Preferences: Rename Schedule page to Tweaks

This commit is contained in:
Romain Vigier
2026-08-02 00:25:06 +02:00
parent 97be9bfffa
commit 0939a53411
7 changed files with 39 additions and 39 deletions
-26
View File
@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Jakub Steiner
SPDX-License-Identifier: CC0-1.0
-->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns0="http://www.w3.org/2000/svg" xmlns:ns1="https://www.gtk.org/grappa" xmlns:ns3="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ns1:version="1" ns1:state-names="outline state4 empty" ns1:state="outline" viewBox="0 0 16 16" preserveAspectRatio="xMidYMid meet" gpa:state="outline" ns0:state="outline" xmlns="http://www.w3.org/2000/svg">
<title>sand-watch</title>
<path id="sand watch" fill="none" stroke="rgb(0,0,0)" stroke-opacity="1" stroke-width="1.100" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="4" stroke-dasharray="none" stroke-dashoffset="22.5589" d="M 11 1 L 11 4 C 11 4.62474, 10.6878 5.20815, 10.1679 5.5547 L 8 7 L 8 8 L 10.1679 9.4453 C 10.6878 9.79185, 11 10.3753, 11 11 L 11 14 M 4 1 L 4 4 C 4 4.62474, 4.31223 5.20815, 4.83205 5.5547 L 7 7 L 7 8 L 4.83205 9.4453 C 4.31223 9.79185, 4 10.3753, 4 11 L 4 14 M 2 14 L 13 14 M 2 1 L 13 1" ns1:stroke-minwidth="25%" ns1:stroke-maxwidth="150%" class="transparent-fill foreground-stroke foreground-stroke" ns1:states="outline state4" data-stroke-mid="2.0" data-stroke-min="0.5" data-stroke-max="3.0" style="--darkreader-inline-stroke: var(--darkreader-text-000000, #e8e6e3);" data-darkreader-inline-stroke=""></path>
<metadata>
<rdf:rdf>
<work>
<license rdf:resource="https://creativecommons.org/publicdomain/zero/1.0/"/>
<dc:creator>
<agent>
<dc:title>Jakub Steiner</dc:title>
</agent>
</dc:creator>
<dc:subject>
<rdf:bag>
<rdf:li>adw clock sand watch clock-timer hourglass libadwaita</rdf:li>
</rdf:bag>
</dc:subject>
</work>
</rdf:rdf>
</metadata>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Jakub Steiner
SPDX-License-Identifier: CC0-1.0
-->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns0="http://www.w3.org/2000/svg" xmlns:ns1="https://www.gtk.org/grappa" xmlns:ns3="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ns1:version="1" ns1:state="outline" ns1:state-names="outline empty" viewBox="0 0 16 16" preserveAspectRatio="xMidYMid meet" gpa:state="outline" ns0:state="outline" xmlns="http://www.w3.org/2000/svg">
<title>cogged-wheel-big</title>
<path id="path0" fill="none" stroke="url(&quot;#gpa:foreground&quot;) rgb(0,0,0)" stroke-width="1.100" stroke-linecap="round" stroke-linejoin="round" d="M 8 1 C 7.48024225 0.999757886, 6.9620738 1.05740499, 6.4550786 1.171875 L 6.43554688 3.23632812 C 5.77788925 3.45227957, 5.17207241 3.80207062, 4.65625 4.26367188 L 2.859375 3.25000024 C 2.15272999 4.01477957, 1.6256038 4.92757511, 1.31640625 5.921875 L 3.09179688 6.97070312 L 3.09179688 6.97265339 C 3.0213716 7.31056118, 2.98602819 7.65483475, 2.98632812 8 C 2.98602796 8.34516525, 3.02137184 8.68943882, 3.09179711 9.02734375 L 3.09179688 9.02929401 L 1.31640637 10.0781221 C 1.62560403 11.0724249, 2.15272975 11.98522, 2.859375 12.75 L 4.65625 11.7363291 C 5.17207241 12.1979303, 5.77788877 12.54772, 6.4355464 12.7636709 L 6.4550786 14.828125 C 6.96207428 14.9425945, 7.48024273 15.0002422, 8.00000095 15.000001 C 8.51975822 15.0002432, 9.03792667 14.9425907, 9.54492188 14.828125 L 9.56445312 12.7636719 C 10.2221107 12.54772, 10.8279276 12.1979294, 11.34375 11.7363281 L 13.140625 12.75 C 13.84727 11.98522, 14.3743963 11.0724249, 14.6835938 10.078125 L 12.9082031 9.02929688 L 12.9082003 9.02732658 C 12.9786196 8.68942165, 13.0139694 8.34514904, 13.013669 7.99998331 C 13.0139694 7.65481806, 12.9786291 7.31054401, 12.9081993 6.97263956 L 12.9081993 6.97067976 L 14.6835899 5.92185163 C 14.3743906 4.9275651, 13.8472672 4.01477575, 13.140625 3.25 L 11.34375 4.26367235 C 10.8279276 3.80207109, 10.2221107 3.45227957, 9.56445312 3.23632812 L 9.54492188 1.17187488 C 9.03792667 1.05740488, 8.51975822 0.999757886, 8 1 Z M 10 8 C 9.99999905 9.10456944, 9.10456848 10, 8 10 C 6.89543009 9.99999905, 6 9.10456944, 6 8 C 5.99999952 6.89543056, 6.89543056 5.99999952, 8 6 C 9.10457039 6, 10 6.89543056, 10 8 Z" class="transparent-fill foreground-stroke foreground-stroke transparent-fill" ns1:states="outline" ns1:stroke-minwidth="25%" ns1:stroke-maxwidth="150%" data-stroke-mid="2.0" data-stroke-min="0.5" data-stroke-max="3.0"></path>
<metadata>
<rdf:rdf>
<work>
<license rdf:resource="https://creativecommons.org/publicdomain/zero/1.0/"/>
<dc:subject>
<rdf:bag>
<rdf:li>applications-system system-run emblem pegged cogged wheel circle settings-default row-preferences adw</rdf:li>
</rdf:bag>
</dc:subject>
<dc:creator>
<agent>
<dc:title>Jakub Steiner</dc:title>
</agent>
</dc:creator>
</work>
</rdf:rdf>
</metadata>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

