commit 27025befef9333bc49c0f7235e9a08d715bed53a
parent 77b8bfd0b2c62c99acb345bf28360eac6a0c77ba
Author: David Norton <david@nortoncrew.com>
Date: Wed, 21 Jun 2006 22:31:52 +0000
Added "Disable automatic scraper updates" preference. (Up to Dan to implement this)
Diffstat:
3 files changed, 13 insertions(+), 12 deletions(-)
diff --git 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
@@ -12,7 +12,7 @@
<dialogheader id="header" title="&scholar.name;" description="&scholar.preferences.title;"/>
-<checkbox id="whateverBox" label="Whatever!"/>
+<checkbox id="autoUpdateBox" label="Automatically check for updated scrapers"/>
</dialog>
\ No newline at end of file
diff --git 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