summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/gui/mainwindow.py18
-rw-r--r--src/leap/platform_init/__init__.py28
2 files changed, 43 insertions, 3 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 0d59e24b..d9e8e3f6 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -34,6 +34,7 @@ from leap.gui.wizard import Wizard
from leap.services.eip.eipbootstrapper import EIPBootstrapper
from leap.services.eip.eipconfig import EIPConfig
from leap.services.eip.providerbootstrapper import ProviderBootstrapper
+from leap.platform_init import IS_MAC
from leap.platform_init.initializers import init_platform
from leap.services.eip.vpn import VPN
from leap.services.eip.vpnlaunchers import (VPNLauncherException,
@@ -81,9 +82,20 @@ class MainWindow(QtGui.QMainWindow):
callback=self._new_updates_available)
self._updates_content = ""
- self.CONNECTING_ICON = QtGui.QPixmap(":/images/conn_connecting.png")
- self.CONNECTED_ICON = QtGui.QPixmap(":/images/conn_connected.png")
- self.ERROR_ICON = QtGui.QPixmap(":/images/conn_error.png")
+ if IS_MAC:
+ EIP_ICONS = (
+ ":/images/conn_connecting-light.png"
+ ":/images/conn_connected-light.png",
+ ":/images/conn_error-light.png")
+ else:
+ EIP_ICONS = (
+ ":/images/conn_connecting.png"
+ ":/images/conn_connected.png",
+ ":/images/conn_error.png")
+
+ self.CONNECTING_ICON = QtGui.QPixmap(EIP_ICONS[0])
+ self.CONNECTED_ICON = QtGui.QPixmap(EIP_ICONS[1])
+ self.ERROR_ICON = QtGui.QPixmap(EIP_ICONS[2])
self.LOGGED_OUT_ICON = QtGui.QPixmap(":/images/leap-gray-big.png")
self.LOGGED_IN_ICON = QtGui.QPixmap(":/images/leap-color-big.png")
diff --git a/src/leap/platform_init/__init__.py b/src/leap/platform_init/__init__.py
index e69de29b..2a262a30 100644
--- a/src/leap/platform_init/__init__.py
+++ b/src/leap/platform_init/__init__.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+# __init__.py
+# Copyright (C) 2013 LEAP
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+System constants
+"""
+import platform
+
+_system = platform.system()
+
+IS_WIN = True if _system == "Windows" else False
+IS_MAC = True if _system == "Darwin" else False
+IS_LINUX = True if _system == "Linux" else False
+IS_UNIX = IS_MAC or IS_LINUX