ussd-dialog: Simplify navigation

Focus the entry by default so we keep the OSK open when there's
additional input required

Helps: https://gitlab.gnome.org/GNOME/calls/-/issues/681

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/761>
This commit is contained in:
Guido Günther
2024-11-09 08:36:00 +01:00
parent 39d953c011
commit 047b5a1495

View File

@@ -65,7 +65,7 @@
<property name="default-width">240</property> <property name="default-width">240</property>
<property name="default-height">200</property> <property name="default-height">200</property>
<property name="hide-on-close">True</property> <property name="hide-on-close">True</property>
<property name="default-widget">ussd_cancel_button</property> <property name="default-widget">ussd_entry</property>
<child type="titlebar"> <child type="titlebar">
<object class="AdwHeaderBar"> <object class="AdwHeaderBar">
<property name="show-start-title-buttons">False</property> <property name="show-start-title-buttons">False</property>
@@ -73,6 +73,7 @@
<child type="start"> <child type="start">
<object class="GtkButton" id="ussd_cancel_button"> <object class="GtkButton" id="ussd_cancel_button">
<property name="use-underline">True</property> <property name="use-underline">True</property>
<property name="focus-on-click">False</property>
<property name="label" translatable="yes">_Cancel</property> <property name="label" translatable="yes">_Cancel</property>
<signal name="clicked" handler="window_ussd_cancel_clicked_cb" swapped="yes"/> <signal name="clicked" handler="window_ussd_cancel_clicked_cb" swapped="yes"/>
</object> </object>
@@ -80,6 +81,7 @@
<child type="start"> <child type="start">
<object class="GtkButton" id="ussd_close_button"> <object class="GtkButton" id="ussd_close_button">
<property name="visible" bind-source="ussd_cancel_button" bind-property="visible" bind-flags="sync-create|invert-boolean|bidirectional"/> <property name="visible" bind-source="ussd_cancel_button" bind-property="visible" bind-flags="sync-create|invert-boolean|bidirectional"/>
<property name="focus-on-click">False</property>
<property name="use-underline">True</property> <property name="use-underline">True</property>
<property name="label" translatable="yes">_Close</property> <property name="label" translatable="yes">_Close</property>
<signal name="clicked" handler="gtk_window_close" object="ussd_dialog" swapped="yes"/> <signal name="clicked" handler="gtk_window_close" object="ussd_dialog" swapped="yes"/>
@@ -88,6 +90,7 @@
<child type="end"> <child type="end">
<object class="GtkButton" id="ussd_reply_button"> <object class="GtkButton" id="ussd_reply_button">
<property name="label" translatable="yes">_Send</property> <property name="label" translatable="yes">_Send</property>
<property name="focus-on-click">False</property>
<property name="sensitive">False</property> <property name="sensitive">False</property>
<property name="use-underline">True</property> <property name="use-underline">True</property>
<signal name="clicked" handler="window_ussd_reply_clicked_cb" swapped="yes"/> <signal name="clicked" handler="window_ussd_reply_clicked_cb" swapped="yes"/>