diff --git a/Random_Walls@Antares/extension.js b/Random_Walls@Antares/extension.js index 6cf4808..aa394c8 100644 --- a/Random_Walls@Antares/extension.js +++ b/Random_Walls@Antares/extension.js @@ -19,7 +19,7 @@ const _ = Gettext.gettext; const SETTINGS_FOLDER_LIST = "folder-list"; const SETTINGS_CHANGE_MODE = "change-mode"; const SETTINGS_HIDE_ICON = "hide-icon"; - +const SETTINGS_TIMEOUT = "change-time"; const CURRENT_DESK = 0; const CURRENT_LOCK = 1; @@ -316,9 +316,13 @@ function init(metadata) { if(!wallUtils.isEmpty()) { this.MyTimer = new Interval.MyTimer(); this.MyTimer.setCallback(function() { - wallUtils.changeWallpapers(); - // WARNING! Without the return true the timer will stop after the first run - return true; + // WARNING! Without the return true the timer will stop after the first run + if(_settings.get_int(SETTINGS_TIMEOUT) != 0) { + wallUtils.changeWallpapers(); + return true; + } + else + return false; }); } let theme = imports.gi.Gtk.IconTheme.get_default(); @@ -331,7 +335,7 @@ let _settings; function enable() { _indicator = new RandWallMenu(_settings); wallUtils.setIndicator(_indicator); - if(!wallUtils.isEmpty() && this.MyTimer) { + if(!wallUtils.isEmpty() && this.MyTimer && _settings.get_int(SETTINGS_TIMEOUT) != 0) { wallUtils.changeWallpapers(); this.MyTimer.start(); } diff --git a/Random_Walls@Antares/prefs.js b/Random_Walls@Antares/prefs.js index adfcef8..e25d470 100644 --- a/Random_Walls@Antares/prefs.js +++ b/Random_Walls@Antares/prefs.js @@ -98,7 +98,7 @@ const RandWallSettingsWidget = new GObject.Class({ let gHBoxTimer = new Gtk.HBox({margin:10, spacing: 20, hexpand: true}); let gLabelTimer = new Gtk.Label({label: _("Interval (in minutes)"),halign: Gtk.Align.START}); gHBoxTimer.add(gLabelTimer); - this._interval = Gtk.SpinButton.new_with_range (1, 3000, 1); + this._interval = Gtk.SpinButton.new_with_range (0, 3000, 1); gHBoxTimer.add(this._interval); this._interval.connect('changed',Lang.bind(this,this._changeInterval)); this.add(gHBoxTimer); diff --git a/Random_Walls@Antares/schemas/gschemas.compiled b/Random_Walls@Antares/schemas/gschemas.compiled index 0727a0f..dfb6934 100644 Binary files a/Random_Walls@Antares/schemas/gschemas.compiled and b/Random_Walls@Antares/schemas/gschemas.compiled differ diff --git a/Random_Walls@Antares/schemas/org.gnome.shell.extensions.randwall.gschema.xml b/Random_Walls@Antares/schemas/org.gnome.shell.extensions.randwall.gschema.xml index 7e96eb4..39aedfb 100644 --- a/Random_Walls@Antares/schemas/org.gnome.shell.extensions.randwall.gschema.xml +++ b/Random_Walls@Antares/schemas/org.gnome.shell.extensions.randwall.gschema.xml @@ -13,10 +13,10 @@ - + 60 How often are the wallpapers changed (in minutes) - Set how often are the wallpapers changed (min 1 min. max 3000 min) + Set how often are the wallpapers changed (min 0 min. max 3000 min)