mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-14 00:17:35 +00:00
notifier: Codestyle
This commit is contained in:
parent
1e734dbbff
commit
4187eec127
1 changed files with 10 additions and 11 deletions
|
@ -44,6 +44,7 @@ struct _CallsNotifier
|
||||||
|
|
||||||
G_DEFINE_TYPE (CallsNotifier, calls_notifier, G_TYPE_OBJECT);
|
G_DEFINE_TYPE (CallsNotifier, calls_notifier, G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
notify (CallsNotifier *self, CuiCall *call)
|
notify (CallsNotifier *self, CuiCall *call)
|
||||||
{
|
{
|
||||||
|
@ -109,17 +110,16 @@ state_changed_cb (CallsNotifier *self,
|
||||||
|
|
||||||
/* Can use g_list_store_find with newer glib */
|
/* Can use g_list_store_find with newer glib */
|
||||||
n = g_list_model_get_n_items (G_LIST_MODEL (self->unanswered));
|
n = g_list_model_get_n_items (G_LIST_MODEL (self->unanswered));
|
||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++) {
|
||||||
{
|
|
||||||
g_autoptr (CuiCall) item = g_list_model_get_item (G_LIST_MODEL (self->unanswered), i);
|
g_autoptr (CuiCall) item = g_list_model_get_item (G_LIST_MODEL (self->unanswered), i);
|
||||||
if (item == call)
|
if (item == call) {
|
||||||
{
|
|
||||||
g_list_store_remove (self->unanswered, i);
|
g_list_store_remove (self->unanswered, i);
|
||||||
g_signal_handlers_disconnect_by_data (item, self);
|
g_signal_handlers_disconnect_by_data (item, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
call_added_cb (CallsNotifier *self, CuiCall *call)
|
call_added_cb (CallsNotifier *self, CuiCall *call)
|
||||||
{
|
{
|
||||||
|
@ -155,10 +155,8 @@ calls_notifier_constructed (GObject *object)
|
||||||
|
|
||||||
calls = calls_manager_get_calls (calls_manager_get_default ());
|
calls = calls_manager_get_calls (calls_manager_get_default ());
|
||||||
for (c = calls; c != NULL; c = c->next)
|
for (c = calls; c != NULL; c = c->next)
|
||||||
{
|
|
||||||
call_added_cb (self, c->data);
|
call_added_cb (self, c->data);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -182,6 +180,7 @@ calls_notifier_class_init (CallsNotifierClass *klass)
|
||||||
object_class->dispose = calls_notifier_dispose;
|
object_class->dispose = calls_notifier_dispose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CallsNotifier *
|
CallsNotifier *
|
||||||
calls_notifier_new (void)
|
calls_notifier_new (void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue