main-window.ui: add a proper callback for Close button

The signal click of Close button is connected to "gtk_widget_hide".
As a result the window is hided, but still active and the whole
program renders unresponsive.

The Close button can appear for example if USSD_STATUS_IDLE comes
before a user press Cancel button in dialog window
(could be for example because of carrier timeout).
The "adw_dialog_close" function should be called instead.

Signed-off-by: knoppix <knoppix@4d2.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/776>
This commit is contained in:
knoppix
2025-04-28 16:23:07 -05:00
committed by Marge Bot
parent c3b2314583
commit ef9db6ce84
2 changed files with 1 additions and 2 deletions

View File

@@ -201,7 +201,6 @@ window_ussd_cancel_clicked_cb (CallsMainWindow *self)
adw_dialog_close (self->ussd_dialog); adw_dialog_close (self->ussd_dialog);
} }
static void static void
window_ussd_entry_changed_cb (CallsMainWindow *self, window_ussd_entry_changed_cb (CallsMainWindow *self,
GtkEntry *entry) GtkEntry *entry)

View File

@@ -85,7 +85,7 @@
<property name="focus-on-click">False</property> <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_widget_hide" object="ussd_dialog" swapped="yes"/> <signal name="clicked" handler="adw_dialog_close" object="ussd_dialog" swapped="yes"/>
</object> </object>
</child> </child>
<child type="end"> <child type="end">