125 lines
3.9 KiB
Diff
125 lines
3.9 KiB
Diff
--- src/plugins/evolution/tracker-evolution-plugin.c 2010-11-10 11:40:07.000000000 -0500
|
|
+++ src/plugins/evolution/tracker-evolution-plugin.c.new 2010-11-11 22:04:35.046263861 -0500
|
|
@@ -46,7 +46,8 @@
|
|
#endif
|
|
|
|
#include <mail/mail-config.h>
|
|
-#include <mail/mail-session.h>
|
|
+#include <mail/e-mail-session.h>
|
|
+#include <mail/e-mail-backend.h>
|
|
#include <mail/em-utils.h>
|
|
#include <mail/mail-ops.h>
|
|
|
|
@@ -1241,6 +1242,7 @@
|
|
|
|
for (it = e_list_get_iterator (E_LIST (priv->accounts)); e_iterator_is_valid (it); e_iterator_next (it)) {
|
|
EAccount *account = (EAccount *) e_iterator_get (it);
|
|
+ EMailSession *session;
|
|
CamelProvider *provider;
|
|
CamelStore *store;
|
|
char *uri;
|
|
@@ -1261,7 +1263,7 @@
|
|
continue;
|
|
}
|
|
|
|
- if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, NULL))) {
|
|
+ if (!(store = (CamelStore *) camel_session_get_service (CAMEL_SESSION (session), uri, CAMEL_PROVIDER_STORE, NULL))) {
|
|
continue;
|
|
}
|
|
|
|
@@ -1352,6 +1354,11 @@
|
|
CamelStore *store,
|
|
gchar *account_uri)
|
|
{
|
|
+ EMailBackend *backend;
|
|
+ EMailSession *session;
|
|
+
|
|
+ session = e_mail_backend_get_session (backend);
|
|
+
|
|
TrackerEvolutionPluginPrivate *priv = TRACKER_EVOLUTION_PLUGIN_GET_PRIVATE (self);
|
|
|
|
if (!priv->registered_folders) {
|
|
@@ -1378,7 +1385,8 @@
|
|
/* This is asynchronous and hooked to the mail/ API, so nicely
|
|
* integrated with the Evolution UI application */
|
|
|
|
- mail_get_folder (iter->uri, 0, register_on_get_folder, info,
|
|
+ mail_get_folder (session, iter->uri, 0,
|
|
+ register_on_get_folder, info,
|
|
mail_msg_unordered_push);
|
|
|
|
if (iter->child) {
|
|
@@ -1436,6 +1444,11 @@
|
|
CamelStore *store,
|
|
gchar *account_uri)
|
|
{
|
|
+ EMailBackend *backend;
|
|
+ EMailSession *session;
|
|
+
|
|
+ session = e_mail_backend_get_session (backend);
|
|
+
|
|
/* Recursively walks all the folders in store */
|
|
|
|
while (titer) {
|
|
@@ -1448,7 +1461,8 @@
|
|
/* This is asynchronous and hooked to the mail/ API, so nicely
|
|
* integrated with the Evolution UI application */
|
|
|
|
- mail_get_folder (titer->uri, 0, unregister_on_get_folder, info,
|
|
+ mail_get_folder (session, titer->uri, 0,
|
|
+ unregister_on_get_folder, info,
|
|
mail_msg_unordered_push);
|
|
|
|
if (titer->child) {
|
|
@@ -1602,6 +1616,7 @@
|
|
EAccount *account,
|
|
ClientRegistry *info)
|
|
{
|
|
+ EMailSession *session;
|
|
CamelProvider *provider;
|
|
CamelStore *store;
|
|
char *uri, *account_uri, *ptr;
|
|
@@ -1617,7 +1632,7 @@
|
|
if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE))
|
|
return;
|
|
|
|
- if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, NULL))) {
|
|
+ if (!(store = (CamelStore *) camel_session_get_service (CAMEL_SESSION (session), uri, CAMEL_PROVIDER_STORE, NULL))) {
|
|
return;
|
|
}
|
|
|
|
@@ -1933,6 +1948,7 @@
|
|
register_account (TrackerEvolutionPlugin *self,
|
|
EAccount *account)
|
|
{
|
|
+ EMailSession *session;
|
|
CamelProvider *provider;
|
|
CamelStore *store;
|
|
char *uri;
|
|
@@ -1948,7 +1964,7 @@
|
|
if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE))
|
|
return;
|
|
|
|
- if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, NULL))) {
|
|
+ if (!(store = (CamelStore *) camel_session_get_service (CAMEL_SESSION (session), uri, CAMEL_PROVIDER_STORE, NULL))) {
|
|
return;
|
|
}
|
|
|
|
@@ -2004,6 +2020,7 @@
|
|
unregister_account (TrackerEvolutionPlugin *self,
|
|
EAccount *account)
|
|
{
|
|
+ EMailSession *session;
|
|
CamelProvider *provider;
|
|
CamelStore *store;
|
|
char *uri = account->source->url;
|
|
@@ -2017,7 +2034,7 @@
|
|
if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE))
|
|
return;
|
|
|
|
- if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, NULL))) {
|
|
+ if (!(store = (CamelStore *) camel_session_get_service (CAMEL_SESSION (session), uri, CAMEL_PROVIDER_STORE, NULL))) {
|
|
return;
|
|
}
|
|
|