event-editor-dialog: Various keyboard improvements

- Add Esc as shortcut to close window
- Add mnemonics for Cancel and Done buttons
This commit is contained in:
Hari Rana
2023-07-23 14:14:33 +00:00
committed by Georges Basile Stavracas Neto
parent 2bb1ae90e4
commit be337bfe70
@@ -6,6 +6,17 @@
<property name="default-height">1000</property>
<property name="destroy-with-parent">True</property>
<property name="hide-on-close">True</property>
<child>
<object class="GtkShortcutController">
<child>
<object class="GtkShortcut">
<property name="trigger">Escape</property>
<property name="action">action(window.close)</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwToolbarView">
<child type="top">
@@ -13,7 +24,8 @@
<property name="show-title-buttons">False</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">Cancel</property>
<property name="use-underline">True</property>
<property name="label" translatable="yes">_Cancel</property>
<signal name="clicked" handler="on_cancel_button_clicked_cb" object="GcalEventEditorDialog" swapped="no"/>
</object>
</child>
@@ -84,7 +96,8 @@
</child>
<child type="end">
<object class="GtkButton" id="done_button">
<property name="label" translatable="yes">Done</property>
<property name="use-underline">True</property>
<property name="label" translatable="yes">_Done</property>
<signal name="clicked" handler="on_done_button_clicked_cb" object="GcalEventEditorDialog" swapped="no"/>
<style>
<class name="suggested-action"/>