aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-component.c
diff options
context:
space:
mode:
authorJohnny Jacob <jjohnny@src.gnome.org>2007-08-20 10:14:38 +0800
committerJohnny Jacob <jjohnny@src.gnome.org>2007-08-20 10:14:38 +0800
commit3ea7bd690fb04f799fea74dc251446ba735a4927 (patch)
tree6f86a819765e1c95dcd3dd6754391bfd61a0cddf /mail/mail-component.c
parentdd87c2918f74214aba162800b1be1e675011cd7e (diff)
downloadgsoc2013-evolution-3ea7bd690fb04f799fea74dc251446ba735a4927.tar.gz
gsoc2013-evolution-3ea7bd690fb04f799fea74dc251446ba735a4927.tar.zst
gsoc2013-evolution-3ea7bd690fb04f799fea74dc251446ba735a4927.zip
Fix for bug #467599.
svn path=/trunk/; revision=34039
Diffstat (limited to 'mail/mail-component.c')
-rw-r--r--mail/mail-component.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 47196b3626..938a720fe3 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -656,29 +656,33 @@ enable_folder_tree (GtkWidget *emfb, GtkWidget *emft)
CamelException ex;
EMFolderView *emfv = (EMFolderView *)emfb;
- camel_exception_init (&ex);
-
- /* Currently displayed folder */
+ /* current_curl - Currently displayed folder (can be the account_search_vfolder) */
MessageList *ml = emfv->list;
folder = ml->folder;
uri = mail_tools_folder_to_url (folder);
current_curl = camel_url_new (uri, NULL);
+ g_free (uri);
- /* Selected folder in emft*/
+ /* selected_curl - Folder that is/was selected in the folder tree */
uri = em_folder_tree_get_selected_uri ((EMFolderTree *) emft);
- folder = mail_tool_uri_to_folder (uri, 0, &ex);
- selected_curl = camel_url_new (uri, NULL);
- camel_exception_clear (&ex);
- if (!camel_url_equal (selected_curl, current_curl))
- g_signal_emit_by_name (emft, "folder-selected", emft, uri, folder->full_name, uri, folder->folder_flags);
+ /* if no folder is selected, skip this section */
+ if (uri && *uri) {
+ camel_exception_init (&ex);
+ folder = mail_tool_uri_to_folder (uri, 0, &ex);
+ selected_curl = camel_url_new (uri, NULL);
+ camel_exception_clear (&ex);
+
+ if (!camel_url_equal (selected_curl, current_curl))
+ g_signal_emit_by_name (emft, "folder-selected", emft, uri, folder->full_name, uri, folder->folder_flags);
+
+ camel_url_free (selected_curl);
+ g_free (uri);
+ }
gtk_widget_set_sensitive (emft, TRUE);
camel_url_free (current_curl);
- camel_url_free (selected_curl);
- g_free (uri);
-
}
/* Evolution::Component CORBA methods. */