aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-04 13:51:58 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-04 13:51:58 +0800
commit69ea343ca9b697a0a4a3753451184859a7b41210 (patch)
tree7a147debdc197e8e93a84ba5efbb026e24147d70 /mail
parent494dffad09716e9829b06d48e207af07ff1ddbe3 (diff)
downloadgsoc2013-evolution-69ea343ca9b697a0a4a3753451184859a7b41210.tar.gz
gsoc2013-evolution-69ea343ca9b697a0a4a3753451184859a7b41210.tar.zst
gsoc2013-evolution-69ea343ca9b697a0a4a3753451184859a7b41210.zip
Do not fetch folder-info from backend - use the available folder-tree
instance. svn path=/trunk/; revision=33651
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-folder-tree.c26
2 files changed, 29 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 391b2ec77e..40a0a2e8d1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-28 Veerapuram Varadhan <vvaradhan@novell.com>
+
+ * em-folder-tree.c: (emft_popup_new_folder),
+ (em_folder_tree_get_selected_folder_info): Do not fetch
+ folder-info from backend - just use the data from the current
+ folder tree.
+
2007-06-03 Srinivasa Ragavan <sragavan@novell.com>
** Fix for version removal from Installed files from Gilles Dartiguelongue
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 1ce73f4208..a4c0d8c81d 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2011,6 +2011,7 @@ emft_popup_new_folder (EPopup *ep, EPopupItem *pitem, void *data)
if ((fi = em_folder_tree_get_selected_folder_info (emft)) != NULL) {
em_folder_utils_create_folder(fi);
+ camel_folder_info_free(fi);
}
}
@@ -2380,7 +2381,7 @@ em_folder_tree_get_selected_folder_info (EMFolderTree *emft)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *full_name = NULL;
+ char *full_name = NULL, *name = NULL, *uri = NULL;
CamelException ex;
CamelStore *store = NULL;
CamelFolderInfo *fi = NULL;
@@ -2392,12 +2393,29 @@ em_folder_tree_get_selected_folder_info (EMFolderTree *emft)
selection = gtk_tree_view_get_selection(emft->priv->treeview);
if (gtk_tree_selection_get_selected(selection, &model, &iter))
gtk_tree_model_get (model, &iter, COL_POINTER_CAMEL_STORE, &store,
- COL_STRING_FULL_NAME, &full_name, -1);
+ COL_STRING_FULL_NAME, &full_name,
+ COL_STRING_DISPLAY_NAME, &name,
+ COL_STRING_URI, &uri, -1);
- fi = camel_store_get_folder_info (store, full_name, CAMEL_STORE_FOLDER_INFO_FAST, &ex);
+ fi = g_new0(CamelFolderInfo, 1);
+ fi->full_name = g_strdup (full_name);
+ fi->uri = g_strdup (uri);
+ fi->name = g_strdup (name);
- camel_exception_clear (&ex);
+ d(g_print ("em_folder_tree_get_selected_folder_info: fi->full_name=[%s], fi->uri=[%s], fi->name=[%s]\n",
+ fi->full_name, fi->uri, fi->name));
+ d(g_print ("em_folder_tree_get_selected_folder_info: full_name=[%s], uri=[%s], name=[%s]\n",
+ full_name, uri, name));
+ if (!fi->full_name)
+ goto done;
+
+ g_free (fi->name);
+ if (!g_ascii_strcasecmp (fi->full_name, "INBOX"))
+ fi->name = g_strdup (_("Inbox"));
+ else
+ fi->name = g_strdup (name);
+ done:
return fi;
}