summaryrefslogtreecommitdiff
path: root/chrome/content/statusBar/statusBarOverlay.js
diff options
context:
space:
mode:
authordb <drebs@riseup.net>2015-01-06 17:00:19 -0200
committerdb <drebs@riseup.net>2015-01-06 17:08:47 -0200
commitb37aaf3f4677fe62ef5948460898abbf6a1ded71 (patch)
treea4222bc6c09cc54f947e86365581ab394eb2c598 /chrome/content/statusBar/statusBarOverlay.js
parent4f931e73a5154242ed0f9e51cff63cddd73756c0 (diff)
Remove the status bar overlay (#6613).
Initially, the status bar overlay was used for three purposes: indicate whether there was a bitmask account configured, as an entry point to the bitmask account wizard (by clicking on it), and as a watchdog that would popup the bitmask account wizard everytime thunderbird started, if there was no account configured. We don't want any of these features, so this commit completelly removes the status bar overlay. The issue indicated above (#6613) has to do with removal of the last of these features (i.e. automated wizard popup).
Diffstat (limited to 'chrome/content/statusBar/statusBarOverlay.js')
-rw-r--r--chrome/content/statusBar/statusBarOverlay.js112
1 files changed, 0 insertions, 112 deletions
diff --git a/chrome/content/statusBar/statusBarOverlay.js b/chrome/content/statusBar/statusBarOverlay.js
deleted file mode 100644
index fbe91bb..0000000
--- a/chrome/content/statusBar/statusBarOverlay.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * statusBar.js
- * Copyright (C) 2013 LEAP
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along
- */
-
-
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-var accountNotConfigured = getStringBundle(
- "chrome://bitmask/locale/statusBar.properties")
- .GetStringFromName("account_not_configured");
-var accountConfigured = getStringBundle(
- "chrome://bitmask/locale/statusBar.properties")
- .GetStringFromName("account_configured");
-
-
-/*****************************************************************************
- * Schedule initialization and update functions.
- ****************************************************************************/
-
-// run startUp() once when window loads
-window.addEventListener("load", function(e) {
- starUp();
-}, false);
-
-/**
- * We don't want a message with the bitmask account status in the status bar
- * for now (see https://leap.se/code/issues/4871).
- */
-// run updatePanel() periodically
-//window.setInterval(
-// function() {
-// updatePanel();
-// }, 10000); // update every ten seconds
-
-
-/*****************************************************************************
- * GUI maintenance functions.
- ****************************************************************************/
-
-function starUp() {
- // TODO: uncomment when we want messages in the status bar again.
- //updatePanel();
- if (!isBitmaskAccountConfigured()) {
- launchAccountWizard();
- } else {
- var server = getBitmaskServer();
- // TODO: add an alert that there exists a bitmask account with caching
- // enabled.
- //if (server.offlineDownload == true)
- // alertPrompt('WARNING!');
- }
-}
-
-/**
- * Update the status bar panel with information about bitmask accounts.
- */
-function updatePanel() {
- var statusBarPanel = document.getElementById("bitmask-status-bar");
- if (isBitmaskAccountConfigured())
- statusBarPanel.label = accountConfigured;
- else
- statusBarPanel.label = accountNotConfigured;
-}
-
-/**
- * Handle a click on the status bar panel. For now, just launch the new
- * account wizard if there's no account configured.
- */
-function handleStatusBarClick() {
- if (!isBitmaskAccountConfigured())
- launchAccountWizard();
-}
-
-
-/*****************************************************************************
- * Account management functions
- ****************************************************************************/
-
-/**
- * Return true if there exists an account with incoming server hostname equal
- * to IMAP_HOST and port equal to IMAP_PORT.
- *
- * TODO: also verify for SMTP configuration?
- */
-function isBitmaskAccountConfigured() {
- return !!getBitmaskServer();
-}
-
-/**
- * Get a configured bitmask account
- */
-function getBitmaskServer() {
- var accountManager = Cc["@mozilla.org/messenger/account-manager;1"]
- .getService(Ci.nsIMsgAccountManager);
- return accountManager.findRealServer(
- "", IMAP_HOST, "imap", IMAP_PORT);
-}