summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-05-11 15:03:23 -0700
committerelijah <elijah@riseup.net>2016-05-11 17:24:01 -0700
commitc7f9bbcc8fe075750e4041c5a7f00c8767dd38b5 (patch)
tree699089d3682f1aef3c336a4058f4b1db63c2fbf4 /src/leap
parente7439f48b4279dcda0dc966903840a2affee3353 (diff)
[feat] Make help menu item open bitmask.net/help directly
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py50
1 files changed, 3 insertions, 47 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index daf49eb6..25ee4f3d 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -1054,53 +1054,9 @@ class MainWindow(QtGui.QMainWindow, SignalTracker):
TRIGGERS:
self.ui.action_help.triggered
- Display the Bitmask help dialog.
- """
- # TODO: don't hardcode!
- smtp_port = 2013
-
- help_url = "<p><a href='https://{0}'>{0}</a></p>".format(
- self.tr("bitmask.net/help"))
-
- lang = QtCore.QLocale.system().name().replace('_', '-')
- thunderbird_extension_url = \
- "https://addons.mozilla.org/{0}/" \
- "thunderbird/addon/bitmask/".format(lang)
-
- email_quick_reference = self.tr("Email quick reference")
- thunderbird_text = self.tr(
- "For Thunderbird, you can use the "
- "Bitmask extension. Search for \"Bitmask\" in the add-on "
- "manager or download it from <a href='{0}'>"
- "addons.mozilla.org</a>.".format(thunderbird_extension_url))
- manual_text = self.tr(
- "Alternatively, you can manually configure "
- "your mail client to use Bitmask Email with these options:")
- manual_imap = self.tr("IMAP: localhost, port {0}".format(IMAP_PORT))
- manual_smtp = self.tr("SMTP: localhost, port {0}".format(smtp_port))
- manual_username = self.tr("Username: your full email address")
-
- # FIXME on i3, this doens't allow to mouse-select.
- # Switch to a dialog in which we can set the QLabel
- mail_auth_token = (
- self.app.service_tokens.get('mail_auth', None) or
- "??? (log in to unlock)")
- mail_password = self.tr("IMAP/SMTP Password:") + " %s" % (
- mail_auth_token,)
-
- msg = help_url + self.tr(
- "<p><strong>{0}</strong></p>"
- "<p>{1}</p>"
- "<p>{2}"
- "<ul>"
- "<li>&nbsp;{3}</li>"
- "<li>&nbsp;{4}</li>"
- "<li>&nbsp;{5}</li>"
- "<li>&nbsp;{6}</li>"
- "</ul></p>").format(email_quick_reference, thunderbird_text,
- manual_text, manual_imap, manual_smtp,
- manual_username, mail_password)
- QtGui.QMessageBox.about(self, self.tr("Bitmask Help"), msg)
+ Open bitmask.net/help
+ """
+ QtGui.QDesktopServices.openUrl("https://bitmask.net/help")
def _needs_update(self):
"""