Settings: Remove background settings
This commit is contained in:
@@ -96,18 +96,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<description>The command to spawn at sunset</description>
|
||||
</key>
|
||||
</schema>
|
||||
<schema id="org.gnome.shell.extensions.nightthemeswitcher.backgrounds" path="/org/gnome/shell/extensions/nightthemeswitcher/backgrounds/">
|
||||
<key name="day" type="s">
|
||||
<default>""</default>
|
||||
<summary>Day background</summary>
|
||||
<description>Path to the day background</description>
|
||||
</key>
|
||||
<key name="night" type="s">
|
||||
<default>""</default>
|
||||
<summary>Night background</summary>
|
||||
<description>Path to the night background</description>
|
||||
</key>
|
||||
</schema>
|
||||
<schema id="org.gnome.shell.extensions.nightthemeswitcher.time" path="/org/gnome/shell/extensions/nightthemeswitcher/time/">
|
||||
<key name="time-source" type="s">
|
||||
<choices>
|
||||
|
||||
@@ -26,7 +26,6 @@ class NightThemeSwitcher {
|
||||
constructor() {
|
||||
console.debug('Initializing extension...');
|
||||
extensionUtils.initTranslations();
|
||||
this.#migrateBackgroundSettings();
|
||||
console.debug('Extension initialized.');
|
||||
}
|
||||
|
||||
@@ -82,25 +81,6 @@ class NightThemeSwitcher {
|
||||
|
||||
console.debug('Extension disabled.');
|
||||
}
|
||||
|
||||
#migrateBackgroundSettings() {
|
||||
// GNOME 42 has its own background switching mechanism. Move the day
|
||||
// and night backgrounds settings from the extension to the shell.
|
||||
// Only run once when the extension is initialized.
|
||||
const systemSettings = new Gio.Settings({ schema: 'org.gnome.desktop.background' });
|
||||
const extensionSettings = extensionUtils.getSettings(utils.getSettingsSchema('backgrounds'));
|
||||
|
||||
if (extensionSettings.get_string('day')) {
|
||||
systemSettings.set_string('picture-uri', extensionSettings.get_string('day'));
|
||||
systemSettings.set_string('picture-uri-dark', extensionSettings.get_string('day'));
|
||||
extensionSettings.set_string('day', '');
|
||||
}
|
||||
|
||||
if (extensionSettings.get_string('night')) {
|
||||
systemSettings.set_string('picture-uri-dark', extensionSettings.get_string('night'));
|
||||
extensionSettings.set_string('night', '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user