+2 -2
View File
@@ -13,15 +13,15 @@ SPDX-License-Identifier: GPL-3.0-or-later
<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" alias="icons/scalable/categories/nightthemeswitcher-tweaks-symbolic.svg">icons/tweaks-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks">ui/AppearanceChooser.ui</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/CommandsPage.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/ContributePage.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/SchedulePage.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/ShortcutButton.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/TimeChooser.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/TweaksPage.ui</file>
<file compressed="true">style.css</file>
</gresource>
</gresources>
@@ -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="SchedulePage" parent="AdwPreferencesPage">
<property name="name">schedule</property>
<property name="title" translatable="yes">Schedule</property>
<property name="icon-name">nightthemeswitcher-schedule-symbolic</property>
<template class="TweaksPage" parent="AdwPreferencesPage">
<property name="name">tweaks</property>
<property name="title" translatable="yes">Tweaks</property>
<property name="icon-name">nightthemeswitcher-tweaks-symbolic</property>
<child>
<object class="AdwPreferencesGroup">
<child>
+1 -1
View File
@@ -41,9 +41,9 @@ preferences = [
'preferences/ColorChooser.js',
'preferences/CommandsPage.js',
'preferences/ContributePage.js',
'preferences/SchedulePage.js',
'preferences/ShortcutButton.js',
'preferences/TimeChooser.js',
'preferences/TweaksPage.js',
]
install_data(main, install_dir: INSTALL_DIR)
@@ -5,12 +5,12 @@ import Adw from "gi://Adw";
import Gio from "gi://Gio";
import GObject from "gi://GObject";
export class SchedulePage extends Adw.PreferencesPage {
export class TweaksPage extends Adw.PreferencesPage {
static {
GObject.registerClass(
{
GTypeName: "SchedulePage",
Template: "resource:///org/gnome/Shell/Extensions/nightthemeswitcher/preferences/ui/SchedulePage.ui",
GTypeName: "TweaksPage",
Template: "resource:///org/gnome/Shell/Extensions/nightthemeswitcher/preferences/ui/TweaksPage.ui",
InternalChildren: [
"manual_schedule_switch",
"keyboard_shortcut_button",
+3 -3
View File
@@ -47,9 +47,9 @@ export default class NightThemeSwitcherPreferences extends ExtensionPreferences
const { ColorChooser } = await import("./preferences/ColorChooser.js");
const { CommandsPage } = await import("./preferences/CommandsPage.js");
const { ContributePage } = await import("./preferences/ContributePage.js");
const { SchedulePage } = await import("./preferences/SchedulePage.js");
const { ShortcutButton } = await import("./preferences/ShortcutButton.js");
const { TimeChooser } = await import("./preferences/TimeChooser.js");
const { TweaksPage } = await import("./preferences/TweaksPage.js");
// Make sure all GObjects are registered
GObject.type_ensure(AppearanceChooser);
@@ -59,18 +59,18 @@ export default class NightThemeSwitcherPreferences extends ExtensionPreferences
GObject.type_ensure(ColorChooser);
GObject.type_ensure(CommandsPage);
GObject.type_ensure(ContributePage);
GObject.type_ensure(SchedulePage);
GObject.type_ensure(ShortcutButton);
GObject.type_ensure(TimeChooser);
GObject.type_ensure(TweaksPage);
// Add all pages
[
new SchedulePage({ settings: this.getSettings(`${this.metadata["settings-schema"]}.time`) }),
new AppearancePage({
accentColorSettings: this.getSettings(`${this.metadata["settings-schema"]}.accent-color`),
colorSchemeSettings: this.getSettings(`${this.metadata["settings-schema"]}.color-scheme`),
}),
new CommandsPage({ settings: this.getSettings(`${this.metadata["settings-schema"]}.commands`) }),
new TweaksPage({ settings: this.getSettings(`${this.metadata["settings-schema"]}.time`) }),
new ContributePage(),
].forEach((page) => window.add(page));
}