1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-13 16:07:36 +00:00

manager: Remove call-add and call-remove signal

They are phased out in favour of their newly introduced ui-call-* pendants.
This was done to have a better separation of concerns and allows for some
cleanup in CallsCall.

Closes #397
This commit is contained in:
Evangelos Ribeiro Tzaras 2022-02-04 04:46:00 +01:00
parent 42557bf2a1
commit 1593625373

View file

@ -98,9 +98,7 @@ static GParamSpec *props[PROP_LAST_PROP];
enum {
SIGNAL_CALL_ADD,
SIGNAL_CALL_REMOVE,
UI_CALL_ADDDED, /* we're phasing out "call-added" in favour of "ui-call-added" */
UI_CALL_ADDDED,
UI_CALL_REMOVED,
USSD_ADDED,
USSD_CANCELLED,
@ -245,8 +243,6 @@ add_call (CallsManager *self, CallsCall *call, CallsOrigin *origin)
call_data = calls_ui_call_data_new (call, origin_id);
g_hash_table_insert (self->calls, call, call_data);
/* TODO get rid of SIGNAL_CALL_ADD signal */
g_signal_emit (self, signals[SIGNAL_CALL_ADD], 0, call, origin);
g_signal_emit (self, signals[UI_CALL_ADDDED], 0, call_data);
}
@ -301,10 +297,6 @@ remove_call (CallsManager *self, CallsCall *call, gchar *reason, CallsOrigin *or
g_timeout_add (DELAY_CALL_REMOVE_MS,
G_SOURCE_FUNC (on_remove_delayed),
data);
/* TODO get rid of SIGNAL_CALL_REMOVE signal */
/* We ignore the reason for now, because it doesn't give any usefull information */
g_signal_emit (self, signals[SIGNAL_CALL_REMOVE], 0, call, origin);
}
#undef DELAY_CALL_REMOVE_MS
@ -673,28 +665,6 @@ calls_manager_class_init (CallsManagerClass *klass)
object_class->get_property = calls_manager_get_property;
object_class->finalize = calls_manager_finalize;
signals[SIGNAL_CALL_ADD] =
g_signal_new ("call-add",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL, NULL,
G_TYPE_NONE,
2,
CALLS_TYPE_CALL,
CALLS_TYPE_ORIGIN);
signals[SIGNAL_CALL_REMOVE] =
g_signal_new ("call-remove",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL, NULL,
G_TYPE_NONE,
2,
CALLS_TYPE_CALL,
CALLS_TYPE_ORIGIN);
signals[UI_CALL_ADDDED] =
g_signal_new ("ui-call-added",
G_TYPE_FROM_CLASS (klass),