[evolution-mapi] e_mapi_subscribe_foreign_folder: Add an EClientCache parameter.



commit a43aa42c6a0f20381ef26408126aa3150821471d
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Mar 7 07:40:56 2013 -0500

    e_mapi_subscribe_foreign_folder: Add an EClientCache parameter.
    
    Needed for ENameSelector.

 src/configuration/e-mapi-config-utils.c            |    7 ++++++-
 .../e-mapi-subscribe-foreign-folder.c              |    5 +++--
 .../e-mapi-subscribe-foreign-folder.h              |    6 +++---
 3 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/configuration/e-mapi-config-utils.c b/src/configuration/e-mapi-config-utils.c
index 9199d9b..5b93f33 100644
--- a/src/configuration/e-mapi-config-utils.c
+++ b/src/configuration/e-mapi-config-utils.c
@@ -691,7 +691,9 @@ action_subscribe_foreign_folder_cb (GtkAction *action,
 {
        gchar *profile;
        GtkWindow *parent;
+       EShell *shell;
        EShellBackend *backend;
+       EClientCache *client_cache;
        CamelSession *session = NULL;
        CamelStore *store = NULL;
 
@@ -703,7 +705,10 @@ action_subscribe_foreign_folder_cb (GtkAction *action,
        backend = e_shell_view_get_shell_backend (shell_view);
        g_object_get (G_OBJECT (backend), "session", &session, NULL);
 
-       e_mapi_subscribe_foreign_folder (parent, session, store);
+       shell = e_shell_backend_get_shell (backend);
+       client_cache = e_shell_get_client_cache (shell);
+
+       e_mapi_subscribe_foreign_folder (parent, session, store, client_cache);
 
        g_object_unref (session);
        g_object_unref (store);
diff --git a/src/configuration/e-mapi-subscribe-foreign-folder.c 
b/src/configuration/e-mapi-subscribe-foreign-folder.c
index 3cff9fa..2c6f6d4 100644
--- a/src/configuration/e-mapi-subscribe-foreign-folder.c
+++ b/src/configuration/e-mapi-subscribe-foreign-folder.c
@@ -583,7 +583,8 @@ pick_gal_user_clicked_cb (GtkButton *button,
 void
 e_mapi_subscribe_foreign_folder (GtkWindow *parent,
                                 CamelSession *session,
-                                CamelStore *store)
+                                CamelStore *store,
+                                 EClientCache *client_cache)
 {
        PangoAttrList *attrs;
        ENameSelector *name_selector;
@@ -648,7 +649,7 @@ e_mapi_subscribe_foreign_folder (GtkWindow *parent,
 
        row++;
 
-       name_selector = e_name_selector_new (e_mail_session_get_registry (E_MAIL_SESSION (session)));
+       name_selector = e_name_selector_new (client_cache);
        name_selector_model = e_name_selector_peek_model (name_selector);
        e_name_selector_model_add_section (name_selector_model, "User", _("User"), NULL);
        name_selector_dialog = e_name_selector_peek_dialog (name_selector);
diff --git a/src/configuration/e-mapi-subscribe-foreign-folder.h 
b/src/configuration/e-mapi-subscribe-foreign-folder.h
index debf5b5..88ddc9c 100644
--- a/src/configuration/e-mapi-subscribe-foreign-folder.h
+++ b/src/configuration/e-mapi-subscribe-foreign-folder.h
@@ -24,11 +24,11 @@
 #ifndef E_MAPI_SUBSCRIBE_FOREIGN_FOLDER_H
 #define E_MAPI_SUBSCRIBE_FOREIGN_FOLDER_H
 
-#include <gtk/gtk.h>
-#include <camel/camel.h>
+#include <e-util/e-util.h>
 
 void   e_mapi_subscribe_foreign_folder (GtkWindow *parent,
                                         CamelSession *session,
-                                        CamelStore *store);
+                                        CamelStore *store,
+                                        EClientCache *client_cache);
 
 #endif /* E_MAPI_SUBSCRIBE_FOREIGN_FOLDER_H */


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