[Pkg-mozext-commits] [tabmixplus] 04/44: Don't define TabmixSvc getters for Services getters

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 9fcd1acbfc99a0ed26efaa00dee79201b4850e6d
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Sep 29 14:23:19 2014 +0300

    Don't define TabmixSvc getters for Services getters
---
 modules/AutoReload.jsm | 7 ++++---
 modules/Services.jsm   | 9 ---------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/modules/AutoReload.jsm b/modules/AutoReload.jsm
index 6f974b4..262caea 100644
--- a/modules/AutoReload.jsm
+++ b/modules/AutoReload.jsm
@@ -4,6 +4,7 @@ var EXPORTED_SYMBOLS = ["AutoReload"];
 
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
+Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://tabmixplus/Services.jsm");
 
 let AutoReload = {
@@ -271,8 +272,8 @@ function _reloadTab(aTab) {
       if (postData && !aTab.postDataAcceptedByUser) {
         let title = TabmixSvc.getString('confirm_autoreloadPostData_title');
         let msg = TabmixSvc.getString('confirm_autoreloadPostData');
-        TabmixSvc.obs.addObserver(_observe, "common-dialog-loaded", false);
-        let resultOK = TabmixSvc.prompt.confirm(window, title, msg);
+        Services.obs.addObserver(_observe, "common-dialog-loaded", false);
+        let resultOK = Services.prompt.confirm(window, title, msg);
         if (resultOK)
           aTab.postDataAcceptedByUser = true;
         else {
@@ -320,7 +321,7 @@ function _reloadTab(aTab) {
 
 function  _observe(aSubject, aTopic, aData) {
   if (aTopic == "common-dialog-loaded") {
-    TabmixSvc.obs.removeObserver(_observe, "common-dialog-loaded");
+    Services.obs.removeObserver(_observe, "common-dialog-loaded");
     let icon = aSubject.document.getElementById("info.icon");
     icon.classList.add("alert-icon");
     icon.classList.remove("question-icon");
diff --git a/modules/Services.jsm b/modules/Services.jsm
index 3b9521e..52033c4 100644
--- a/modules/Services.jsm
+++ b/modules/Services.jsm
@@ -218,15 +218,6 @@ XPCOMUtils.defineLazyGetter(TabmixSvc, "australis", function() {
           true : false;
 });
 
-/**
- * Lazily define services
- * Getters for common services, use Services.jsm where possible
- */
-XPCOMUtils.defineLazyGetter(TabmixSvc, "io", function () {return Services.io});
-XPCOMUtils.defineLazyGetter(TabmixSvc, "wm", function () {return Services.wm});
-XPCOMUtils.defineLazyGetter(TabmixSvc, "obs", function () {return Services.obs});
-XPCOMUtils.defineLazyGetter(TabmixSvc, "prompt", function () {return Services.prompt});
-
 // Tabmix preference branch
 XPCOMUtils.defineLazyGetter(TabmixSvc, "prefBranch", function () {return Services.prefs.getBranch("extensions.tabmix.")});
 // string bundle

-- 
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