aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/e-filter-rule.c3
-rw-r--r--e-util/filter.error.xml5
2 files changed, 8 insertions, 0 deletions
diff --git a/e-util/e-filter-rule.c b/e-util/e-filter-rule.c
index aabd0a67b4..33b626fd9b 100644
--- a/e-util/e-filter-rule.c
+++ b/e-util/e-filter-rule.c
@@ -400,6 +400,9 @@ filter_rule_validate (EFilterRule *rule,
parts = parts->next;
}
+ if (!valid && !parts && alert)
+ *alert = e_alert_new ("filter:no-condition", NULL);
+
return valid;
}
diff --git a/e-util/filter.error.xml b/e-util/filter.error.xml
index 62b75193d2..0b35f059be 100644
--- a/e-util/filter.error.xml
+++ b/e-util/filter.error.xml
@@ -31,4 +31,9 @@
<_secondary>Please choose another name.</_secondary>
</error>
+ <error id="no-condition" type="error">
+ <_primary>Missing condition.</_primary>
+ <_secondary>Filter should have at least one condition.</_secondary>
+ </error>
+
</error-list>