aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-10-22 22:50:44 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-10-22 22:50:44 +0800
commit0d339e5e16391b26b862a5611c6d85bf9583722a (patch)
treee7fd098cca7bb54830bd7106a7b87b597bdbb865
parent7dfdd3cfb8c5130bf6e0b145b7b128b49ea20a64 (diff)
downloadgsoc2013-evolution-0d339e5e16391b26b862a5611c6d85bf9583722a.tar
gsoc2013-evolution-0d339e5e16391b26b862a5611c6d85bf9583722a.tar.gz
gsoc2013-evolution-0d339e5e16391b26b862a5611c6d85bf9583722a.tar.bz2
gsoc2013-evolution-0d339e5e16391b26b862a5611c6d85bf9583722a.tar.lz
gsoc2013-evolution-0d339e5e16391b26b862a5611c6d85bf9583722a.tar.xz
gsoc2013-evolution-0d339e5e16391b26b862a5611c6d85bf9583722a.tar.zst
gsoc2013-evolution-0d339e5e16391b26b862a5611c6d85bf9583722a.zip
Hack it so that folders are fetched during account setup.
svn path=/branches/EXCHANGE_MAPI_BRANCH/; revision=34405
-rw-r--r--plugins/exchange-mapi/ChangeLog7
-rw-r--r--plugins/exchange-mapi/exchange-account-listener.c25
-rw-r--r--plugins/exchange-mapi/exchange-mapi-account-setup.c4
3 files changed, 26 insertions, 10 deletions
diff --git a/plugins/exchange-mapi/ChangeLog b/plugins/exchange-mapi/ChangeLog
index 4e278904fa..254229d5bb 100644
--- a/plugins/exchange-mapi/ChangeLog
+++ b/plugins/exchange-mapi/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-22 Srinivasa Ragavan <sragavan@novell.com>
+
+ * exchange-account-listener.c: (add_addressbook_sources),
+ (account_added), (exchange_account_listener_get_folder_list):
+ * exchange-mapi-account-setup.c: (create_profile): Hack it, so that
+ folders are fetched during account setup.
+
2007-10-22 Sankar P <psankar@novell.com>
* Makefile.am:
diff --git a/plugins/exchange-mapi/exchange-account-listener.c b/plugins/exchange-mapi/exchange-account-listener.c
index b6db82dea0..bdbbd664ae 100644
--- a/plugins/exchange-mapi/exchange-account-listener.c
+++ b/plugins/exchange-mapi/exchange-account-listener.c
@@ -43,7 +43,7 @@ LIMBAPI_CFLAGS or something is going wrong */
list of ExchangeAccountInfo structures */
static GList *mapi_accounts = NULL;
-
+static GSList *folders_list = NULL;
struct _ExchangeAccountListenerPrivate {
GConfClient *gconf_client;
/* we get notification about mail account changes form this object */
@@ -485,8 +485,9 @@ add_addressbook_sources (EAccount *account, GSList *folders)
tmp = g_strdup_printf ("%016llx", folder->folder_id);
e_source_set_property(source, "folder-id", tmp);
g_free (tmp);
- e_source_set_property (source, "offline_sync",
- camel_url_get_param (url, "offline_sync") ? "1" : "0");
+// e_source_set_property (source, "offline_sync",
+// camel_url_get_param (url, "offline_sync") ? "1" : "0");
+ e_source_set_property(source, "offline_sync", "1");
e_source_set_property (source, "completion", "true");
e_source_group_add_source (group, source, -1);
g_object_unref (source);
@@ -652,7 +653,7 @@ account_added (EAccountList *account_listener, EAccount *account)
EAccount *parent;
gboolean status;
CamelURL *parent_url;
- GSList *folders_list = NULL;
+
if (!is_mapi_account (account))
return;
@@ -665,11 +666,6 @@ account_added (EAccountList *account_listener, EAccount *account)
/* Fetch the folders into a global list for future use.*/
- if (exchange_mapi_get_folders_list (&folders_list)) {
- printf ("\n\aget folders list call is sucessful \n\a");
- }
-
-
add_addressbook_sources (account, folders_list);
/*FIXME: Maybe the folders_list above should be freed */
@@ -820,6 +816,17 @@ exchange_account_listener_construct (ExchangeAccountListener *config_listener)
// g_signal_connect (config_listener->priv->account_list, "account_removed", G_CALLBACK (account_removed), NULL);
}
+void
+exchange_account_listener_get_folder_list ()
+{
+ if (folders_list)
+ return;
+
+ if (exchange_mapi_get_folders_list (&folders_list)) {
+ printf ("\n\aget folders list call is sucessful \n\a");
+ }
+}
+
GType
exchange_account_listener_get_type (void)
{
diff --git a/plugins/exchange-mapi/exchange-mapi-account-setup.c b/plugins/exchange-mapi/exchange-mapi-account-setup.c
index 6edf471bbc..689e3b6815 100644
--- a/plugins/exchange-mapi/exchange-mapi-account-setup.c
+++ b/plugins/exchange-mapi/exchange-mapi-account-setup.c
@@ -210,7 +210,9 @@ create_profile(const char *username, const char *password, const char *domain, c
return FALSE;
g_free (profname);
-
+
+ exchange_account_listener_get_folder_list ();
+
return TRUE;
}