summaryrefslogtreecommitdiff
path: root/staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch')
-rw-r--r--staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch122
1 files changed, 122 insertions, 0 deletions
diff --git a/staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch b/staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch
new file mode 100644
index 000000000..51938b5fa
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch
@@ -0,0 +1,122 @@
+--- jbsrc/lib/src/extras/jb-evolution-plugin.c.evolution30 2011-02-02 00:09:33.945696868 +0100
++++ jbsrc/lib/src/extras/jb-evolution-plugin.c 2011-02-02 00:28:09.096275028 +0100
+@@ -41,7 +41,7 @@
+ if (! minversion)
+ minversion = "2.12";
+
+- packages = g_strdup_printf("evolution-plugin >= %s libgtkhtml-3.15 gtkhtml-editor-3.14", minversion);
++ packages = g_strdup_printf("evolution-plugin-3.0 >= %s libgtkhtml-4.0 gtkhtml-editor-4.0", minversion);
+ result = jb_check_packages("Evolution", "evolution-plugin", packages);
+ g_free(packages);
+
+@@ -53,7 +53,7 @@
+ char *plugindir;
+
+ jb_message_checking("for the Evolution plugin directory");
+- plugindir = jb_get_package_variable("evolution-plugin", "plugindir");
++ plugindir = jb_get_package_variable("evolution-plugin-3.0", "plugindir");
+ jb_message_result_string(plugindir ? plugindir : "not found");
+
+ if (! plugindir)
+--- src/mn-evolution-plugin.c.orig 2011-02-09 00:07:37.422002566 +0100
++++ src/mn-evolution-plugin.c 2011-02-09 00:12:43.652678682 +0100
+@@ -25,6 +25,7 @@
+ #include <dbus/dbus-glib-lowlevel.h>
+ #include <dbus/dbus-glib-bindings.h>
+ #include <camel/camel.h>
++#include <libedataserver/eds-version.h>
+ #include <mail/em-event.h>
+ #include <mail/mail-tools.h>
+ #include "mn-evolution.h"
+@@ -240,7 +241,11 @@
+ EMEventTargetFolder *folder)
+ {
+ if (evo_server)
++#if EDS_CHECK_VERSION(3,1,0)
++ mn_evolution_server_folder_changed(evo_server, e_mail_folder_uri_build(folder->store, folder->folder_name));
++#else
+ mn_evolution_server_folder_changed(evo_server, folder->uri);
++#endif
+ }
+
+ void
+@@ -249,10 +250,16 @@
+ {
+ if (evo_server)
+ {
+- char *url;
++#if EDS_CHECK_VERSION(2,91,0)
++ const char *url = camel_folder_get_uri(message->folder);
++#else
++ char *url = mail_tools_folder_to_url(message->folder);
++#endif
+
+- url = mail_tools_folder_to_url(message->folder);
+ mn_evolution_server_message_reading(evo_server, url);
++
++#if !EDS_CHECK_VERSION(2,91,0)
+ g_free(url);
++#endif
+ }
+ }
+--- build/src/mn-evolution-server.c.orig 2011-02-09 00:17:38.850944227 +0100
++++ build/src/mn-evolution-server.c 2011-02-09 22:21:54.155346478 +0100
+@@ -496,11 +496,15 @@
+
+ if (! folder)
+ {
+- folder = mail_tool_uri_to_folder(uri, 0,
+ #if EDS_CHECK_VERSION(2,91,0)
+- NULL,
++ static EMailSession * session = NULL;
++ if (!session)
++ session = e_mail_session_new();
++
++ folder = e_mail_session_uri_to_folder_sync(session, uri, 0, NULL, NULL);
++#else
++ folder = mail_tool_uri_to_folder(uri, 0, NULL);
+ #endif
+- NULL);
+ if (folder)
+ self_cache_folder(uri, folder);
+ else
+@@ -677,7 +681,12 @@
+ folder = self_lookup_folder(folder_uri, err);
+ if (folder)
+ {
++#if EDS_CHECK_VERSION(3,1,0)
++ *ret = g_strdup(camel_folder_get_display_name(folder));
++#else
+ *ret = g_strdup(camel_folder_get_name(folder));
++#endif
++
+ #if EDS_CHECK_VERSION(2,31,0)
+ g_object_unref(folder);
+ #else
+@@ -725,8 +734,12 @@
+ shell = e_shell_get_default ();
+ shell_backend = e_shell_get_backend_by_name (shell, "mail");
+
+- browser = e_mail_browser_new (shell_backend);
++ browser = e_mail_browser_new (E_MAIL_BACKEND(shell_backend));
++#if EDS_CHECK_VERSION(3,1,0)
++ e_mail_reader_set_folder (E_MAIL_READER (browser), folder);
++#else
+ e_mail_reader_set_folder (E_MAIL_READER (browser), folder, folder_uri);
++#endif
+ e_mail_reader_set_message (E_MAIL_READER (browser), message_uid);
+ gtk_widget_show (browser);
+ #else
+--- build/src/mn-evolution-folder-tree-server.c.orig 2011-06-17 22:01:49.226886994 +0200
++++ build/src/mn-evolution-folder-tree-server.c 2011-06-18 00:34:23.046889847 +0200
+@@ -444,7 +444,9 @@
+ {
+ #line 61 "src/mn-evolution-folder-tree-server.gob"
+
+-#if EDS_CHECK_VERSION(2,91,0)
++#if EDS_CHECK_VERSION(3,1,0)
++ selfp->tree = em_folder_tree_new(NULL, NULL);
++#elif EDS_CHECK_VERSION(2,91,0)
+ selfp->session = e_mail_session_new();
+ selfp->tree = em_folder_tree_new(selfp->session);
+ #elif EDS_CHECK_VERSION(2,29,0)