Rather use gapplication service. This makes the flow similar to what
Chatty does and makes us hold/release rather than having an application
window.
It also allows us to drop the --daemon.
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/760>
The activate method is used when the application is activated via
various means - e.g. via the `Activate` DBus method. We don't want to
ignore that activation just because calls was started with the
`--daemon` option. Rename the variable to better match what it means.
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/760>
Add proper vertical margins (12px) to the SearchEntry widget in the
contacts view to improve spacing and visual consistency. This matches
the existing horizontal margins and follows GNOME design guidelines.
This change improves the visual appearance by preventing the search bar
from appearing cramped, especially when using high-contrast themes.
Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/672
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/762>
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>