jan: thuban/Extensions/drawshape drawshape.py,1.1,1.2

cvs@intevation.de cvs at intevation.de
Sun May 16 11:30:37 CEST 2004


Author: jan

Update of /thubanrepository/thuban/Extensions/drawshape
In directory doto:/tmp/cvs-serv15996

Modified Files:
	drawshape.py 
Log Message:
Add the command to the experimental menu additionally to the toolbar.


Index: drawshape.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/drawshape/drawshape.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- drawshape.py	25 Nov 2003 14:05:35 -0000	1.1
+++ drawshape.py	16 May 2004 09:30:34 -0000	1.2
@@ -23,11 +23,13 @@
 from wxPython.wx import *
 
 import shapelib
+import Thuban
+from Thuban import _
 from Thuban.Model.data import SHAPETYPE_POLYGON
 from Thuban.Model.table import FIELDTYPE_INT, FIELDTYPE_STRING, \
      FIELDTYPE_DOUBLE
 from Thuban.UI.command import registry, ToolCommand
-import Thuban.UI.mainwindow
+from Thuban.UI.mainwindow import main_menu, main_toolbar
 from Thuban.UI.viewport import Tool
 
 
@@ -142,5 +144,12 @@
                          checked = check_shape_draw_tool))
 
 # Add the command to the toolbar
-Thuban.UI.mainwindow.main_toolbar.InsertSeparator()
-Thuban.UI.mainwindow.main_toolbar.InsertItem("shape_draw_tool")
+main_toolbar.InsertSeparator()
+main_toolbar.InsertItem("shape_draw_tool")
+
+# find the experimental menu (create it anew if not found)
+experimental_menu = main_menu.FindOrInsertMenu('experimental',
+                                               _('Experimenta&l'))
+
+# finally add the new command to the experimental menu
+experimental_menu.InsertItem('shape_draw_tool')





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)