summaryrefslogtreecommitdiff
path: root/extra/mail-notification/mail-notification-5.4-evolution-3-0-support.patch
blob: 51a0eb51965b1a4498dc9fcccea4e80aa810d481 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
--- 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"
@@ -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