[Pkg-mozext-commits] [compactheader] 01/06: Remove obsolete code for old addon manager.

David Prévot taffit at moszumanska.debian.org
Sat Mar 28 14:21:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository compactheader.

commit 08c3e177d58984be7b41186315b7c70ead3d7465
Author: jmozmoz <Joachim.Herb at gmx.de>
Date:   Fri Mar 27 01:04:09 2015 +0100

    Remove obsolete code for old addon manager.
---
 .../CompactHeader/content/compactHeaderOverlay.js  | 39 ++--------------------
 install.rdf                                        |  2 +-
 2 files changed, 4 insertions(+), 37 deletions(-)

diff --git a/chrome/CompactHeader/content/compactHeaderOverlay.js b/chrome/CompactHeader/content/compactHeaderOverlay.js
index ab3d516..d047579 100644
--- a/chrome/CompactHeader/content/compactHeaderOverlay.js
+++ b/chrome/CompactHeader/content/compactHeaderOverlay.js
@@ -785,11 +785,6 @@ org_mozdev_compactHeader.pane = function() {
 
 
   pub.coheInitializeOverlay = function() {
-    // var gExtensionManager = Components.classes["@mozilla.org/extensions/manager;1"].getService(Components.interfaces.nsIExtensionManager);
-    // check if this is part of CompactHeader
-    // if ((gExtensionManager.getItemForID(COMPACTHEADER_EXTENSION_UUID) == null) || isAddonDisabled(COMPACTHEADER_EXTENSION_UUID)) {
-    //  return;
-    //}
     org_mozdev_compactHeader.debug.log("before register");
     coheUninstallObserver.register();
     myPrefObserver.register();
@@ -906,18 +901,9 @@ org_mozdev_compactHeader.pane = function() {
   var coheUninstallObserver = {
     _uninstall : false,
     observe : function(subject, topic, data) {
-      if (topic == "em-action-requested") {
-        subject.QueryInterface(Components.interfaces.nsIUpdateItem);
-
-        if (subject.id == COMPACTHEADER_EXTENSION_UUID) {
-          org_mozdev_compactHeader.debug.log("uninstalling COHE 1");
-          if (data == "item-uninstalled") {
-            this._uninstall = true;
-          } else if (data == "item-cancel-action") {
-            this._uninstall = false;
-          }
-        }
-      } else if (topic == "quit-application-granted") {
+      org_mozdev_compactHeader.debug.log("test: " + subject + ", " +
+          topic + ", " + data);
+      if (topic == "quit-application-granted") {
         org_mozdev_compactHeader.debug.log("uninstalling COHE 2");
         if (this._uninstall) {
           cohePrefBranch.deleteBranch("");
@@ -963,25 +949,6 @@ org_mozdev_compactHeader.pane = function() {
     }
   }
 
-  function isAddonDisabled(uuid) {
-    var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
-    var addon = rdfService.GetResource("urn:mozilla:item:" + uuid);
-
-    var em = Components.classes["@mozilla.org/extensions/manager;1"].getService(Components.interfaces.nsIExtensionManager);
-    var ds = em.datasource;
-
-    var appRes = rdfService.GetResource("http://www.mozilla.org/2004/em-rdf#appDisabled");
-    var appDisabled = ds.GetTarget(addon, appRes, true);
-    if(appDisabled instanceof Components.interfaces.nsIRDFLiteral && appDisabled.Value == "true")
-      return true;
-
-    var userRes = rdfService.GetResource("http://www.mozilla.org/2004/em-rdf#userDisabled");
-    var userDisabled = ds.GetTarget(addon, userRes, true);
-    if(userDisabled instanceof Components.interfaces.nsIRDFLiteral && userDisabled.Value == "true")
-      return true;
-
-    return false;
-  }
   return pub;
 }();
 
diff --git a/install.rdf b/install.rdf
index d8257fa..9d34759 100644
--- a/install.rdf
+++ b/install.rdf
@@ -14,7 +14,7 @@
         <em:translator>Peter Klofutar</em:translator>
       </Description>
     </em:localized>
-		<em:version>2.1.0beta4</em:version>
+		<em:version>2.1.0beta5</em:version>
 		<em:description>Add ability to reduce header size to one or two lines. Linkify subjects in RSS feeds.</em:description>
 		<em:creator>Joachim Herb</em:creator>
 		<em:contributor>Zamula</em:contributor>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/compactheader.git



More information about the Pkg-mozext-commits mailing list