[Pkg-mozext-commits] [tabmixplus] 03/44: Use TabmixSvc.prefBranch for 'extensions.tabmix.' branch in our modules

David Prévot taffit at moszumanska.debian.org
Wed Oct 15 02:09:58 UTC 2014


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit 9ab953f3ac469c0b1a39f43bcac5d137a3a826a4
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Sep 29 14:15:31 2014 +0300

    Use TabmixSvc.prefBranch for 'extensions.tabmix.' branch in our modules
---
 modules/Services.jsm                      | 1 -
 modules/Slideshow.jsm                     | 8 ++++----
 modules/extensions/CompatibilityCheck.jsm | 6 +++---
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/modules/Services.jsm b/modules/Services.jsm
index 75bbeae..3b9521e 100644
--- a/modules/Services.jsm
+++ b/modules/Services.jsm
@@ -222,7 +222,6 @@ XPCOMUtils.defineLazyGetter(TabmixSvc, "australis", function() {
  * Lazily define services
  * Getters for common services, use Services.jsm where possible
  */
-XPCOMUtils.defineLazyGetter(TabmixSvc, "prefs", function () {return Services.prefs});
 XPCOMUtils.defineLazyGetter(TabmixSvc, "io", function () {return Services.io});
 XPCOMUtils.defineLazyGetter(TabmixSvc, "wm", function () {return Services.wm});
 XPCOMUtils.defineLazyGetter(TabmixSvc, "obs", function () {return Services.obs});
diff --git a/modules/Slideshow.jsm b/modules/Slideshow.jsm
index 2236494..afad778 100644
--- a/modules/Slideshow.jsm
+++ b/modules/Slideshow.jsm
@@ -29,12 +29,12 @@ flst.prototype = {
 
   //toggle flst on/off
   toggle: function() {
-    if (TabmixSvc.prefs.getIntPref("extensions.tabmix.focusTab") != 4) {
-      TabmixSvc.prefs.setIntPref("extensions.tabmix.focusTab", 4);
+    if (TabmixSvc.prefBranch.getIntPref("focusTab") != 4) {
+      TabmixSvc.prefBranch.setIntPref("focusTab", 4);
       this.showAlert(this.flstOn, "toggleFLST");
     }
     else {
-      TabmixSvc.prefs.setIntPref("extensions.tabmix.focusTab", 2);
+      TabmixSvc.prefBranch.setIntPref("focusTab", 2);
       this.showAlert(this.flstOff, "toggleFLST");
     }
   },
@@ -44,7 +44,7 @@ flst.prototype = {
       this.cancel();
     }
     else if (this.moreThenOneTab) {
-      let timerInterval = TabmixSvc.prefs.getIntPref("extensions.tabmix.slideDelay") * 1000;
+      let timerInterval = TabmixSvc.prefBranch.getIntPref("slideDelay") * 1000;
       this.slideShowTimer =  Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
       this.slideShowTimer.initWithCallback(this, timerInterval,
                         Ci.nsITimer.TYPE_REPEATING_SLACK);
diff --git a/modules/extensions/CompatibilityCheck.jsm b/modules/extensions/CompatibilityCheck.jsm
index a4f449f..22644bc 100644
--- a/modules/extensions/CompatibilityCheck.jsm
+++ b/modules/extensions/CompatibilityCheck.jsm
@@ -102,7 +102,7 @@ CompatibilityCheck.prototype = {
       outStr += " - " + name + " " + list[i]._version + "\n";
     }
 
-    var showatStart = TabmixSvc.prefs.getBoolPref("extensions.tabmix.disableIncompatible")
+    var showatStart = TabmixSvc.prefBranch.getBoolPref("disableIncompatible")
     var chkBoxState = showatStart ? TMP_CHECKBOX_CHECKED : TMP_CHECKBOX_UNCHECKED;
 
     var title = TabmixSvc.getString("incompatible.title");
@@ -129,8 +129,8 @@ CompatibilityCheck.prototype = {
   // we use non modal promptService on startup
   promptCallBack: function TMP_EX_promptCallBack(aResult) {
     if (aResult.checked != aResult.showatStart) {
-      TabmixSvc.prefs.setBoolPref("extensions.tabmix.disableIncompatible", aResult.checked);
-      TabmixSvc.prefs.savePrefFile(null); // store the pref immediately
+      TabmixSvc.prefBranch.setBoolPref("disableIncompatible", aResult.checked);
+      Services.prefs.savePrefFile(null); // store the pref immediately
     }
 
     if (aResult.button != this.CANCEL) {

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



More information about the Pkg-mozext-commits mailing list