Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions lib/prefs/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,32 @@ export class DropDownRow extends Adw.ActionRow {
}
}

export class ResetButton extends Gtk.Button {
export class ClearButton extends Gtk.Button {
static {
GObject.registerClass(this);
}
constructor({ settings = undefined, bind = undefined, onClear }) {
super({
icon_name: "edit-clear-symbolic",
tooltip_text: _("Clear shortcut"),
css_classes: ["flat", "circular"],
valign: Gtk.Align.CENTER,
});
this.connect("clicked", () => {
onClear?.();
});
}
}

export class ResetButton extends Gtk.Button {
static {
GObject.registerClass(this);
}
constructor({ settings = undefined, bind = undefined, onReset }) {
super({
icon_name: "edit-undo-symbolic",
tooltip_text: _("Reset"),
tooltip_text: _("Reset to default"),
css_classes: ["flat", "circular"],
valign: Gtk.Align.CENTER,
});
this.connect("clicked", () => {
Expand Down Expand Up @@ -247,6 +264,15 @@ export class EntryRow extends Adw.EntryRow {
});
const current = map ? map.from(settings, bind) : settings.get_string(bind);
this.set_text(current ?? "");
this.add_suffix(
new ClearButton({
settings,
bind,
onClear: () => {
this.set_text("");
},
})
);
this.add_suffix(
new ResetButton({
settings,
Expand Down
16 changes: 12 additions & 4 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Forge\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-04 16:38-0400\n"
"POT-Creation-Date: 2025-05-10 17:37+0100\n"
"PO-Revision-Date: 2021-09-18 16:25-0400\n"
"Last-Translator: Jose Maranan <jmmaranan@gmail.com>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -344,9 +344,17 @@ msgstr ""
"<b>PRECAUCIÓN</b>: Activar esta configuración puede provocar errores o hacer "
"que el entorno se bloquee"

#: lib/prefs/widgets.js:222
msgid "Reset"
msgstr "Restablecer"
#: lib/prefs/widgets.js:219
#, fuzzy
msgid "Clear shortcut"
msgstr "Actualizar atajos"

#: lib/prefs/widgets.js:234
msgid "Reset to default"
msgstr ""

#~ msgid "Reset"
#~ msgstr "Restablecer"

#~ msgid "Workspace"
#~ msgstr "Espacio de trabajo"
Expand Down
19 changes: 12 additions & 7 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Forge\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-04 16:38-0400\n"
"POT-Creation-Date: 2025-05-10 17:37+0100\n"
"PO-Revision-Date: 2023-02-28 17:16-0500\n"
"Last-Translator: Wedone <wedoneofficiel@outlook.fr>\n"
"Language-Team: French - Canada <wroy@proton.me>\n"
Expand Down Expand Up @@ -359,9 +359,17 @@ msgstr ""
"ATTENTION : Ces paramètres, lorsqu'ils sont activés, sont bogués ou peuvent "
"causer un plantage de l'environnement de bureau"

#: lib/prefs/widgets.js:222
msgid "Reset"
msgstr "Réinitialiser"
#: lib/prefs/widgets.js:219
#, fuzzy
msgid "Clear shortcut"
msgstr "Raccourcis pour les conteneurs"

#: lib/prefs/widgets.js:234
msgid "Reset to default"
msgstr ""

#~ msgid "Reset"
#~ msgstr "Réinitialiser"

#~ msgid "Workspace"
#~ msgstr "Espace de travail"
Expand Down Expand Up @@ -523,9 +531,6 @@ msgstr "Réinitialiser"
#~ msgid "Workspace Shortcuts"
#~ msgstr "Raccourcis de l'espace de travail"

#~ msgid "Container Shortcuts"
#~ msgstr "Raccourcis pour les conteneurs"

#~ msgid "Focus Shortcuts"
#~ msgstr "Raccourcis de focus"

Expand Down
19 changes: 12 additions & 7 deletions po/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Forge\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-04 16:38-0400\n"
"POT-Creation-Date: 2025-05-10 17:37+0100\n"
"PO-Revision-Date: 2024-09-15 20:16+0100\n"
"Last-Translator: Albano Battistella <albanobattistella@gmail.com>\n"
"Language-Team: Italian <albanobattistella@gmail.com>\n"
Expand Down Expand Up @@ -353,9 +353,17 @@ msgstr ""
"<b>ATTENZIONE</b>: l'attivazione di questa impostazione può portare a bug o "
"causare il crash della shell"

#: lib/prefs/widgets.js:222
msgid "Reset"
msgstr "Ripristina"
#: lib/prefs/widgets.js:219
#, fuzzy
msgid "Clear shortcut"
msgstr "Scorciatoie per i container"

#: lib/prefs/widgets.js:234
msgid "Reset to default"
msgstr ""

#~ msgid "Reset"
#~ msgstr "Ripristina"

#~ msgid "Workspace"
#~ msgstr "Spazio di lavoro"
Expand Down Expand Up @@ -521,9 +529,6 @@ msgstr "Ripristina"
#~ msgid "Workspace Shortcuts"
#~ msgstr "Scorciatoie dell'area di lavoro"

#~ msgid "Container Shortcuts"
#~ msgstr "Scorciatoie per i container"

#~ msgid "Focus Shortcuts"
#~ msgstr "Scorciatoie per la messa a fuoco"

Expand Down
19 changes: 12 additions & 7 deletions po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Forge\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-04 16:38-0400\n"
"POT-Creation-Date: 2025-05-10 17:37+0100\n"
"PO-Revision-Date: 2021-12-29 19:04+0100\n"
"Last-Translator: Heimen Stoffels <vistausss@fastmail.com>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -338,9 +338,17 @@ msgstr ""
"<b>LET OP</b>: deze voorkeuren kunnen instabiliteit veroorzaken of zelfs de "
"shell laten crashen!"

#: lib/prefs/widgets.js:222
msgid "Reset"
msgstr "Standaardwaarden"
#: lib/prefs/widgets.js:219
#, fuzzy
msgid "Clear shortcut"
msgstr "Containersneltoetsen"

#: lib/prefs/widgets.js:234
msgid "Reset to default"
msgstr ""

#~ msgid "Reset"
#~ msgstr "Standaardwaarden"

#~ msgid "Workspace"
#~ msgstr "Werkblad"
Expand Down Expand Up @@ -456,9 +464,6 @@ msgstr "Standaardwaarden"
#~ msgid "Workspace Shortcuts"
#~ msgstr "Werkbladsneltoetsen"

#~ msgid "Container Shortcuts"
#~ msgstr "Containersneltoetsen"

#~ msgid "Focus Shortcuts"
#~ msgstr "Focussneltoetsen"

Expand Down
19 changes: 12 additions & 7 deletions po/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Forge\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-04 16:38-0400\n"
"POT-Creation-Date: 2025-05-10 17:37+0100\n"
"PO-Revision-Date: 2021-09-18 16:25-0400\n"
"Last-Translator: Juarez Rudsatz <juarezr@gmail.com>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -348,9 +348,17 @@ msgstr ""
"CUIDADO: Estas configurações, quando ativadas, são problemáticas ou podem "
"causar a queda da interface"

#: lib/prefs/widgets.js:222
msgid "Reset"
msgstr "Restaurar"
#: lib/prefs/widgets.js:219
#, fuzzy
msgid "Clear shortcut"
msgstr "Atalhos de Container"

#: lib/prefs/widgets.js:234
msgid "Reset to default"
msgstr ""

#~ msgid "Reset"
#~ msgstr "Restaurar"

#~ msgid "Workspace"
#~ msgstr "Área de Trabalho"
Expand Down Expand Up @@ -508,9 +516,6 @@ msgstr "Restaurar"
#~ msgid "Workspace Shortcuts"
#~ msgstr "Atalhos de Área de Trabalho"

#~ msgid "Container Shortcuts"
#~ msgstr "Atalhos de Container"

#~ msgid "Focus Shortcuts"
#~ msgstr "Atalhos de Foco"

Expand Down