From 9b4856e9c1fb25484575108f27af3a544f308e89 Mon Sep 17 00:00:00 2001 From: Romain Vigier Date: Thu, 28 Jul 2022 09:47:06 +0200 Subject: [PATCH] Settings: Remove background settings --- ....extensions.nightthemeswitcher.gschema.xml | 12 ----------- src/extension.js | 20 ------------------- 2 files changed, 32 deletions(-) diff --git a/src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml b/src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml index 3a3c1f6..fcb2c21 100644 --- a/src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml +++ b/src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml @@ -96,18 +96,6 @@ SPDX-License-Identifier: GPL-3.0-or-later The command to spawn at sunset - - - "" - Day background - Path to the day background - - - "" - Night background - Path to the night background - - diff --git a/src/extension.js b/src/extension.js index 7c082fa..04275fa 100644 --- a/src/extension.js +++ b/src/extension.js @@ -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', ''); - } - } } /**