From 4e5c8b32a7fde365a7535cf440d24ae8853140d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Mon, 12 Aug 2013 15:59:48 -0300 Subject: Do not start IMAP if MX is not enabled --- src/leap/bitmask/gui/mainwindow.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'src/leap/bitmask/gui') diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 6dd28f04..aa4baf56 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -1053,11 +1053,26 @@ class MainWindow(QtGui.QMainWindow): TRIGGERS: soledad_ready """ - logger.debug('Starting imap service') + if self._provider_config.provides_mx() and \ + self._enabled_services.count(self.MX_SERVICE) > 0: + logger.debug('Starting imap service') + + self._imap_service = imap.start_imap_service( + self._soledad, + self._keymanager) + else: + if self._enabled_services.count(self.MX_SERVICE) > 0: + pass # TODO: show MX status + #self._status_panel.set_eip_status( + # self.tr("%s does not support MX") % + # (self._provider_config.get_domain(),), + # error=True) + else: + pass # TODO: show MX status + #self._status_panel.set_eip_status( + # self.tr("MX is disabled")) + - self._imap_service = imap.start_imap_service( - self._soledad, - self._keymanager) def _get_socket_host(self): """ -- cgit v1.2.3