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>
GTK4's filters models swallow the reference.
Without this calls crashes like this:
```
#0 g_type_check_instance (type_instance=type_instance@entry=0x555c0f84ce90) at ../../../gobject/gtype.c:4024
#1 0x00007f0837af6e18 in g_signal_handlers_disconnect_matched
(instance=0x555c0f84ce90, mask=mask@entry=(G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), signal_id=signal_id@entry=0, detail=detail@entry=0, closure=closure@entry=0x0, func=func@entry=0x7f0836f828a0 <gtk_filter_list_model_items_changed_cb>, data=0x555c0f84f1b0) at ../../../gobject/gsignal.c:3007
#2 0x00007f0836f82459 in gtk_filter_list_model_clear_model (self=self@entry=0x555c0f84f1b0 [GtkFilterListModel]) at ../../../gtk/gtkfilterlistmodel.c:497
#3 0x00007f0836f824f4 in gtk_filter_list_model_clear_model (self=0x555c0f84f1b0 [GtkFilterListModel]) at ../../../gtk/gtkfilterlistmodel.c:493
#4 gtk_filter_list_model_dispose (object=0x555c0f84f1b0 [GtkFilterListModel]) at ../../../gtk/gtkfilterlistmodel.c:661
#5 0x00007f0837ae1289 in g_object_unref (_object=0x555c0f84f1b0) at ../../../gobject/gobject.c:4438
#6 0x00007f08379b47f3 in g_hash_table_remove_all_nodes (hash_table=hash_table@entry=0x555c0f84d2c0, notify=notify@entry=1, destruction=destruction@entry=1)
at ../../../glib/ghash.c:656
#7 0x00007f08379b53a3 in g_hash_table_remove_all_nodes (hash_table=0x555c0f84d2c0, notify=1, destruction=1) at ../../../glib/ghash.c:578
#8 g_hash_table_unref (hash_table=0x555c0f84d2c0) at ../../../glib/ghash.c:1438
#9 g_hash_table_unref (hash_table=0x555c0f84d2c0) at ../../../glib/ghash.c:1432
#10 0x0000555bf0b649b2 in calls_manager_finalize (object=0x555c0f84b800 [CallsManager]) at ../src/calls-manager.c:465
#11 0x00007f0837ae14fe in g_object_unref (_object=0x555c0f84b800) at ../../../gobject/gobject.c:4509
#12 0x0000555bf0b5b92d in finalize (object=0x555c0f82fcb0 [CallsApplication]) at ../src/calls-application.c:780
#13 0x00007f0837ae14fe in g_object_unref (_object=0x555c0f82fcb0) at ../../../gobject/gobject.c:4509
#14 0x0000555bf0b58cd4 in main (argc=1, argv=0x7fffc05d57a8) at ../src/main.c:47
```
Steps to reproduce:
- start calls
- open account dialog
- close account dialog
- hit control-c to end calls daemon
- observe above crash
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/777>
The gtk_*list_model_new() functions are `transfer: full` for the model.
Since we keep accessing the underlying models we keep the refs for clear
ownership and drop them in finalize.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
Apparently the slice list model in the history box
rebuilds the whole list when a single new record gets added.
Additionally, the "pressed" signal gets emitted on the
GtkGestureLongPress controller even when the call button is tapped
(i.e. should not have been pressed down for longer than the required timeout).
This then causes the callback to be invoked with a disposed record row.
This commit ensures the signals get properly disconnected
even in the face of unforeseen cleanup of the record row.
Helps with https://gitlab.gnome.org/GNOME/calls/-/issues/666
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
If a user e.g. lowers the gobal feedback level we don't want to
retrigger the events.
Without this calls assumes events ended naturally and restarts the
ringing without any events. As that is never ended even subsequent calls
don't receive any ringing.
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/734>