diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/comp-util.c | 10 | ||||
-rw-r--r-- | calendar/gui/e-cal-list-view.c | 9 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 2 |
4 files changed, 16 insertions, 7 deletions
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c index aceff667c2..45d9dc1f27 100644 --- a/calendar/gui/comp-util.c +++ b/calendar/gui/comp-util.c @@ -227,11 +227,11 @@ cal_comp_is_on_server (CalComponent *comp, CalClient *client) return TRUE; } - if (error) { - g_warning ("cal_comp_is_on_server(): %s", error->message); - g_error_free (error); - } - + if (error->code != E_CALENDAR_STATUS_OBJECT_NOT_FOUND) + g_warning (G_STRLOC ": %s", error->message); + + g_clear_error (&error); + return FALSE; } diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c index 9fce533917..720f378ac7 100644 --- a/calendar/gui/e-cal-list-view.c +++ b/calendar/gui/e-cal-list-view.c @@ -334,14 +334,19 @@ GtkWidget * e_cal_list_view_new (const gchar *table_state_path) { ECalListView *cal_list_view; + ECalModel *model; + + model = E_CAL_MODEL (e_cal_model_calendar_new ()); - cal_list_view = g_object_new (e_cal_list_view_get_type (), NULL); + cal_list_view = g_object_new (e_cal_list_view_get_type (), "model", model, NULL); if (!e_cal_list_view_construct (cal_list_view, table_state_path)) { - g_message ("e_cal_list_view(): Could not construct the calendar list GUI"); + g_message (G_STRLOC ": Could not construct the calendar list GUI"); g_object_unref (cal_list_view); return NULL; } + g_object_unref (model); + return GTK_WIDGET (cal_list_view); } diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index b4ec9faea0..08c7ef2fa3 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -855,6 +855,8 @@ e_day_view_new (void) day_view = GTK_WIDGET (g_object_new (e_day_view_get_type (), "model", model, NULL)); + g_object_unref (model); + return day_view; } diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 1be94fc1de..9e622ff381 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -428,6 +428,8 @@ e_week_view_new (void) week_view = GTK_WIDGET (g_object_new (e_week_view_get_type (), "model", model, NULL)); + g_object_unref (model); + return week_view; } |