Skip to content

Commit

Permalink
settings dialog 2 pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLauinger77 committed Apr 21, 2023
1 parent c50bff8 commit cb28f3d
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 98 deletions.
2 changes: 1 addition & 1 deletion [email protected]/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class SettingsCenter {

this._settingSignals = new Array();

this._indicator = new SettingsCenterIndicator();
this._indicator = new SettingsCenterIndicator(this._settings);

this._settingSignals.push(
this._settings.connect(
Expand Down
2 changes: 1 addition & 1 deletion [email protected]/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"url": "https://github.com/ChrisLauinger77/XES-Settings-Center-Extension",
"uuid": "[email protected]",
"settings-schema": "org.gnome.shell.extensions.SettingsCenter",
"version": 32
"version": 33
}
17 changes: 12 additions & 5 deletions [email protected]/prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,20 +281,21 @@ class AdwPrefs extends Prefs {
super(schema);
this._window = window;
this._page1 = null;
this._page2 = null;
this._group3 = null;
this.filechoosertarget1 = null;
this.filechoosertarget2 = null;
}

buildList() {
if (this._group3 !== null) {
this._page1.remove(this._group3);
this._page2.remove(this._group3);
}

this._group3 = Adw.PreferencesGroup.new();
this._group3.set_title(_("Menu Items"));
this._group3.set_name("settingscenter_menuitems");
this._page1.add(this._group3);
this._page2.add(this._group3);
let items = this._menuItems.getItems();

for (let indexItem in items) {
Expand Down Expand Up @@ -347,8 +348,8 @@ class AdwPrefs extends Prefs {
fillPreferencesWindow() {
let adwrow;
this._page1 = Adw.PreferencesPage.new();
this._page1.set_title(_("Settings Center"));
this._page1.set_name("settingscenter_page");
this._page1.set_title(_("Settings"));
this._page1.set_name("settingscenter_page1");
this._page1.set_icon_name("preferences-system-symbolic");

// group1
Expand Down Expand Up @@ -450,9 +451,15 @@ class AdwPrefs extends Prefs {
);
adwrow.add_suffix(buttonAdd);
adwrow.activatable_widget = buttonAdd;
//page2
this._page2 = Adw.PreferencesPage.new();
this._page2.set_title(_("Settings Center"));
this._page2.set_name("settingscenter_page2");
this._page2.set_icon_name("preferences-other-symbolic");
// group3
this.buildList();
this._window.set_default_size(675, 800);
this._window.set_default_size(675, 655);
this._window.add(this._page1);
this._window.add(this._page2);
}
}
59 changes: 30 additions & 29 deletions po/SettingsCenter.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-28 18:02+0200\n"
"POT-Creation-Date: 2023-04-21 17:29+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -18,43 +18,44 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"

#: [email protected]/extension.js:75
#: [email protected]/prefs.js:351
msgid "Settings"
msgstr ""

#: [email protected]/prefs.js:10
msgid "Desktop Config Editor"
msgid "Gnome Tweaks"
msgstr ""

#: [email protected]/prefs.js:11
msgid "Gnome Config Editor"
msgid "Desktop Config Editor"
msgstr ""

#: [email protected]/prefs.js:12
msgid "Session Properties"
msgid "Gnome Config Editor"
msgstr ""

#: [email protected]/prefs.js:13
msgid "Extensions Preferences"
msgid "Session Properties"
msgstr ""

#: [email protected]/prefs.js:14
msgid "Passwords and Keys"
msgid "Extensions Preferences"
msgstr ""

#: [email protected]/prefs.js:15
msgid "NVidia Settings"
msgid "Passwords and Keys"
msgstr ""

#: [email protected]/prefs.js:16
msgid "Gnome Tweaks"
msgid "NVidia Settings"
msgstr ""

#: [email protected]/prefs.js:55
msgid "SettingsCenter"
msgstr ""

#: [email protected]/prefs.js:57
#: [email protected]/prefs.js:449
#: [email protected]/prefs.js:450
msgid "'Label' and 'Command' must be filled out !"
msgstr ""

Expand All @@ -71,76 +72,76 @@ msgid "Del"
msgstr ""

#: [email protected]/prefs.js:173
#: [email protected]/prefs.js:356
#: [email protected]/prefs.js:357
msgid "Global"
msgstr ""

#: [email protected]/prefs.js:187
#: [email protected]/prefs.js:359
#: [email protected]/prefs.js:360
msgid "Menu Label"
msgstr ""

#: [email protected]/prefs.js:190
#: [email protected]/prefs.js:368
#: [email protected]/prefs.js:369
msgid "Apply"
msgstr ""

#: [email protected]/prefs.js:211
#: [email protected]/prefs.js:295
#: [email protected]/prefs.js:296
msgid "Menu Items"
msgstr ""

#: [email protected]/prefs.js:227
#: [email protected]/prefs.js:393
#: [email protected]/prefs.js:394
msgid "Add Menu"
msgstr ""

#: [email protected]/prefs.js:241
#: [email protected]/prefs.js:396
#: [email protected]/prefs.js:397
msgid "Label"
msgstr ""

#: [email protected]/prefs.js:252
#: [email protected]/prefs.js:405
#: [email protected]/prefs.js:406
msgid "Command"
msgstr ""

#: [email protected]/prefs.js:263
#: [email protected]/prefs.js:441
#: [email protected]/prefs.js:442
msgid "Add"
msgstr ""

#: [email protected]/prefs.js:325
#: [email protected]/prefs.js:419
#: [email protected]/prefs.js:432
#: [email protected]/prefs.js:326
#: [email protected]/prefs.js:420
#: [email protected]/prefs.js:433
msgid "Select desktop file"
msgstr ""

#: [email protected]/prefs.js:350
msgid "Settings Center"
msgstr ""

#: [email protected]/prefs.js:376
#: [email protected]/prefs.js:377
msgid "Show SystemIndicator"
msgstr ""

#: [email protected]/prefs.js:377
#: [email protected]/prefs.js:378
#: [email protected]/schemas/org.gnome.shell.extensions.SettingsCenter.gschema.xml:16
msgid "Toggle to show systemindicator"
msgstr ""

#: [email protected]/prefs.js:397
#: [email protected]/prefs.js:398
msgid "Label to show in menu"
msgstr ""

#: [email protected]/prefs.js:407
#: [email protected]/prefs.js:408
msgid "Name of .desktop file (MyApp.desktop) or name of command"
msgstr ""

#: [email protected]/prefs.js:423
#: [email protected]/prefs.js:424
msgid "Usually located in '/usr/share/applications'"
msgstr ""

#: [email protected]/prefs.js:456
msgid "Settings Center"
msgstr ""

#: [email protected]/schemas/org.gnome.shell.extensions.SettingsCenter.gschema.xml:6
msgid "Label Menu"
msgstr ""
Expand Down
63 changes: 32 additions & 31 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-28 18:02+0200\n"
"POT-Creation-Date: 2023-04-21 17:29+0200\n"
"PO-Revision-Date: 2023-03-28 18:01+0200\n"
"Last-Translator: Christian Lauinger <[email protected]>\n"
"Language-Team: \n"
Expand All @@ -19,43 +19,44 @@ msgstr ""
"X-Generator: Poedit 3.2.2\n"

#: [email protected]/extension.js:75
#: [email protected]/prefs.js:351
msgid "Settings"
msgstr "Einstellungen"

#: [email protected]/prefs.js:10
msgid "Gnome Tweaks"
msgstr "Gnome Optimierungen"

#: [email protected]/prefs.js:11
msgid "Desktop Config Editor"
msgstr "Desktop Konfigurationseditor"

#: [email protected]/prefs.js:11
#: [email protected]/prefs.js:12
msgid "Gnome Config Editor"
msgstr "Gnome Konfigurationseditor"

#: [email protected]/prefs.js:12
#: [email protected]/prefs.js:13
msgid "Session Properties"
msgstr "Sitzungseigenschaften"

#: [email protected]/prefs.js:13
#: [email protected]/prefs.js:14
msgid "Extensions Preferences"
msgstr "Erweiterungen Einstellungen"

#: [email protected]/prefs.js:14
#: [email protected]/prefs.js:15
msgid "Passwords and Keys"
msgstr "Passwörter und Schlüssel"

#: [email protected]/prefs.js:15
#: [email protected]/prefs.js:16
msgid "NVidia Settings"
msgstr "NVidia Einstellungen"

#: [email protected]/prefs.js:16
msgid "Gnome Tweaks"
msgstr "Gnome Optimierungen"

#: [email protected]/prefs.js:55
msgid "SettingsCenter"
msgstr "Einstellungszentrum"

#: [email protected]/prefs.js:57
#: [email protected]/prefs.js:449
#: [email protected]/prefs.js:450
msgid "'Label' and 'Command' must be filled out !"
msgstr "'Beschriftung' und 'Kommando' müssen ausgefüllt werden !"

Expand All @@ -72,76 +73,76 @@ msgid "Del"
msgstr "Entf"

#: [email protected]/prefs.js:173
#: [email protected]/prefs.js:356
#: [email protected]/prefs.js:357
msgid "Global"
msgstr "Global"

#: [email protected]/prefs.js:187
#: [email protected]/prefs.js:359
#: [email protected]/prefs.js:360
msgid "Menu Label"
msgstr "Menü Beschriftung"

#: [email protected]/prefs.js:190
#: [email protected]/prefs.js:368
#: [email protected]/prefs.js:369
msgid "Apply"
msgstr "Übernehmen"

#: [email protected]/prefs.js:211
#: [email protected]/prefs.js:295
#: [email protected]/prefs.js:296
msgid "Menu Items"
msgstr "Menü Einträge"

#: [email protected]/prefs.js:227
#: [email protected]/prefs.js:393
#: [email protected]/prefs.js:394
msgid "Add Menu"
msgstr "Menü hinzufügen"

#: [email protected]/prefs.js:241
#: [email protected]/prefs.js:396
#: [email protected]/prefs.js:397
msgid "Label"
msgstr "Beschriftung"

#: [email protected]/prefs.js:252
#: [email protected]/prefs.js:405
#: [email protected]/prefs.js:406
msgid "Command"
msgstr "Kommando"

#: [email protected]/prefs.js:263
#: [email protected]/prefs.js:441
#: [email protected]/prefs.js:442
msgid "Add"
msgstr "Hinzufügen"

#: [email protected]/prefs.js:325
#: [email protected]/prefs.js:419
#: [email protected]/prefs.js:432
#: [email protected]/prefs.js:326
#: [email protected]/prefs.js:420
#: [email protected]/prefs.js:433
msgid "Select desktop file"
msgstr "Desktop Datei auswählen"

#: [email protected]/prefs.js:350
msgid "Settings Center"
msgstr "Einstellungszentrum"

#: [email protected]/prefs.js:376
#: [email protected]/prefs.js:377
msgid "Show SystemIndicator"
msgstr "Systemindikator anzeigen"

#: [email protected]/prefs.js:377
#: [email protected]/prefs.js:378
#: [email protected]/schemas/org.gnome.shell.extensions.SettingsCenter.gschema.xml:16
msgid "Toggle to show systemindicator"
msgstr "Umschalten der Anzeige des Systemindikators"

#: [email protected]/prefs.js:397
#: [email protected]/prefs.js:398
msgid "Label to show in menu"
msgstr "Beschriftung die im Menü angezeigt wird"

#: [email protected]/prefs.js:407
#: [email protected]/prefs.js:408
msgid "Name of .desktop file (MyApp.desktop) or name of command"
msgstr "Name der .desktop Datei (MyApp.desktop) oder Name des Befehls"

#: [email protected]/prefs.js:423
#: [email protected]/prefs.js:424
msgid "Usually located in '/usr/share/applications'"
msgstr "Befinden sich normalerweise in '/usr/share/applications'"

#: [email protected]/prefs.js:456
msgid "Settings Center"
msgstr "Einstellungszentrum"

#: [email protected]/schemas/org.gnome.shell.extensions.SettingsCenter.gschema.xml:6
msgid "Label Menu"
msgstr "Menü Beschriftung"
Expand Down
Loading

0 comments on commit cb28f3d

Please sign in to comment.