summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend/leapbackend.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-07-11 17:24:20 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-07-14 12:56:55 -0300
commit0aee7d6cbc3f2c0b764056966eeddc4057eafd08 (patch)
tree2b9d50cc39a0debc2b581b1e035e81f4f8b67b1e /src/leap/bitmask/backend/leapbackend.py
parent525433088d6fbe3392af90942272dfd5dd2511d6 (diff)
Use specific settings for backend.
This way we get rid of Qt on the backend side. The use of QSettings in the backend was breaking the app on OSX.
Diffstat (limited to 'src/leap/bitmask/backend/leapbackend.py')
-rw-r--r--src/leap/bitmask/backend/leapbackend.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/leap/bitmask/backend/leapbackend.py b/src/leap/bitmask/backend/leapbackend.py
index 3bc7a513..d3c4fcda 100644
--- a/src/leap/bitmask/backend/leapbackend.py
+++ b/src/leap/bitmask/backend/leapbackend.py
@@ -24,6 +24,7 @@ import zope.proxy
from leap.bitmask.backend import components
from leap.bitmask.backend.backend import Backend
+from leap.bitmask.backend.settings import Settings
logger = logging.getLogger(__name__)
@@ -41,6 +42,8 @@ class LeapBackend(Backend):
"""
Backend.__init__(self)
+ self._settings = Settings()
+
# Objects needed by several components, so we make a proxy and pass
# them around
self._soledad_proxy = zope.proxy.ProxyBase(None)
@@ -515,3 +518,14 @@ class LeapBackend(Backend):
imap_stopped
"""
self._mail.stop_imap_service()
+
+ def settings_set_selected_gateway(self, provider, gateway):
+ """
+ Set the selected gateway for a given provider.
+
+ :param provider: provider domain
+ :type provider: str
+ :param gateway: gateway to use as default
+ :type gateway: str
+ """
+ self._settings.set_selected_gateway(provider, gateway)