[evolution-kolab/ek-wip-porting] libekolab(util): fixes for E-D-S API changes
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting] libekolab(util): fixes for E-D-S API changes
- Date: Fri, 9 Mar 2012 18:31:25 +0000 (UTC)
commit dc375bf26834ed1bb1619797619872c37cbe9f50
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri Mar 9 19:28:52 2012 +0100
libekolab(util): fixes for E-D-S API changes
* <e-util/e-util.h> is now <libedataserver/e-data-server-util.h>
* getting the Camel storage path has been simplified
(reflect changes here)
src/libekolab/kolab-settings-handler.c | 5 +---
src/libekolabutil/kolab-util-camel.c | 40 ++++----------------------------
2 files changed, 6 insertions(+), 39 deletions(-)
---
diff --git a/src/libekolab/kolab-settings-handler.c b/src/libekolab/kolab-settings-handler.c
index 018abc4..a05b419 100644
--- a/src/libekolab/kolab-settings-handler.c
+++ b/src/libekolab/kolab-settings-handler.c
@@ -31,6 +31,7 @@
#include <glib/gi18n-lib.h>
+#include <libedataserver/e-data-server-util.h>
#include <libekolabutil/kolab-util-glib.h>
#include "kolab-util-backend.h"
@@ -140,13 +141,9 @@ kolab_settings_handler_char_get_func_camel_data_dir (KolabSettingsHandler *self,
g_assert_not_reached ();
}
- /* FIXME implement getting of the user data dir */
- g_error ("%s: FIXME implement getting of the user data dir", __func__);
-#if 0
data_dir = g_build_filename (e_get_user_data_dir (),
backend_dir,
NULL);
-#endif
g_free (backend_dir);
diff --git a/src/libekolabutil/kolab-util-camel.c b/src/libekolabutil/kolab-util-camel.c
index cbab2c6..ec7ba71 100644
--- a/src/libekolabutil/kolab-util-camel.c
+++ b/src/libekolabutil/kolab-util-camel.c
@@ -29,7 +29,7 @@
#include <glib/gi18n-lib.h>
-#include <e-util/e-util.h>
+#include <libedataserver/e-data-server-util.h>
#include "camel-system-headers.h"
#include "kolab-util-error.h"
@@ -87,50 +87,20 @@ kolab_util_camel_get_storage_path (CamelService *service,
GError **err)
{
gchar *store_path = NULL;
- CamelURL *url = NULL;
g_assert (CAMEL_IS_SERVICE (service));
g_assert (CAMEL_IS_SESSION (session));
g_return_val_if_fail (err == NULL || *err == NULL, NULL);
- /* FIXME Rework the whole CamelURL / CamelSettings / CamelService
- * stuff according to mbarnes' changes
- */
- url = camel_service_new_camel_url (service);
- g_assert (url != NULL);
- g_assert (url->path != NULL);
- store_path = g_strdup (url->path);
- camel_url_free (url);
-
-#if 0
- if (service->url->path != NULL)
- return g_strdup (service->url->path);
-
- store_path = camel_session_get_storage_path (session,
- service,
- &tmp_err);
- if (tmp_err != NULL) {
- g_warning ("%s: %s",
- __func__,
- tmp_err->message);
- g_error_free (tmp_err);
- tmp_err = NULL;
- if (store_path != NULL) {
- g_free (store_path);
- store_path = NULL;
- }
- }
- if (store_path == NULL)
- store_path = camel_session_get_storage_path (session,
- service,
- NULL);
+ store_path = g_strdup (camel_service_get_user_cache_path (service));
+
if (store_path == NULL) {
+ /* FIXME mark this as a translatable string */
g_set_error (err,
KOLAB_CAMEL_KOLAB_ERROR,
KOLAB_CAMEL_KOLAB_ERROR_DB,
- _("Could not get Camel storage path"));
+ "Could not get Camel storage path");
}
-#endif
return store_path;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]