/[thuban]/branches/WIP-pyshapelib-bramz/Extensions/profiling/profiling.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Extensions/profiling/profiling.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1915 by bh, Mon Nov 3 14:19:40 2003 UTC revision 2357 by jan, Tue Sep 28 19:54:50 2004 UTC
# Line 32  from wxPython.lib.dialogs import wxScrol Line 32  from wxPython.lib.dialogs import wxScrol
32    
33  from Thuban import _  from Thuban import _
34  from Thuban.UI.command import registry, Command  from Thuban.UI.command import registry, Command
35  import Thuban.UI.mainwindow  from Thuban.UI.mainwindow import main_menu
36    from Thuban.UI.extensionregistry import ExtensionDesc, ext_registry
37    
38    ext_registry.add(ExtensionDesc(
39        name = 'profiling',
40        version = '1.0.0',
41        authors= [ 'Bernhard Herzog' ],
42        copyright = '2003 Intevation GmbH',
43        desc = _("Provide a profiler and a timer\n"
44                 "for screen rendering.")))
45    
46  #  #
47  # Customization  # Customization
# Line 139  registry.Add(Command("time_screen_render Line 148  registry.Add(Command("time_screen_render
148                       time_screen_renderer,                       time_screen_renderer,
149                       helptext = _('Time the screen render')))                       helptext = _('Time the screen render')))
150    
   
151  # find the extensions menu (create it anew if not found)  # find the extensions menu (create it anew if not found)
152  main_menu = Thuban.UI.mainwindow.main_menu  extensions_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions'))
 extensions_menu = main_menu.find_menu('extensions')  
 if extensions_menu is None:  
     extensions_menu = main_menu.InsertMenu('extensions', _('E&xtensions'))  
153    
154  profiler_menu = extensions_menu.InsertMenu("profiler", _('&Profiler'))  profiler_menu = extensions_menu.InsertMenu("profiler", _('&Profiler'))
155  profiler_menu.InsertItem("time_screen_renderer")  profiler_menu.InsertItem("time_screen_renderer")

Legend:
Removed from v.1915  
changed lines
  Added in v.2357

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26