mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-06 03:20:43 +02:00
41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
--- dff/ui/gui/mainwindow.py.orig 2011-03-22 13:18:45.000000000 +0800
|
|
+++ dff/ui/gui/mainwindow.py 2011-03-22 13:19:49.000000000 +0800
|
|
@@ -49,8 +49,11 @@
|
|
from ui.gui.resources.ui_mainwindow import Ui_MainWindow
|
|
|
|
# Documentation
|
|
-from ui.gui.widget.help import Help
|
|
-
|
|
+HELP = True
|
|
+try:
|
|
+ from ui.gui.widget.help import Help
|
|
+except ImportError:
|
|
+ HELP = False
|
|
|
|
class MainWindow(QMainWindow, Ui_MainWindow):
|
|
def __init__(self, app, debug = False):
|
|
@@ -97,8 +100,9 @@
|
|
self.connect(self.actionNodeBrowser, SIGNAL("triggered()"), self.addNodeBrowser)
|
|
self.connect(self.actionShell, SIGNAL("triggered()"), self.shellActions.create)
|
|
self.connect(self.actionPython_interpreter, SIGNAL("triggered()"), self.interpreterActions.create) ## About menu
|
|
- self.connect(self.actionHelp, SIGNAL("triggered()"), self.addHelpWidget)
|
|
self.connect(self.actionAbout, SIGNAL("triggered()"), self.dialog.about)
|
|
+ if HELP:
|
|
+ self.connect(self.actionHelp, SIGNAL("triggered()"), self.addHelpWidget)
|
|
|
|
# list used to build toolbar
|
|
# None will be a separator
|
|
@@ -109,11 +113,12 @@
|
|
self.actionShell,
|
|
self.actionPython_interpreter,
|
|
self.actionIdeOpen,
|
|
- self.actionHelp,
|
|
None,
|
|
self.actionMaximize,
|
|
self.actionFullscreen_mode,
|
|
]
|
|
+ if HELP:
|
|
+ self.toolbarList = [self.actionHelp]
|
|
|
|
# Set up toolbar
|
|
self.setupToolBar()
|