Add icons to preferences headerbar
@@ -32,6 +32,7 @@ build: build-clean
|
||||
--extra-source=./config.js \
|
||||
--extra-source=./convenience.js \
|
||||
--extra-source=./utils.js \
|
||||
--extra-source=./icons/ \
|
||||
--extra-source=./modules/ \
|
||||
--extra-source=./preferences/ \
|
||||
--extra-source=./schemas/ \
|
||||
|
||||
|
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 247 KiB |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#808080"><path d="m2 0.99841c-1.108 0-2 0.892-2 2v10.001c0 1.108 0.892 2 2 2h12c1.108 0 2-0.892 2-2v-10.001c0-1.108-0.892-2-2-2zm1 2h10c0.554 0 1 0.446 1 1v8.0008c0 0.554-0.446 1-1 1h-10c-0.554 0-1-0.446-1-1v-8.0008c0-0.554 0.446-1 1-1z" stop-color="#000000" style="paint-order:normal"/><path d="m3 10v2h10v-4l-3-3-3 4-2-2z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 443 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#808080"><path d="m2 0.99841c-1.108 0-2 0.892-2 2v10.001c0 1.108 0.892 2 2 2h12c1.108 0 2-0.892 2-2v-10.001c0-1.108-0.892-2-2-2zm1 2h10c0.554 0 1 0.446 1 1v8.0008c0 0.554-0.446 1-1 1h-10c-0.554 0-1-0.446-1-1v-8.0008c0-0.554 0.446-1 1-1z" stop-color="#000000" style="paint-order:normal"/><path d="m3.9766 5.5a0.5 0.5 0 0 0-0.33008 0.14648 0.5 0.5 0 0 0 0 0.70703l1.6465 1.6465-1.6465 1.6465a0.5 0.5 0 0 0 0 0.70703 0.5 0.5 0 0 0 0.70703 0l2-2a0.50005 0.50005 0 0 0 0-0.70703l-2-2a0.5 0.5 0 0 0-0.37695-0.14648z" color="#000000" color-rendering="auto" dominant-baseline="auto" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stop-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;isolation:auto;mix-blend-mode:normal;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/><rect x="6" y="10" width="5" height="1" rx=".5" stop-color="#000000" style="paint-order:normal"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1c-0.554 0-1 0.446-1 1v8h-1v-1c0-0.554-0.446-1-1-1s-1 0.446-1 1v4c0 1.108 0.892 2 2 2h7c1.108 0 2-0.892 2-2v-6c0-0.554-0.446-1-1-1s-1 0.446-1 1h-1v-1c0-0.554-0.446-1-1-1s-1 0.446-1 1v1h-1v-5c0-0.554-0.446-1-1-1z" fill="#808080" stop-color="#000000" style="paint-order:normal"/></svg>
|
||||
|
After Width: | Height: | Size: 393 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m2 0c-1.108 0-2 0.892-2 2v14h16v-14c0-1.108-0.892-2-2-2zm9.9512 2c0.01628-1.987e-4 0.03255-1.987e-4 0.04883 0 1.1046 0 2 0.89543 2 2s-0.89543 2-2 2c-1.1046 0-2-0.89543-2-2-3.236e-4 -1.0858 0.86572-1.9735 1.9512-2zm-9.9512 6h12v6h-12z" fill="#666" stop-color="#000000"/></svg>
|
||||
|
After Width: | Height: | Size: 382 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#808080"><path d="m2 0v16h12v-12l-4-4zm2 2h5v3h3v9h-8z"/><path d="m5 13h6v-5c-4-1-2 3-6 2z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 210 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#808080"><path d="m8 0a8 8 0 0 0-8 8 8 8 0 0 0 8 8 8 8 0 0 0 8-8 8 8 0 0 0-8-8zm0 2a6 6 0 0 1 6 6 6 6 0 0 1-6 6 6 6 0 0 1-6-6 6 6 0 0 1 6-6z" stop-color="#000000" style="paint-order:normal"/><rect transform="rotate(-45)" x="-.49864" y="10.81" width="5.5" height="1" rx=".5" stop-color="#000000" style="paint-order:normal"/><rect transform="rotate(30)" x="6.9285" y="2.4294" width="4.5" height="1" rx=".5" ry=".4898" stop-color="#000000" style="paint-order:normal"/></g></svg>
|
||||
|
After Width: | Height: | Size: 582 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#808080"><path d="m8 3-2 3h-2.9987c-1.108 0-2 0.892-2 2v4.9998c0 1.108 0.892 2 2 2h10.002c1.108 0 2-0.892 2-2v-4.9998c0-1.108-0.892-2-2-2h-3.003zm0 3 1.334 2h2.669c0.554 0 1 0.446 1 1v2.9998c0 0.554-0.446 1-1 1h-8.0017c-0.554 0-1-0.446-1-1v-2.9998c0-0.554 0.446-1 1-1h2.6647z" stop-color="#000000" style="paint-order:normal"/><rect y="1" width="16" height="2" rx="1.3878e-16" stop-color="#000000" style="paint-order:normal"/></g></svg>
|
||||
|
After Width: | Height: | Size: 542 B |
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Night Theme Switcher 7\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-09-23 20:13+0200\n"
|
||||
"POT-Creation-Date: 2020-09-24 13:12+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"
|
||||
@@ -48,26 +48,28 @@ msgid "Switch to day theme"
|
||||
msgstr "Passer au thème diurne"
|
||||
|
||||
#: src/preferences/Backgrounds.js:36 src/preferences/ui/backgrounds.ui:145
|
||||
#: src/preferences/ui/headerbar.ui:338
|
||||
msgid "Backgrounds"
|
||||
msgstr "Arrière-plans"
|
||||
|
||||
#: src/preferences/Commands.js:36 src/preferences/ui/commands.ui:132
|
||||
#: src/preferences/ui/headerbar.ui:391
|
||||
msgid "Commands"
|
||||
msgstr "Commandes"
|
||||
|
||||
#: src/preferences/CursorTheme.js:38
|
||||
#: src/preferences/CursorTheme.js:38 src/preferences/ui/headerbar.ui:285
|
||||
msgid "Cursor theme"
|
||||
msgstr "Thème de curseur"
|
||||
|
||||
#: src/preferences/GtkTheme.js:38
|
||||
#: src/preferences/GtkTheme.js:38 src/preferences/ui/headerbar.ui:126
|
||||
msgid "GTK theme"
|
||||
msgstr "Thème GTK"
|
||||
|
||||
#: src/preferences/IconTheme.js:38
|
||||
#: src/preferences/IconTheme.js:38 src/preferences/ui/headerbar.ui:232
|
||||
msgid "Icon theme"
|
||||
msgstr "Thème d’icônes"
|
||||
|
||||
#: src/preferences/Schedule.js:38
|
||||
#: src/preferences/Schedule.js:38 src/preferences/ui/headerbar.ui:73
|
||||
msgid "Schedule"
|
||||
msgstr "Horaires"
|
||||
|
||||
@@ -75,7 +77,7 @@ msgstr "Horaires"
|
||||
msgid "Choose"
|
||||
msgstr "Choisir"
|
||||
|
||||
#: src/preferences/ShellTheme.js:38
|
||||
#: src/preferences/ShellTheme.js:38 src/preferences/ui/headerbar.ui:179
|
||||
msgid "Shell theme"
|
||||
msgstr "Thème du shell"
|
||||
|
||||
|
||||
@@ -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 20:13+0200\n"
|
||||
"POT-Creation-Date: 2020-09-24 13:12+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"
|
||||
@@ -41,26 +41,28 @@ msgid "Switch to day theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Backgrounds.js:36 src/preferences/ui/backgrounds.ui:145
|
||||
#: src/preferences/ui/headerbar.ui:338
|
||||
msgid "Backgrounds"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Commands.js:36 src/preferences/ui/commands.ui:132
|
||||
#: src/preferences/ui/headerbar.ui:391
|
||||
msgid "Commands"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/CursorTheme.js:38
|
||||
#: src/preferences/CursorTheme.js:38 src/preferences/ui/headerbar.ui:285
|
||||
msgid "Cursor theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/GtkTheme.js:38
|
||||
#: src/preferences/GtkTheme.js:38 src/preferences/ui/headerbar.ui:126
|
||||
msgid "GTK theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/IconTheme.js:38
|
||||
#: src/preferences/IconTheme.js:38 src/preferences/ui/headerbar.ui:232
|
||||
msgid "Icon theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Schedule.js:38
|
||||
#: src/preferences/Schedule.js:38 src/preferences/ui/headerbar.ui:73
|
||||
msgid "Schedule"
|
||||
msgstr ""
|
||||
|
||||
@@ -68,7 +70,7 @@ msgstr ""
|
||||
msgid "Choose"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ShellTheme.js:38
|
||||
#: src/preferences/ShellTheme.js:38 src/preferences/ui/headerbar.ui:179
|
||||
msgid "Shell theme"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
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 { 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 Headerbar = class {
|
||||
|
||||
constructor(stack) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'headerbar.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('headerbar');
|
||||
|
||||
this._connect(stack);
|
||||
|
||||
return this.widget;
|
||||
}
|
||||
|
||||
_connect(stack) {
|
||||
const scheduleRadio = this._builder.get_object('schedule_radio');
|
||||
scheduleRadio.connect('clicked', () => stack.set_visible_child_name('schedule'));
|
||||
|
||||
const gtkThemeRadio = this._builder.get_object('gtk_theme_radio');
|
||||
gtkThemeRadio.connect('clicked', () => stack.set_visible_child_name('gtk-theme'));
|
||||
|
||||
const shellThemeRadio = this._builder.get_object('shell_theme_radio');
|
||||
shellThemeRadio.connect('clicked', () => stack.set_visible_child_name('shell-theme'));
|
||||
|
||||
const iconThemeRadio = this._builder.get_object('icon_theme_radio');
|
||||
iconThemeRadio.connect('clicked', () => stack.set_visible_child_name('icon-theme'));
|
||||
|
||||
const cursorThemeRadio = this._builder.get_object('cursor_theme_radio');
|
||||
cursorThemeRadio.connect('clicked', () => stack.set_visible_child_name('cursor-theme'));
|
||||
|
||||
const backgroundsRadio = this._builder.get_object('backgrounds_radio');
|
||||
backgroundsRadio.connect('clicked', () => stack.set_visible_child_name('backgrounds'));
|
||||
|
||||
const commandsRadio = this._builder.get_object('commands_radio');
|
||||
commandsRadio.connect('clicked', () => stack.set_visible_child_name('commands'));
|
||||
}
|
||||
|
||||
};
|
||||
@@ -31,6 +31,8 @@ const { IconThemePreferences } = Me.imports.preferences.IconTheme;
|
||||
const { SchedulePreferences } = Me.imports.preferences.Schedule;
|
||||
const { ShellThemePreferences } = Me.imports.preferences.ShellTheme;
|
||||
|
||||
const { Headerbar } = Me.imports.preferences.Headerbar;
|
||||
|
||||
|
||||
var Preferences = class {
|
||||
|
||||
@@ -66,10 +68,7 @@ var Preferences = class {
|
||||
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,
|
||||
});
|
||||
this.headerbar = new Headerbar(this.widget);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -0,0 +1,417 @@
|
||||
<?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-local-resource-path ../../icons/ -->
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Night Theme Switcher -->
|
||||
<!-- interface-copyright 2020 -->
|
||||
<!-- interface-authors Romain Vigier -->
|
||||
<object class="GtkHeaderBar" id="headerbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<child type="title">
|
||||
<object class="GtkBox" id="switcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="schedule_radio">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">preferences-schedule-symbolic</property>
|
||||
<property name="icon_size">2</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">Schedule</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="gtk_theme_radio">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">preferences-gtktheme-symbolic</property>
|
||||
<property name="icon_size">2</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">GTK theme</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="shell_theme_radio">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">preferences-shelltheme-symbolic</property>
|
||||
<property name="icon_size">2</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">Shell theme</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="icon_theme_radio">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">preferences-icontheme-symbolic</property>
|
||||
<property name="icon_size">2</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">Icon theme</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="cursor_theme_radio">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">preferences-cursortheme-symbolic</property>
|
||||
<property name="icon_size">2</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">Cursor theme</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="backgrounds_radio">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">preferences-backgrounds-symbolic</property>
|
||||
<property name="icon_size">2</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">Backgrounds</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="commands_radio">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">preferences-commands-symbolic</property>
|
||||
<property name="icon_size">2</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">Commands</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -18,7 +18,7 @@ this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||
|
||||
'use strict';
|
||||
|
||||
const { GLib } = imports.gi;
|
||||
const { GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
@@ -29,15 +29,16 @@ const { Preferences } = Me.imports.preferences.Preferences;
|
||||
|
||||
function init() {
|
||||
compat.initTranslations(Me.metadata.uuid);
|
||||
const iconTheme = Gtk.IconTheme.get_default();
|
||||
iconTheme.append_search_path(GLib.build_filenamev([Me.path, 'icons']));
|
||||
}
|
||||
|
||||
function buildPrefsWidget() {
|
||||
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;
|
||||
window.resize(600, 200);
|
||||
window.set_titlebar(preferences.headerbar);
|
||||
});
|
||||
return preferences.widget;
|
||||
}
|
||||
|
||||