[evolution-kolab] Adapt to deprecated E-D-S backend APIs being removed.



commit 634eb733f4f5d995bb17b1a9bbf94de10b19a061
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Mar 29 21:28:55 2013 -0400

    Adapt to deprecated E-D-S backend APIs being removed.
    
    Must have missed these amongst all the other compiler warnings.

 src/addressbook/e-book-backend-kolab.c |    8 ++++----
 src/calendar/e-cal-backend-kolab.c     |   22 ++++++++--------------
 2 files changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-kolab.c b/src/addressbook/e-book-backend-kolab.c
index 42c264e..8291d15 100644
--- a/src/addressbook/e-book-backend-kolab.c
+++ b/src/addressbook/e-book-backend-kolab.c
@@ -213,10 +213,10 @@ book_backend_kolab_notify_opened (EBookBackendKolab *self,
                g_propagate_error (err, tmp_err);
                return FALSE;
        }
-       e_book_backend_notify_online (bbackend,
-                                     tmp_mode == KOLAB_MAIL_ACCESS_OPMODE_ONLINE ? TRUE : FALSE);
-       e_book_backend_notify_readonly (bbackend, FALSE);
-       e_book_backend_notify_opened (bbackend, NULL);
+
+       e_backend_set_online (E_BACKEND (self),
+                             tmp_mode == KOLAB_MAIL_ACCESS_OPMODE_ONLINE);
+       e_book_backend_set_writable (bbackend, TRUE);
 
        return TRUE;
 }
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index afcdf66..d2c43a0 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -225,10 +225,9 @@ cal_backend_kolab_notify_opened (ECalBackendKolab *self,
                g_propagate_error (err, tmp_err);
                return FALSE;
        }
-       e_cal_backend_notify_online (cbackend,
-                                    tmp_mode == KOLAB_MAIL_ACCESS_OPMODE_ONLINE ? TRUE : FALSE);
-       e_cal_backend_notify_readonly (cbackend, FALSE);
-       e_cal_backend_notify_opened (cbackend, NULL);
+       e_backend_set_online (E_BACKEND (self),
+                             tmp_mode == KOLAB_MAIL_ACCESS_OPMODE_ONLINE);
+       e_cal_backend_set_writable (cbackend, TRUE);
 
        return TRUE;
 }
@@ -1763,20 +1762,17 @@ cal_backend_kolab_start_view (ECalBackend *backend,
                }
                if (ecalcomp != NULL) {
                        gboolean do_add = FALSE;
-                       gchar *compstr = NULL;
                        do_add = e_data_cal_view_component_matches (view,
                                                                    ecalcomp);
                        if (do_add) {
-                               compstr = e_cal_component_get_as_string (ecalcomp);
-                               iCal_objects = g_slist_append (iCal_objects,
-                                                              compstr);
+                               iCal_objects = g_slist_append (
+                                       iCal_objects, g_object_ref (ecalcomp));
                        }
                        g_object_unref (ecalcomp);
                }
        }
 
-       e_data_cal_view_notify_objects_added (view,
-                                             iCal_objects);
+       e_data_cal_view_notify_components_added (view, iCal_objects);
 
  exit:
 
@@ -1790,10 +1786,8 @@ cal_backend_kolab_start_view (ECalBackend *backend,
        if (view_err != NULL)
                g_error_free (view_err);
 
-       if (iCal_objects != NULL) {
-               g_slist_foreach (iCal_objects, (GFunc) g_free, NULL);
-               g_slist_free (iCal_objects);
-       }
+       g_slist_free_full (iCal_objects, (GDestroyNotify) g_object_unref);
+
        if (uid_list != NULL)
                kolab_util_glib_glist_free (uid_list);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]