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;
|
||||
|
||||
if (g_list_model_get_n_items (self->model) == 0)
|
||||
{
|
||||
if (g_list_model_get_n_items (self->model) == 0) {
|
||||
child_name = "empty";
|
||||
}
|
||||
else
|
||||
{
|
||||
} 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,8 +92,7 @@ delete_call_cb (CallsCallRecord *record,
|
|||
&id,
|
||||
NULL);
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
if (!ok) {
|
||||
g_warning ("Could not find record with id %u in model",
|
||||
id);
|
||||
return;
|
||||
|
@ -133,8 +127,7 @@ set_property (GObject *object,
|
|||
{
|
||||
CallsHistoryBox *self = CALLS_HISTORY_BOX (object);
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
switch (property_id) {
|
||||
case PROP_MODEL:
|
||||
g_set_object (&self->model,
|
||||
G_LIST_MODEL (g_value_get_object (value)));
|
||||
|
|
Loading…
Reference in a new issue