Skip to content

Commit

Permalink
Gnome guidelines
Browse files Browse the repository at this point in the history
avoid creating Object in global scope
  • Loading branch information
LukeVader-IV committed Jan 15, 2022
1 parent 7a107cf commit 504945f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@ const St = imports.gi.St;
const background = imports.ui.background;
const init_opacity = background.ANIMATION_OPACITY_STEP_INCREMENT
const init_wakeup = background.ANIMATION_MIN_WAKEUP_INTERVAL
const settings = imports.misc.extensionUtils.getSettings('org.gnome.shell.extensions.speedbackground');
const ExtensionUtils = imports.misc.extensionUtils;
const settings = null;

class Extension{
constructor(){
}

enable(){
settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.speedbackground');

background.ANIMATION_OPACITY_STEP_INCREMENT = OPACITY_STEP.get();
background.ANIMATION_MIN_WAKEUP_INTERVAL = WAKEUP_INTERVAL.get();
}

disable(){
settings = null;

background.ANIMATION_OPACITY_STEP_INCREMENT = init_opacity;
background.ANIMATION_MIN_WAKEUP_INTERVAL = init_wakeup;
}
Expand Down
Binary file added schemas/gschemas.compiled
Binary file not shown.

0 comments on commit 504945f

Please sign in to comment.