diff options
author | Einar Egilsson | 2009-11-11 07:59:43 +0000 |
---|---|---|
committer | Einar Egilsson | 2009-11-11 07:59:43 +0000 |
commit | 100883d6c539e0fa23b2baec668e4d48cf5d2506 (patch) | |
tree | 618ea301adf91b556bdae2985354578fc4c0f6ec /chrome/content/code/prefs.js | |
parent | d8c8ad84b03be92d40f4569b4c1b8a5822dc924d (diff) |
Fixed error when pressing Cancel on the Import file picker.
Converted spaces to tabs on all .js files.
git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@294 119bf307-c92d-0410-89bd-8f53e6181181
Diffstat (limited to 'chrome/content/code/prefs.js')
-rw-r--r-- | chrome/content/code/prefs.js | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/chrome/content/code/prefs.js b/chrome/content/code/prefs.js index 4118bc5..055293b 100644 --- a/chrome/content/code/prefs.js +++ b/chrome/content/code/prefs.js @@ -6,77 +6,77 @@ function Prefs() { Prefs.prototype = {
- //Preferences:
- _version : null,
- _enabled : null,
- _showStatusBarIcon : null,
- _showContextMenu : null,
- _debugEnabled : null,
- _defaultDir : null,
- _redirects : null,
-
- _prefBranch : null,
-
- _listeners : null,
-
- //Preferences props
-
- get version() { return this._version; },
- set version(value) { this._prefBranch.setCharPref('version', value); },
+ //Preferences:
+ _version : null,
+ _enabled : null,
+ _showStatusBarIcon : null,
+ _showContextMenu : null,
+ _debugEnabled : null,
+ _defaultDir : null,
+ _redirects : null,
+
+ _prefBranch : null,
+
+ _listeners : null,
+
+ //Preferences props
+
+ get version() { return this._version; },
+ set version(value) { this._prefBranch.setCharPref('version', value); },
- get enabled() { return this._enabled; },
- set enabled(value) { this._prefBranch.setBoolPref('enabled', value); },
-
- get showStatusBarIcon() { return this._showStatusBarIcon; },
- set showStatusBarIcon(value) { this._prefBranch.setBoolPref('showStatusBarIcon', value); },
+ get enabled() { return this._enabled; },
+ set enabled(value) { this._prefBranch.setBoolPref('enabled', value); },
+
+ get showStatusBarIcon() { return this._showStatusBarIcon; },
+ set showStatusBarIcon(value) { this._prefBranch.setBoolPref('showStatusBarIcon', value); },
- get showContextMenu() { return this._showContextMenu; },
- set showContextMenu(value) { this._prefBranch.setBoolPref('showContextMenu', value); },
+ get showContextMenu() { return this._showContextMenu; },
+ set showContextMenu(value) { this._prefBranch.setBoolPref('showContextMenu', value); },
- get debugEnabled() { return this._debugEnabled; },
- set debugEnabled(value) { this._prefBranch.setBoolPref('debugEnabled', value); },
+ get debugEnabled() { return this._debugEnabled; },
+ set debugEnabled(value) { this._prefBranch.setBoolPref('debugEnabled', value); },
- get defaultDir() { return this._defaultDir; },
- set defaultDir(value) { this._prefBranch.setCharPref('defaultDir', value); },
+ get defaultDir() { return this._defaultDir; },
+ set defaultDir(value) { this._prefBranch.setCharPref('defaultDir', value); },
- get redirects() { return this._redirects; },
- set redirects(value) { this._prefBranch.setCharPref('redirects', value); },
+ get redirects() { return this._redirects; },
+ set redirects(value) { this._prefBranch.setCharPref('redirects', value); },
init : function() {
- this._prefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("extensions.redirector.");
+ this._prefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("extensions.redirector.");
this.reload();
this._listeners = [];
- this.service.addObserver('extensions.redirector', this, false);
- },
+ this.service.addObserver('extensions.redirector', this, false);
+ },
- dispose : function() {
- this._listeners = null;
- this.service.removeObserver('extensions.redirector', this);
+ dispose : function() {
+ this._listeners = null;
+ this.service.removeObserver('extensions.redirector', this);
},
reload : function() {
- this._version = this._prefBranch.getCharPref('version');
- this._enabled = this._prefBranch.getBoolPref('enabled');
- this._showStatusBarIcon = this._prefBranch.getBoolPref('showStatusBarIcon');
- this._showContextMenu = this._prefBranch.getBoolPref('showContextMenu');
- this._debugEnabled = this._prefBranch.getBoolPref('debugEnabled');
- this._defaultDir = this._prefBranch.getCharPref('defaultDir');
- this._redirects = this._prefBranch.getCharPref('redirects');
+ this._version = this._prefBranch.getCharPref('version');
+ this._enabled = this._prefBranch.getBoolPref('enabled');
+ this._showStatusBarIcon = this._prefBranch.getBoolPref('showStatusBarIcon');
+ this._showContextMenu = this._prefBranch.getBoolPref('showContextMenu');
+ this._debugEnabled = this._prefBranch.getBoolPref('debugEnabled');
+ this._defaultDir = this._prefBranch.getCharPref('defaultDir');
+ this._redirects = this._prefBranch.getCharPref('redirects');
},
- get service() {
- return Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranchInternal);
- },
+ get service() {
+ return Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranchInternal);
+ },
- observe : function(subject, topic, data) {
- if (topic != 'nsPref:changed') {
- return;
- }
- this.reload();
- for each (var listener in this._listeners) {
- listener && listener.changedPrefs && listener.changedPrefs(this);
- }
- },
+ observe : function(subject, topic, data) {
+ if (topic != 'nsPref:changed') {
+ return;
+ }
+ this.reload();
+ for each (var listener in this._listeners) {
+ listener && listener.changedPrefs && listener.changedPrefs(this);
+ }
+ },
addListener : function(listener) {
this._listeners.push(listener);
|