]> saetta.ns0.it Git - solipa/libsolipa/commitdiff
Modifiche per evolution-data-server 3.2 (d testare).
authorAndrea Zagli <azagli@libero.it>
Sat, 17 Dec 2011 10:37:05 +0000 (11:37 +0100)
committerAndrea Zagli <azagli@libero.it>
Sat, 17 Dec 2011 10:37:05 +0000 (11:37 +0100)
.anjuta/session/anjuta.session
.anjuta/session/dock-layout.xml
src/camelsession.c
src/mail.c

index cfc725eddc13d2bbc9f96035f679c4f15b23c073..f515c2b10e3ba175fde3bd24c9b113b2472a8242 100644 (file)
@@ -8,7 +8,7 @@ Shortcut=libsolipa//libsolipa//src//libsolipa.la%%%libsolipa//libsolipa//src//li
 Expand=libsolipa.la%%%libsolipa%%%libsolipa//libsolipa
 
 [File Loader]
-Files=file:///home/andreaz/files/comune/solipa/libsolipa/src/utils.c#1146%%%file:///home/andreaz/files/comune/solipa/libsolipa/src/utils.h#76
+Files=file:///home/andreaz/files/comune/solipa/libsolipa/src/utils.c#130
 
 [Document Manager]
 bookmarks=<?xml version="1.0" encoding="UTF-8"?>\n<bookmarks/>\n
index b5b3e4dc02740ec81ea049b36ea1b04b4bccb874..b35c6dbff1b8a460ea6ccdccdb4012320f949ea8 100644 (file)
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<dock-layout><layout name="__default__"><dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0"><paned orientation="horizontal" locked="no" position="1008"><notebook orientation="vertical" locked="no" page="0"><item name="AnjutaDocumentManager" orientation="vertical" locked="no"/><item name="AnjutaDevhelpDisplay" orientation="vertical" locked="no"/><item name="AnjutaTerminal" orientation="vertical" locked="no"/></notebook><paned orientation="vertical" locked="no" position="336"><notebook orientation="vertical" locked="no" page="1"><item name="AnjutaProjectManager" orientation="vertical" locked="no"/><item name="AnjutaFileManager" orientation="vertical" locked="no"/></notebook><notebook orientation="vertical" locked="no" page="1"><item name="AnjutaDevhelpIndex" orientation="vertical" locked="no"/><item name="AnjutaSymbolDB" orientation="vertical" locked="no"/></notebook></paned></paned></dock></layout></dock-layout>
+<dock-layout><layout name="__default__"><dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0"><paned orientation="horizontal" locked="no" position="1008"><notebook orientation="vertical" locked="no" page="0"><item name="AnjutaDocumentManager" orientation="vertical" locked="no"/><item name="AnjutaDevhelpDisplay" orientation="vertical" locked="no"/><item name="AnjutaTerminal" orientation="vertical" locked="no"/></notebook><paned orientation="vertical" locked="no" position="336"><notebook orientation="vertical" locked="no" page="0"><item name="AnjutaProjectManager" orientation="vertical" locked="no"/><item name="AnjutaFileManager" orientation="vertical" locked="no"/></notebook><notebook orientation="vertical" locked="no" page="1"><item name="AnjutaDevhelpIndex" orientation="vertical" locked="no"/><item name="AnjutaSymbolDB" orientation="vertical" locked="no"/></notebook></paned></paned></dock></layout></dock-layout>
index 41749d2acd2a89737482cf7f654b90289fa06c02..5bddf9a380088f5b2020881af79df9b5fe206de2 100644 (file)
@@ -40,7 +40,9 @@ solipa_camel_session_new (const gchar *path)
        CamelSession *session;
 
        session = g_object_new (SOLIPA_TYPE_CAMEL_SESSION, NULL);
+#ifndef CAMEL3
        camel_session_construct (session, path);
+#endif
 
        return session;
 }
index 4a969bb89feb93ae6ce95b24051d241475f99232..f208844813927506be2e155c6d21ca9b717d0a4d 100644 (file)
@@ -456,6 +456,8 @@ solipa_mail_get_as_string (SolipaMail *mail)
                                   error != NULL && error->message != NULL ? error->message : "no details");
                        return NULL;
                }
+
+#ifndef CAMEL3
        error = NULL;
        if (camel_stream_reset (mem, &error) < 0)
                {
@@ -463,6 +465,7 @@ solipa_mail_get_as_string (SolipaMail *mail)
                                   error != NULL && error->message != NULL ? error->message : "no details");
                        return NULL;
                }
+#endif
 
        ret = g_strdup ("");
        while (!camel_stream_eos (mem))
@@ -485,6 +488,10 @@ solipa_mail_get_as_string (SolipaMail *mail)
                                }
                }
 
+#ifdef CAMEL3
+       camel_stream_close (mem, NULL, NULL);
+#endif
+
        return ret;
 }
 
@@ -553,7 +560,19 @@ solipa_mail_send (SolipaMail *mail, const gchar *url)
 #endif
 
        error = NULL;
+#ifdef CAMEL3
+       CamelURL *camel_url;
+       camel_url = camel_url_new (url, &error);
+       if (camel_url == NULL || error != NULL)
+               {
+                       g_warning ("Not url: %s",
+                                  error != NULL && error->message != NULL ? error->message : "no details");
+                       return;
+               }
+       trans = camel_session_get_service_by_url (solipa_get_camel_session (priv->solipa), camel_url, CAMEL_PROVIDER_TRANSPORT);
+#else
        trans = camel_session_get_service (solipa_get_camel_session (priv->solipa), url, CAMEL_PROVIDER_TRANSPORT, &error);
+#endif
        if (trans == NULL || error != NULL)
                {
                        g_warning ("Not service: %s",