aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-vfolder-rule.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-13 22:24:10 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-13 22:24:10 +0800
commite06b88c4fda627599d7c1a33ddec0a35a4374e4f (patch)
treea862b4d3909923719ab03936ec60dfc00f185ba8 /mail/em-vfolder-rule.c
parentdc2953040b0fb9576411d2f145e7e6ff11dd989a (diff)
downloadgsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.gz
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.zst
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.zip
Bug #594471 - Shouldn't call e_error_new/run with NULL 'parent'
Diffstat (limited to 'mail/em-vfolder-rule.c')
-rw-r--r--mail/em-vfolder-rule.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index ea6b6f0b87..2ccbe1378d 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -43,7 +43,7 @@
#define d(x)
-static gint validate(FilterRule *);
+static gint validate(FilterRule *, GtkWindow *error_parent);
static gint vfolder_eq(FilterRule *fr, FilterRule *cm);
static xmlNodePtr xml_encode(FilterRule *);
static gint xml_decode(FilterRule *, xmlNodePtr, RuleContext *f);
@@ -207,25 +207,23 @@ em_vfolder_rule_next_source(EMVFolderRule *vr, const gchar *last)
}
static gint
-validate(FilterRule *fr)
+validate(FilterRule *fr, GtkWindow *error_parent)
{
g_return_val_if_fail(fr != NULL, 0);
if (!fr->name || !*fr->name) {
- /* FIXME: set a parent window? */
- e_error_run(NULL, "mail:no-name-vfolder", NULL);
+ e_error_run (error_parent, "mail:no-name-vfolder", NULL);
return 0;
}
/* We have to have at least one source set in the "specific" case.
Do not translate this string! */
if (((EMVFolderRule *)fr)->with == EM_VFOLDER_RULE_WITH_SPECIFIC && ((EMVFolderRule *)fr)->sources == NULL) {
- /* FIXME: set a parent window? */
- e_error_run(NULL, "mail:vfolder-no-source", NULL);
+ e_error_run (error_parent, "mail:vfolder-no-source", NULL);
return 0;
}
- return FILTER_RULE_CLASS(parent_class)->validate(fr);
+ return FILTER_RULE_CLASS(parent_class)->validate (fr, error_parent);
}
static gint