Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Commit

Permalink
Minor Code Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mystro256 committed May 17, 2012
1 parent bee0986 commit d966d4a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions [email protected]/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const POWER_KEY = 'active';
const SCREEN_SCHEMA = 'org.gnome.desktop.screensaver';
const SCREEN_KEY = 'idle-activation-enabled';

let indicationmenu;
let indicationbutton;
//Icon variables for easy editing/customization:
let DisabledIcon = 'preferences-desktop-screensaver-symbolic';
let EnabledIcon = 'system-run-symbolic';
Expand Down Expand Up @@ -84,11 +84,11 @@ InhibitButton.prototype = {
},

destroy: function() {
if (indicationmenu._powerSettings) {
indicationmenu._powerSettings.set_boolean(POWER_KEY, true);
if (this._powerSettings) {
this._powerSettings.set_boolean(POWER_KEY, true);
}
if (indicationmenu._screenSettings) {
indicationmenu._screenSettings.set_boolean(SCREEN_KEY, true);
if (this._screenSettings) {
this._screenSettings.set_boolean(SCREEN_KEY, true);
}

Main.panel._statusArea[ROLE] = null;
Expand All @@ -105,9 +105,9 @@ function init(extensionMeta) {
}

function enable() {
indicationmenu = new InhibitButton();
indicationbutton = new InhibitButton();
}

function disable() {
indicationmenu.destroy();
indicationbutton.destroy();
}

0 comments on commit d966d4a

Please sign in to comment.