[Pkg-mozext-commits] [perspectives-extension] 25/44: Pers_init - Convert root_pref retrieval to use new functions
David Prévot
taffit at moszumanska.debian.org
Sun Jun 26 04:59:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository perspectives-extension.
commit be500725b249aea4a5903acc5582c0d89cdf5117
Author: Dave Schaefer <dave.schaefer at gmail.com>
Date: Sun Jun 12 22:38:30 2016 -0700
Pers_init - Convert root_pref retrieval to use new functions
This doesn't fix everything, but it's a step forward.
---
plugin/chrome/content/init.js | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/plugin/chrome/content/init.js b/plugin/chrome/content/init.js
index e2334c0..1e5f4d5 100644
--- a/plugin/chrome/content/init.js
+++ b/plugin/chrome/content/init.js
@@ -24,14 +24,13 @@ var Pers_init = {
evtLoad: function(){
Perspectives.init_data();
Perspectives.initNotaries();
- var root_prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
// call this *after* the document has loaded
// so we have access to the stringbundle from statusbar.xul
Perspectives.prompt_update();
const FIRSTRUN_PREF = "extensions.perspectives.first_run";
- var firstrun = root_prefs.getBoolPref(FIRSTRUN_PREF);
+ var firstrun = Perspectives.getBoolPref(FIRSTRUN_PREF);
if (firstrun) {
var bname = "perspectives-status-button";
@@ -42,7 +41,7 @@ var Pers_init = {
// else the user has already added the button previously
// we don't want to touch it
- root_prefs.setBoolPref(FIRSTRUN_PREF, false);
+ Perspectives.setBoolPref(FIRSTRUN_PREF, false);
}
Pers_init.migrateOldSettings();
@@ -77,8 +76,8 @@ var Pers_init = {
'perspectives.enable_default_list_auto_update',
'perspectives.use_default_notary_list'
];
- var root_prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
- var migration_needed = root_prefs.getBoolPref("extensions.perspectives.preference_migration");
+ var root_prefs = Perspectives.getRootPrefs();
+ var migration_needed = Perspectives.getBoolPref("extensions.perspectives.preference_migration");
var tmpNum = 0;
var tmpStr = "";
@@ -103,7 +102,7 @@ var Pers_init = {
root_prefs.setBoolPref("extensions." + preflist_bool[index],tmpBool);
}
}
- root_prefs.setBoolPref("extensions.perspectives.preference_migration",false);
+ Perspectives.setBoolPref("extensions.perspectives.preference_migration",false);
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/perspectives-extension.git
More information about the Pkg-mozext-commits
mailing list