[evolution-patches] Fix for #73201 (shared-folder plugin)
- From: Vivek Jain <jvivek novell com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] Fix for #73201 (shared-folder plugin)
- Date: Wed, 02 Mar 2005 20:45:17 +0530
Hi,
The attached bug fixes, http://bugzilla.ximian.com/show_bug.cgi?id=73201
Changes are made in shared-folder plugin.
Thanks,
Vivek Jain
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/shared-folder/ChangeLog,v
retrieving revision 1.11
diff -u -p -r1.11 ChangeLog
--- ChangeLog 25 Feb 2005 15:54:24 -0000 1.11
+++ ChangeLog 2 Mar 2005 14:59:14 -0000
@@ -1,3 +1,9 @@
+2005-03-02 Vivek Jain <jvivek novell com>
+
+ **Fixes #73201
+ * share-folder-common.c : (org_gnome_shared_folder_factory)
+ use full_name given by CamelFolder to get the selected folder name
+
2005-02-24 Björn Torkelsson <torkel acc umu se>
* org-gnome-shared-folder.eplug.in: Added Groupwise to name.
Index: share-folder-common.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/shared-folder/share-folder-common.c,v
retrieving revision 1.11
diff -u -p -r1.11 share-folder-common.c
--- share-folder-common.c 17 Feb 2005 09:52:01 -0000 1.11
+++ share-folder-common.c 2 Mar 2005 14:59:14 -0000
@@ -360,23 +360,24 @@ org_gnome_shared_folder_factory (EPlugin
gchar *account = NULL;
gchar *id = NULL;
gchar *sub = NULL;
+ gchar *folder_name = NULL;
EGwConnection *cnc;
ShareFolder *sharing_tab;
EMConfigTargetFolder *target= (EMConfigTargetFolder *)hook_data->config->target;
-
+ CamelFolder *folder = target->folder;
+
+ folder_name = g_strdup (folder->full_name);
folderuri = g_strdup(target->uri);
- if (folderuri) {
+ if (folderuri && folder_name)
account = g_strrstr(folderuri, "groupwise");
- sub = g_strrstr(folderuri, "#");
- } else
+ else
return NULL;
-
- if(sub == NULL)
- sub = g_strrstr(folderuri, "/");
+
+ sub = g_strrstr (folder_name, "/");
if (sub)
sub++;
else
- return NULL;
+ sub = folder_name;
if ( !( strcmp (sub, "Mailbox") && strcmp (sub, "Calendar") && strcmp (sub, "Contacts") && strcmp (sub, "Documents") && strcmp (sub, "Authored") && strcmp (sub, "Default Library") && strcmp (sub, "Work In Progress") && strcmp (sub, "Cabinet") && strcmp (sub, "Sent Items") && strcmp (sub, "Trash") && strcmp (sub, "Checklist"))) {
g_free (folderuri);
@@ -384,23 +385,22 @@ org_gnome_shared_folder_factory (EPlugin
}
if (account) {
- CamelFolder *folder = target->folder;
CamelStore *store = folder->parent_store;
cnc = get_cnc (store);
+
if (E_IS_GW_CONNECTION (cnc))
id = get_container_id (cnc, sub);
else
g_warning("Could not Connnect\n");
- g_free (folderuri);
if (cnc && id)
sharing_tab = share_folder_new (cnc, id);
else
return NULL;
-
+
gtk_notebook_append_page((GtkNotebook *) hook_data->parent, (GtkWidget *) sharing_tab->vbox, gtk_label_new_with_mnemonic N_("Sharing"));
common = sharing_tab;
-
+ g_free (folderuri);
return GTK_WIDGET (sharing_tab);
} else
return NULL;
@@ -460,7 +460,7 @@ get_container_id(EGwConnection *cnc, gch
GList *container = NULL;
for (container = container_list; container != NULL; container = container->next) {
- name = e_gw_container_get_name (container->data);
+ name = g_strdup (e_gw_container_get_name (container->data));
/* if Null is passed as name then we return top lavel id*/
if (fname == NULL) {
id = g_strdup (e_gw_container_get_id (container->data));
@@ -469,6 +469,7 @@ get_container_id(EGwConnection *cnc, gch
id = g_strdup (e_gw_container_get_id (container->data));
break;
}
+ g_free (name);
}
e_gw_connection_free_container_list (container_list);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]