From bba69b99980a3f3386c98ccc98b4136ca5860d92 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 1 Dec 2004 03:24:52 +0000 Subject: ** See bug #69579. 2004-11-23 Not Zed ** See bug #69579. * em-folder-properties.c (em_folder_properties_show): check to see if the vfolder is the unmatched folder before letting the user try to see its properties. svn path=/trunk/; revision=28023 --- mail/ChangeLog | 8 ++++++++ mail/em-folder-properties.c | 21 ++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 548fa13041..1ca8830418 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2004-11-23 Not Zed + + ** See bug #69579. + + * em-folder-properties.c (em_folder_properties_show): check to see + if the vfolder is the unmatched folder before letting the user try + to see its properties. + 2004-11-30 Not Zed ** See bug #68958. diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c index 37df32199d..78328db898 100644 --- a/mail/em-folder-properties.c +++ b/mail/em-folder-properties.c @@ -39,6 +39,7 @@ #include #include +#include #include #include "em-folder-properties.h" @@ -314,9 +315,23 @@ void em_folder_properties_show(GtkWindow *parent, CamelFolder *folder, const char *uri) { /* HACK: its the old behaviour, not very 'neat' but it works */ - if (!strncmp(uri, "vfolder:", 8)) - vfolder_edit_rule(uri); - else if (folder == NULL) + if (!strncmp(uri, "vfolder:", 8)) { + CamelURL *url = camel_url_new(uri, NULL); + + /* MORE HACK: UNMATCHED is a special folder which you can't modify, so check for it here */ + if (url == NULL + || url->fragment == NULL + || strcmp(url->fragment, CAMEL_UNMATCHED_NAME) != 0) { + if (url) + camel_url_free(url); + vfolder_edit_rule(uri); + return; + } + if (url) + camel_url_free(url); + } + + if (folder == NULL) mail_get_folder(uri, 0, emfp_dialog_got_folder, NULL, mail_thread_new); else emfp_dialog_got_folder((char *)uri, folder, NULL); -- cgit