editor: Add some mnemonics

This commit is contained in:
Elias Projahn 2025-03-01 08:34:53 +01:00
parent a16dc446d6
commit 3b02dc98a6
17 changed files with 48 additions and 28 deletions

View file

@ -46,7 +46,8 @@ template $MusicusAlbumEditor: Adw.NavigationPage {
] ]
Adw.ActionRow { Adw.ActionRow {
title: _("Add recording"); title: _("Add _recording");
use-underline: true;
activatable: true; activatable: true;
activated => $select_recording() swapped; activated => $select_recording() swapped;
@ -68,7 +69,8 @@ template $MusicusAlbumEditor: Adw.NavigationPage {
] ]
Adw.ButtonRow save_row { Adw.ButtonRow save_row {
title: _("Create album"); title: _("_Create album");
use-underline: true;
activated => $save() swapped; activated => $save() swapped;
} }
} }

View file

@ -35,7 +35,8 @@ template $MusicusEnsembleEditor: Adw.NavigationPage {
] ]
Adw.ButtonRow save_row { Adw.ButtonRow save_row {
title: _("Create ensemble"); title: _("_Create ensemble");
use-underline: true;
activated => $save() swapped; activated => $save() swapped;
} }
} }

View file

@ -35,7 +35,8 @@ template $MusicusInstrumentEditor: Adw.NavigationPage {
] ]
Adw.ButtonRow save_row { Adw.ButtonRow save_row {
title: _("Create instrument"); title: _("_Create instrument");
use-underline: true;
activated => $save() swapped; activated => $save() swapped;
} }
} }

View file

@ -35,7 +35,8 @@ template $MusicusPersonEditor: Adw.NavigationPage {
] ]
Adw.ButtonRow save_row { Adw.ButtonRow save_row {
title: _("Create person"); title: _("_Create person");
use-underline: true;
activated => $save() swapped; activated => $save() swapped;
} }
} }

View file

@ -35,7 +35,8 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
] ]
Adw.ActionRow work_row { Adw.ActionRow work_row {
title: _("Select work"); title: _("Select _work");
use-underline: true;
activatable: true; activatable: true;
activated => $select_work() swapped; activated => $select_work() swapped;
@ -48,7 +49,8 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
} }
Adw.SpinRow year_row { Adw.SpinRow year_row {
title: _("Year"); title: _("_Year");
use-underline: true;
adjustment: Gtk.Adjustment { adjustment: Gtk.Adjustment {
lower: 0; lower: 0;
@ -79,7 +81,8 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
] ]
Adw.ActionRow { Adw.ActionRow {
title: _("Add performer"); title: _("Add _performer");
use-underline: true;
activatable: true; activatable: true;
activated => $select_person() swapped; activated => $select_person() swapped;
@ -111,7 +114,8 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
] ]
Adw.ActionRow { Adw.ActionRow {
title: _("Add ensemble"); title: _("Add _ensemble");
use-underline: true;
activatable: true; activatable: true;
activated => $select_ensemble() swapped; activated => $select_ensemble() swapped;
@ -133,7 +137,8 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
] ]
Adw.ButtonRow save_row { Adw.ButtonRow save_row {
title: _("Create recording"); title: _("_Create recording");
use-underline: true;
activated => $save() swapped; activated => $save() swapped;
} }
} }

View file

@ -35,7 +35,8 @@ template $MusicusRoleEditor: Adw.NavigationPage {
] ]
Adw.ButtonRow save_row { Adw.ButtonRow save_row {
title: _("Create role"); title: _("_Create role");
use-underline: true;
activated => $save() swapped; activated => $save() swapped;
} }
} }

View file

