summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/leap/app.py3
-rw-r--r--src/leap/baseapp/eip.py2
-rw-r--r--src/leap/baseapp/systray.py24
3 files changed, 18 insertions, 11 deletions
diff --git a/src/leap/app.py b/src/leap/app.py
index c0d83042..fe88a002 100644
--- a/src/leap/app.py
+++ b/src/leap/app.py
@@ -60,7 +60,8 @@ def main():
QApplication.setQuitOnLastWindowClosed(False)
window = LeapWindow(opts)
- window.show()
+ if debug:
+ window.show()
sys.exit(app.exec_())
if __name__ == "__main__":
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()