aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-folder-properties.c21
2 files changed, 26 insertions, 3 deletions
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 <NotZed@Ximian.com>
+
+ ** 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 <NotZed@Ximian.com>
** 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 <gtk/gtkvbox.h>
#include <camel/camel-folder.h>
+#include <camel/camel-vee-folder.h>
#include <libgnome/gnome-i18n.h>
#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);