jan: thuban/Extensions/profiling profiling.py,1.3,1.4

cvs@intevation.de cvs at intevation.de
Wed May 12 00:34:51 CEST 2004


Author: jan

Update of /thubanrepository/thuban/Extensions/profiling
In directory doto:/tmp/cvs-serv30058/profiling

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


Index: profiling.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/profiling/profiling.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- profiling.py	3 Nov 2003 14:19:40 -0000	1.3
+++ profiling.py	11 May 2004 22:34:49 -0000	1.4
@@ -32,7 +32,7 @@
 
 from Thuban import _
 from Thuban.UI.command import registry, Command
-import Thuban.UI.mainwindow
+from Thuban.UI.mainwindow import main_menu
 
 #
 # Customization
@@ -139,12 +139,8 @@
                      time_screen_renderer,
                      helptext = _('Time the screen render')))
 
-
 # find the extensions menu (create it anew if not found)
-main_menu = Thuban.UI.mainwindow.main_menu
-extensions_menu = main_menu.find_menu('extensions')
-if extensions_menu is None:
-    extensions_menu = main_menu.InsertMenu('extensions', _('E&xtensions'))
+extensions_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions'))
 
 profiler_menu = extensions_menu.InsertMenu("profiler", _('&Profiler'))
 profiler_menu.InsertItem("time_screen_renderer")





More information about the Thuban-devel mailing list

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