diff options
Diffstat (limited to 'src/leap/app.py')
-rw-r--r-- | src/leap/app.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/leap/app.py b/src/leap/app.py index 52ebcaea..341f6a6e 100644 --- a/src/leap/app.py +++ b/src/leap/app.py @@ -3,6 +3,7 @@ import logging # This is only needed for Python v2 but is harmless for Python v3. import sip sip.setapi('QVariant', 2) +sip.setapi('QString', 2) from PyQt4.QtGui import (QApplication, QSystemTrayIcon, QMessageBox) from leap import __version__ as VERSION @@ -50,6 +51,14 @@ def main(): logger.info('Starting app') app = QApplication(sys.argv) + # needed for initializing qsettings + # it will write .config/leap/leap.conf + # top level app settings + # in a platform independent way + app.setOrganizationName("leap") + app.setApplicationName("leap") + app.setOrganizationDomain("leap.se") + if not QSystemTrayIcon.isSystemTrayAvailable(): QMessageBox.critical(None, "Systray", "I couldn't detect" @@ -60,6 +69,10 @@ def main(): window = LeapWindow(opts) if debug: + # we only show the main window + # if debug mode active. + # if not, it will be set visible + # from the systray menu. window.show() sys.exit(app.exec_()) |