From 8d4f7dd527a290483ae4456bc23cd4a9ee0cf4e7 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 13 Nov 2001 00:57:10 +0000 Subject: Force the user to name the filter. 2001-11-12 Jeffrey Stedfast * filter-rule.c (validate): Force the user to name the filter. * vfolder-rule.c (validate): Force the user to name the vfolder. svn path=/trunk/; revision=14679 --- filter/filter-rule.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'filter/filter-rule.c') diff --git a/filter/filter-rule.c b/filter/filter-rule.c index 5a4b28d5f7..2f8fd76047 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -31,6 +31,8 @@ #include #include #include +#include +#include #include #include "filter-rule.h" @@ -209,6 +211,16 @@ validate (FilterRule *fr) int valid = TRUE; GList *parts; + if (!fr->name || !*fr->name) { + GtkWidget *dialog; + + dialog = gnome_ok_dialog (_("You must name this filter.")); + + gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + + return FALSE; + } + /* validate rule parts */ parts = fr->parts; while (parts && valid) { -- cgit