summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-01-14 13:59:14 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-01-14 14:02:44 -0300
commit9bfaaded5adf66a129fb35c2e561a4e435a9179d (patch)
treec4ee8d1f3a113adedc8e5cd318de02bc626b64af
parent60ff19439ffc850dd83974b1d7574056e0b8d298 (diff)
Add dialog with instructions to configure mail.
[Closes #4530]
-rw-r--r--changes/feature-4530_add-in-app-help-for-mail1
-rw-r--r--src/leap/bitmask/gui/mainwindow.py30
2 files changed, 31 insertions, 0 deletions
diff --git a/changes/feature-4530_add-in-app-help-for-mail b/changes/feature-4530_add-in-app-help-for-mail
new file mode 100644
index 00000000..9d7f3316
--- /dev/null
+++ b/changes/feature-4530_add-in-app-help-for-mail
@@ -0,0 +1 @@
+- Add in-app indication of how to connect to local imap and smtp. Closes #4530.
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index ddaa085c..3f41900b 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -81,6 +81,8 @@ from leap.common.check import leap_assert
from leap.common.events import register
from leap.common.events import events_pb2 as proto
+from leap.mail.imap.service.imap import IMAP_PORT
+
from ui_mainwindow import Ui_MainWindow
logger = logging.getLogger(__name__)
@@ -259,6 +261,7 @@ class MainWindow(QtGui.QMainWindow):
self.ui.action_quit.triggered.connect(self.quit)
self.ui.action_wizard.triggered.connect(self._launch_wizard)
self.ui.action_show_logs.triggered.connect(self._show_logger_window)
+ self.ui.action_help.triggered.connect(self._help)
self.ui.action_create_new_account.triggered.connect(
self._launch_wizard)
@@ -872,6 +875,33 @@ class MainWindow(QtGui.QMainWindow):
"<a href='https://leap.se'>More about LEAP"
"</a>") % (VERSION, VERSION_HASH[:10], greet))
+ def _help(self):
+ """
+ SLOT
+ TRIGGERS: self.ui.action_help.triggered
+
+ Display the Bitmask help dialog.
+ """
+ # TODO: don't hardcode!
+ smtp_port = 2013
+
+ url = ("<a href='https://addons.mozilla.org/es/thunderbird/"
+ "addon/bitmask/'>bitmask addon</a>")
+
+ msg = (
+ "<strong>Instructions to use mail:</strong><br>"
+ "If you use Thunderbird you can use the Bitmask extension helper. "
+ "Search for 'Bitmask' in the add-on manager or download it "
+ "from: {0}.<br><br>"
+ "You can configure bitmask manually with this options:<br>"
+ "<em>"
+ " Incoming -> IMAP, port: {1}<br>"
+ " Outgoing -> SMTP, port: {2}<br>"
+ " Username -> your bitmask username.<br>"
+ " Password -> leave it empty."
+ "</em>").format(url, IMAP_PORT, smtp_port)
+ QtGui.QMessageBox.about(self, self.tr("Bitmask Help"), msg)
+
def _needs_update(self):
"""
Display a warning dialog to inform the user that the app needs update.