Preferences: Rename Backgrounds page to Appearance

This commit is contained in:
Romain Vigier
2026-07-29 20:11:58 +02:00
parent 25741058e6
commit 42d08b1488
6 changed files with 13 additions and 13 deletions

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

+2 -2
View File
@@ -8,12 +8,12 @@ SPDX-License-Identifier: GPL-3.0-or-later
<file compressed="true" preprocess="xml-stripblanks" alias="icons/scalable/actions/nightthemeswitcher-code-symbolic.svg">icons/code-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks" alias="icons/scalable/actions/nightthemeswitcher-translate-symbolic.svg">icons/translate-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks" alias="icons/scalable/apps/nightthemeswitcher-symbolic.svg">icons/nightthemeswitcher-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks" alias="icons/scalable/categories/nightthemeswitcher-backgrounds-symbolic.svg">icons/backgrounds-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks" alias="icons/scalable/categories/nightthemeswitcher-appearance-symbolic.svg">icons/appearance-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks" alias="icons/scalable/categories/nightthemeswitcher-commands-symbolic.svg">icons/commands-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks" alias="icons/scalable/categories/nightthemeswitcher-contribute-symbolic.svg">icons/contribute-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks" alias="icons/scalable/categories/nightthemeswitcher-schedule-symbolic.svg">icons/schedule-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks">ui/AppearancePage.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/BackgroundButton.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/BackgroundsPage.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/CommandsPage.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/ContributePage.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/SchedulePage.ui</file>
@@ -4,10 +4,10 @@ SPDX-FileCopyrightText: Night Theme Switcher Contributors
SPDX-License-Identifier: GPL-3.0-or-later
-->
<interface domain="nightthemeswitcher@romainvigier.fr">
<template class="BackgroundsPage" parent="AdwPreferencesPage">
<property name="name">backgrounds</property>
<property name="title" translatable="yes">Backgrounds</property>
<property name="icon-name">nightthemeswitcher-backgrounds-symbolic</property>
<template class="AppearancePage" parent="AdwPreferencesPage">
<property name="name">appearance</property>
<property name="title" translatable="yes">Appearance</property>
<property name="icon-name">nightthemeswitcher-appearance-symbolic</property>
<child>
<object class="AdwPreferencesGroup">
<property name="description" translatable="yes">Background switching is handled by the Shell, these settings allow you to change the images it uses.</property>
+1 -1
View File
@@ -32,8 +32,8 @@ modules = [
'modules/Timer.js',
]
preferences = [
'preferences/AppearancePage.js',
'preferences/BackgroundButton.js',
'preferences/BackgroundsPage.js',
'preferences/CommandsPage.js',
'preferences/ContributePage.js',
'preferences/SchedulePage.js',
@@ -5,12 +5,12 @@ import Adw from "gi://Adw";
import Gio from "gi://Gio";
import GObject from "gi://GObject";
export class BackgroundsPage extends Adw.PreferencesPage {
export class AppearancePage extends Adw.PreferencesPage {
static {
GObject.registerClass(
{
GTypeName: "BackgroundsPage",
Template: "resource:///org/gnome/Shell/Extensions/nightthemeswitcher/preferences/ui/BackgroundsPage.ui",
GTypeName: "AppearancePage",
Template: "resource:///org/gnome/Shell/Extensions/nightthemeswitcher/preferences/ui/AppearancePage.ui",
InternalChildren: ["day_button", "night_button"],
},
this,
+3 -3
View File
@@ -31,7 +31,7 @@ export default class NightThemeSwitcherPreferences extends ExtensionPreferences
// Dynamically import all classes
const { BackgroundButton } = await import("./preferences/BackgroundButton.js");
const { BackgroundsPage } = await import("./preferences/BackgroundsPage.js");
const { AppearancePage } = await import("./preferences/AppearancePage.js");
const { CommandsPage } = await import("./preferences/CommandsPage.js");
const { ContributePage } = await import("./preferences/ContributePage.js");
const { SchedulePage } = await import("./preferences/SchedulePage.js");
@@ -40,7 +40,7 @@ export default class NightThemeSwitcherPreferences extends ExtensionPreferences
// Make sure all GObjects are registered
GObject.type_ensure(BackgroundButton);
GObject.type_ensure(BackgroundsPage);
GObject.type_ensure(AppearancePage);
GObject.type_ensure(CommandsPage);
GObject.type_ensure(ContributePage);
GObject.type_ensure(SchedulePage);
@@ -50,7 +50,7 @@ export default class NightThemeSwitcherPreferences extends ExtensionPreferences
// Add all pages
[
new SchedulePage({ settings: this.getSettings(`${this.metadata["settings-schema"]}.time`) }),
new BackgroundsPage(),
new AppearancePage(),
new CommandsPage({ settings: this.getSettings(`${this.metadata["settings-schema"]}.commands`) }),
new ContributePage(),
].forEach((page) => window.add(page));