[tracker/evolution-plugin] plugins/evolution: Fixes for making it work on latest master



commit 87a5064e3033e1521b3ba01c63a5667bde231a82
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Feb 17 11:35:14 2011 +0100

    plugins/evolution: Fixes for making it work on latest master

 configure.ac                                     |    8 +++++---
 src/plugins/evolution/tracker-evolution-plugin.c |   15 ++++++++++++++-
 2 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7282529..72f9610 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,9 +186,10 @@ LIBFLAC_REQUIRED=1.2.1
 LIBEXIF_REQUIRED=0.6
 LIBGSF_REQUIRED=1.13
 EXEMPI_REQUIRED=2.1.0
-EVO_REQUIRED=2.31.2
-EDS_REQUIRED=2.31.2
-CAMEL_REQUIRED=2.31.2
+EVO_REQUIRED=2.92
+EVO_SHELL_REQUIRED=2.92
+EDS_REQUIRED=2.92
+CAMEL_REQUIRED=2.92
 # Unlikely version for now, Nepomuk integration isn't finished in streamanalyzer atm
 LIBSTREAMANALYZER_REQUIRED=0.7.0
 GEE_REQUIRED=0.3
@@ -352,6 +353,7 @@ TRACKER_MINER_FS_LIBS="$TRACKER_MINER_FS_LIBS -lz -lm"
 evolution_plugin_name="evolution-plugin"
 
 TRACKER_MINER_EVOLUTION_REQUIRED="glib-2.0                  >= $GLIB_REQUIRED
+                                  evolution-shell           >= $EVO_SHELL_REQUIRED
                                   evolution-plugin          >= $EVO_REQUIRED
                                   evolution-data-server-1.2 >= $EDS_REQUIRED
                                   camel-1.2                 >= $CAMEL_REQUIRED"
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index c6f1a87..abfbee2 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -43,10 +43,13 @@
 #include <camel/camel.h>
 
 #include <mail/mail-config.h>
-#include <mail/mail-session.h>
 #include <mail/em-utils.h>
 #include <mail/mail-ops.h>
 
+#include <mail/e-mail-session.h>
+#include <mail/e-mail-backend.h>
+#include <shell/e-shell.h>
+
 #include <e-util/e-config.h>
 #include <e-util/e-account-utils.h>
 
@@ -183,6 +186,7 @@ static TrackerEvolutionPlugin *manager = NULL;
 static GStaticRecMutex glock = G_STATIC_REC_MUTEX_INIT;
 static guint register_count = 0, walk_count = 0;
 static ThreadPool *folder_pool = NULL;
+static EMailSession *session = NULL;
 
 /* Prototype declarations */
 static void register_account (TrackerEvolutionPlugin *self, EAccount *account);
@@ -2170,6 +2174,15 @@ tracker_evolution_plugin_init (TrackerEvolutionPlugin *plugin)
 	TrackerEvolutionPluginPrivate *priv = TRACKER_EVOLUTION_PLUGIN_GET_PRIVATE (plugin);
 	EIterator *it;
 
+	if (!session) {
+		EShell *shell;
+		EShellBackend *shell_backend;
+
+		shell = e_shell_get_default ();
+		shell_backend = e_shell_get_backend_by_name (shell, "mail");
+		session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
+	}
+
 	priv->connection = NULL;
 	priv->last_time = 0;
 	priv->resuming = FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]