summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordb <drebs@riseup.net>2015-01-08 15:48:34 -0200
committerdb <drebs@riseup.net>2015-01-08 15:48:34 -0200
commit7c0a703d1509b46d7d5c3a952d48d281667b9577 (patch)
tree4ed02519cd2562f4e32c881ca06f44f6794f1b34
parent06c4facdd0e5eef678622953ddcc850ca7153ebc (diff)
parent60abdca26f5945efbed670a3ae43b73b6114dd55 (diff)
Merge tag '0.0.4' into debian/release-0.0.4
Tag bitmask_thunderbird 0.0.4. Conflicts: Makefile install.rdf.template
-rw-r--r--CHANGELOG15
-rw-r--r--[-rwxr-xr-x]Makefile99
-rw-r--r--README.rst6
-rw-r--r--chrome.manifest1
-rw-r--r--chrome/content/accountWizard/accountWizard.js12
-rw-r--r--chrome/content/accountWizard/accountWizard.xul2
-rw-r--r--chrome/content/accountWizard/launchAccountWizard.js2
-rw-r--r--chrome/content/preventCaching/bitmaskAmOfflineOverlay.js19
-rw-r--r--chrome/content/statusBar/statusBarOverlay.js94
-rw-r--r--chrome/content/statusBar/statusBarOverlay.xul17
-rw-r--r--chrome/locale/en-US/accountWizard.properties3
-rw-r--r--chrome/locale/en-US/statusBar.properties3
-rw-r--r--install.rdf.template38
13 files changed, 100 insertions, 211 deletions
diff --git a/CHANGELOG b/CHANGELOG
index d8e3811..1cc4e04 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,19 @@
-0.0.3 Dez 23:
+0.0.4 Jan 07, 2015:
+ o Do not disable caching checkbox for manual accounts when caching is turned
+ on (#4811).
+ o Remove automatic wizard popup when there's no account configured (#6613).
+ o Remove status bar messages (#4871).
+ o Improve error message when configuring account (#4881).
+
+0.0.3 Dec 23, 2013:
o Remove the password field from the account wizard. Closes #4525.
o Remove misleading encryption information from wizard (#4545).
-0.0.2 Nov 5:
+
+0.0.2 Nov 5, 2013:
o Fix items from Mozilla editors review. Closes #4374.
o Create a Thunderbird extension with a wizard for creating LEAP's Bitmask
client-compliant accounts and with caching prevention. Closes #3542.
+0.0.1 Oct 4, 2013:
+ o Create a Thunderbird extension with a wizard for creating LEAP's Bitmask
+ client-compliant accounts and with caching prevention. Closes #3542.
diff --git a/Makefile b/Makefile
index a11840d..3dcda0e 100755..100644
--- a/Makefile
+++ b/Makefile
@@ -1,66 +1,48 @@
EXTNAME := bitmask-thunderbird
+XPINAME := bitmask.xpi # debian package will use this name
PREFIX := .
FILES_TO_PACKAGE := chrome,chrome.manifest,install.rdf
RSA_FILE := META-INF/zigbert.rsa
# the following variables are updated automatically
COMMIT := $(shell git --no-pager log -1 --format=format:%h)
-VERSION = $(shell head -n1 CHANGELOG | cut -d" " -f1)
+VERSION := $(shell head -n1 CHANGELOG | cut -d" " -f1)
PKGNAME := $(EXTNAME)-$(VERSION)-$(COMMIT).xpi
-# XXX for debian makefile it's simpler to pick a fixed name.
-# XXX we could build it and rename in another goal.
-XPINAME := bitmask.xpi
-TARGET := $(CURDIR)/$(XPINAME)
-#TARGET := $(CURDIR)/build/$(PKGNAME)
+TARGET := $(CURDIR)/build/$(PKGNAME)
TEMPDIR := $(shell mktemp -d -u)
-# make sure CERTDIR and CERTNAME are defined for signing
-USAGE := "Usage: make CERTDIR=<certificate directory> CERTNAME=<certificate name> DEFAULTKEY=<key id>"
-ifeq ($(MAKECMDGOALS),signed)
-ifndef CERTDIR
- $(error $(USAGE))
-endif
-ifndef CERTNAME
- $(error $(USAGE))
-endif
-ifndef DEFAULTKEY
- $(error $(USAGE))
-endif
-endif
+XPI_CONTENTS := $(shell find chrome -name "*.html" -o -name "*.xhtml" -o -name "*.css" -o -name "*.png" -o -name "*.gif" -o -name "*.js" -o -name "*.jsm" -o -name "*.dtd" -o -name "*.xul" -o -name "messages" -o -name "*.properties") chrome.manifest install.rdf COPYING
-# make sure DEFAULTKEY was given to sign the calculated hashes
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),upload)
-ifneq ($(MAKECMDGOALS),bitmask.xpi)
-ifneq ($(MAKECMDGOALS),install.rdf)
-ifndef DEFAULTKEY
-# XXX need to remove signed from default build, debian chokes otherwise
-# $(error "Usage: make DEFAULTKEY=<key id>")
-endif
-endif
-endif
-endif
-endif
-XPI_CONTENTS:=$(shell find chrome -name "*.html" -o -name "*.xhtml" -o -name "*.css" -o -name "*.png" -o -name "*.gif" -o -name "*.js" -o -name "*.jsm" -o -name "*.dtd" -o -name "*.xul" -o -name "messages" -o -name "*.properties") chrome.manifest install.rdf COPYING
+#-----------------------------------------------------------------------------
+# debhelper targets
+#-----------------------------------------------------------------------------
-bitmask.xpi: $(XPI_CONTENTS)
+$(XPINAME): $(XPI_CONTENTS)
zip $@ $(XPI_CONTENTS)
install.rdf: install.rdf.template Changelog
- sed 's/__VERSION__/$(VERSION)/' < $< > $@
+ sed 's/__VERSION__/$(VERSION)/' < $< > $@
xpi_release:
ln -s $(XPINAME) $(PKGNAME)
+debian-package:
+ git buildpackage -us -uc
-# main rule
-#all: clean $(TARGET)
+#-----------------------------------------------------------------------------
+# unsigned XPI file
+#-----------------------------------------------------------------------------
-# main target: .xpi file
+# make sure DEFAULTKEY is defined to sign the calculated hashes
+ifeq ($(MAKECMDGOALS),unsigned)
+ifndef DEFAULTKEY
+ $(error "Usage: make DEFAULTKEY=<key id>")
+endif
+endif
-$(TARGET): clean install.rdf
+unsigned: clean install.rdf
mkdir -p $(TEMPDIR)
mkdir -p `dirname $@`
cp -r $(PREFIX)/{$(FILES_TO_PACKAGE)} $(TEMPDIR)/
@@ -69,7 +51,26 @@ $(TARGET): clean install.rdf
rm -rf $(TEMPDIR)
(cd build/ && sha512sum $(PKGNAME) > SHA512SUMS && gpg -a --default-key $(DEFAULTKEY) --detach-sign SHA512SUMS)
-signed: clean
+
+#-----------------------------------------------------------------------------
+# signed XPI file
+#-----------------------------------------------------------------------------
+
+# make sure CERTDIR, CERTNAME and DEFAULTKEY are defined for signing
+ifeq ($(MAKECMDGOALS),signed)
+USAGE := "Usage: make CERTDIR=<certificate directory> CERTNAME=<certificate name> DEFAULTKEY=<key id>"
+ifndef CERTDIR
+ $(error $(USAGE))
+endif
+ifndef CERTNAME
+ $(error $(USAGE))
+endif
+ifndef DEFAULTKEY
+ $(error $(USAGE))
+endif
+endif
+
+signed: clean install.rdf
mkdir -p $(TEMPDIR)
mkdir -p `dirname $@`
cp -r $(PREFIX)/{$(FILES_TO_PACKAGE)} $(TEMPDIR)/
@@ -79,27 +80,13 @@ signed: clean
rm -rf $(TEMPDIR)
(cd build/ && sha512sum $(PKGNAME) > SHA512SUMS && gpg -a --default-key $(DEFAULTKEY) --detach-sign SHA512SUMS)
-clean:
- rm -f $(TARGET) build/*
- rm -f install.rdf
-
upload:
ssh downloads.leap.se rm -rf /var/www/leap-downloads/public/thunderbird_extension/*
scp build/* downloads.leap.se:/var/www/leap-downloads/public/thunderbird_extension/
-debian-package:
- git buildpackage -us -uc
-
-install.rdf: install.rdf.template Changelog
- sed 's/__VERSION__/$(VERSION)/' < $< > $@
-
-debian-package:
- git buildpackage -us -uc
-
clean:
- #rm -f $(TARGET) build/*
+ rm -f $(TARGET) build/*
rm -f *.xpi
rm -f install.rdf
-
-.PHONY: all clean
+.PHONY: all clean xpi_release unsigned signed upload debian-package
diff --git a/README.rst b/README.rst
index be00062..727eedf 100644
--- a/README.rst
+++ b/README.rst
@@ -6,7 +6,6 @@ The Bitmask Thunderbird Extension provides:
* A wizard for creating email accounts with IMAP/SMTP configuration targeted
to localhost and the default Bitmask client ports. There are different ways to
launch the wizard for configuring a Bitmask Account:
- - Clicking on the statusbar notification.
- File -> New -> Bitmask account.
- Edit -> Account Settings... -> Account Actions -> Add Bitmask Accont.
* Caching prevention: accounts are created with caching turned off and the
@@ -22,8 +21,7 @@ extension directory whose contents point to the repository dir:
* The file must be created in the `~/.thunderbird/<profile>/extensions/`
directory.
* The file name must be `bitmask-thunderbird@leap.se`.
-* The file contents must be the path for the `src/` directory inside this
- repository.
+* The file contents must be the path for this repository.
XPI Package
-----------
@@ -48,7 +46,7 @@ Signed XPI package
To generate a signed XPI package you must first have a certificate and then do
the following:
- make sign CERTDIR=<path to cert dir> CERTNAME=<cert name> DEFAULTKEY=<key id>
+ make signed CERTDIR=<path to cert dir> CERTNAME=<cert name> DEFAULTKEY=<key id>
This command will:
diff --git a/chrome.manifest b/chrome.manifest
index bb14689..98d7b4b 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -1,7 +1,6 @@
content bitmask chrome/content/
skin bitmask classic/1.0 chrome/skin/
locale bitmask en-US chrome/locale/en-US/
-overlay chrome://messenger/content/messenger.xul chrome://bitmask/content/statusBar/statusBarOverlay.xul
overlay chrome://messenger/content/messenger.xul chrome://bitmask/content/accountWizard/bitmaskMessengerOverlay.xul
overlay chrome://messenger/content/AccountManager.xul chrome://bitmask/content/accountWizard/bitmaskAccountManagerOverlay.xul
overlay chrome://messenger/content/am-offline.xul chrome://bitmask/content/preventCaching/bitmaskAmOfflineOverlay.xul
diff --git a/chrome/content/accountWizard/accountWizard.js b/chrome/content/accountWizard/accountWizard.js
index 35dae00..c3f8887 100644
--- a/chrome/content/accountWizard/accountWizard.js
+++ b/chrome/content/accountWizard/accountWizard.js
@@ -405,14 +405,14 @@ BitmaskAccountWizard.prototype =
{
e("status_area").setAttribute("status", "loading");
gEmailWizardLogger.warn("spinner start " + actionStrName);
- this._showStatusTitle(actionStrName);
+ this._showStatusTitle(actionStrName, gStringsBundle);
},
stopSpinner : function(actionStrName)
{
e("status_area").setAttribute("status", "result");
_hide("stop_button");
- this._showStatusTitle(actionStrName);
+ this._showStatusTitle(actionStrName, gStringsBundle);
gEmailWizardLogger.warn("all spinner stop " + actionStrName);
},
@@ -420,15 +420,15 @@ BitmaskAccountWizard.prototype =
{
e("status_area").setAttribute("status", "error");
gEmailWizardLogger.warn("status error " + actionStrName);
- this._showStatusTitle(actionStrName);
+ this._showStatusTitle(actionStrName, gAccountWizardStringsBundle);
},
- _showStatusTitle : function(msgName)
+ _showStatusTitle : function(msgName, bundle)
{
let msg = " "; // assure height. Do via min-height in CSS, for 2 lines?
try {
if (msgName) {
- msg = gStringsBundle.getFormattedString(msgName, [gBrandShortName]);
+ msg = bundle.getFormattedString(msgName, [gBrandShortName]);
}
} catch(ex) {
gEmailWizardLogger.error("missing string for " + msgName);
@@ -687,7 +687,7 @@ BitmaskAccountWizard.prototype =
self.showErrorStatus("config_unverifiable");
// TODO bug 555448: wrong error msg, there may be a 1000 other
// reasons why this failed, and this is misleading users.
- self.setError("passworderror", "user_pass_invalid");
+ //self.setError("passworderror", "user_pass_invalid");
// TODO use switchToMode(), see above
// give user something to proceed after fixing
_enable("create_button");
diff --git a/chrome/content/accountWizard/accountWizard.xul b/chrome/content/accountWizard/accountWizard.xul
index 1587c50..12b4d17 100644
--- a/chrome/content/accountWizard/accountWizard.xul
+++ b/chrome/content/accountWizard/accountWizard.xul
@@ -145,7 +145,7 @@
<hbox id="status_area" flex="1">
<vbox id="status_img_before" pack="start"/>
- <description id="status_msg">&#160;</description>
+ <description id="status_msg" style="white-space: pre-wrap;">&#160;</description>
<!-- Include 160 = nbsp, to make the element occupy the
full height, for at least one line. With a normal space,
it does not have sufficient height. -->
diff --git a/chrome/content/accountWizard/launchAccountWizard.js b/chrome/content/accountWizard/launchAccountWizard.js
index bda743f..dc8e9ea 100644
--- a/chrome/content/accountWizard/launchAccountWizard.js
+++ b/chrome/content/accountWizard/launchAccountWizard.js
@@ -1,5 +1,5 @@
/**
- * statusBar.js
+ * launchAccountWizard.js
* Copyright (C) 2013 LEAP
*
* This program is free software: you can redistribute it and/or modify
diff --git a/chrome/content/preventCaching/bitmaskAmOfflineOverlay.js b/chrome/content/preventCaching/bitmaskAmOfflineOverlay.js
index c88b2ab..afc35a3 100644
--- a/chrome/content/preventCaching/bitmaskAmOfflineOverlay.js
+++ b/chrome/content/preventCaching/bitmaskAmOfflineOverlay.js
@@ -22,23 +22,32 @@
var currentAccount = null;
-// The following function disables UI items that would allow a user to turn
-// on offline caching for a LEAP account. It acts on am-offline.xul items that
+// The following function disables UI items that would allow a user to turn on
+// offline caching for a LEAP account. It acts on am-offline.xul items that
// can be accessed in Thunderbird by choosing:
//
// Edit -> Account Settings... -> Synchronization and Storage.
+// In order to be somewhat consistent, we only disable those items if the
+// account already has its offline caching turned off. Accounts created with
+// the Bitmask wizard are created with offline caching turned off (and so the
+// UI items are disabled from the beginning). Accounts created manually will
+// have offline caching turned on by default, and thus need a way to disable
+// it if the user ever wants to. Once offline caching is disabled, then the
+// user will not be able to turn it on again for Leap accounts.
function disableOfflineCaching()
{
var disabled;
- // for now, we consider a LEAP account every account whose incoming server
+ var checkbox = document.getElementById("offline.folders")
+ // For now, we consider a LEAP account every account whose incoming server
// has a hostname equal to IMAP_HOST and port equal to IMAP_PORT.
if (currentAccount.incomingServer.port == IMAP_PORT &&
- currentAccount.incomingServer.hostName == IMAP_HOST)
+ currentAccount.incomingServer.hostName == IMAP_HOST &&
+ checkbox.checked == false)
disabled = true;
else
disabled = false;
// The "Keep messsages for this account on this computer" checkbox.
- document.getElementById("offline.folders").disabled = disabled;
+ checkbox.disabled = disabled;
// The "Advanced..." button.
document.getElementById("selectImapFoldersButton").disabled = disabled;
}
diff --git a/chrome/content/statusBar/statusBarOverlay.js b/chrome/content/statusBar/statusBarOverlay.js
deleted file mode 100644
index 31ec16a..0000000
--- a/chrome/content/statusBar/statusBarOverlay.js
+++ /dev/null
@@ -1,94 +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");
-
-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);
-
-// run updatePanel() periodically
-window.setInterval(
- function() {
- updatePanel();
- }, 10000); // update every ten seconds
-
-
-/*****************************************************************************
- * GUI maintenance functions.
- ****************************************************************************/
-
-function starUp() {
- updatePanel();
- if (!isBitmaskAccountConfigured()) {
- launchAccountWizard();
- }
-}
-
-/**
- * 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() {
- var accountManager = Cc["@mozilla.org/messenger/account-manager;1"]
- .getService(Ci.nsIMsgAccountManager);
- var existing = accountManager.findRealServer(
- "", IMAP_HOST, "imap", IMAP_PORT);
- return !!existing;
-}
diff --git a/chrome/content/statusBar/statusBarOverlay.xul b/chrome/content/statusBar/statusBarOverlay.xul
deleted file mode 100644
index 006ccb9..0000000
--- a/chrome/content/statusBar/statusBarOverlay.xul
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<overlay id="bitmaskStatusBarOverlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://bitmask/content/util.js"/>
- <script type="application/javascript"
- src="chrome://bitmask/content/serverConfig.js"/>
- <script type="application/javascript"
- src="chrome://bitmask/content/accountWizard/bitmaskAccountManagerOverlay.js"/>
- <script type="application/javascript"
- src="chrome://bitmask/content/statusBar/statusBarOverlay.js"/>
- <statusbar id="status-bar">
- <statusbarpanel id="bitmask-status-bar"
- label="Bitmask"
- onclick="handleStatusBarClick();" />
- </statusbar>
-</overlay>
diff --git a/chrome/locale/en-US/accountWizard.properties b/chrome/locale/en-US/accountWizard.properties
index f91fc70..fbd3055 100644
--- a/chrome/locale/en-US/accountWizard.properties
+++ b/chrome/locale/en-US/accountWizard.properties
@@ -1,4 +1,7 @@
# verifyConfig.js
cannot_login.error=Unable to log in at server. Probably wrong configuration, username or password.
+
+# accountWizard.js
resultIncoming=%1$S, %2$S
resultOutgoing=%1$S, %2$S
+config_unverifiable=Configuration could not be verified. Bitmask client needs\nto be running in order to configure the account. Are you\nlogged into Bitmask with the correct username?
diff --git a/chrome/locale/en-US/statusBar.properties b/chrome/locale/en-US/statusBar.properties
deleted file mode 100644
index 7715c71..0000000
--- a/chrome/locale/en-US/statusBar.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-# statusBar.js
-account_not_configured=Click to config Bitmask account
-account_configured=Bitmask account is configured!
diff --git a/install.rdf.template b/install.rdf.template
index 88ecbfc..aac65ab 100644
--- a/install.rdf.template
+++ b/install.rdf.template
@@ -26,38 +26,34 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<em:name>Bitmask Thunderbird Extension</em:name>
<em:version>__VERSION__</em:version>
<em:type>2</em:type>
- <em:description>Automatic configuration for Bitmask Encrypted Mail accounts.
- </em:description>
+ <em:description>Automatic configuration for Bitmask Encrypted Mail accounts.</em:description>
<em:creator>LEAP developers</em:creator>
- <em:contributor>Andre Jucovsky Bianchi
- </em:contributor>
+ <em:contributor>Andre Jucovsky Bianchi</em:contributor>
<em:homepageURL>https://github.com/leapcode/thunderbird_extension/</em:homepageURL>
<em:iconURL>chrome://bitmask/content/logo-small.png</em:iconURL>
-
+
<em:targetApplication>
<Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>23.999</em:minVersion>
- <em:maxVersion>24.*</em:maxVersion>
+ <em:maxVersion>31.*</em:maxVersion>
</Description>
</em:targetApplication>
- <em:localized>
- <Description>
- <em:locale>en-US</em:locale>
+ <em:localized>
+ <Description>
+ <em:locale>en-US</em:locale>
<em:name>Bitmask</em:name>
- <em:description>Configure Bitmask Encrypted Mail accounts.
- </em:description>
+ <em:description>Configure Bitmask Encrypted Mail accounts.</em:description>
<em:creator>The LEAP Encryption Access Project</em:creator>
- </Description>
- </em:localized>
- <em:localized>
- <Description>
- <em:locale>es-ES</em:locale>
+ </Description>
+ </em:localized>
+ <em:localized>
+ <Description>
+ <em:locale>es-ES</em:locale>
<em:name>Bitmask</em:name>
- <em:description>Configura cuentas Bitmask de Correo Cifrado.
- </em:description>
+ <em:description>Configura cuentas Bitmask de Correo Cifrado.</em:description>
<em:creator>El projecto LEAP, Encryption Access Project</em:creator>
- </Description>
- </em:localized>
- </Description>
+ </Description>
+ </em:localized>
+ </Description>
</RDF>