diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-04-13 03:55:28 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-04-13 06:35:12 +0800 |
commit | 08d5bdcf8b8bef913c9ad175927d528ff432332f (patch) | |
tree | 4162aea0f9d0d2837011ddb941263f2556f12947 /calendar/gui/e-calendar-view.c | |
parent | 1df4952769b3211b90aecb3a359d8ae484fd1363 (diff) | |
download | gsoc2013-evolution-08d5bdcf8b8bef913c9ad175927d528ff432332f.tar.gz gsoc2013-evolution-08d5bdcf8b8bef913c9ad175927d528ff432332f.tar.zst gsoc2013-evolution-08d5bdcf8b8bef913c9ad175927d528ff432332f.zip |
Add e_cal_model_ref_default_client().
Replaces e_cal_model_get_default_client(), which was not thread-safe.
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r-- | calendar/gui/e-calendar-view.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index cf01231502..8228e68285 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -622,15 +622,15 @@ clipboard_get_calendar_data (ECalendarView *cal_view, if (!icalcomp) return FALSE; - default_zone = e_cal_model_get_timezone (cal_view->priv->model); - client = e_cal_model_get_default_client (cal_view->priv->model); - /* check the type of the component */ /* FIXME An error dialog if we return? */ kind = icalcomponent_isa (icalcomp); if (kind != ICAL_VCALENDAR_COMPONENT && kind != ICAL_VEVENT_COMPONENT) return FALSE; + default_zone = e_cal_model_get_timezone (cal_view->priv->model); + client = e_cal_model_ref_default_client (cal_view->priv->model); + #if 0 /* KILL-BONOBO */ e_calendar_view_set_status_message (cal_view, _("Updating objects"), -1); #endif @@ -688,6 +688,8 @@ clipboard_get_calendar_data (ECalendarView *cal_view, *copied_list = g_slist_prepend (*copied_list, g_strdup (icalcomponent_get_uid (icalcomp))); } + g_object_unref (client); + return ret; #if 0 /* KILL-BONOBO */ @@ -1517,7 +1519,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, priv = cal_view->priv; - default_client = e_cal_model_get_default_client (priv->model); + default_client = e_cal_model_ref_default_client (priv->model); g_return_if_fail (default_client != NULL); dt.value = &itt; @@ -1571,6 +1573,8 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, cal_view, default_client, icalcomp, flags); g_object_unref (comp); + + g_object_unref (default_client); } /** |