Skip to content

Commit

Permalink
Confirmation of delete in prefs.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLauinger77 committed Mar 8, 2024
1 parent e73ae66 commit 6579008
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 74 deletions.
2 changes: 1 addition & 1 deletion [email protected]/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"uuid": "[email protected]",
"settings-schema": "org.gnome.shell.extensions.SettingsCenter",
"donations": { "github": "ChrisLauinger77","paypal": "ChrisLauinger" },
"version-name": "46.1"
"version-name": "46.2"
}
21 changes: 19 additions & 2 deletions [email protected]/prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,26 @@ export default class AdwPrefs extends ExtensionPreferences {
}

_delCmd(menuItems, page2, index) {
menuItems.delItem(index);
const dialog = Adw.MessageDialog.new(
page2.get_root(),
_("Delete entry"),
_("Are you sure you want to delete the entry ?")
);
dialog.add_response("cancel", _("Cancel"));
dialog.add_response("delete", _("Delete"));
dialog.set_response_appearance(
"delete",
Adw.ResponseAppearance.DESTRUCTIVE
);

this._buildList(menuItems, page2);
dialog.connect("response", (self, response) => {
if (response === "cancel") return;

menuItems.delItem(index);
this._buildList(menuItems, page2);
});

dialog.present();
}

_buttonUp(menuItems, page2, indexItem) {
Expand Down
62 changes: 39 additions & 23 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-10-08 19:20+0200\n"
"POT-Creation-Date: 2024-03-08 16:21+0100\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,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"

#: [email protected]/extension.js:64
#: [email protected]/prefs.js:189
#: [email protected]/prefs.js:218
msgid "Settings"
msgstr ""

Expand All @@ -27,82 +27,98 @@ msgid "SettingsCenter"
msgstr ""

#: [email protected]/prefs.js:24
#: [email protected]/prefs.js:300
#: [email protected]/prefs.js:329
msgid "'Label' and 'Command' must be filled out !"
msgstr ""

#: [email protected]/prefs.js:50
#: [email protected]/prefs.js:45
msgid "Delete entry"
msgstr ""

#: [email protected]/prefs.js:46
msgid "Are you sure you want to delete the entry ?"
msgstr ""

#: [email protected]/prefs.js:48
msgid "Cancel"
msgstr ""

#: [email protected]/prefs.js:49
msgid "Delete"
msgstr ""

#: [email protected]/prefs.js:67
msgid "Up"
msgstr ""

#: [email protected]/prefs.js:63
#: [email protected]/prefs.js:85
msgid "Down"
msgstr ""

#: [email protected]/prefs.js:78
#: [email protected]/prefs.js:106
msgid "Del"
msgstr ""

#: [email protected]/prefs.js:107
#: [email protected]/prefs.js:136
msgid "Menu Items"
msgstr ""

#: [email protected]/prefs.js:148
#: [email protected]/prefs.js:260
#: [email protected]/prefs.js:270
#: [email protected]/prefs.js:177
#: [email protected]/prefs.js:289
#: [email protected]/prefs.js:299
msgid "Select desktop file"
msgstr ""

#: [email protected]/prefs.js:195
#: [email protected]/prefs.js:224
msgid "Global"
msgstr ""

#: [email protected]/prefs.js:198
#: [email protected]/prefs.js:227
msgid "Menu Label"
msgstr ""

#: [email protected]/prefs.js:207
#: [email protected]/prefs.js:236
msgid "Apply"
msgstr ""

#: [email protected]/prefs.js:215
#: [email protected]/prefs.js:244
msgid "Show SystemIndicator"
msgstr ""

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

#: [email protected]/prefs.js:232
#: [email protected]/prefs.js:261
msgid "Add Menu"
msgstr ""

#: [email protected]/prefs.js:235
#: [email protected]/prefs.js:264
msgid "Label"
msgstr ""

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

#: [email protected]/prefs.js:243
#: [email protected]/prefs.js:272
msgid "Command"
msgstr ""

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

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

#: [email protected]/prefs.js:280
#: [email protected]/prefs.js:309
msgid "Add"
msgstr ""

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

Expand Down
66 changes: 41 additions & 25 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-08 19:20+0200\n"
"PO-Revision-Date: 2023-10-08 19:21+0200\n"
"POT-Creation-Date: 2024-03-08 16:21+0100\n"
"PO-Revision-Date: 2024-03-08 16:22+0100\n"
"Last-Translator: Christian Lauinger <[email protected]>\n"
"Language-Team: \n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.3.2\n"
"X-Generator: Poedit 3.4.2\n"

#: [email protected]/extension.js:64
#: [email protected]/prefs.js:189
#: [email protected]/prefs.js:218
msgid "Settings"
msgstr "Einstellungen"

Expand All @@ -28,82 +28,98 @@ msgid "SettingsCenter"
msgstr "Einstellungszentrum"

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

#: [email protected]/prefs.js:50
#: [email protected]/prefs.js:45
msgid "Delete entry"
msgstr "Eintrag löschen"

#: [email protected]/prefs.js:46
msgid "Are you sure you want to delete the entry ?"
msgstr "Sind Sie sicher das Sie den Eintrag löschen möchten ?"

#: [email protected]/prefs.js:48
msgid "Cancel"
msgstr "Abbrechen"

#: [email protected]/prefs.js:49
msgid "Delete"
msgstr "Löschen"

#: [email protected]/prefs.js:67
msgid "Up"
msgstr "Auf"

#: [email protected]/prefs.js:63
#: [email protected]/prefs.js:85
msgid "Down"
msgstr "Ab"

#: [email protected]/prefs.js:78
#: [email protected]/prefs.js:106
msgid "Del"
msgstr "Entf"

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

#: [email protected]/prefs.js:148
#: [email protected]/prefs.js:260
#: [email protected]/prefs.js:270
#: [email protected]/prefs.js:177
#: [email protected]/prefs.js:289
#: [email protected]/prefs.js:299
msgid "Select desktop file"
msgstr "Desktop Datei auswählen"

#: [email protected]/prefs.js:195
#: [email protected]/prefs.js:224
msgid "Global"
msgstr "Global"

#: [email protected]/prefs.js:198
#: [email protected]/prefs.js:227
msgid "Menu Label"
msgstr "Menü Beschriftung"

#: [email protected]/prefs.js:207
#: [email protected]/prefs.js:236
msgid "Apply"
msgstr "Übernehmen"

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

#: [email protected]/prefs.js:216
#: [email protected]/prefs.js:245
#: [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:232
#: [email protected]/prefs.js:261
msgid "Add Menu"
msgstr "Menü hinzufügen"

#: [email protected]/prefs.js:235
#: [email protected]/prefs.js:264
msgid "Label"
msgstr "Beschriftung"

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

#: [email protected]/prefs.js:243
#: [email protected]/prefs.js:272
msgid "Command"
msgstr "Kommando"

#: [email protected]/prefs.js:245
#: [email protected]/prefs.js:274
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:264
#: [email protected]/prefs.js:293
msgid "Usually located in '/usr/share/applications'"
msgstr "Befinden sich normalerweise in '/usr/share/applications'"

#: [email protected]/prefs.js:280
#: [email protected]/prefs.js:309
msgid "Add"
msgstr "Hinzufügen"

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

Expand Down
Loading

0 comments on commit 6579008

Please sign in to comment.