commit c24aad3af4479f99dc85081bc887434a476e91a5
parent 64b4d3fd47927e6f277e700dae182d10853b010b
Author: Simon Kornblith <simon@simonster.com>
Date: Wed, 20 Jul 2011 03:35:21 +0000
Add incompatible version message to Firefox
Diffstat:
3 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/connector/connector_firefox.js b/chrome/content/zotero/xpcom/connector/connector_firefox.js
@@ -0,0 +1,46 @@
+/*
+ ***** BEGIN LICENSE BLOCK *****
+
+ Copyright © 2011 Center for History and New Media
+ George Mason University, Fairfax, Virginia, USA
+ http://zotero.org
+
+ This file is part of Zotero.
+
+ Zotero is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Zotero 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 Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with Zotero. If not, see <http://www.gnu.org/licenses/>.
+
+ ***** END LICENSE BLOCK *****
+*/
+
+Zotero.Connector_Browser = new function() {
+ var _incompatibleVersionMessageShown;
+
+ /**
+ * Called if Zotero version is determined to be incompatible with Standalone
+ */
+ this.onIncompatibleStandaloneVersion = function(zoteroVersion, standaloneVersion) {
+ if(_incompatibleVersionMessageShown) return;
+ var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].
+ createInstance(Components.interfaces.nsIPromptService);
+ ps.alert(null,
+ Zotero.getString("connector.error.title"),
+ 'Zotero '+zoteroVersion+' is incompatible with the running '+
+ 'version of Zotero Standalone'+(standaloneVersion ? " ("+standaloneVersion+")" : "")+
+ '. Zotero Connector will continue to operate, but functionality that relies upon '+
+ 'Zotero Standalone may be unavaliable.\n\n'+
+ 'Please ensure that you have installed the latest version of these components. See '+
+ 'http://www.zotero.org/support/standalone for more details.');
+ _incompatibleVersionMessageShown = true;
+ }
+}
+\ No newline at end of file
diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js
@@ -426,7 +426,7 @@ Zotero.Server.Connector.IncompatibleVersion.prototype = {
Zotero.Integration.activate();
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].
createInstance(Components.interfaces.nsIPromptService);
- ps.confirm(null,
+ ps.alert(null,
Zotero.getString("connector.error.title"),
Zotero.getString("integration.error.incompatibleVersion2",
["Standalone "+Zotero.version, "Connector", "2.1.999"]));
diff --git a/components/zotero-service.js b/components/zotero-service.js
@@ -110,6 +110,7 @@ const xpcomFilesConnector = [
'connector/translate_item',
'connector/translator',
'connector/connector',
+ 'connector/connector_firefox',
'connector/cachedTypes',
'connector/repo',
'connector/typeSchemaData'