[calls] history-box: Codestyle
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] history-box: Codestyle
- Date: Thu, 2 Dec 2021 05:28:10 +0000 (UTC)
commit 85689dbb45d2bba0aa5a8830a66c665d6ff2babb
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Wed Dec 1 07:03:09 2021 +0100
history-box: Codestyle
src/calls-history-box.c | 57 ++++++++++++++++++++++---------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
---
diff --git a/src/calls-history-box.c b/src/calls-history-box.c
index 962e311e..b174848a 100644
--- a/src/calls-history-box.c
+++ b/src/calls-history-box.c
@@ -58,21 +58,16 @@ update (CallsHistoryBox *self)
{
gchar *child_name;
- if (g_list_model_get_n_items (self->model) == 0)
- {
- child_name = "empty";
- }
- else
- {
- child_name = "history";
-
- /* Transition should only ever be from empty to non-empty */
- if (self->model_changed_handler_id != 0)
- {
- calls_clear_signal (self->model,
- &self->model_changed_handler_id);
- }
- }
+ if (g_list_model_get_n_items (self->model) == 0) {
+ child_name = "empty";
+ } else {
+ child_name = "history";
+
+ /* Transition should only ever be from empty to non-empty */
+ if (self->model_changed_handler_id != 0)
+ calls_clear_signal (self->model,
+ &self->model_changed_handler_id);
+ }
gtk_stack_set_visible_child_name (GTK_STACK (self), child_name);
}
@@ -97,12 +92,11 @@ delete_call_cb (CallsCallRecord *record,
&id,
NULL);
- if (!ok)
- {
- g_warning ("Could not find record with id %u in model",
- id);
- return;
- }
+ if (!ok) {
+ g_warning ("Could not find record with id %u in model",
+ id);
+ return;
+ }
g_list_store_remove ((GListStore *) self->model, position);
@@ -133,17 +127,16 @@ set_property (GObject *object,
{
CallsHistoryBox *self = CALLS_HISTORY_BOX (object);
- switch (property_id)
- {
- case PROP_MODEL:
- g_set_object (&self->model,
- G_LIST_MODEL (g_value_get_object (value)));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
+ switch (property_id) {
+ case PROP_MODEL:
+ g_set_object (&self->model,
+ G_LIST_MODEL (g_value_get_object (value)));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]