[calls] notifier: Codestyle
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] notifier: Codestyle
- Date: Tue, 22 Feb 2022 09:30:39 +0000 (UTC)
commit 4187eec127efe9c3ac920f1a0283896783103390
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Thu Feb 17 16:36:20 2022 +0100
notifier: Codestyle
src/calls-notifier.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/src/calls-notifier.c b/src/calls-notifier.c
index 2bcbe357..99235ac5 100644
--- a/src/calls-notifier.c
+++ b/src/calls-notifier.c
@@ -44,6 +44,7 @@ struct _CallsNotifier
G_DEFINE_TYPE (CallsNotifier, calls_notifier, G_TYPE_OBJECT);
+
static void
notify (CallsNotifier *self, CuiCall *call)
{
@@ -109,17 +110,16 @@ state_changed_cb (CallsNotifier *self,
/* Can use g_list_store_find with newer glib */
n = g_list_model_get_n_items (G_LIST_MODEL (self->unanswered));
- for (int i = 0; i < n; i++)
- {
- g_autoptr (CuiCall) item = g_list_model_get_item (G_LIST_MODEL (self->unanswered), i);
- if (item == call)
- {
- g_list_store_remove (self->unanswered, i);
- g_signal_handlers_disconnect_by_data (item, self);
- }
+ for (int i = 0; i < n; i++) {
+ g_autoptr (CuiCall) item = g_list_model_get_item (G_LIST_MODEL (self->unanswered), i);
+ if (item == call) {
+ g_list_store_remove (self->unanswered, i);
+ g_signal_handlers_disconnect_by_data (item, self);
}
+ }
}
+
static void
call_added_cb (CallsNotifier *self, CuiCall *call)
{
@@ -155,9 +155,7 @@ calls_notifier_constructed (GObject *object)
calls = calls_manager_get_calls (calls_manager_get_default ());
for (c = calls; c != NULL; c = c->next)
- {
- call_added_cb (self, c->data);
- }
+ call_added_cb (self, c->data);
}
@@ -182,6 +180,7 @@ calls_notifier_class_init (CallsNotifierClass *klass)
object_class->dispose = calls_notifier_dispose;
}
+
CallsNotifier *
calls_notifier_new (void)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]