From: Andrea Zagli Date: Tue, 19 Nov 2013 21:42:46 +0000 (+0000) Subject: Adattamento a libcamel 3.8.x. X-Git-Tag: 0.4.0~2 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=befff61f1246006e85a29311cb8ab880ff209d65;p=solipa%2Flibsolipa Adattamento a libcamel 3.8.x. --- diff --git a/.anjuta/session/anjuta.session b/.anjuta/session/anjuta.session index f515c2b..70a2860 100644 --- a/.anjuta/session/anjuta.session +++ b/.anjuta/session/anjuta.session @@ -1,21 +1,16 @@ - [Anjuta] Maximized=1 -Geometry=1366x745+0+1 - -[Project Manager] -Shortcut=libsolipa//libsolipa//src//libsolipa.la%%%libsolipa//libsolipa//src//libsolipaooo.la%%%libsolipa//libsolipa//tests//allegato%%%libsolipa//libsolipa//tests//mail%%%libsolipa//libsolipa//tests//mail_get_addresses_from_string%%%libsolipa//libsolipa//tests//mailui%%%libsolipa//libsolipa//tests//ooo%%%libsolipa//libsolipa//tests//progresswindow%%%libsolipa//libsolipa//tests//utils%%%libsolipa//libsolipa//tests//utils_codfisc_piva%%%libsolipa//libsolipa//tests//utils_format_money%%%libsolipa//libsolipa//tests//utils_gdatetime%%%libsolipa//libsolipa//tests//utils_infobar%%%libsolipa//libsolipa//tests//utils_round -Expand=libsolipa.la%%%libsolipa%%%libsolipa//libsolipa - -[File Loader] -Files=file:///home/andreaz/files/comune/solipa/libsolipa/src/utils.c#130 +Geometry=1366x715+0+27 [Document Manager] bookmarks=\n\n +[Project Manager] +Expand=libsolipa + [Execution] Run in terminal=2 -Working directories=file:///home/andreaz/files/comune/solipa/libsolipa +Working directories=../../../../../files/comune/solipa/libsolipa [Build] Configuration list=1:Default:%%%1:Debug:Debug%%%1:Profiling:Profiling%%%1:Optimized:Optimized diff --git a/.anjuta/session/dock-layout.xml b/.anjuta/session/dock-layout.xml index b35c6db..fd5c4a4 100644 --- a/.anjuta/session/dock-layout.xml +++ b/.anjuta/session/dock-layout.xml @@ -1,2 +1,2 @@ - + diff --git a/.anjuta_sym_db.db b/.anjuta_sym_db.db index 6f5d3ce..a79f5d0 100644 Binary files a/.anjuta_sym_db.db and b/.anjuta_sym_db.db differ diff --git a/.gitignore b/.gitignore index 10f734e..2d270ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +compile *~ *.rpath *.pot @@ -55,6 +56,7 @@ tests/mailui tests/ooo tests/progresswindow tests/utils +tests/utils_apri_collegamento tests/utils_codfisc_piva tests/utils_format_money tests/utils_gdatetime diff --git a/configure.ac b/configure.ac index ac17bc2..e5e4358 100644 --- a/configure.ac +++ b/configure.ac @@ -40,10 +40,10 @@ PKG_CHECK_MODULES(SOLIPA, [gobject-2.0 >= 2.24.0 AC_SUBST(SOLIPA_CFLAGS) AC_SUBST(SOLIPA_LIBS) -PKG_CHECK_MODULES(CAMEL, camel-1.2 >= 3.4, [camel34_found=yes], [camel34_found=no]) +PKG_CHECK_MODULES(CAMEL, camel-1.2 >= 3.8, [camel38_found=yes], [camel38_found=no]) camel3_found=no -if test x$camel34_found = xno; then +if test x$camel38_found = xno; then PKG_CHECK_MODULES(CAMEL, camel-provider-1.2 >= 3, [camel3_found=yes], [camel3_found=no]) if test x$camel3_found = xno; then @@ -57,8 +57,8 @@ fi AC_SUBST(CAMEL_CFLAGS) AC_SUBST(CAMEL_LIBS) -AC_SUBST(CAMEL34_FOUND) -AM_CONDITIONAL(HAVE_CAMEL34, test $camel34_found = yes) +AC_SUBST(CAMEL38_FOUND) +AM_CONDITIONAL(HAVE_CAMEL38, test $camel38_found = yes) AC_SUBST(CAMEL3_FOUND) AM_CONDITIONAL(HAVE_CAMEL3, test $camel3_found = yes) diff --git a/src/Makefile.am b/src/Makefile.am index d7efa0b..1905935 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,8 +10,8 @@ LIBS = $(SOLIPA_LIBS) \ $(CAMEL_LIBS) \ $(WIN32_LIBS) -if HAVE_CAMEL34 -CAMEL3=-DCAMEL3=\"yes\" +if HAVE_CAMEL38 +CAMEL3=-DCAMEL3=\"yes\" -DCAMEL38=\"yes\" else if HAVE_CAMEL3 CAMEL3=-DCAMEL3=\"yes\" diff --git a/src/mail.c b/src/mail.c index d544d91..976d32e 100644 --- a/src/mail.c +++ b/src/mail.c @@ -600,7 +600,11 @@ solipa_mail_send (SolipaMail *mail, const gchar *url) error != NULL && error->message != NULL ? error->message : "no details"); return; } +#ifdef CAMEL38 + trans = camel_session_ref_service_by_url (solipa_get_camel_session (priv->solipa), camel_url, CAMEL_PROVIDER_TRANSPORT); +#else trans = camel_session_get_service_by_url (solipa_get_camel_session (priv->solipa), camel_url, CAMEL_PROVIDER_TRANSPORT); +#endif #else trans = camel_session_get_service (solipa_get_camel_session (priv->solipa), url, CAMEL_PROVIDER_TRANSPORT, &error); #endif @@ -612,7 +616,9 @@ solipa_mail_send (SolipaMail *mail, const gchar *url) } error = NULL; -#ifdef CAMEL3 +#ifdef CAMEL38 + ret = camel_service_connect_sync (trans, NULL, &error); +#elif defined CAMEL3 ret = camel_service_connect_sync (trans, &error); #else ret = camel_service_connect (trans, &error); @@ -658,6 +664,8 @@ solipa_mail_send (SolipaMail *mail, const gchar *url) error = NULL; #ifdef CAMEL3 + camel_service_disconnect_sync (trans, FALSE, NULL, NULL); +#elif defined CAMEL3 camel_service_disconnect_sync (trans, FALSE, NULL); #else camel_service_disconnect (trans, FALSE, NULL); diff --git a/src/solipa.c b/src/solipa.c index 1d1ce5d..77d4183 100644 --- a/src/solipa.c +++ b/src/solipa.c @@ -317,6 +317,12 @@ solipa_dispose (GObject *gobject) priv->gtkbuilder = NULL; } + if (priv->camel_tmpdir) + { + /* rimuovo la directory temporanea */ + g_rmdir (priv->camel_tmpdir); + } + if (priv->camel_session) { g_object_unref (priv->camel_session);