diff options
author | kali <kali@leap.se> | 2012-09-13 04:55:21 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-09-13 04:55:21 +0900 |
commit | 3c26d5b5427e788aebfa174de3f0689bb1e146d2 (patch) | |
tree | 607950eeaa5114892171db6a72ae60d4dfcfe610 /src/leap/baseapp | |
parent | ea13e9a04786fbb6c461690097361e48e8ca94ce (diff) |
display about and aboutqt dialogs
Diffstat (limited to 'src/leap/baseapp')
-rw-r--r-- | src/leap/baseapp/systray.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/leap/baseapp/systray.py b/src/leap/baseapp/systray.py index c696ee74..762dac13 100644 --- a/src/leap/baseapp/systray.py +++ b/src/leap/baseapp/systray.py @@ -1,6 +1,7 @@ from PyQt4 import QtCore from PyQt4 import QtGui +from leap import __version__ as VERSION from leap.gui import mainwindow_rc @@ -82,6 +83,9 @@ class StatusAwareTrayIconMixin(object): self.trayIconMenu.addAction(self.maximizeAction) self.trayIconMenu.addAction(self.restoreAction) self.trayIconMenu.addSeparator() + self.trayIconMenu.addAction(self.aboutAct) + self.trayIconMenu.addAction(self.aboutQtAct) + self.trayIconMenu.addSeparator() self.trayIconMenu.addAction(self.quitAction) self.trayIcon = QtGui.QSystemTrayIcon(self) @@ -104,9 +108,19 @@ class StatusAwareTrayIconMixin(object): triggered=self.showMaximized) self.restoreAction = QtGui.QAction("&Restore", self, triggered=self.showNormal) + self.aboutAct = QtGui.QAction("&About", self, + triggered=self.about) + self.aboutQtAct = QtGui.QAction("About Q&t", self, + triggered=QtGui.qApp.aboutQt) self.quitAction = QtGui.QAction("&Quit", self, triggered=self.cleanupAndQuit) + def about(self): + # move to widget + QtGui.QMessageBox.about(self, "About", + "Running LEAP client<br>" + "version <b>%s</b>" % VERSION) + def setConnWidget(self, icon_name): oldlayout = self.statusIconBox.layout() |