From 27025befef9333bc49c0f7235e9a08d715bed53a Mon Sep 17 00:00:00 2001 From: David Norton Date: Wed, 21 Jun 2006 22:31:52 +0000 Subject: [PATCH] Added "Disable automatic scraper updates" preference. (Up to Dan to implement this) --- .../content/scholar/preferences.js | 20 +++++++++---------- .../content/scholar/preferences.xul | 2 +- defaults/preferences/scholar.js | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/preferences.js b/chrome/chromeFiles/content/scholar/preferences.js index 9a57734ce..f5e4ad1c3 100644 --- a/chrome/chromeFiles/content/scholar/preferences.js +++ b/chrome/chromeFiles/content/scholar/preferences.js @@ -1,25 +1,25 @@ var prefManager = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); -var whateverBox; +var autoUpdateBox; /* To add a new preference: - * modify defaults/prefs.js - * add a control to prefs.xul - * in this document: - 1) add var above - 2) add lines to init() function - 3) add line to accept() function + 1) modify defaults/preferences/scholar.js + 2) in this document: + a) add var above + b) add lines to init() function + c) add line to accept() function + 3) add a control to prefs.xul */ function init() { - whateverBox = document.getElementById('whateverBox'); - whateverBox.checked = prefManager.getBoolPref('extensions.scholar.whatever'); + autoUpdateBox = document.getElementById('autoUpdateBox'); + autoUpdateBox.checked = prefManager.getBoolPref('extensions.scholar.automaticScraperUpdates'); } function accept() { - prefManager.setBoolPref('extensions.scholar.whatever', whateverBox.checked); + prefManager.setBoolPref('extensions.scholar.automaticScraperUpdates', autoUpdateBox.checked); } \ No newline at end of file diff --git a/chrome/chromeFiles/content/scholar/preferences.xul b/chrome/chromeFiles/content/scholar/preferences.xul index 7e66407c8..9d01e1b24 100644 --- a/chrome/chromeFiles/content/scholar/preferences.xul +++ b/chrome/chromeFiles/content/scholar/preferences.xul @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/defaults/preferences/scholar.js b/defaults/preferences/scholar.js index a2b65ed87..37d114ba6 100644 --- a/defaults/preferences/scholar.js +++ b/defaults/preferences/scholar.js @@ -1,4 +1,4 @@ // These are DEFAULT prefs for the INSTALL. You will have to reinstall the extension to see differences! // Display internal shortcut -pref("extensions.scholar.whatever", false); +pref("extensions.scholar.automaticScraperUpdates",true); \ No newline at end of file