@ -17,7 +17,9 @@ template $MusicusTracksEditor: Adw.NavigationPage {
margin-end: 12; margin-end: 12;
Gtk.Label { Gtk.Label {
label: _("Recording"); label: _("_Recording");
use-underline: true;
mnemonic-widget: recording_row;
xalign: 0; xalign: 0;
margin-top: 24; margin-top: 24;
@ -69,7 +71,8 @@ template $MusicusTracksEditor: Adw.NavigationPage {
] ]
Adw.ActionRow { Adw.ActionRow {
title: _("Add files"); title: _("Add _files");
use-underline: true;
activatable: true; activatable: true;
activated => $add_files() swapped; activated => $add_files() swapped;
@ -89,7 +92,8 @@ template $MusicusTracksEditor: Adw.NavigationPage {
] ]
Adw.ButtonRow save_row { Adw.ButtonRow save_row {
title: _("Import tracks"); title: _("_Import tracks");
use-underline: true;
activated => $save() swapped; activated => $save() swapped;
} }
} }

View file

@ -10,7 +10,8 @@ template $MusicusTranslationEditor: Adw.Bin {
] ]
Adw.EntryRow entry_row { Adw.EntryRow entry_row {
title: _("Name"); title: _("_Name");
use-underline: true;
} }
Adw.ActionRow { Adw.ActionRow {

View file

@ -49,7 +49,8 @@ template $MusicusWorkEditor: Adw.NavigationPage {
] ]
Adw.ActionRow { Adw.ActionRow {
title: _("Add composer"); title: _("Add _composer");
use-underline: true;
activatable: true; activatable: true;
activated => $add_person() swapped; activated => $add_person() swapped;
@ -81,7 +82,8 @@ template $MusicusWorkEditor: Adw.NavigationPage {
] ]
Adw.ActionRow { Adw.ActionRow {
title: _("Add part"); title: _("Add _part");
use-underline: true;
activatable: true; activatable: true;
activated => $add_part() swapped; activated => $add_part() swapped;
@ -112,7 +114,8 @@ template $MusicusWorkEditor: Adw.NavigationPage {
] ]
Adw.ActionRow { Adw.ActionRow {
title: _("Add instrument"); title: _("Add _instrument");
use-underline: true;
activatable: true; activatable: true;
activated => $add_instrument() swapped; activated => $add_instrument() swapped;
@ -134,7 +137,8 @@ template $MusicusWorkEditor: Adw.NavigationPage {
] ]
Adw.ButtonRow save_row { Adw.ButtonRow save_row {
title: _("Create work"); title: _("_Create work");
use-underline: true;
activated => $save() swapped; activated => $save() swapped;
} }
} }

View file

@ -126,7 +126,7 @@ impl AlbumEditor {
.build(); .build();
if let Some(album) = album { if let Some(album) = album {
obj.imp().save_row.set_title(&gettext("Save changes")); obj.imp().save_row.set_title(&gettext("_Save changes"));
obj.imp().album_id.set(album.album_id.clone()).unwrap(); obj.imp().album_id.set(album.album_id.clone()).unwrap();
obj.imp().name_editor.set_translation(&album.name); obj.imp().name_editor.set_translation(&album.name);

View file

@ -78,7 +78,7 @@ impl MusicusEnsembleEditor {
obj.imp().library.set(library.to_owned()).unwrap(); obj.imp().library.set(library.to_owned()).unwrap();
if let Some(ensemble) = ensemble { if let Some(ensemble) = ensemble {
obj.imp().save_row.set_title(&gettext("Save changes")); obj.imp().save_row.set_title(&gettext("_Save changes"));
obj.imp() obj.imp()
.ensemble_id .ensemble_id
.set(ensemble.ensemble_id.clone()) .set(ensemble.ensemble_id.clone())

View file

@ -78,7 +78,7 @@ impl MusicusInstrumentEditor {
obj.imp().library.set(library.to_owned()).unwrap(); obj.imp().library.set(library.to_owned()).unwrap();
if let Some(instrument) = instrument { if let Some(instrument) = instrument {
obj.imp().save_row.set_title(&gettext("Save changes")); obj.imp().save_row.set_title(&gettext("_Save changes"));
obj.imp() obj.imp()
.instrument_id .instrument_id
.set(instrument.instrument_id.clone()) .set(instrument.instrument_id.clone())

View file

@ -78,7 +78,7 @@ impl MusicusPersonEditor {
obj.imp().library.set(library.to_owned()).unwrap(); obj.imp().library.set(library.to_owned()).unwrap();
if let Some(person) = person { if let Some(person) = person {
obj.imp().save_row.set_title(&gettext("Save changes")); obj.imp().save_row.set_title(&gettext("_Save changes"));
obj.imp().person_id.set(person.person_id.clone()).unwrap(); obj.imp().person_id.set(person.person_id.clone()).unwrap();
obj.imp().name_editor.set_translation(&person.name); obj.imp().name_editor.set_translation(&person.name);
} }

View file

@ -195,7 +195,7 @@ impl MusicusRecordingEditor {
.build(); .build();
if let Some(recording) = recording { if let Some(recording) = recording {
obj.imp().save_row.set_title(&gettext("Save changes")); obj.imp().save_row.set_title(&gettext("_Save changes"));
obj.imp() obj.imp()
.recording_id .recording_id
.set(recording.recording_id.clone()) .set(recording.recording_id.clone())

View file

@ -76,7 +76,7 @@ impl MusicusRoleEditor {
obj.imp().library.set(library.to_owned()).unwrap(); obj.imp().library.set(library.to_owned()).unwrap();
if let Some(role) = role { if let Some(role) = role {
obj.imp().save_row.set_title(&gettext("Save changes")); obj.imp().save_row.set_title(&gettext("_Save changes"));
obj.imp().role_id.set(role.role_id.clone()).unwrap(); obj.imp().role_id.set(role.role_id.clone()).unwrap();
obj.imp().name_editor.set_translation(&role.name); obj.imp().name_editor.set_translation(&role.name);
} }

View file

@ -135,7 +135,7 @@ impl TracksEditor {
.build(); .build();
if let Some(recording) = recording { if let Some(recording) = recording {
obj.imp().save_row.set_title(&gettext("Save changes")); obj.imp().save_row.set_title(&gettext("_Save changes"));
obj.set_recording(recording); obj.set_recording(recording);
} }
@ -206,7 +206,7 @@ impl TracksEditor {
.unwrap(); .unwrap();
if !tracks.is_empty() { if !tracks.is_empty() {
self.imp().save_row.set_title(&gettext("Save changes")); self.imp().save_row.set_title(&gettext("_Save changes"));
for track in tracks { for track in tracks {
self.add_track_row( self.add_track_row(

View file

@ -181,7 +181,7 @@ impl MusicusWorkEditor {
} }
if let Some(work) = work { if let Some(work) = work {
obj.imp().save_row.set_title(&gettext("Save changes")); obj.imp().save_row.set_title(&gettext("_Save changes"));
obj.imp().work_id.set(work.work_id.clone()).unwrap(); obj.imp().work_id.set(work.work_id.clone()).unwrap();
obj.imp().name_editor.set_translation(&work.name); obj.imp().name_editor.set_translation(&work.name);