mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-14 00:17:35 +00:00
history-box: Codestyle
This commit is contained in:
parent
aad6b85a2b
commit
85689dbb45
1 changed files with 23 additions and 30 deletions
|
@ -58,21 +58,16 @@ update (CallsHistoryBox *self)
|
||||||
{
|
{
|
||||||
gchar *child_name;
|
gchar *child_name;
|
||||||
|
|
||||||
if (g_list_model_get_n_items (self->model) == 0)
|
if (g_list_model_get_n_items (self->model) == 0) {
|
||||||
{
|
child_name = "empty";
|
||||||
child_name = "empty";
|
} else {
|
||||||
}
|
child_name = "history";
|
||||||
else
|
|
||||||
{
|
|
||||||
child_name = "history";
|
|
||||||
|
|
||||||
/* Transition should only ever be from empty to non-empty */
|
/* Transition should only ever be from empty to non-empty */
|
||||||
if (self->model_changed_handler_id != 0)
|
if (self->model_changed_handler_id != 0)
|
||||||
{
|
calls_clear_signal (self->model,
|
||||||
calls_clear_signal (self->model,
|
&self->model_changed_handler_id);
|
||||||
&self->model_changed_handler_id);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_stack_set_visible_child_name (GTK_STACK (self), child_name);
|
gtk_stack_set_visible_child_name (GTK_STACK (self), child_name);
|
||||||
}
|
}
|
||||||
|
@ -97,12 +92,11 @@ delete_call_cb (CallsCallRecord *record,
|
||||||
&id,
|
&id,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!ok)
|
if (!ok) {
|
||||||
{
|
g_warning ("Could not find record with id %u in model",
|
||||||
g_warning ("Could not find record with id %u in model",
|
id);
|
||||||
id);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
g_list_store_remove ((GListStore *) self->model, position);
|
g_list_store_remove ((GListStore *) self->model, position);
|
||||||
|
|
||||||
|
@ -133,17 +127,16 @@ set_property (GObject *object,
|
||||||
{
|
{
|
||||||
CallsHistoryBox *self = CALLS_HISTORY_BOX (object);
|
CallsHistoryBox *self = CALLS_HISTORY_BOX (object);
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id) {
|
||||||
{
|
case PROP_MODEL:
|
||||||
case PROP_MODEL:
|
g_set_object (&self->model,
|
||||||
g_set_object (&self->model,
|
G_LIST_MODEL (g_value_get_object (value)));
|
||||||
G_LIST_MODEL (g_value_get_object (value)));
|
break;
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue