Activate timer before modules and activate always on-demand timer first
This commit is contained in:
+1
-1
@@ -78,13 +78,13 @@ function start() {
|
|||||||
commander = new Commander();
|
commander = new Commander();
|
||||||
|
|
||||||
settings.enable();
|
settings.enable();
|
||||||
|
timer.enable();
|
||||||
gtkThemer.enable();
|
gtkThemer.enable();
|
||||||
shellThemer.enable();
|
shellThemer.enable();
|
||||||
iconThemer.enable();
|
iconThemer.enable();
|
||||||
cursorThemer.enable();
|
cursorThemer.enable();
|
||||||
backgrounder.enable();
|
backgrounder.enable();
|
||||||
commander.enable();
|
commander.enable();
|
||||||
timer.enable();
|
|
||||||
|
|
||||||
enabled = true;
|
enabled = true;
|
||||||
logDebug('Extension enabled.');
|
logDebug('Extension enabled.');
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ var Backgrounder = class {
|
|||||||
if (e.settings.backgrounds.enabled) {
|
if (e.settings.backgrounds.enabled) {
|
||||||
this._connectSettings();
|
this._connectSettings();
|
||||||
this._connectTimer();
|
this._connectTimer();
|
||||||
|
this._changeSystemBackground(e.timer.time);
|
||||||
}
|
}
|
||||||
logDebug('Backgrounder enabled.');
|
logDebug('Backgrounder enabled.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,10 @@ var Commander = class {
|
|||||||
enable() {
|
enable() {
|
||||||
logDebug('Enabling Commander...');
|
logDebug('Enabling Commander...');
|
||||||
this._watchStatus();
|
this._watchStatus();
|
||||||
if (e.settings.commands.enabled)
|
if (e.settings.commands.enabled) {
|
||||||
this._connectTimer();
|
this._connectTimer();
|
||||||
|
this._spawnCommand(e.timer.time);
|
||||||
|
}
|
||||||
logDebug('Commander enabled.');
|
logDebug('Commander enabled.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ var CursorThemer = class {
|
|||||||
if (e.settings.cursorVariants.enabled) {
|
if (e.settings.cursorVariants.enabled) {
|
||||||
this._connectSettings();
|
this._connectSettings();
|
||||||
this._connectTimer();
|
this._connectTimer();
|
||||||
|
this._setSystemVariant(e.timer.time);
|
||||||
}
|
}
|
||||||
logDebug('Cursor Themer enabled.');
|
logDebug('Cursor Themer enabled.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ var GtkThemer = class {
|
|||||||
this._connectSettings();
|
this._connectSettings();
|
||||||
this._updateVariants();
|
this._updateVariants();
|
||||||
this._connectTimer();
|
this._connectTimer();
|
||||||
|
this._setSystemVariant(e.timer.time);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notifyError(error);
|
notifyError(error);
|
||||||
@@ -142,11 +143,9 @@ var GtkThemer = class {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onManualChanged(_settings, enabled) {
|
_onManualChanged(_settings, _enabled) {
|
||||||
this.disable();
|
this.disable();
|
||||||
this.enable();
|
this.enable();
|
||||||
if (enabled)
|
|
||||||
this._setSystemVariant(e.timer.time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTimeChanged(_timer, newTime) {
|
_onTimeChanged(_timer, newTime) {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ var IconThemer = class {
|
|||||||
if (e.settings.iconVariants.enabled) {
|
if (e.settings.iconVariants.enabled) {
|
||||||
this._connectSettings();
|
this._connectSettings();
|
||||||
this._connectTimer();
|
this._connectTimer();
|
||||||
|
this._setSystemVariant(e.timer.time);
|
||||||
}
|
}
|
||||||
logDebug('Icon Themer enabled.');
|
logDebug('Icon Themer enabled.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ var ShellThemer = class {
|
|||||||
this._connectSettings();
|
this._connectSettings();
|
||||||
this._updateVariants();
|
this._updateVariants();
|
||||||
this._connectTimer();
|
this._connectTimer();
|
||||||
|
this._setSystemVariant(e.timer.time);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notifyError(error);
|
notifyError(error);
|
||||||
@@ -142,11 +143,9 @@ var ShellThemer = class {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onManualChanged(_settings, enabled) {
|
_onManualChanged(_settings, _enabled) {
|
||||||
this.disable();
|
this.disable();
|
||||||
this.enable();
|
this.enable();
|
||||||
if (enabled)
|
|
||||||
this._setSystemVariant(e.timer.time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTimeChanged(_timer, newTime) {
|
_onTimeChanged(_timer, newTime) {
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ var Timer = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (e.settings.time.alwaysEnableOndemand && ['nightlight', 'location', 'schedule'].includes(source))
|
if (e.settings.time.alwaysEnableOndemand && ['nightlight', 'location', 'schedule'].includes(source))
|
||||||
this._sources.push(new TimerOndemand());
|
this._sources.unshift(new TimerOndemand());
|
||||||
}
|
}
|
||||||
|
|
||||||
_enableSources() {
|
_enableSources() {
|
||||||
|
|||||||
Reference in New Issue
Block a user