[evolution-data-server] ECal: Reimplement "remove" functions.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] ECal: Reimplement "remove" functions.
- Date: Sun, 7 Oct 2012 22:41:59 +0000 (UTC)
commit 6a36f7b8e60f588f7f6e181cce10010091f98da0
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Oct 6 23:40:18 2012 -0400
ECal: Reimplement "remove" functions.
Have them just call e_source_remove() or e_source_remove_sync().
calendar/libecal/e-cal.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index b3d8033..e1e2b52 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -1240,17 +1240,13 @@ gboolean
e_cal_remove (ECal *ecal,
GError **error)
{
- ECalPrivate *priv;
+ ESource *source;
- e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
- priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ g_return_val_if_fail (E_IS_CAL (ecal), FALSE);
- if (!e_gdbus_cal_call_remove_sync (priv->gdbus_cal, NULL, error)) {
- E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
- }
+ source = e_cal_get_source (ecal);
- return TRUE;
+ return e_source_remove_sync (source, NULL, error);
}
#if 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]