diff --git a/modules/gui/pymod/init_menubar.py b/modules/gui/pymod/init_menubar.py index b3df099d56df2d80f6ce875c8649b88d1a801081..574e7b21925b17a3c20e700f2baef33acbd7d937 100644 --- a/modules/gui/pymod/init_menubar.py +++ b/modules/gui/pymod/init_menubar.py @@ -26,8 +26,8 @@ import ost from PyQt4 import QtCore, QtGui from ost.gui import FileLoader from ost.gui.scene.file_loader import GenericLoader - from ost.gui.scene.loader_manager_widget import LoaderManagerWidget +from ost.gui.init_splash import _InitSplash class InitMenuBar(QtCore.QObject): def __init__(self, menu_bar=None): @@ -50,6 +50,12 @@ class InitMenuBar(QtCore.QObject): webpage.setShortcut('Ctrl+D') self.connect(webpage, QtCore.SIGNAL('triggered()'), self.OpenDocs) help.addAction(webpage) + about = QtGui.QAction('&About', self) + about.setStatusTip('About') + about.setShortcut('Ctrl+A') + self.connect(about, QtCore.SIGNAL('triggered()'), self.About) + help.addAction(about) + window.addMenu(persp.panels.menu) gl_win = QtGui.QAction('&GL Window', self) @@ -83,6 +89,9 @@ class InitMenuBar(QtCore.QObject): def OpenDocs(self): QtGui.QDesktopServices.openUrl(QtCore.QUrl("http://www.openstructure.org/docs/index.html")) + def About(self): + _InitSplash() + def ShowGLWin(self): gosty=gui.GostyApp.Instance() gl_win=gosty.GetGLWin() diff --git a/modules/gui/pymod/init_splash.py b/modules/gui/pymod/init_splash.py index d2f4cf8f8c80a1117dd623f7e5a5530941027b9e..2941c858dad3e71329ee5b395518109d8a6c4780 100644 --- a/modules/gui/pymod/init_splash.py +++ b/modules/gui/pymod/init_splash.py @@ -20,10 +20,8 @@ class SplashDialog(QtGui.QDialog): self.label.setHtml("Welcome to <b>Openstructure</b>!<br /><br />You are running version 1.0.0a<br /><br />If you are new to OpenStructure, we invite you to run the demos from the examples directory. Scripts can be displayed by right clicking on the file and selecting 'Show source'.<br /><br />Feel free visit our website at:<br /> http://www.openstructure.org") layout.addWidget(self.label) -def _InitSplash(app): - splash = SplashDialog(app.perspective.main_area.qobject) - #print dir(splash) - +def _InitSplash(): + splash = SplashDialog(gui.GostyApp.Instance().perspective.main_area.qobject) splash.showNormal() #QtCore.QTimer.singleShot(30000, splash.close); diff --git a/scripts/init.py b/scripts/init.py index b5f87d0b15d4e754011ca0db7c7a9a84288bb981..4c9d779a90f17104e3327d4f8a7e806681e6ec74 100644 --- a/scripts/init.py +++ b/scripts/init.py @@ -54,7 +54,7 @@ def _InitFrontEnd(): main_area=app.perspective.main_area _InitMenuBar(app) if not _InitPanels(app): - _InitSplash(app) + _InitSplash() _InitSpaceNav(app) _InitContextMenu(app) main_area.AddPersistentWidget("3D Scene", "gl_win" , app.gl_win, int(QtCore.Qt.WindowMaximized))