aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-12-01 11:24:52 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-12-01 11:24:52 +0800
commitbba69b99980a3f3386c98ccc98b4136ca5860d92 (patch)
treee45104b00b9de810db45fe9271a697dfc2f6abfe
parentac0a49bc0bbddad44c9e9661229b135b7760d03a (diff)
downloadgsoc2013-evolution-bba69b99980a3f3386c98ccc98b4136ca5860d92.tar
gsoc2013-evolution-bba69b99980a3f3386c98ccc98b4136ca5860d92.tar.gz
gsoc2013-evolution-bba69b99980a3f3386c98ccc98b4136ca5860d92.tar.bz2
gsoc2013-evolution-bba69b99980a3f3386c98ccc98b4136ca5860d92.tar.lz
gsoc2013-evolution-bba69b99980a3f3386c98ccc98b4136ca5860d92.tar.xz
gsoc2013-evolution-bba69b99980a3f3386c98ccc98b4136ca5860d92.tar.zst
gsoc2013-evolution-bba69b99980a3f3386c98ccc98b4136ca5860d92.zip
** See bug #69579.
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. svn path=/trunk/; revision=28023
-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);