calendars-page: Add shortcuts for Add Calendar

The "Add Calendar" button lacked a mnemonic, which made it difficult for keyboard users to activate it. It also adds a Ctrl+N shortcut.
This commit is contained in:
Hari Rana
2023-12-04 19:46:10 -05:00
parent 8c53034864
commit e7a61de5fc
@@ -56,12 +56,25 @@
<property name="margin-bottom">12</property>
<child>
<object class="GtkButton" id="add_calendar_row">
<property name="label" translatable="yes">Add Calendar…</property>
<property name="label" translatable="yes">_Add Calendar…</property>
<property name="use-underline">true</property>
<signal name="clicked" handler="on_new_calendar_button_clicked_cb" object="GcalCalendarsPage" swapped="no" />
<style>
<class name="pill"/>
<class name="suggested-action"/>
</style>
<child>
<object class="GtkShortcutController">
<property name="scope">managed</property>
<child>
<object class="GtkShortcut">
<property name="trigger">&lt;Ctrl&gt;n</property>
<property name="action">activate</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>