jan: thuban/Extensions/svgexport svgsaver.py,1.1,1.2

cvs@intevation.de cvs at intevation.de
Sun May 16 11:33:06 CEST 2004


Author: jan

Update of /thubanrepository/thuban/Extensions/svgexport
In directory doto:/tmp/cvs-serv16087

Modified Files:
	svgsaver.py 
Log Message:
Use FindOrInsertMenu() instead of finding menu on its own.


Index: svgsaver.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/svgexport/svgsaver.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- svgsaver.py	19 Feb 2004 13:38:27 -0000	1.1
+++ svgsaver.py	16 May 2004 09:33:04 -0000	1.2
@@ -83,14 +83,12 @@
 # See Thuban/UI/menu.py for the API of the Menu class
 from Thuban.UI.mainwindow import main_menu
 
-# find the extensions menu (create it anew if not found)
-extensions_menu = main_menu.find_menu('extensions')
-if extensions_menu is None:
-    extensions_menu = main_menu.InsertMenu('extensions', _('E&xtensions'))
-    
 # create a new command and register it
 registry.Add(Command('write_to_svg', _('Write SVG Map'), write_to_svg,
                      helptext = _('Export the a map into a SVG file')))
+
+# find the extensions menu (create it anew if not found)
+extensions_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions'))
 
 # finally bind the new command with an entry in the extensions menu
 extensions_menu.InsertItem('write_to_svg')





More information about the Thuban-devel mailing list

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