summaryrefslogtreecommitdiff
path: root/src/leap/baseapp
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-09-20 03:57:05 +0900
committerkali <kali@leap.se>2012-09-20 03:57:05 +0900
commitcbd474e49e12e5fc0677dafe331b9c5ab3a2539a (patch)
treebd758d48564294a7d80509bcc77c9dfcbd511b1d /src/leap/baseapp
parentdb704eecf513fcc48365844523557d6edab28293 (diff)
start hidden, and toggle details window from menu
Diffstat (limited to 'src/leap/baseapp')
-rw-r--r--src/leap/baseapp/eip.py2
-rw-r--r--src/leap/baseapp/systray.py24
2 files changed, 16 insertions, 10 deletions
diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py
index 6c147cb4..6d6b79cb 100644
--- a/src/leap/baseapp/eip.py
+++ b/src/leap/baseapp/eip.py
@@ -152,7 +152,7 @@ class EIPConductorAppMixin(object):
# from openvpn manager)
if not self.eip_service_started:
- # there is a race condition
+ # there is a race condition
# going on here. Depending on how long we take
# to init the qt app, the management socket
# is not ready yet.
diff --git a/src/leap/baseapp/systray.py b/src/leap/baseapp/systray.py
index dd872de0..f98bfa76 100644
--- a/src/leap/baseapp/systray.py
+++ b/src/leap/baseapp/systray.py
@@ -3,6 +3,7 @@ import logging
from PyQt4 import QtCore
from PyQt4 import QtGui
+from leap import __branding as BRANDING
from leap import __version__ as VERSION
from leap.gui import mainwindow_rc
@@ -138,18 +139,23 @@ class StatusAwareTrayIconMixin(object):
triggered=self.cleanupAndQuit)
def detailsWin(self):
- logger.debug('details win toggle')
- # XXX toggle main window visibility
- # if visible: self.hide
- # if hidden: self.show
+ visible = self.isVisible()
+ if visible:
+ self.hide()
+ else:
+ self.show()
def about(self):
# move to widget
- QtGui.QMessageBox.about(self, "About",
- "LEAP client<br>"
- "(version <b>%s</b>)<br>"
- "<a href='https://leap.se/'>"
- "https://leap.se</a>" % VERSION)
+ flavor = BRANDING.get('short_name', None)
+ content = ("LEAP client<br>"
+ "(version <b>%s</b>)<br>" % VERSION)
+ if flavor:
+ content = content + ('<br>Flavor: <i>%s</i><br>' % flavor)
+ content = content + (
+ "<br><a href='https://leap.se/'>"
+ "https://leap.se</a>")
+ QtGui.QMessageBox.about(self, "About", content)
def setConnWidget(self, icon_name):
oldlayout = self.statusIconBox.layout()