summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/config/leapsettings.py2
-rw-r--r--src/leap/bitmask/gui/preferences_email_page.py19
-rw-r--r--src/leap/bitmask/gui/ui/preferences_email_page.ui30
3 files changed, 48 insertions, 3 deletions
diff --git a/src/leap/bitmask/config/leapsettings.py b/src/leap/bitmask/config/leapsettings.py
index 01900484..075be8a7 100644
--- a/src/leap/bitmask/config/leapsettings.py
+++ b/src/leap/bitmask/config/leapsettings.py
@@ -360,4 +360,4 @@ class LeapSettings(object):
def set_pixelmail_enabled(self, enabled):
leap_assert_type(enabled, bool)
- self._settings.setvalue(self.PIXELMAIL_KEY, enabled)
+ self._settings.setValue(self.PIXELMAIL_KEY, enabled)
diff --git a/src/leap/bitmask/gui/preferences_email_page.py b/src/leap/bitmask/gui/preferences_email_page.py
index 8211aeb8..b8633f07 100644
--- a/src/leap/bitmask/gui/preferences_email_page.py
+++ b/src/leap/bitmask/gui/preferences_email_page.py
@@ -18,11 +18,14 @@ Widget for "email" preferences
"""
from PySide import QtCore, QtGui
+from leap.bitmask.config.leapsettings import LeapSettings
from leap.bitmask.logs.utils import get_logger
from leap.bitmask.gui.ui_preferences_email_page import Ui_PreferencesEmailPage
from leap.bitmask.gui.preferences_page import PreferencesPage
+from leap.bitmask.pix import HAS_PIXELATED
from leap.mail.imap.service.imap import IMAP_PORT
+
logger = get_logger()
@@ -40,6 +43,7 @@ class PreferencesEmailPage(PreferencesPage):
:type app: App
"""
PreferencesPage.__init__(self, parent, account, app)
+ self.settings = LeapSettings()
self.ui = Ui_PreferencesEmailPage()
self.ui.setupUi(self)
@@ -65,6 +69,16 @@ class PreferencesEmailPage(PreferencesPage):
"Alternatively, you can manually configure your mail client to "
"use Bitmask Email with these options:"))
+ self.ui.webmail_label.setText(self.tr(
+ "This distribution of Bitmask ships an experimental integration "
+ "of the <a href='https://pixelated-project.org/'>Pixelated "
+ "Webmail</a>. It is not stable yet, but you can enable it to help "
+ "beta-testing it. (Needs restart!)"))
+ webmail_enabled = self.settings.get_pixelmail_enabled()
+ self.ui.webmail_checkbox.setChecked(webmail_enabled)
+ if not HAS_PIXELATED:
+ self.ui.webmail_box.setVisible(False)
+
self.ui.keys_table.horizontalHeader().setResizeMode(
0, QtGui.QHeaderView.Stretch)
@@ -81,6 +95,7 @@ class PreferencesEmailPage(PreferencesPage):
self._keymanager_export_error)
self.ui.import_button.clicked.connect(self._import_keys)
self.ui.export_button.clicked.connect(self._export_keys)
+ self.ui.webmail_checkbox.stateChanged.connect(self._toggle_webmail)
def teardown_connections(self):
"""
@@ -205,3 +220,7 @@ class PreferencesEmailPage(PreferencesPage):
row, 0, QtGui.QTableWidgetItem(key.address))
self.ui.keys_table.setItem(
row, 1, QtGui.QTableWidgetItem(key.fingerprint))
+
+ def _toggle_webmail(self, state):
+ value = True if state == QtCore.Qt.Checked else False
+ self.settings.set_pixelmail_enabled(value)
diff --git a/src/leap/bitmask/gui/ui/preferences_email_page.ui b/src/leap/bitmask/gui/ui/preferences_email_page.ui
index 5f83426b..22d690d9 100644
--- a/src/leap/bitmask/gui/ui/preferences_email_page.ui
+++ b/src/leap/bitmask/gui/ui/preferences_email_page.ui
@@ -23,7 +23,7 @@
<item>
<widget class="QTabWidget" name="email_tabs">
<property name="currentIndex">
- <number>2</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="config_tab">
<property name="accessibleName">
@@ -35,7 +35,7 @@
<attribute name="title">
<string>Tab 1</string>
</attribute>
- <layout class="QVBoxLayout" name="verticalLayout_4">
+ <layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QGroupBox" name="thunderbird_box">
<property name="title">
@@ -333,6 +333,32 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="webmail_box">
+ <property name="title">
+ <string>Webmail Configuration</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <widget class="QCheckBox" name="webmail_checkbox">
+ <property name="text">
+ <string>Enable Bitmask Webmail (beta)</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="webmail_label">
+ <property name="text">
+ <string>webmail info</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>