Split preferences into different files
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
build
|
||||
node_modules
|
||||
|
||||
**/*.ui~
|
||||
|
||||
tests/**/_variants.js
|
||||
|
||||
@@ -31,9 +31,9 @@ build: build-clean
|
||||
--extra-source=./compat.js \
|
||||
--extra-source=./config.js \
|
||||
--extra-source=./convenience.js \
|
||||
--extra-source=./prefs.ui \
|
||||
--extra-source=./utils.js \
|
||||
--extra-source=./modules/ \
|
||||
--extra-source=./preferences/ \
|
||||
--extra-source=./schemas/ \
|
||||
--extra-source=./settings/ \
|
||||
--podir=./po/ \
|
||||
@@ -86,7 +86,7 @@ pot:
|
||||
--package-name="$(NAME)" \
|
||||
--package-version="$(VERSION)" \
|
||||
--output=./src/po/$(UUID).pot \
|
||||
./src/*.js ./src/**/*.js ./src/**/*.xml ./src/*.ui
|
||||
./src/*.js ./src/**/*.js ./src/schemas/*.xml ./src/preferences/ui/*.ui
|
||||
sed -i '1,4s/SOME DESCRIPTIVE TITLE./$(NAME)/g' ./src/po/$(UUID).pot
|
||||
sed -i '1,4s/YEAR/$(COPYRIGHT_YEAR)/' ./src/po/$(UUID).pot
|
||||
sed -i "1,4s/THE PACKAGE'S COPYRIGHT HOLDER/$(AUTHOR_NAME)/" ./src/po/$(UUID).pot
|
||||
|
||||
+170
-160
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Night Theme Switcher 7\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-09-23 11:56+0200\n"
|
||||
"PO-Revision-Date: 2020-09-23 11:57+0200\n"
|
||||
"POT-Creation-Date: 2020-09-23 20:13+0200\n"
|
||||
"PO-Revision-Date: 2020-09-23 20:13+0200\n"
|
||||
"Last-Translator: Romain Vigier <romain@romainvigier.fr>\n"
|
||||
"Language-Team: French - France <romain@romainvigier.fr>\n"
|
||||
"Language: fr_FR\n"
|
||||
@@ -18,14 +18,6 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
"X-Generator: Gtranslator 3.36.0\n"
|
||||
|
||||
#: src/prefs.js:230 src/prefs.ui:643
|
||||
msgid "Choose"
|
||||
msgstr "Choisir"
|
||||
|
||||
#: src/prefs.js:350
|
||||
msgid "Default"
|
||||
msgstr "Par défaut"
|
||||
|
||||
#: src/modules/GtkThemer.js:179
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
@@ -55,6 +47,42 @@ msgstr "Passer au thème nocturne"
|
||||
msgid "Switch to day theme"
|
||||
msgstr "Passer au thème diurne"
|
||||
|
||||
#: src/preferences/Backgrounds.js:36 src/preferences/ui/backgrounds.ui:145
|
||||
msgid "Backgrounds"
|
||||
msgstr "Arrière-plans"
|
||||
|
||||
#: src/preferences/Commands.js:36 src/preferences/ui/commands.ui:132
|
||||
msgid "Commands"
|
||||
msgstr "Commandes"
|
||||
|
||||
#: src/preferences/CursorTheme.js:38
|
||||
msgid "Cursor theme"
|
||||
msgstr "Thème de curseur"
|
||||
|
||||
#: src/preferences/GtkTheme.js:38
|
||||
msgid "GTK theme"
|
||||
msgstr "Thème GTK"
|
||||
|
||||
#: src/preferences/IconTheme.js:38
|
||||
msgid "Icon theme"
|
||||
msgstr "Thème d’icônes"
|
||||
|
||||
#: src/preferences/Schedule.js:38
|
||||
msgid "Schedule"
|
||||
msgstr "Horaires"
|
||||
|
||||
#: src/preferences/Schedule.js:193 src/preferences/ui/schedule.ui:595
|
||||
msgid "Choose"
|
||||
msgstr "Choisir"
|
||||
|
||||
#: src/preferences/ShellTheme.js:38
|
||||
msgid "Shell theme"
|
||||
msgstr "Thème du shell"
|
||||
|
||||
#: src/preferences/ShellTheme.js:80
|
||||
msgid "Default"
|
||||
msgstr "Par défaut"
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:6
|
||||
msgid "Settings version"
|
||||
msgstr "Version des paramètres"
|
||||
@@ -65,7 +93,7 @@ msgstr "La version actuelle des paramètres de l’extension"
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:13
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:6
|
||||
#: src/prefs.ui:821
|
||||
#: src/preferences/ui/gtk_theme.ui:76
|
||||
msgid "Switch GTK variants"
|
||||
msgstr "Permuter les variantes GTK"
|
||||
|
||||
@@ -146,7 +174,7 @@ msgstr "Désactiver la détection automatique des variantes du thème shell"
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:57
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:46
|
||||
#: src/prefs.ui:1509
|
||||
#: src/preferences/ui/icon_theme.ui:76
|
||||
msgid "Switch icon variants"
|
||||
msgstr "Permuter les variantes d’icônes"
|
||||
|
||||
@@ -177,7 +205,7 @@ msgstr "Le thème d’icônes à utiliser la nuit"
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:74
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:61
|
||||
#: src/prefs.ui:1755
|
||||
#: src/preferences/ui/cursor_theme.ui:76
|
||||
msgid "Switch cursor variants"
|
||||
msgstr "Permuter les variantes de curseur"
|
||||
|
||||
@@ -218,7 +246,7 @@ msgstr "Les commandes seront lancées au changement d’horaire"
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:96
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:131
|
||||
#: src/prefs.ui:2432
|
||||
#: src/preferences/ui/commands.ui:174
|
||||
msgid "Sunrise command"
|
||||
msgstr "Commande du lever de soleil"
|
||||
|
||||
@@ -229,7 +257,7 @@ msgstr "La commande à lancer quand le soleil se lève"
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:101
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:136
|
||||
#: src/prefs.ui:2523
|
||||
#: src/preferences/ui/commands.ui:268
|
||||
msgid "Sunset command"
|
||||
msgstr "Commande du coucher de soleil"
|
||||
|
||||
@@ -250,7 +278,7 @@ msgstr "L’arrière-plan changera au changement d’horaire"
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:113
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:146
|
||||
#: src/prefs.ui:2088
|
||||
#: src/preferences/ui/backgrounds.ui:187
|
||||
msgid "Day background"
|
||||
msgstr "Arrière-plan diurne"
|
||||
|
||||
@@ -261,7 +289,7 @@ msgstr "Chemin vers l’arrière-plan diurne"
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:118
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:151
|
||||
#: src/prefs.ui:2177
|
||||
#: src/preferences/ui/backgrounds.ui:279
|
||||
msgid "Night background"
|
||||
msgstr "Arrière-plan nocturne"
|
||||
|
||||
@@ -340,99 +368,60 @@ msgstr "Heure du coucher"
|
||||
msgid "When the day ends"
|
||||
msgstr "Quand le jour se couche"
|
||||
|
||||
#: src/prefs.ui:58
|
||||
msgid "Press your keyboard shortcut..."
|
||||
msgstr "Pressez votre raccourci clavier…"
|
||||
#: src/preferences/ui/backgrounds.ui:97
|
||||
msgid "Switch backgrounds"
|
||||
msgstr "Permuter les arrière-plans"
|
||||
|
||||
#: src/prefs.ui:72 src/prefs.ui:629
|
||||
msgid "Keyboard shortcut"
|
||||
msgstr "Raccourci clavier"
|
||||
#: src/preferences/ui/backgrounds.ui:210 src/preferences/ui/backgrounds.ui:302
|
||||
msgid "Select your background image"
|
||||
msgstr "Sélectionnez votre image d’arrière-plan"
|
||||
|
||||
#: src/prefs.ui:75
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: src/prefs.ui:159
|
||||
msgid "Automatic time source"
|
||||
msgstr "Source d’horaires automatique"
|
||||
|
||||
#: src/prefs.ui:172
|
||||
msgid ""
|
||||
"<small>The extension will try to use Night Light or Location Services to "
|
||||
"automatically set your current sunrise and sunset times if they are enabled. "
|
||||
"If you prefer, you can manually choose a time source.</small>"
|
||||
msgstr ""
|
||||
"<small>S’ils sont activés, l’extension tentera d’utiliser le mode nuit ou "
|
||||
"les services de localisation pour déterminer automatiquement les heures de "
|
||||
"lever et de coucher du soleil. Si vous préférez, vous pouvez choisir "
|
||||
"manuellement une source d’horaires.</small>"
|
||||
|
||||
#: src/prefs.ui:236
|
||||
msgid "Manual time source"
|
||||
msgstr "Source d’horaires manuelle"
|
||||
|
||||
#: src/prefs.ui:256
|
||||
msgid "Night Light"
|
||||
msgstr "Mode nuit"
|
||||
|
||||
#: src/prefs.ui:271
|
||||
msgid "Location Services"
|
||||
msgstr "Services de localisation"
|
||||
|
||||
#: src/prefs.ui:286
|
||||
msgid "Manual schedule"
|
||||
msgstr "Horaire manuel"
|
||||
|
||||
#: src/prefs.ui:301 src/prefs.ui:590
|
||||
msgid "On-demand"
|
||||
msgstr "À la demande"
|
||||
|
||||
#: src/prefs.ui:343
|
||||
msgid "Manual schedule times"
|
||||
msgstr "Horaires manuels"
|
||||
|
||||
#: src/prefs.ui:382
|
||||
msgid "Sunrise"
|
||||
msgstr "Lever du soleil"
|
||||
|
||||
#: src/prefs.ui:418 src/prefs.ui:522
|
||||
msgid ":"
|
||||
msgstr ":"
|
||||
|
||||
#: src/prefs.ui:486
|
||||
msgid "Sunset"
|
||||
msgstr "Coucher du soleil"
|
||||
|
||||
#: src/prefs.ui:658 src/prefs.ui:2121 src/prefs.ui:2210 src/prefs.ui:2464
|
||||
#: src/prefs.ui:2555
|
||||
#: src/preferences/ui/backgrounds.ui:220 src/preferences/ui/backgrounds.ui:312
|
||||
#: src/preferences/ui/commands.ui:206 src/preferences/ui/commands.ui:300
|
||||
#: src/preferences/ui/schedule.ui:610
|
||||
msgid "Clear"
|
||||
msgstr "Effacer"
|
||||
|
||||
#: src/prefs.ui:718
|
||||
msgid "Button location"
|
||||
msgstr "Emplacement du bouton"
|
||||
#: src/preferences/ui/commands.ui:57
|
||||
msgid "Run commands"
|
||||
msgstr "Lancer des commandes"
|
||||
|
||||
#: src/prefs.ui:733
|
||||
msgid "None"
|
||||
msgstr "Aucun"
|
||||
#: src/preferences/ui/commands.ui:70
|
||||
msgid ""
|
||||
"<small>You can set custom commands that will be run when the time of the day "
|
||||
"changes.</small>"
|
||||
msgstr ""
|
||||
"<small>Vous pouvez définir des commandes personnalisées qui seront lancées "
|
||||
"quand le moment du jour change.</small>"
|
||||
|
||||
#: src/prefs.ui:734
|
||||
msgid "Top bar"
|
||||
msgstr "Barre supérieure"
|
||||
#: src/preferences/ui/commands.ui:195
|
||||
msgid "notify-send \"Hello sunshine!\""
|
||||
msgstr "notify-send \"Bonjour!\""
|
||||
|
||||
#: src/prefs.ui:735
|
||||
msgid "System menu"
|
||||
msgstr "Menu système"
|
||||
#: src/preferences/ui/commands.ui:289
|
||||
msgid "notify-send \"Hello moonshine!\""
|
||||
msgstr "notify-send \"Bonsoir!\""
|
||||
|
||||
#: src/prefs.ui:773
|
||||
msgid "Schedule"
|
||||
msgstr "Horaires"
|
||||
#: src/preferences/ui/cursor_theme.ui:125 src/preferences/ui/icon_theme.ui:125
|
||||
msgid "Variants"
|
||||
msgstr "Variantes"
|
||||
|
||||
#: src/prefs.ui:893 src/prefs.ui:968 src/prefs.ui:1237 src/prefs.ui:1312
|
||||
#: src/preferences/ui/cursor_theme.ui:167 src/preferences/ui/gtk_theme.ui:268
|
||||
#: src/preferences/ui/icon_theme.ui:167 src/preferences/ui/shell_theme.ui:268
|
||||
msgid "Day variant"
|
||||
msgstr "Variante diurne"
|
||||
|
||||
#: src/preferences/ui/cursor_theme.ui:226 src/preferences/ui/gtk_theme.ui:327
|
||||
#: src/preferences/ui/icon_theme.ui:226 src/preferences/ui/shell_theme.ui:327
|
||||
msgid "Night variant"
|
||||
msgstr "Variante nocturne"
|
||||
|
||||
#: src/preferences/ui/gtk_theme.ui:151 src/preferences/ui/gtk_theme.ui:226
|
||||
#: src/preferences/ui/shell_theme.ui:151 src/preferences/ui/shell_theme.ui:226
|
||||
msgid "Manual variants"
|
||||
msgstr "Variantes manuelles"
|
||||
|
||||
#: src/prefs.ui:906
|
||||
#: src/preferences/ui/gtk_theme.ui:164
|
||||
msgid ""
|
||||
"<small>You can manually set variants if the extension cannot automatically "
|
||||
"detect the day and night variants of your GTK theme. Please <a href="
|
||||
@@ -445,23 +434,96 @@ msgstr ""
|
||||
"shell-extension/-/issues\">soumettre une requête</a> pour obtenir le support "
|
||||
"de votre thème.</small>"
|
||||
|
||||
#: src/prefs.ui:1007 src/prefs.ui:1351 src/prefs.ui:1597 src/prefs.ui:1843
|
||||
msgid "Day variant"
|
||||
msgstr "Variante diurne"
|
||||
#: src/preferences/ui/ondemand_keyboard_shortcut_dialog.ui:62
|
||||
msgid "Press your keyboard shortcut..."
|
||||
msgstr "Pressez votre raccourci clavier…"
|
||||
|
||||
#: src/prefs.ui:1063 src/prefs.ui:1407 src/prefs.ui:1653 src/prefs.ui:1899
|
||||
msgid "Night variant"
|
||||
msgstr "Variante nocturne"
|
||||
#: src/preferences/ui/ondemand_keyboard_shortcut_dialog.ui:76
|
||||
#: src/preferences/ui/schedule.ui:581
|
||||
msgid "Keyboard shortcut"
|
||||
msgstr "Raccourci clavier"
|
||||
|
||||
#: src/prefs.ui:1116
|
||||
msgid "GTK theme"
|
||||
msgstr "Thème GTK"
|
||||
#: src/preferences/ui/ondemand_keyboard_shortcut_dialog.ui:79
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: src/prefs.ui:1165
|
||||
#: src/preferences/ui/schedule.ui:82
|
||||
msgid "Automatic time source"
|
||||
msgstr "Source d’horaires automatique"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:95
|
||||
msgid ""
|
||||
"<small>The extension will try to use Night Light or Location Services to "
|
||||
"automatically set your current sunrise and sunset times if they are enabled. "
|
||||
"If you prefer, you can manually choose a time source.</small>"
|
||||
msgstr ""
|
||||
"<small>S’ils sont activés, l’extension tentera d’utiliser le mode nuit ou "
|
||||
"les services de localisation pour déterminer automatiquement les heures de "
|
||||
"lever et de coucher du soleil. Si vous préférez, vous pouvez choisir "
|
||||
"manuellement une source d’horaires.</small>"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:158
|
||||
msgid "Manual time source"
|
||||
msgstr "Source d’horaires manuelle"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:178
|
||||
msgid "Night Light"
|
||||
msgstr "Mode nuit"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:193
|
||||
msgid "Location Services"
|
||||
msgstr "Services de localisation"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:208
|
||||
msgid "Manual schedule"
|
||||
msgstr "Horaire manuel"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:223 src/preferences/ui/schedule.ui:539
|
||||
#: src/preferences/ui/schedule.ui:719
|
||||
msgid "On-demand"
|
||||
msgstr "À la demande"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:271
|
||||
msgid "No preferences"
|
||||
msgstr "Pas de préférences"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:286 src/preferences/ui/schedule.ui:523
|
||||
msgid "Manual schedule times"
|
||||
msgstr "Horaires manuels"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:328
|
||||
msgid "Sunrise"
|
||||
msgstr "Lever du soleil"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:364 src/preferences/ui/schedule.ui:471
|
||||
msgid ":"
|
||||
msgstr ":"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:435
|
||||
msgid "Sunset"
|
||||
msgstr "Coucher du soleil"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:673
|
||||
msgid "Button location"
|
||||
msgstr "Emplacement du bouton"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:689
|
||||
msgid "None"
|
||||
msgstr "Aucun"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:690
|
||||
msgid "Top bar"
|
||||
msgstr "Barre supérieure"
|
||||
|
||||
#: src/preferences/ui/schedule.ui:691
|
||||
msgid "System menu"
|
||||
msgstr "Menu système"
|
||||
|
||||
#: src/preferences/ui/shell_theme.ui:76
|
||||
msgid "Switch Shell variants"
|
||||
msgstr "Permuter les variantes Shell"
|
||||
|
||||
#: src/prefs.ui:1250
|
||||
#: src/preferences/ui/shell_theme.ui:164
|
||||
msgid ""
|
||||
"<small>You can manually set variants if the extension cannot automatically "
|
||||
"detect the day and night variants of your GNOME Shell theme. Please <a href="
|
||||
@@ -474,58 +536,6 @@ msgstr ""
|
||||
"gnome-shell-extension/-/issues\">soumettre une requête</a> pour obtenir le "
|
||||
"support de votre thème.</small>"
|
||||
|
||||
#: src/prefs.ui:1460
|
||||
msgid "Shell theme"
|
||||
msgstr "Thème du shell"
|
||||
|
||||
#: src/prefs.ui:1558 src/prefs.ui:1804
|
||||
msgid "Variants"
|
||||
msgstr "Variantes"
|
||||
|
||||
#: src/prefs.ui:1706
|
||||
msgid "Icon theme"
|
||||
msgstr "Thème d’icônes"
|
||||
|
||||
#: src/prefs.ui:1952
|
||||
msgid "Cursor theme"
|
||||
msgstr "Thème de curseur"
|
||||
|
||||
#: src/prefs.ui:2001
|
||||
msgid "Switch backgrounds"
|
||||
msgstr "Permuter les arrière-plans"
|
||||
|
||||
#: src/prefs.ui:2049 src/prefs.ui:2263
|
||||
msgid "Backgrounds"
|
||||
msgstr "Arrière-plans"
|
||||
|
||||
#: src/prefs.ui:2111 src/prefs.ui:2200
|
||||
msgid "Select your background image"
|
||||
msgstr "Sélectionnez votre image d’arrière-plan"
|
||||
|
||||
#: src/prefs.ui:2318
|
||||
msgid "Run commands"
|
||||
msgstr "Lancer des commandes"
|
||||
|
||||
#: src/prefs.ui:2331
|
||||
msgid ""
|
||||
"<small>You can set custom commands that will be run when the time of the day "
|
||||
"changes.</small>"
|
||||
msgstr ""
|
||||
"<small>Vous pouvez définir des commandes personnalisées qui seront lancées "
|
||||
"quand le moment du jour change.</small>"
|
||||
|
||||
#: src/prefs.ui:2393 src/prefs.ui:2611
|
||||
msgid "Commands"
|
||||
msgstr "Commandes"
|
||||
|
||||
#: src/prefs.ui:2453
|
||||
msgid "notify-send \"Hello sunshine!\""
|
||||
msgstr "notify-send \"Bonjour!\""
|
||||
|
||||
#: src/prefs.ui:2544
|
||||
msgid "notify-send \"Hello moonshine!\""
|
||||
msgstr "notify-send \"Bonsoir!\""
|
||||
|
||||
#~ msgid "Original GTK theme"
|
||||
#~ msgstr "Thème GTK original"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Night Theme Switcher 37\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-09-23 11:56+0200\n"
|
||||
"POT-Creation-Date: 2020-09-23 20:13+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -17,14 +17,6 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/prefs.js:230 src/prefs.ui:643
|
||||
msgid "Choose"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.js:350
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/GtkThemer.js:179
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
@@ -48,6 +40,42 @@ msgstr ""
|
||||
msgid "Switch to day theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Backgrounds.js:36 src/preferences/ui/backgrounds.ui:145
|
||||
msgid "Backgrounds"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Commands.js:36 src/preferences/ui/commands.ui:132
|
||||
msgid "Commands"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/CursorTheme.js:38
|
||||
msgid "Cursor theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/GtkTheme.js:38
|
||||
msgid "GTK theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/IconTheme.js:38
|
||||
msgid "Icon theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Schedule.js:38
|
||||
msgid "Schedule"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Schedule.js:193 src/preferences/ui/schedule.ui:595
|
||||
msgid "Choose"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ShellTheme.js:38
|
||||
msgid "Shell theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ShellTheme.js:80
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:6
|
||||
msgid "Settings version"
|
||||
msgstr ""
|
||||
@@ -58,7 +86,7 @@ msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:13
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:6
|
||||
#: src/prefs.ui:821
|
||||
#: src/preferences/ui/gtk_theme.ui:76
|
||||
msgid "Switch GTK variants"
|
||||
msgstr ""
|
||||
|
||||
@@ -139,7 +167,7 @@ msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:57
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:46
|
||||
#: src/prefs.ui:1509
|
||||
#: src/preferences/ui/icon_theme.ui:76
|
||||
msgid "Switch icon variants"
|
||||
msgstr ""
|
||||
|
||||
@@ -170,7 +198,7 @@ msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:74
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:61
|
||||
#: src/prefs.ui:1755
|
||||
#: src/preferences/ui/cursor_theme.ui:76
|
||||
msgid "Switch cursor variants"
|
||||
msgstr ""
|
||||
|
||||
@@ -211,7 +239,7 @@ msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:96
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:131
|
||||
#: src/prefs.ui:2432
|
||||
#: src/preferences/ui/commands.ui:174
|
||||
msgid "Sunrise command"
|
||||
msgstr ""
|
||||
|
||||
@@ -222,7 +250,7 @@ msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:101
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:136
|
||||
#: src/prefs.ui:2523
|
||||
#: src/preferences/ui/commands.ui:268
|
||||
msgid "Sunset command"
|
||||
msgstr ""
|
||||
|
||||
@@ -243,7 +271,7 @@ msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:113
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:146
|
||||
#: src/prefs.ui:2088
|
||||
#: src/preferences/ui/backgrounds.ui:187
|
||||
msgid "Day background"
|
||||
msgstr ""
|
||||
|
||||
@@ -254,7 +282,7 @@ msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:118
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:151
|
||||
#: src/prefs.ui:2177
|
||||
#: src/preferences/ui/backgrounds.ui:279
|
||||
msgid "Night background"
|
||||
msgstr ""
|
||||
|
||||
@@ -333,95 +361,58 @@ msgstr ""
|
||||
msgid "When the day ends"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:58
|
||||
msgid "Press your keyboard shortcut..."
|
||||
#: src/preferences/ui/backgrounds.ui:97
|
||||
msgid "Switch backgrounds"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:72 src/prefs.ui:629
|
||||
msgid "Keyboard shortcut"
|
||||
#: src/preferences/ui/backgrounds.ui:210 src/preferences/ui/backgrounds.ui:302
|
||||
msgid "Select your background image"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:75
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:159
|
||||
msgid "Automatic time source"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:172
|
||||
msgid ""
|
||||
"<small>The extension will try to use Night Light or Location Services to "
|
||||
"automatically set your current sunrise and sunset times if they are enabled. "
|
||||
"If you prefer, you can manually choose a time source.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:236
|
||||
msgid "Manual time source"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:256
|
||||
msgid "Night Light"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:271
|
||||
msgid "Location Services"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:286
|
||||
msgid "Manual schedule"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:301 src/prefs.ui:590
|
||||
msgid "On-demand"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:343
|
||||
msgid "Manual schedule times"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:382
|
||||
msgid "Sunrise"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:418 src/prefs.ui:522
|
||||
msgid ":"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:486
|
||||
msgid "Sunset"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:658 src/prefs.ui:2121 src/prefs.ui:2210 src/prefs.ui:2464
|
||||
#: src/prefs.ui:2555
|
||||
#: src/preferences/ui/backgrounds.ui:220 src/preferences/ui/backgrounds.ui:312
|
||||
#: src/preferences/ui/commands.ui:206 src/preferences/ui/commands.ui:300
|
||||
#: src/preferences/ui/schedule.ui:610
|
||||
msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:718
|
||||
msgid "Button location"
|
||||
#: src/preferences/ui/commands.ui:57
|
||||
msgid "Run commands"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:733
|
||||
msgid "None"
|
||||
#: src/preferences/ui/commands.ui:70
|
||||
msgid ""
|
||||
"<small>You can set custom commands that will be run when the time of the day "
|
||||
"changes.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:734
|
||||
msgid "Top bar"
|
||||
#: src/preferences/ui/commands.ui:195
|
||||
msgid "notify-send \"Hello sunshine!\""
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:735
|
||||
msgid "System menu"
|
||||
#: src/preferences/ui/commands.ui:289
|
||||
msgid "notify-send \"Hello moonshine!\""
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:773
|
||||
msgid "Schedule"
|
||||
#: src/preferences/ui/cursor_theme.ui:125 src/preferences/ui/icon_theme.ui:125
|
||||
msgid "Variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:893 src/prefs.ui:968 src/prefs.ui:1237 src/prefs.ui:1312
|
||||
#: src/preferences/ui/cursor_theme.ui:167 src/preferences/ui/gtk_theme.ui:268
|
||||
#: src/preferences/ui/icon_theme.ui:167 src/preferences/ui/shell_theme.ui:268
|
||||
msgid "Day variant"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/cursor_theme.ui:226 src/preferences/ui/gtk_theme.ui:327
|
||||
#: src/preferences/ui/icon_theme.ui:226 src/preferences/ui/shell_theme.ui:327
|
||||
msgid "Night variant"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/gtk_theme.ui:151 src/preferences/ui/gtk_theme.ui:226
|
||||
#: src/preferences/ui/shell_theme.ui:151 src/preferences/ui/shell_theme.ui:226
|
||||
msgid "Manual variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:906
|
||||
#: src/preferences/ui/gtk_theme.ui:164
|
||||
msgid ""
|
||||
"<small>You can manually set variants if the extension cannot automatically "
|
||||
"detect the day and night variants of your GTK theme. Please <a href="
|
||||
@@ -429,76 +420,95 @@ msgid ""
|
||||
"\">submit a request</a> to get your theme supported.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:1007 src/prefs.ui:1351 src/prefs.ui:1597 src/prefs.ui:1843
|
||||
msgid "Day variant"
|
||||
#: src/preferences/ui/ondemand_keyboard_shortcut_dialog.ui:62
|
||||
msgid "Press your keyboard shortcut..."
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:1063 src/prefs.ui:1407 src/prefs.ui:1653 src/prefs.ui:1899
|
||||
msgid "Night variant"
|
||||
#: src/preferences/ui/ondemand_keyboard_shortcut_dialog.ui:76
|
||||
#: src/preferences/ui/schedule.ui:581
|
||||
msgid "Keyboard shortcut"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:1116
|
||||
msgid "GTK theme"
|
||||
#: src/preferences/ui/ondemand_keyboard_shortcut_dialog.ui:79
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:1165
|
||||
#: src/preferences/ui/schedule.ui:82
|
||||
msgid "Automatic time source"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:95
|
||||
msgid ""
|
||||
"<small>The extension will try to use Night Light or Location Services to "
|
||||
"automatically set your current sunrise and sunset times if they are enabled. "
|
||||
"If you prefer, you can manually choose a time source.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:158
|
||||
msgid "Manual time source"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:178
|
||||
msgid "Night Light"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:193
|
||||
msgid "Location Services"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:208
|
||||
msgid "Manual schedule"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:223 src/preferences/ui/schedule.ui:539
|
||||
#: src/preferences/ui/schedule.ui:719
|
||||
msgid "On-demand"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:271
|
||||
msgid "No preferences"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:286 src/preferences/ui/schedule.ui:523
|
||||
msgid "Manual schedule times"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:328
|
||||
msgid "Sunrise"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:364 src/preferences/ui/schedule.ui:471
|
||||
msgid ":"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:435
|
||||
msgid "Sunset"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:673
|
||||
msgid "Button location"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:689
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:690
|
||||
msgid "Top bar"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:691
|
||||
msgid "System menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/shell_theme.ui:76
|
||||
msgid "Switch Shell variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:1250
|
||||
#: src/preferences/ui/shell_theme.ui:164
|
||||
msgid ""
|
||||
"<small>You can manually set variants if the extension cannot automatically "
|
||||
"detect the day and night variants of your GNOME Shell theme. Please <a href="
|
||||
"\"https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/issues"
|
||||
"\">submit a request</a> to get your theme supported.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:1460
|
||||
msgid "Shell theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:1558 src/prefs.ui:1804
|
||||
msgid "Variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:1706
|
||||
msgid "Icon theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:1952
|
||||
msgid "Cursor theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:2001
|
||||
msgid "Switch backgrounds"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:2049 src/prefs.ui:2263
|
||||
msgid "Backgrounds"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:2111 src/prefs.ui:2200
|
||||
msgid "Select your background image"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:2318
|
||||
msgid "Run commands"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:2331
|
||||
msgid ""
|
||||
"<small>You can set custom commands that will be run when the time of the day "
|
||||
"changes.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:2393 src/prefs.ui:2611
|
||||
msgid "Commands"
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:2453
|
||||
msgid "notify-send \"Hello sunshine!\""
|
||||
msgstr ""
|
||||
|
||||
#: src/prefs.ui:2544
|
||||
msgid "notify-send \"Hello moonshine!\""
|
||||
msgstr ""
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
Night Theme Switcher Gnome Shell extension
|
||||
|
||||
Copyright (C) 2020 Romain Vigier
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { GdkPixbuf, Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata.uuid);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var BackgroundsPreferences = class {
|
||||
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'backgrounds.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('backgrounds');
|
||||
this.name = 'backgrounds';
|
||||
this.title = _('Backgrounds');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.backgrounds.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const choosers = this._builder.get_object('choosers');
|
||||
settings.backgrounds.settings.bind(
|
||||
'enabled',
|
||||
choosers,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const dayChooser = this._builder.get_object('day_chooser');
|
||||
const dayBackgroundPreview = this._builder.get_object('day_background_preview');
|
||||
const updateDayChooserUri = () => {
|
||||
dayChooser.set_uri(settings.backgrounds.day);
|
||||
};
|
||||
settings.backgrounds.connect('day-changed', () => updateDayChooserUri());
|
||||
dayChooser.connect('update-preview', () => {
|
||||
const file = dayChooser.get_preview_filename();
|
||||
const allowedContentTypes = ['image/jpeg', 'image/png', 'image/tiff'];
|
||||
if (allowedContentTypes.includes(Gio.content_type_guess(file, null)[0])) {
|
||||
const pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(file, 256, 256);
|
||||
dayBackgroundPreview.set_from_pixbuf(pixbuf);
|
||||
}
|
||||
});
|
||||
dayChooser.connect('file-set', () => {
|
||||
settings.backgrounds.day = dayChooser.get_uri();
|
||||
});
|
||||
updateDayChooserUri();
|
||||
|
||||
const dayClearButton = this._builder.get_object('day_clear_button');
|
||||
dayClearButton.connect('clicked', () => {
|
||||
settings.backgrounds.day = '';
|
||||
});
|
||||
const updateDayClearButtonSensitivity = () => {
|
||||
dayClearButton.sensitive = !!settings.backgrounds.day;
|
||||
};
|
||||
settings.backgrounds.connect('day-changed', () => updateDayClearButtonSensitivity());
|
||||
updateDayClearButtonSensitivity();
|
||||
|
||||
const nightChooser = this._builder.get_object('night_chooser');
|
||||
const nightBackgroundPreview = this._builder.get_object('night_background_preview');
|
||||
const updateNightChooserUri = () => {
|
||||
nightChooser.set_uri(settings.backgrounds.night);
|
||||
};
|
||||
settings.backgrounds.connect('night-changed', () => updateNightChooserUri());
|
||||
nightChooser.connect('update-preview', () => {
|
||||
const file = nightChooser.get_preview_filename();
|
||||
const allowedContentTypes = ['image/jpeg', 'image/png', 'image/tiff'];
|
||||
if (allowedContentTypes.includes(Gio.content_type_guess(file, null)[0])) {
|
||||
const pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(file, 256, 256);
|
||||
nightBackgroundPreview.set_from_pixbuf(pixbuf);
|
||||
}
|
||||
});
|
||||
nightChooser.connect('file-set', () => {
|
||||
settings.backgrounds.night = nightChooser.get_uri();
|
||||
});
|
||||
updateNightChooserUri();
|
||||
|
||||
const nightClearButton = this._builder.get_object('night_clear_button');
|
||||
nightClearButton.connect('clicked', () => {
|
||||
settings.backgrounds.night = '';
|
||||
});
|
||||
const updateNightClearButtonSensitivity = () => {
|
||||
nightClearButton.sensitive = !!settings.backgrounds.night;
|
||||
};
|
||||
settings.backgrounds.connect('night-changed', () => updateNightClearButtonSensitivity());
|
||||
updateNightClearButtonSensitivity();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
Night Theme Switcher Gnome Shell extension
|
||||
|
||||
Copyright (C) 2020 Romain Vigier
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata.uuid);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var CommandsPreferences = class {
|
||||
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'commands.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('commands');
|
||||
this.name = 'commands';
|
||||
this.title = _('Commands');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.commands.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const entries = this._builder.get_object('entries');
|
||||
settings.commands.settings.bind(
|
||||
'enabled',
|
||||
entries,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const sunriseEntry = this._builder.get_object('sunrise_entry');
|
||||
settings.commands.settings.bind(
|
||||
'sunrise',
|
||||
sunriseEntry,
|
||||
'text',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const sunriseClearButton = this._builder.get_object('sunrise_clear_button');
|
||||
sunriseClearButton.connect('clicked', () => {
|
||||
settings.commands.sunrise = '';
|
||||
});
|
||||
const updateSunriseClearButtonSensitivity = () => {
|
||||
sunriseClearButton.sensitive = !!settings.commands.sunrise;
|
||||
};
|
||||
settings.commands.connect('sunrise-changed', () => updateSunriseClearButtonSensitivity());
|
||||
updateSunriseClearButtonSensitivity();
|
||||
|
||||
const sunsetEntry = this._builder.get_object('sunset_entry');
|
||||
settings.commands.settings.bind(
|
||||
'sunset',
|
||||
sunsetEntry,
|
||||
'text',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const sunsetClearButton = this._builder.get_object('sunset_clear_button');
|
||||
sunsetClearButton.connect('clicked', () => {
|
||||
settings.commands.sunset = '';
|
||||
});
|
||||
const updateSunsetClearButtonSensitivity = () => {
|
||||
sunsetClearButton.sensitive = !!settings.commands.sunset;
|
||||
};
|
||||
settings.commands.connect('sunset-changed', () => updateSunsetClearButtonSensitivity());
|
||||
updateSunsetClearButtonSensitivity();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Night Theme Switcher Gnome Shell extension
|
||||
|
||||
Copyright (C) 2020 Romain Vigier
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata.uuid);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var CursorThemePreferences = class {
|
||||
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'cursor_theme.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('cursor_theme');
|
||||
this.name = 'cursor-theme';
|
||||
this.title = _('Cursor theme');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.cursorVariants.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const variants = this._builder.get_object('variants');
|
||||
settings.cursorVariants.settings.bind(
|
||||
'enabled',
|
||||
variants,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const installedCursorThemes = Array.from(utils.getInstalledCursorThemes()).sort();
|
||||
const dayCombo = this._builder.get_object('day_combo');
|
||||
const nightCombo = this._builder.get_object('night_combo');
|
||||
installedCursorThemes.forEach(theme => {
|
||||
dayCombo.append(theme, theme);
|
||||
nightCombo.append(theme, theme);
|
||||
});
|
||||
settings.cursorVariants.settings.bind(
|
||||
'day',
|
||||
dayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
settings.cursorVariants.settings.bind(
|
||||
'night',
|
||||
nightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
Night Theme Switcher Gnome Shell extension
|
||||
|
||||
Copyright (C) 2020 Romain Vigier
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata.uuid);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var GtkThemePreferences = class {
|
||||
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'gtk_theme.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('gtk_theme');
|
||||
this.name = 'gtk-theme';
|
||||
this.title = _('GTK theme');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.gtkVariants.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manual = this._builder.get_object('manual');
|
||||
settings.gtkVariants.settings.bind(
|
||||
'enabled',
|
||||
manual,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manualSwitch = this._builder.get_object('manual_switch');
|
||||
settings.gtkVariants.settings.bind(
|
||||
'manual',
|
||||
manualSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const variants = this._builder.get_object('variants');
|
||||
const updateVariantsSensitivity = () => {
|
||||
variants.sensitive = !!(settings.gtkVariants.enabled && settings.gtkVariants.manual);
|
||||
};
|
||||
settings.gtkVariants.connect('status-changed', () => updateVariantsSensitivity());
|
||||
settings.gtkVariants.connect('manual-changed', () => updateVariantsSensitivity());
|
||||
updateVariantsSensitivity();
|
||||
|
||||
const dayCombo = this._builder.get_object('day_combo');
|
||||
const nightCombo = this._builder.get_object('night_combo');
|
||||
const installedGtkThemes = Array.from(utils.getInstalledGtkThemes()).sort();
|
||||
installedGtkThemes.forEach(theme => {
|
||||
dayCombo.append(theme, theme);
|
||||
nightCombo.append(theme, theme);
|
||||
});
|
||||
settings.gtkVariants.settings.bind(
|
||||
'day',
|
||||
dayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
settings.gtkVariants.settings.bind(
|
||||
'night',
|
||||
nightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Night Theme Switcher Gnome Shell extension
|
||||
|
||||
Copyright (C) 2020 Romain Vigier
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata.uuid);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var IconThemePreferences = class {
|
||||
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'icon_theme.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('icon_theme');
|
||||
this.name = 'icon-theme';
|
||||
this.title = _('Icon theme');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.iconVariants.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const variants = this._builder.get_object('variants');
|
||||
settings.iconVariants.settings.bind(
|
||||
'enabled',
|
||||
variants,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const installedIconThemes = Array.from(utils.getInstalledIconThemes()).sort();
|
||||
const dayCombo = this._builder.get_object('day_combo');
|
||||
const nightCombo = this._builder.get_object('night_combo');
|
||||
installedIconThemes.forEach(theme => {
|
||||
dayCombo.append(theme, theme);
|
||||
nightCombo.append(theme, theme);
|
||||
});
|
||||
settings.iconVariants.settings.bind(
|
||||
'day',
|
||||
dayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
settings.iconVariants.settings.bind(
|
||||
'night',
|
||||
nightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Night Theme Switcher Gnome Shell extension
|
||||
|
||||
Copyright (C) 2020 Romain Vigier
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { Gdk, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata.uuid);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
|
||||
var OndemandKeyboardShortcutDialog = class {
|
||||
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'ondemand_keyboard_shortcut_dialog.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('dialog');
|
||||
|
||||
this._connectSettings(settings);
|
||||
|
||||
return this.widget;
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
this.widget.connect('key-press-event', (_widget, event) => {
|
||||
const state = event.get_state()[1];
|
||||
let mask = state & Gtk.accelerator_get_default_mod_mask();
|
||||
mask &= ~Gdk.ModifierType.LOCK_MASK;
|
||||
const keycode = event.get_keycode()[1];
|
||||
const eventKeyval = event.get_keyval()[1];
|
||||
let keyval = Gdk.keyval_to_lower(eventKeyval);
|
||||
|
||||
if (mask === 0 && keyval === Gdk.KEY_Escape) {
|
||||
this.widget.visible = false;
|
||||
return Gdk.EVENT_STOP;
|
||||
}
|
||||
|
||||
if (keyval === Gdk.KEY_ISO_Left_Tab)
|
||||
keyval = Gdk.KEY_Tab;
|
||||
|
||||
if (keyval !== eventKeyval)
|
||||
mask |= Gdk.ModifierType.SHIFT_MASK;
|
||||
|
||||
if (keyval === Gdk.KEY_Sys_Req && (mask & Gdk.ModifierType.MOD1_MASK) !== 0)
|
||||
keyval = Gdk.KEY_Print;
|
||||
|
||||
if (
|
||||
!utils.isBindingValid({ mask, keycode, keyval }) ||
|
||||
!utils.isAccelValid({ mask, keyval })
|
||||
)
|
||||
return Gdk.EVENT_STOP;
|
||||
|
||||
const binding = Gtk.accelerator_name_with_keycode(
|
||||
null,
|
||||
keyval,
|
||||
keycode,
|
||||
mask
|
||||
);
|
||||
settings.time.ondemandKeybinding = binding;
|
||||
this.widget.close();
|
||||
return Gdk.EVENT_STOP;
|
||||
});
|
||||
|
||||
const cancelButton = this._builder.get_object('cancel_button');
|
||||
cancelButton.connect('clicked', () => {
|
||||
this.widget.close();
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
Night Theme Switcher Gnome Shell extension
|
||||
|
||||
Copyright (C) 2020 Romain Vigier
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const { Settings } = Me.imports.settings.Settings;
|
||||
|
||||
const { BackgroundsPreferences } = Me.imports.preferences.Backgrounds;
|
||||
const { CommandsPreferences } = Me.imports.preferences.Commands;
|
||||
const { CursorThemePreferences } = Me.imports.preferences.CursorTheme;
|
||||
const { GtkThemePreferences } = Me.imports.preferences.GtkTheme;
|
||||
const { IconThemePreferences } = Me.imports.preferences.IconTheme;
|
||||
const { SchedulePreferences } = Me.imports.preferences.Schedule;
|
||||
const { ShellThemePreferences } = Me.imports.preferences.ShellTheme;
|
||||
|
||||
|
||||
var Preferences = class {
|
||||
|
||||
constructor() {
|
||||
this.settings = new Settings();
|
||||
this.settings.enable();
|
||||
|
||||
this.widget = new Gtk.Stack({
|
||||
interpolate_size: true,
|
||||
vhomogeneous: false,
|
||||
transition_type: Gtk.StackTransitionType.SLIDE_LEFT_RIGHT,
|
||||
visible: true,
|
||||
});
|
||||
|
||||
const schedulePreferences = new SchedulePreferences(this.settings);
|
||||
this.widget.add_titled(schedulePreferences.widget, schedulePreferences.name, schedulePreferences.title);
|
||||
|
||||
const gtkThemePreferences = new GtkThemePreferences(this.settings);
|
||||
this.widget.add_titled(gtkThemePreferences.widget, gtkThemePreferences.name, gtkThemePreferences.title);
|
||||
|
||||
const shellThemePreferences = new ShellThemePreferences(this.settings);
|
||||
this.widget.add_titled(shellThemePreferences.widget, shellThemePreferences.name, shellThemePreferences.title);
|
||||
|
||||
const iconThemePreferences = new IconThemePreferences(this.settings);
|
||||
this.widget.add_titled(iconThemePreferences.widget, iconThemePreferences.name, iconThemePreferences.title);
|
||||
|
||||
const cursorThemePreferences = new CursorThemePreferences(this.settings);
|
||||
this.widget.add_titled(cursorThemePreferences.widget, cursorThemePreferences.name, cursorThemePreferences.title);
|
||||
|
||||
const backgroundsPreferences = new BackgroundsPreferences(this.settings);
|
||||
this.widget.add_titled(backgroundsPreferences.widget, backgroundsPreferences.name, backgroundsPreferences.title);
|
||||
|
||||
const commandsPreferences = new CommandsPreferences(this.settings);
|
||||
this.widget.add_titled(commandsPreferences.widget, commandsPreferences.name, commandsPreferences.title);
|
||||
|
||||
this.titlebar = new Gtk.StackSwitcher({
|
||||
stack: this.widget,
|
||||
visible: true,
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,222 @@
|
||||
/*
|
||||
Night Theme Switcher Gnome Shell extension
|
||||
|
||||
Copyright (C) 2020 Romain Vigier
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const { OndemandKeyboardShortcutDialog } = Me.imports.preferences.OndemandKeyboardShortcutDialog;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata.uuid);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var SchedulePreferences = class {
|
||||
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'schedule.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('schedule');
|
||||
this.name = 'schedule';
|
||||
this.title = _('Schedule');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const autoSwitch = this._builder.get_object('auto_switch');
|
||||
settings.time.settings.bind(
|
||||
'manual-time-source',
|
||||
autoSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.INVERT_BOOLEAN
|
||||
);
|
||||
|
||||
const manual = this._builder.get_object('manual');
|
||||
settings.time.settings.bind(
|
||||
'manual-time-source',
|
||||
manual,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manualNightlightRadio = this._builder.get_object('manual_nightlight_radio');
|
||||
const updateManualNightlightRadioActivity = () => {
|
||||
manualNightlightRadio.active = settings.time.timeSource === 'nightlight';
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualNightlightRadioActivity());
|
||||
settings.system.colorSettings.bind(
|
||||
'night-light-enabled',
|
||||
manualNightlightRadio,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
manualNightlightRadio.connect('toggled', () => {
|
||||
if (manualNightlightRadio.active)
|
||||
settings.time.timeSource = 'nightlight';
|
||||
});
|
||||
updateManualNightlightRadioActivity();
|
||||
|
||||
const manualLocationRadio = this._builder.get_object('manual_location_radio');
|
||||
const updateManualLocationRadioActivity = () => {
|
||||
manualLocationRadio.active = settings.time.timeSource === 'location';
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualLocationRadioActivity());
|
||||
settings.system.locationSettings.bind(
|
||||
'enabled',
|
||||
manualLocationRadio,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
manualLocationRadio.connect('toggled', () => {
|
||||
if (manualLocationRadio.active)
|
||||
settings.time.timeSource = 'location';
|
||||
});
|
||||
updateManualLocationRadioActivity();
|
||||
|
||||
const manualScheduleRadio = this._builder.get_object('manual_schedule_radio');
|
||||
const updateManualScheduleRadioActivity = () => {
|
||||
manualScheduleRadio.active = settings.time.timeSource === 'schedule';
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualScheduleRadioActivity());
|
||||
manualScheduleRadio.connect('toggled', () => {
|
||||
if (manualScheduleRadio.active)
|
||||
settings.time.timeSource = 'schedule';
|
||||
});
|
||||
updateManualScheduleRadioActivity();
|
||||
|
||||
const manualOndemandRadio = this._builder.get_object('manual_ondemand_radio');
|
||||
const updateManualOndemandRadioActivity = () => {
|
||||
manualOndemandRadio.active = settings.time.timeSource === 'ondemand';
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualOndemandRadioActivity());
|
||||
manualOndemandRadio.connect('toggled', () => {
|
||||
if (manualOndemandRadio.active)
|
||||
settings.time.timeSource = 'ondemand';
|
||||
});
|
||||
updateManualOndemandRadioActivity();
|
||||
|
||||
const manualPrefsStack = this._builder.get_object('manual_prefs_stack');
|
||||
const updateManualPrefsStackVisible = () => {
|
||||
switch (settings.time.timeSource) {
|
||||
case 'schedule':
|
||||
manualPrefsStack.set_visible_child_name('schedule_times');
|
||||
break;
|
||||
case 'ondemand':
|
||||
manualPrefsStack.set_visible_child_name('ondemand');
|
||||
break;
|
||||
default:
|
||||
manualPrefsStack.set_visible_child_name('none');
|
||||
}
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualPrefsStackVisible());
|
||||
updateManualPrefsStackVisible();
|
||||
|
||||
const scheduleTimesSunriseHoursSpin = this._builder.get_object('schedule_times_sunrise_hours_spin');
|
||||
scheduleTimesSunriseHoursSpin.value = Math.trunc(settings.time.scheduleSunrise);
|
||||
scheduleTimesSunriseHoursSpin.connect('output', () => {
|
||||
const text = scheduleTimesSunriseHoursSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleTimesSunriseHoursSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleTimesSunriseHoursSpin.connect('value-changed', () => {
|
||||
const oldTime = settings.time.scheduleSunrise;
|
||||
const oldHour = Math.trunc(oldTime);
|
||||
const newMinutes = oldTime - oldHour;
|
||||
const newTime = scheduleTimesSunriseHoursSpin.value + newMinutes;
|
||||
settings.time.scheduleSunrise = newTime;
|
||||
});
|
||||
|
||||
const scheduleTimesSunriseMinutesSpin = this._builder.get_object('schedule_times_sunrise_minutes_spin');
|
||||
scheduleTimesSunriseMinutesSpin.value = Math.round((settings.time.scheduleSunrise - Math.trunc(settings.time.scheduleSunrise)) * 60);
|
||||
scheduleTimesSunriseMinutesSpin.connect('output', () => {
|
||||
const text = scheduleTimesSunriseMinutesSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleTimesSunriseMinutesSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleTimesSunriseMinutesSpin.connect('value-changed', () => {
|
||||
const hour = Math.trunc(settings.time.scheduleSunrise);
|
||||
const newMinutes = scheduleTimesSunriseMinutesSpin.value / 60;
|
||||
const newTime = hour + newMinutes;
|
||||
settings.time.scheduleSunrise = newTime;
|
||||
});
|
||||
|
||||
const scheduleTimesSunsetHoursSpin = this._builder.get_object('schedule_times_sunset_hours_spin');
|
||||
scheduleTimesSunsetHoursSpin.value = Math.trunc(settings.time.scheduleSunset);
|
||||
scheduleTimesSunsetHoursSpin.connect('output', () => {
|
||||
const text = scheduleTimesSunsetHoursSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleTimesSunsetHoursSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleTimesSunsetHoursSpin.connect('value-changed', () => {
|
||||
const oldTime = settings.time.scheduleSunset;
|
||||
const oldHour = Math.trunc(oldTime);
|
||||
const newMinutes = oldTime - oldHour;
|
||||
const newTime = scheduleTimesSunsetHoursSpin.value + newMinutes;
|
||||
settings.time.scheduleSunset = newTime;
|
||||
});
|
||||
|
||||
const scheduleTimesSunsetMinutesSpin = this._builder.get_object('schedule_times_sunset_minutes_spin');
|
||||
scheduleTimesSunsetMinutesSpin.value = Math.round((settings.time.scheduleSunset - Math.trunc(settings.time.scheduleSunset)) * 60);
|
||||
scheduleTimesSunsetMinutesSpin.connect('output', () => {
|
||||
const text = scheduleTimesSunsetMinutesSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleTimesSunsetMinutesSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleTimesSunsetMinutesSpin.connect('value-changed', () => {
|
||||
const hour = Math.trunc(settings.time.scheduleSunset);
|
||||
const newMinutes = scheduleTimesSunsetMinutesSpin.value / 60;
|
||||
const newTime = hour + newMinutes;
|
||||
settings.time.scheduleSunset = newTime;
|
||||
});
|
||||
|
||||
const ondemandShortcutButton = this._builder.get_object('ondemand_shortcut_button');
|
||||
const updateOndemandShortcutButtonLabel = () => {
|
||||
const label = settings.time.ondemandKeybinding;
|
||||
ondemandShortcutButton.label = label || _('Choose');
|
||||
};
|
||||
settings.time.connect('ondemand-keybinding-changed', () => updateOndemandShortcutButtonLabel());
|
||||
ondemandShortcutButton.connect('clicked', () => {
|
||||
const dialog = new OndemandKeyboardShortcutDialog(settings);
|
||||
dialog.set_transient_for(this.widget.get_toplevel());
|
||||
dialog.present();
|
||||
});
|
||||
updateOndemandShortcutButtonLabel();
|
||||
|
||||
const ondemandShortcutClearButton = this._builder.get_object('ondemand_shortcut_clear_button');
|
||||
ondemandShortcutClearButton.connect('clicked', () => {
|
||||
settings.time.ondemandKeybinding = '';
|
||||
});
|
||||
const updateOndemandShortcutClearButtonVisibility = () => {
|
||||
ondemandShortcutClearButton.visible = !!settings.time.ondemandKeybinding;
|
||||
};
|
||||
settings.time.connect('ondemand-keybinding-changed', () => updateOndemandShortcutClearButtonVisibility());
|
||||
updateOndemandShortcutClearButtonVisibility();
|
||||
|
||||
const ondemandButtonPlacementCombo = this._builder.get_object('ondemand_button_placement_combo');
|
||||
settings.time.settings.bind(
|
||||
'ondemand-button-placement',
|
||||
ondemandButtonPlacementCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
Night Theme Switcher Gnome Shell extension
|
||||
|
||||
Copyright (C) 2020 Romain Vigier
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata.uuid);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var ShellThemePreferences = class {
|
||||
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'shell_theme.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('shell_theme');
|
||||
this.name = 'shell-theme';
|
||||
this.title = _('Shell theme');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.shellVariants.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manual = this._builder.get_object('manual');
|
||||
settings.shellVariants.settings.bind(
|
||||
'enabled',
|
||||
manual,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manualSwitch = this._builder.get_object('manual_switch');
|
||||
settings.shellVariants.settings.bind(
|
||||
'manual',
|
||||
manualSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const variants = this._builder.get_object('variants');
|
||||
const updateVariantsSensitivity = () => {
|
||||
variants.sensitive = !!(settings.shellVariants.enabled && settings.shellVariants.manual);
|
||||
};
|
||||
settings.shellVariants.connect('status-changed', () => updateVariantsSensitivity());
|
||||
settings.shellVariants.connect('manual-changed', () => updateVariantsSensitivity());
|
||||
updateVariantsSensitivity();
|
||||
|
||||
const dayCombo = this._builder.get_object('day_combo');
|
||||
const nightCombo = this._builder.get_object('night_combo');
|
||||
const installedShellThemes = Array.from(utils.getInstalledShellThemes()).sort();
|
||||
installedShellThemes.forEach(theme => {
|
||||
const themeName = theme === '' ? _('Default') : theme;
|
||||
dayCombo.append(theme, themeName);
|
||||
nightCombo.append(theme, themeName);
|
||||
});
|
||||
settings.shellVariants.settings.bind(
|
||||
'day',
|
||||
dayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
settings.shellVariants.settings.bind(
|
||||
'night',
|
||||
nightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,357 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0
|
||||
|
||||
Copyright (C) 2020
|
||||
|
||||
This file is part of Night Theme Switcher.
|
||||
|
||||
Night Theme Switcher is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Night Theme Switcher is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Night Theme Switcher. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Romain Vigier
|
||||
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Night Theme Switcher -->
|
||||
<!-- interface-copyright 2020 -->
|
||||
<!-- interface-authors Romain Vigier -->
|
||||
<object class="GtkImage" id="day_background_preview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="pixel_size">256</property>
|
||||
<property name="icon_name">image-missing</property>
|
||||
<property name="icon_size">0</property>
|
||||
</object>
|
||||
<object class="GtkFileFilter" id="image_filter">
|
||||
<mime-types>
|
||||
<mime-type>image/jpeg</mime-type>
|
||||
<mime-type>image/png</mime-type>
|
||||
<mime-type>image/tiff</mime-type>
|
||||
</mime-types>
|
||||
</object>
|
||||
<object class="GtkImage" id="night_background_preview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="pixel_size">256</property>
|
||||
<property name="icon_name">image-missing</property>
|
||||
<property name="icon_size">0</property>
|
||||
</object>
|
||||
<object class="GtkBox" id="backgrounds">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">36</property>
|
||||
<property name="margin_right">36</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Switch backgrounds</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="choosers">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Backgrounds</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Day background</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkFileChooserButton" id="day_chooser">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="filter">image_filter</property>
|
||||
<property name="preview_widget">day_background_preview</property>
|
||||
<property name="use_preview_label">False</property>
|
||||
<property name="title" translatable="yes">Select your background image</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="day_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Night background</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkFileChooserButton" id="night_chooser">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="filter">image_filter</property>
|
||||
<property name="preview_widget">night_background_preview</property>
|
||||
<property name="use_preview_label">False</property>
|
||||
<property name="title" translatable="yes">Select your background image</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="night_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,348 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0 -->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="GtkBox" id="commands">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">36</property>
|
||||
<property name="margin_right">36</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Run commands</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>You can set custom commands that will be run when the time of the day changes.</small></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="max_width_chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="entries">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Commands</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Sunrise command</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="sunrise_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="width_chars">28</property>
|
||||
<property name="truncate_multiline">True</property>
|
||||
<property name="placeholder_text" translatable="yes">notify-send "Hello sunshine!"</property>
|
||||
<property name="input_purpose">terminal</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="sunrise_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Sunset command</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="sunset_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="width_chars">28</property>
|
||||
<property name="truncate_multiline">True</property>
|
||||
<property name="placeholder_text" translatable="yes">notify-send "Hello moonshine!"</property>
|
||||
<property name="input_purpose">terminal</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="sunset_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,271 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0
|
||||
|
||||
Copyright (C) 2020
|
||||
|
||||
This file is part of Night Theme Switcher.
|
||||
|
||||
Night Theme Switcher is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Night Theme Switcher is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Night Theme Switcher. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Romain Vigier
|
||||
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Night Theme Switcher -->
|
||||
<!-- interface-copyright 2020 -->
|
||||
<!-- interface-authors Romain Vigier -->
|
||||
<object class="GtkBox" id="cursor_theme">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">36</property>
|
||||
<property name="margin_right">36</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Switch cursor variants</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="variants">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Variants</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Day variant</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="day_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Night variant</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="night_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,372 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0
|
||||
|
||||
Copyright (C) 2020
|
||||
|
||||
This file is part of Night Theme Switcher.
|
||||
|
||||
Night Theme Switcher is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Night Theme Switcher is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Night Theme Switcher. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Romain Vigier
|
||||
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Night Theme Switcher -->
|
||||
<!-- interface-copyright 2020 -->
|
||||
<!-- interface-authors Romain Vigier -->
|
||||
<object class="GtkBox" id="gtk_theme">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">36</property>
|
||||
<property name="margin_right">36</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Switch GTK variants</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="manual">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual variants</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>You can manually set variants if the extension cannot automatically detect the day and night variants of your GTK theme. Please <a href="https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/issues">submit a request</a> to get your theme supported.</small></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="max_width_chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="manual_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="variants">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual variants</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Day variant</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="day_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Night variant</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="night_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,271 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0
|
||||
|
||||
Copyright (C) 2020
|
||||
|
||||
This file is part of Romain Vigier.
|
||||
|
||||
Romain Vigier is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Romain Vigier is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Romain Vigier. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Romain Vigier
|
||||
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Romain Vigier -->
|
||||
<!-- interface-copyright 2020 -->
|
||||
<!-- interface-authors Romain Vigier -->
|
||||
<object class="GtkBox" id="icon_theme">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">36</property>
|
||||
<property name="margin_right">36</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Switch icon variants</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="variants">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Variants</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Day variant</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="day_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Night variant</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="night_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0
|
||||
|
||||
Copyright (C) 2020
|
||||
|
||||
This file is part of Night Theme Switcher.
|
||||
|
||||
Night Theme Switcher is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Night Theme Switcher is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Night Theme Switcher. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Romain Vigier
|
||||
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Night Theme Switcher -->
|
||||
<!-- interface-copyright 2020 -->
|
||||
<!-- interface-authors Romain Vigier -->
|
||||
<object class="GtkDialog" id="dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="default_width">440</property>
|
||||
<property name="default_height">200</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Press your keyboard shortcut...</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Keyboard shortcut</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="yes">Cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,747 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0
|
||||
|
||||
Copyright (C) 2020
|
||||
|
||||
This file is part of Night Theme Switcher.
|
||||
|
||||
Night Theme Switcher is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Night Theme Switcher is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Night Theme Switcher. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Romain Vigier
|
||||
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Night Theme Switcher -->
|
||||
<!-- interface-copyright 2020 -->
|
||||
<!-- interface-authors Romain Vigier -->
|
||||
<object class="GtkBox" id="schedule">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">36</property>
|
||||
<property name="margin_right">36</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="auto">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Automatic time source</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>The extension will try to use Night Light or Location Services to automatically set your current sunrise and sunset times if they are enabled. If you prefer, you can manually choose a time source.</small></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="max_width_chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="auto_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="manual">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual time source</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="manual_nightlight_radio">
|
||||
<property name="label" translatable="yes">Night Light</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="manual_location_radio">
|
||||
<property name="label" translatable="yes">Location Services</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">manual_nightlight_radio</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="manual_schedule_radio">
|
||||
<property name="label" translatable="yes">Manual schedule</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">manual_nightlight_radio</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="manual_ondemand_radio">
|
||||
<property name="label" translatable="yes">On-demand</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">manual_nightlight_radio</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="manual_prefs_stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="vhomogeneous">False</property>
|
||||
<property name="transition_type">crossfade</property>
|
||||
<property name="interpolate_size">True</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="none">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">none</property>
|
||||
<property name="title" translatable="yes">No preferences</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="schedule_times">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual schedule times</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Sunrise</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="schedule_times_sunrise_hours_spin">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="max_length">2</property>
|
||||
<property name="width_chars">2</property>
|
||||
<property name="text">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">sunrise_hours_adjustment</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="schedule_times_sunrise_minutes_spin">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="max_length">2</property>
|
||||
<property name="width_chars">2</property>
|
||||
<property name="text">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">sunrise_minutes_adjustment</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Sunset</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="schedule_times_sunset_hours_spin">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="max_length">2</property>
|
||||
<property name="width_chars">2</property>
|
||||
<property name="text">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">sunset_hours_adjustment</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="schedule_times_sunset_minutes_spin">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="max_length">2</property>
|
||||
<property name="width_chars">2</property>
|
||||
<property name="text">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">sunset_minutes_adjustment</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">schedule_times</property>
|
||||
<property name="title" translatable="yes">Manual schedule times</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="ondemand">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">On-demand</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Keyboard shortcut</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="ondemand_shortcut_button">
|
||||
<property name="label" translatable="yes">Choose</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="ondemand_shortcut_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Button location</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="ondemand_button_placement_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="active">1</property>
|
||||
<property name="active_id">panel</property>
|
||||
<items>
|
||||
<item id="none" translatable="yes">None</item>
|
||||
<item id="panel" translatable="yes">Top bar</item>
|
||||
<item id="menu" translatable="yes">System menu</item>
|
||||
</items>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">ondemand</property>
|
||||
<property name="title" translatable="yes">On-demand</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="sunrise_hours_adjustment">
|
||||
<property name="upper">23</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="sunrise_minutes_adjustment">
|
||||
<property name="upper">59</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="sunset_hours_adjustment">
|
||||
<property name="upper">23</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="sunset_minutes_adjustment">
|
||||
<property name="upper">59</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,372 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0
|
||||
|
||||
Copyright (C) 2020
|
||||
|
||||
This file is part of Night Theme Switcher.
|
||||
|
||||
Night Theme Switcher is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Night Theme Switcher is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Night Theme Switcher. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Romain Vigier
|
||||
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Night Theme Switcher -->
|
||||
<!-- interface-copyright 2020 -->
|
||||
<!-- interface-authors Romain Vigier -->
|
||||
<object class="GtkBox" id="shell_theme">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">36</property>
|
||||
<property name="margin_right">36</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Switch Shell variants</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="manual">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual variants</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>You can manually set variants if the extension cannot automatically detect the day and night variants of your GNOME Shell theme. Please <a href="https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/issues">submit a request</a> to get your theme supported.</small></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="max_width_chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="manual_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="variants">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual variants</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Day variant</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="day_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Night variant</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="night_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
+10
-588
@@ -18,16 +18,13 @@ this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
|
||||
'use strict';
|
||||
|
||||
const { Gdk, GdkPixbuf, Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { GLib } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const { compat, utils } = Me.imports;
|
||||
const { Settings } = Me.imports.settings.Settings;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata.uuid);
|
||||
const _ = Gettext.gettext;
|
||||
const { Preferences } = Me.imports.preferences.Preferences;
|
||||
|
||||
|
||||
function init() {
|
||||
@@ -35,587 +32,12 @@ function init() {
|
||||
}
|
||||
|
||||
function buildPrefsWidget() {
|
||||
const prefsWidget = new Preferences();
|
||||
return prefsWidget;
|
||||
const preferences = new Preferences();
|
||||
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
||||
const window = preferences.widget.get_toplevel();
|
||||
window.resize(800, 200);
|
||||
const titlebar = window.get_titlebar();
|
||||
titlebar.custom_title = preferences.titlebar;
|
||||
});
|
||||
return preferences.widget;
|
||||
}
|
||||
|
||||
|
||||
const Preferences = class {
|
||||
|
||||
constructor() {
|
||||
// this.settings = compat.getExtensionSettings();
|
||||
this.settings = new Settings();
|
||||
this.settings.enable();
|
||||
// this.colorSettings = new Gio.Settings({ schema: 'org.gnome.settings-daemon.plugins.color' });
|
||||
// this.locationSettings = new Gio.Settings({ schema: 'org.gnome.system.location' });
|
||||
|
||||
this.builder = new Gtk.Builder();
|
||||
this.builder.set_translation_domain(Me.metadata.uuid);
|
||||
this.builder.add_from_file(GLib.build_filenamev([Me.path, 'prefs.ui']));
|
||||
|
||||
this.widget = this.builder.get_object('prefs_notebook');
|
||||
|
||||
this._connectSchedulePreferences();
|
||||
this._connectGtkThemePreferences();
|
||||
this._connectShellThemePreferences();
|
||||
this._connectIconThemePreferences();
|
||||
this._connectCursorThemePreferences();
|
||||
this._connectBackgroundPreferences();
|
||||
this._connectCommandsPreferences();
|
||||
this._connectOndemandKeyboardShortcutDialog();
|
||||
|
||||
return this.widget;
|
||||
}
|
||||
|
||||
_connectSchedulePreferences() {
|
||||
const scheduleAutoSwitch = this.builder.get_object('prefs_schedule_auto_switch');
|
||||
this.settings.time.settings.bind(
|
||||
'manual-time-source',
|
||||
scheduleAutoSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.INVERT_BOOLEAN
|
||||
);
|
||||
|
||||
const scheduleManualTimeSource = this.builder.get_object('prefs_schedule_manual_time_source');
|
||||
this.settings.time.settings.bind(
|
||||
'manual-time-source',
|
||||
scheduleManualTimeSource,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const scheduleManualTimeSourceNightlightRadio = this.builder.get_object('prefs_schedule_manual_time_source_nightlight_radio');
|
||||
const updateScheduleManualTimeSourceNightlightRadioActivity = () => {
|
||||
scheduleManualTimeSourceNightlightRadio.active = this.settings.time.timeSource === 'nightlight';
|
||||
};
|
||||
this.settings.time.connect('time-source-changed', () => updateScheduleManualTimeSourceNightlightRadioActivity());
|
||||
this.settings.system.colorSettings.bind(
|
||||
'night-light-enabled',
|
||||
scheduleManualTimeSourceNightlightRadio,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
scheduleManualTimeSourceNightlightRadio.connect('toggled', () => {
|
||||
if (scheduleManualTimeSourceNightlightRadio.active)
|
||||
this.settings.time.timeSource = 'nightlight';
|
||||
});
|
||||
updateScheduleManualTimeSourceNightlightRadioActivity();
|
||||
|
||||
const scheduleManualTimeSourceLocationRadio = this.builder.get_object('prefs_schedule_manual_time_source_location_radio');
|
||||
const updateScheduleManualTimeSourceLocationRadioActivity = () => {
|
||||
scheduleManualTimeSourceLocationRadio.active = this.settings.time.timeSource === 'location';
|
||||
};
|
||||
this.settings.time.connect('time-source-changed', () => updateScheduleManualTimeSourceLocationRadioActivity());
|
||||
this.settings.system.locationSettings.bind(
|
||||
'enabled',
|
||||
scheduleManualTimeSourceLocationRadio,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
scheduleManualTimeSourceLocationRadio.connect('toggled', () => {
|
||||
if (scheduleManualTimeSourceLocationRadio.active)
|
||||
this.settings.time.timeSource = 'location';
|
||||
});
|
||||
updateScheduleManualTimeSourceLocationRadioActivity();
|
||||
|
||||
const scheduleManualTimeSourceManualRadio = this.builder.get_object('prefs_schedule_manual_time_source_manual_radio');
|
||||
const updateScheduleManualTimeSourceManualRadioActivity = () => {
|
||||
scheduleManualTimeSourceManualRadio.active = this.settings.time.timeSource === 'schedule';
|
||||
};
|
||||
this.settings.time.connect('time-source-changed', () => updateScheduleManualTimeSourceManualRadioActivity());
|
||||
scheduleManualTimeSourceManualRadio.connect('toggled', () => {
|
||||
if (scheduleManualTimeSourceManualRadio.active)
|
||||
this.settings.time.timeSource = 'schedule';
|
||||
});
|
||||
updateScheduleManualTimeSourceManualRadioActivity();
|
||||
|
||||
const scheduleManualTimeSourceOndemandRadio = this.builder.get_object('prefs_schedule_manual_time_source_ondemand_radio');
|
||||
const updateScheduleManualTimeSourceOndemandRadioActivity = () => {
|
||||
scheduleManualTimeSourceOndemandRadio.active = this.settings.time.timeSource === 'ondemand';
|
||||
};
|
||||
this.settings.time.connect('time-source-changed', () => updateScheduleManualTimeSourceOndemandRadioActivity());
|
||||
scheduleManualTimeSourceOndemandRadio.connect('toggled', () => {
|
||||
if (scheduleManualTimeSourceOndemandRadio.active)
|
||||
this.settings.time.timeSource = 'ondemand';
|
||||
});
|
||||
updateScheduleManualTimeSourceOndemandRadioActivity();
|
||||
|
||||
const scheduleManualScheduleTimes = this.builder.get_object('prefs_schedule_manual_schedule_times');
|
||||
const updateScheduleManualScheduleTimesVisibility = () => {
|
||||
scheduleManualScheduleTimes.visible = this.settings.time.timeSource === 'schedule';
|
||||
};
|
||||
this.settings.time.settings.bind(
|
||||
'manual-time-source',
|
||||
scheduleManualScheduleTimes,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
this.settings.time.connect('time-source-changed', () => updateScheduleManualScheduleTimesVisibility());
|
||||
updateScheduleManualScheduleTimesVisibility();
|
||||
|
||||
const scheduleManualScheduleTimesSunriseHoursSpin = this.builder.get_object('prefs_schedule_manual_schedule_times_sunrise_hours_spin');
|
||||
scheduleManualScheduleTimesSunriseHoursSpin.value = Math.trunc(this.settings.time.scheduleSunrise);
|
||||
scheduleManualScheduleTimesSunriseHoursSpin.connect('output', () => {
|
||||
const text = scheduleManualScheduleTimesSunriseHoursSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleManualScheduleTimesSunriseHoursSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleManualScheduleTimesSunriseHoursSpin.connect('value-changed', () => {
|
||||
const oldTime = this.settings.time.scheduleSunrise;
|
||||
const oldHour = Math.trunc(oldTime);
|
||||
const newMinutes = oldTime - oldHour;
|
||||
const newTime = scheduleManualScheduleTimesSunriseHoursSpin.value + newMinutes;
|
||||
this.settings.time.scheduleSunrise = newTime;
|
||||
});
|
||||
|
||||
const scheduleManualScheduleTimesSunriseMinutesSpin = this.builder.get_object('prefs_schedule_manual_schedule_times_sunrise_minutes_spin');
|
||||
scheduleManualScheduleTimesSunriseMinutesSpin.value = Math.round((this.settings.time.scheduleSunrise - Math.trunc(this.settings.time.scheduleSunrise)) * 60);
|
||||
scheduleManualScheduleTimesSunriseMinutesSpin.connect('output', () => {
|
||||
const text = scheduleManualScheduleTimesSunriseMinutesSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleManualScheduleTimesSunriseMinutesSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleManualScheduleTimesSunriseMinutesSpin.connect('value-changed', () => {
|
||||
const hour = Math.trunc(this.settings.time.scheduleSunrise);
|
||||
const newMinutes = scheduleManualScheduleTimesSunriseMinutesSpin.value / 60;
|
||||
const newTime = hour + newMinutes;
|
||||
this.settings.time.scheduleSunrise = newTime;
|
||||
});
|
||||
|
||||
const scheduleManualScheduleTimesSunsetHoursSpin = this.builder.get_object('prefs_schedule_manual_schedule_times_sunset_hours_spin');
|
||||
scheduleManualScheduleTimesSunsetHoursSpin.value = Math.trunc(this.settings.time.scheduleSunset);
|
||||
scheduleManualScheduleTimesSunsetHoursSpin.connect('output', () => {
|
||||
const text = scheduleManualScheduleTimesSunsetHoursSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleManualScheduleTimesSunsetHoursSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleManualScheduleTimesSunsetHoursSpin.connect('value-changed', () => {
|
||||
const oldTime = this.settings.time.scheduleSunset;
|
||||
const oldHour = Math.trunc(oldTime);
|
||||
const newMinutes = oldTime - oldHour;
|
||||
const newTime = scheduleManualScheduleTimesSunsetHoursSpin.value + newMinutes;
|
||||
this.settings.time.scheduleSunset = newTime;
|
||||
});
|
||||
|
||||
const scheduleManualScheduleTimesSunsetMinutesSpin = this.builder.get_object('prefs_schedule_manual_schedule_times_sunset_minutes_spin');
|
||||
scheduleManualScheduleTimesSunsetMinutesSpin.value = Math.round((this.settings.time.scheduleSunset - Math.trunc(this.settings.time.scheduleSunset)) * 60);
|
||||
scheduleManualScheduleTimesSunsetMinutesSpin.connect('output', () => {
|
||||
const text = scheduleManualScheduleTimesSunsetMinutesSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleManualScheduleTimesSunsetMinutesSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleManualScheduleTimesSunsetMinutesSpin.connect('value-changed', () => {
|
||||
const hour = Math.trunc(this.settings.time.scheduleSunset);
|
||||
const newMinutes = scheduleManualScheduleTimesSunsetMinutesSpin.value / 60;
|
||||
const newTime = hour + newMinutes;
|
||||
this.settings.time.scheduleSunset = newTime;
|
||||
});
|
||||
|
||||
const scheduleOndemand = this.builder.get_object('prefs_schedule_ondemand');
|
||||
const updateScheduleOndemandVisibility = () => {
|
||||
scheduleOndemand.visible = this.settings.time.timeSource === 'ondemand';
|
||||
};
|
||||
this.settings.time.settings.bind(
|
||||
'manual-time-source',
|
||||
scheduleOndemand,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
this.settings.time.connect('time-source-changed', () => updateScheduleOndemandVisibility());
|
||||
updateScheduleOndemandVisibility();
|
||||
|
||||
const scheduleOndemandShortcutButton = this.builder.get_object('prefs_schedule_ondemand_shortcut_button');
|
||||
const updateScheduleOndemandShortcutButtonLabel = () => {
|
||||
const label = this.settings.time.ondemandKeybinding;
|
||||
scheduleOndemandShortcutButton.label = label || _('Choose');
|
||||
};
|
||||
this.settings.time.connect('ondemand-keybinding-changed', () => updateScheduleOndemandShortcutButtonLabel());
|
||||
scheduleOndemandShortcutButton.connect('clicked', () => {
|
||||
const dialog = this.builder.get_object('ondemand_keyboard_shortcut_dialog');
|
||||
dialog.set_transient_for(this.widget.get_toplevel());
|
||||
dialog.show_all();
|
||||
});
|
||||
updateScheduleOndemandShortcutButtonLabel();
|
||||
|
||||
const scheduleOndemandShortcutClearButton = this.builder.get_object('prefs_schedule_ondemand_shortcut_clear_button');
|
||||
scheduleOndemandShortcutClearButton.connect('clicked', () => {
|
||||
this.settings.time.ondemandKeybinding = '';
|
||||
});
|
||||
const updateScheduleOndemandShortcutClearButtonVisibility = () => {
|
||||
scheduleOndemandShortcutClearButton.visible = !!this.settings.time.ondemandKeybinding;
|
||||
};
|
||||
this.settings.time.connect('ondemand-keybinding-changed', () => updateScheduleOndemandShortcutClearButtonVisibility());
|
||||
updateScheduleOndemandShortcutClearButtonVisibility();
|
||||
|
||||
const scheduleOndemandButtonPlacementCombo = this.builder.get_object('prefs_schedule_ondemand_button_placement_combo');
|
||||
this.settings.time.settings.bind(
|
||||
'ondemand-button-placement',
|
||||
scheduleOndemandButtonPlacementCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
_connectGtkThemePreferences() {
|
||||
const gtkThemeSwitchVariantsSwitch = this.builder.get_object('prefs_gtk_theme_switch_variants_switch');
|
||||
this.settings.gtkVariants.settings.bind(
|
||||
'enabled',
|
||||
gtkThemeSwitchVariantsSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const gtkThemeManualVariants = this.builder.get_object('prefs_gtk_theme_manual_variants');
|
||||
this.settings.gtkVariants.settings.bind(
|
||||
'enabled',
|
||||
gtkThemeManualVariants,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const gtkThemeManualVariantsSwitch = this.builder.get_object('prefs_gtk_theme_manual_variants_switch');
|
||||
this.settings.gtkVariants.settings.bind(
|
||||
'manual',
|
||||
gtkThemeManualVariantsSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const gtkThemeVariants = this.builder.get_object('prefs_gtk_theme_variants');
|
||||
const updateGtkThemeVariantsSensitivity = () => {
|
||||
gtkThemeVariants.sensitive = !!(this.settings.gtkVariants.enabled && this.settings.gtkVariants.manual);
|
||||
};
|
||||
this.settings.gtkVariants.connect('status-changed', () => updateGtkThemeVariantsSensitivity());
|
||||
this.settings.gtkVariants.connect('manual-changed', () => updateGtkThemeVariantsSensitivity());
|
||||
updateGtkThemeVariantsSensitivity();
|
||||
|
||||
const gtkThemeVariantsDayCombo = this.builder.get_object('prefs_gtk_theme_variants_day_combo');
|
||||
const gtkThemeVariantsNightCombo = this.builder.get_object('prefs_gtk_theme_variants_night_combo');
|
||||
const installedGtkThemes = Array.from(utils.getInstalledGtkThemes()).sort();
|
||||
installedGtkThemes.forEach(theme => {
|
||||
gtkThemeVariantsDayCombo.append(theme, theme);
|
||||
gtkThemeVariantsNightCombo.append(theme, theme);
|
||||
});
|
||||
this.settings.gtkVariants.settings.bind(
|
||||
'day',
|
||||
gtkThemeVariantsDayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
this.settings.gtkVariants.settings.bind(
|
||||
'night',
|
||||
gtkThemeVariantsNightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
_connectShellThemePreferences() {
|
||||
const shellThemeSwitchVariantsSwitch = this.builder.get_object('prefs_shell_theme_switch_variants_switch');
|
||||
this.settings.shellVariants.settings.bind(
|
||||
'enabled',
|
||||
shellThemeSwitchVariantsSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const shellThemeManualVariants = this.builder.get_object('prefs_shell_theme_manual_variants');
|
||||
this.settings.shellVariants.settings.bind(
|
||||
'enabled',
|
||||
shellThemeManualVariants,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const shellThemeManualVariantsSwitch = this.builder.get_object('prefs_shell_theme_manual_variants_switch');
|
||||
this.settings.shellVariants.settings.bind(
|
||||
'manual',
|
||||
shellThemeManualVariantsSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const shellThemeVariants = this.builder.get_object('prefs_shell_theme_variants');
|
||||
const updateShellThemeVariantsSensitivity = () => {
|
||||
shellThemeVariants.sensitive = !!(this.settings.shellVariants.enabled && this.settings.shellVariants.manual);
|
||||
};
|
||||
this.settings.shellVariants.connect('status-changed', () => updateShellThemeVariantsSensitivity());
|
||||
this.settings.shellVariants.connect('manual-changed', () => updateShellThemeVariantsSensitivity());
|
||||
updateShellThemeVariantsSensitivity();
|
||||
|
||||
const shellThemeVariantsDayCombo = this.builder.get_object('prefs_shell_theme_variants_day_combo');
|
||||
const shellThemeVariantsNightCombo = this.builder.get_object('prefs_shell_theme_variants_night_combo');
|
||||
const installedShellThemes = Array.from(utils.getInstalledShellThemes()).sort();
|
||||
installedShellThemes.forEach(theme => {
|
||||
const themeName = theme === '' ? _('Default') : theme;
|
||||
shellThemeVariantsDayCombo.append(theme, themeName);
|
||||
shellThemeVariantsNightCombo.append(theme, themeName);
|
||||
});
|
||||
this.settings.shellVariants.settings.bind(
|
||||
'day',
|
||||
shellThemeVariantsDayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
this.settings.shellVariants.settings.bind(
|
||||
'night',
|
||||
shellThemeVariantsNightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
_connectIconThemePreferences() {
|
||||
const iconThemeSwitchVariantsSwitch = this.builder.get_object('prefs_icon_theme_switch_variants_switch');
|
||||
this.settings.iconVariants.settings.bind(
|
||||
'enabled',
|
||||
iconThemeSwitchVariantsSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const iconThemeVariants = this.builder.get_object('prefs_icon_theme_variants');
|
||||
this.settings.iconVariants.settings.bind(
|
||||
'enabled',
|
||||
iconThemeVariants,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const installedIconThemes = Array.from(utils.getInstalledIconThemes()).sort();
|
||||
const iconThemeVariantsDayCombo = this.builder.get_object('prefs_icon_theme_variants_day_combo');
|
||||
const iconThemeVariantsNightCombo = this.builder.get_object('prefs_icon_theme_variants_night_combo');
|
||||
installedIconThemes.forEach(theme => {
|
||||
iconThemeVariantsDayCombo.append(theme, theme);
|
||||
iconThemeVariantsNightCombo.append(theme, theme);
|
||||
});
|
||||
this.settings.iconVariants.settings.bind(
|
||||
'day',
|
||||
iconThemeVariantsDayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
this.settings.iconVariants.settings.bind(
|
||||
'night',
|
||||
iconThemeVariantsNightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
_connectCursorThemePreferences() {
|
||||
const cursorThemeSwitchVariantsSwitch = this.builder.get_object('prefs_cursor_theme_switch_variants_switch');
|
||||
this.settings.cursorVariants.settings.bind(
|
||||
'enabled',
|
||||
cursorThemeSwitchVariantsSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const cursorThemeVariants = this.builder.get_object('prefs_cursor_theme_variants');
|
||||
this.settings.cursorVariants.settings.bind(
|
||||
'enabled',
|
||||
cursorThemeVariants,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const installedCursorThemes = Array.from(utils.getInstalledCursorThemes()).sort();
|
||||
const cursorThemeVariantsDayCombo = this.builder.get_object('prefs_cursor_theme_variants_day_combo');
|
||||
const cursorThemeVariantsNightCombo = this.builder.get_object('prefs_cursor_theme_variants_night_combo');
|
||||
installedCursorThemes.forEach(theme => {
|
||||
cursorThemeVariantsDayCombo.append(theme, theme);
|
||||
cursorThemeVariantsNightCombo.append(theme, theme);
|
||||
});
|
||||
this.settings.cursorVariants.settings.bind(
|
||||
'day',
|
||||
cursorThemeVariantsDayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
this.settings.cursorVariants.settings.bind(
|
||||
'night',
|
||||
cursorThemeVariantsNightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
_connectBackgroundPreferences() {
|
||||
const backgroundSwitchBackgroundsSwitch = this.builder.get_object('prefs_backgrounds_switch_backgrounds_switch');
|
||||
this.settings.backgrounds.settings.bind(
|
||||
'enabled',
|
||||
backgroundSwitchBackgroundsSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const backgroundsBackgrounds = this.builder.get_object('prefs_backgrounds_backgrounds');
|
||||
this.settings.backgrounds.settings.bind(
|
||||
'enabled',
|
||||
backgroundsBackgrounds,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const backgroundsBackgroundsDayBackgroundButton = this.builder.get_object('prefs_backgrounds_backgrounds_day_background_button');
|
||||
const dayBackgroundPreview = this.builder.get_object('day_background_preview');
|
||||
const updateBackgroundsBackgroundsDayBackgroundButtonUri = () => {
|
||||
backgroundsBackgroundsDayBackgroundButton.set_uri(this.settings.backgrounds.day);
|
||||
};
|
||||
this.settings.backgrounds.connect('day-changed', () => updateBackgroundsBackgroundsDayBackgroundButtonUri());
|
||||
backgroundsBackgroundsDayBackgroundButton.connect('update-preview', () => {
|
||||
const file = backgroundsBackgroundsDayBackgroundButton.get_preview_filename();
|
||||
const allowedContentTypes = ['image/jpeg', 'image/png', 'image/tiff'];
|
||||
if (allowedContentTypes.includes(Gio.content_type_guess(file, null)[0])) {
|
||||
const pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(file, 256, 256);
|
||||
dayBackgroundPreview.set_from_pixbuf(pixbuf);
|
||||
}
|
||||
});
|
||||
backgroundsBackgroundsDayBackgroundButton.connect('file-set', () => {
|
||||
this.settings.backgrounds.day = backgroundsBackgroundsDayBackgroundButton.get_uri();
|
||||
});
|
||||
updateBackgroundsBackgroundsDayBackgroundButtonUri();
|
||||
|
||||
const backgroundsBackgroundsDayBackgroundClearButton = this.builder.get_object('prefs_backgrounds_backgrounds_day_background_clear_button');
|
||||
backgroundsBackgroundsDayBackgroundClearButton.connect('clicked', () => {
|
||||
this.settings.backgrounds.day = '';
|
||||
});
|
||||
const updateBackgroundsBackgroundsDayBackgroundClearButtonSensitivity = () => {
|
||||
backgroundsBackgroundsDayBackgroundClearButton.sensitive = !!this.settings.backgrounds.day;
|
||||
};
|
||||
this.settings.backgrounds.connect('day-changed', () => updateBackgroundsBackgroundsDayBackgroundClearButtonSensitivity());
|
||||
updateBackgroundsBackgroundsDayBackgroundClearButtonSensitivity();
|
||||
|
||||
const backgroundsBackgroundsNightBackgroundButton = this.builder.get_object('prefs_backgrounds_backgrounds_night_background_button');
|
||||
const nightBackgroundPreview = this.builder.get_object('night_background_preview');
|
||||
const updateBackgroundsBackgroundsNightBackgroundButtonUri = () => {
|
||||
backgroundsBackgroundsNightBackgroundButton.set_uri(this.settings.backgrounds.night);
|
||||
};
|
||||
this.settings.backgrounds.connect('night-changed', () => updateBackgroundsBackgroundsNightBackgroundButtonUri());
|
||||
backgroundsBackgroundsNightBackgroundButton.connect('update-preview', () => {
|
||||
const file = backgroundsBackgroundsNightBackgroundButton.get_preview_filename();
|
||||
const allowedContentTypes = ['image/jpeg', 'image/png', 'image/tiff'];
|
||||
if (allowedContentTypes.includes(Gio.content_type_guess(file, null)[0])) {
|
||||
const pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(file, 256, 256);
|
||||
nightBackgroundPreview.set_from_pixbuf(pixbuf);
|
||||
}
|
||||
});
|
||||
backgroundsBackgroundsNightBackgroundButton.connect('file-set', () => {
|
||||
this.settings.backgrounds.night = backgroundsBackgroundsNightBackgroundButton.get_uri();
|
||||
});
|
||||
updateBackgroundsBackgroundsNightBackgroundButtonUri();
|
||||
|
||||
const backgroundsBackgroundsNightBackgroundClearButton = this.builder.get_object('prefs_backgrounds_backgrounds_night_background_clear_button');
|
||||
backgroundsBackgroundsNightBackgroundClearButton.connect('clicked', () => {
|
||||
this.settings.backgrounds.night = '';
|
||||
});
|
||||
const updateBackgroundsBackgroundsNightBackgroundClearButtonSensitivity = () => {
|
||||
backgroundsBackgroundsNightBackgroundClearButton.sensitive = !!this.settings.backgrounds.night;
|
||||
};
|
||||
this.settings.backgrounds.connect('night-changed', () => updateBackgroundsBackgroundsNightBackgroundClearButtonSensitivity());
|
||||
updateBackgroundsBackgroundsNightBackgroundClearButtonSensitivity();
|
||||
}
|
||||
|
||||
_connectCommandsPreferences() {
|
||||
const commandsSwitchCommandsSwitch = this.builder.get_object('prefs_commands_switch_commands_switch');
|
||||
this.settings.commands.settings.bind(
|
||||
'enabled',
|
||||
commandsSwitchCommandsSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const commandsCommands = this.builder.get_object('prefs_commands_commands');
|
||||
this.settings.commands.settings.bind(
|
||||
'enabled',
|
||||
commandsCommands,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const commandsCommandsSunriseCommandEntry = this.builder.get_object('prefs_commands_commands_sunrise_command_entry');
|
||||
this.settings.commands.settings.bind(
|
||||
'sunrise',
|
||||
commandsCommandsSunriseCommandEntry,
|
||||
'text',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const commandsCommandsSunriseCommandClearButton = this.builder.get_object('prefs_commands_commands_sunrise_command_clear_button');
|
||||
commandsCommandsSunriseCommandClearButton.connect('clicked', () => {
|
||||
this.settings.commands.sunrise = '';
|
||||
});
|
||||
const updateCommandsCommandsSunriseCommandClearButtonSensitivity = () => {
|
||||
commandsCommandsSunriseCommandClearButton.sensitive = !!this.settings.commands.sunrise;
|
||||
};
|
||||
this.settings.commands.connect('sunrise-changed', () => updateCommandsCommandsSunriseCommandClearButtonSensitivity());
|
||||
updateCommandsCommandsSunriseCommandClearButtonSensitivity();
|
||||
|
||||
const commandsCommandsSunsetCommandEntry = this.builder.get_object('prefs_commands_commands_sunset_command_entry');
|
||||
this.settings.commands.settings.bind(
|
||||
'sunset',
|
||||
commandsCommandsSunsetCommandEntry,
|
||||
'text',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const commandsCommandsSunsetCommandClearButton = this.builder.get_object('prefs_commands_commands_sunset_command_clear_button');
|
||||
commandsCommandsSunsetCommandClearButton.connect('clicked', () => {
|
||||
this.settings.commands.sunset = '';
|
||||
});
|
||||
const updateCommandsCommandsSunsetCommandClearButtonSensitivity = () => {
|
||||
commandsCommandsSunsetCommandClearButton.sensitive = !!this.settings.commands.sunset;
|
||||
};
|
||||
this.settings.commands.connect('sunset-changed', () => updateCommandsCommandsSunsetCommandClearButtonSensitivity());
|
||||
updateCommandsCommandsSunsetCommandClearButtonSensitivity();
|
||||
}
|
||||
|
||||
_connectOndemandKeyboardShortcutDialog() {
|
||||
const ondemandKeyboardShortcutDialog = this.builder.get_object('ondemand_keyboard_shortcut_dialog');
|
||||
ondemandKeyboardShortcutDialog.connect('key-press-event', (_widget, event) => {
|
||||
const state = event.get_state()[1];
|
||||
let mask = state & Gtk.accelerator_get_default_mod_mask();
|
||||
mask &= ~Gdk.ModifierType.LOCK_MASK;
|
||||
const keycode = event.get_keycode()[1];
|
||||
const eventKeyval = event.get_keyval()[1];
|
||||
let keyval = Gdk.keyval_to_lower(eventKeyval);
|
||||
|
||||
if (mask === 0 && keyval === Gdk.KEY_Escape) {
|
||||
ondemandKeyboardShortcutDialog.visible = false;
|
||||
return Gdk.EVENT_STOP;
|
||||
}
|
||||
|
||||
if (keyval === Gdk.KEY_ISO_Left_Tab)
|
||||
keyval = Gdk.KEY_Tab;
|
||||
|
||||
if (keyval !== eventKeyval)
|
||||
mask |= Gdk.ModifierType.SHIFT_MASK;
|
||||
|
||||
if (keyval === Gdk.KEY_Sys_Req && (mask & Gdk.ModifierType.MOD1_MASK) !== 0)
|
||||
keyval = Gdk.KEY_Print;
|
||||
|
||||
if (
|
||||
!utils.isBindingValid({ mask, keycode, keyval }) ||
|
||||
!utils.isAccelValid({ mask, keyval })
|
||||
)
|
||||
return Gdk.EVENT_STOP;
|
||||
|
||||
const binding = Gtk.accelerator_name_with_keycode(
|
||||
null,
|
||||
keyval,
|
||||
keycode,
|
||||
mask
|
||||
);
|
||||
this.settings.time.ondemandKeybinding = binding;
|
||||
ondemandKeyboardShortcutDialog.visible = false;
|
||||
return Gdk.EVENT_STOP;
|
||||
});
|
||||
|
||||
const ondemandKeyboardShortcutDialogCancelButton = this.builder.get_object('ondemand_keyboard_shortcut_dialog_cancel_button');
|
||||
ondemandKeyboardShortcutDialogCancelButton.connect('clicked', () => {
|
||||
ondemandKeyboardShortcutDialog.visible = false;
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
-2619
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user