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 |
|
|
37 |
# |
# |
38 |
# Customization |
# Customization |
139 |
time_screen_renderer, |
time_screen_renderer, |
140 |
helptext = _('Time the screen render'))) |
helptext = _('Time the screen render'))) |
141 |
|
|
|
|
|
142 |
# find the extensions menu (create it anew if not found) |
# find the extensions menu (create it anew if not found) |
143 |
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')) |
|
144 |
|
|
145 |
profiler_menu = extensions_menu.InsertMenu("profiler", _('&Profiler')) |
profiler_menu = extensions_menu.InsertMenu("profiler", _('&Profiler')) |
146 |
profiler_menu.InsertItem("time_screen_renderer") |
profiler_menu.InsertItem("time_screen_renderer") |