[Pkg-mozext-commits] [firetray] 365/399: address compatibility warnings from AMO

David Prévot taffit at alioth.debian.org
Tue Oct 29 18:24:15 UTC 2013


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

taffit pushed a commit to branch dfsg-clean
in repository firetray.

commit c4c5a3425b9d2387ce4756d3f0984918f1a0d6f2
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Fri Apr 19 21:57:43 2013 +0200

    address compatibility warnings from AMO
    
    https://addons.mozilla.org/en-US/developers/addon/firetray/file/203468/validation.
    Not sure if we should not just drop compatibility...  We should be able to
    support back to Gecko 4.0 but ctypes-utils.jsm uses features introduced in 7.0.
---
 src/install.rdf                   |    6 +++---
 src/modules/FiretrayMessaging.jsm |    4 +++-
 src/modules/PrefListener.jsm      |    4 +++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/install.rdf b/src/install.rdf
index 4a6aa4f..a409c40 100644
--- a/src/install.rdf
+++ b/src/install.rdf
@@ -18,7 +18,7 @@
     <em:targetApplication>
       <Description>
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- Firefox -->
-        <em:minVersion>13.0</em:minVersion>
+        <em:minVersion>7.0</em:minVersion>
         <em:maxVersion>23.0</em:maxVersion>
       </Description>
     </em:targetApplication>
@@ -26,7 +26,7 @@
     <em:targetApplication>      <!-- Thunderbird -->
       <Description>
         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
-        <em:minVersion>15.0</em:minVersion>
+        <em:minVersion>7.0</em:minVersion>
         <em:maxVersion>23.0</em:maxVersion>
       </Description>
     </em:targetApplication>
@@ -34,7 +34,7 @@
     <em:targetApplication>      <!-- SeaMonkey -->
       <Description>
         <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
-        <em:minVersion>2.1</em:minVersion>
+        <em:minVersion>2.4</em:minVersion>
         <em:maxVersion>2.20</em:maxVersion>
       </Description>
     </em:targetApplication>
diff --git a/src/modules/FiretrayMessaging.jsm b/src/modules/FiretrayMessaging.jsm
index 964fc83..05780f8 100644
--- a/src/modules/FiretrayMessaging.jsm
+++ b/src/modules/FiretrayMessaging.jsm
@@ -325,7 +325,9 @@ firetray.Messaging = {
     log.debug("runProcess="+filepath+" args="+args);
     try {
       // create a file for the process
-      var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); // TODO: nsILocalFile merged into the nsIFile in Gecko 14
+      var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
+      if (!file.initWithPath)
+        file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); // deprecated in Gecko 14
       file.initWithPath(filepath);
 
       // create the process
diff --git a/src/modules/PrefListener.jsm b/src/modules/PrefListener.jsm
index 93b0931..b688a91 100644
--- a/src/modules/PrefListener.jsm
+++ b/src/modules/PrefListener.jsm
@@ -21,7 +21,9 @@ function PrefListener(branch_name, callback) {
   var prefService = Components.classes["@mozilla.org/preferences-service;1"]
         .getService(Components.interfaces.nsIPrefService);
   this._branch = prefService.getBranch(branch_name);
-  this._branch.QueryInterface(Components.interfaces.nsIPrefBranch2); // FIXME: deprecated in Gecko 13.0
+  this._branch.QueryInterface(Ci.nsIPrefBranch);
+  if (!this._branch.addObserver)
+    this._branch.QueryInterface(Ci.nsIPrefBranch2); // deprecated in Gecko 13.0
   this._callback = callback;
 }
 

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



More information about the Pkg-mozext-commits mailing list