event-editor: Focus "Done" for read-only events
In commit 1494f7407, we focus the summary entry when opening the dialog.
However, this prevents the Escape keyboard shortcut from working
when opening a read-only event after having opened a writable event.
Set focus onto the "Done" button when showing a read-only event,
as it's the only widget that can be activated/clicked in this situation.
This makes the "Escape", "Spacebar" and "Enter" keyboard shortcuts work.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1180
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
65bb78f11a
commit
704c0815a1
@@ -787,6 +787,9 @@ gcal_event_editor_dialog_set_event (GcalEventEditorDialog *self,
|
||||
self->event_is_new = new_event;
|
||||
gtk_widget_set_visible (self->delete_button, !new_event);
|
||||
|
||||
if (!self->writable)
|
||||
gtk_widget_grab_focus (self->done_button);
|
||||
|
||||
out:
|
||||
flags = GCAL_EVENT_EDITOR_FLAG_NONE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user