[evolution] Bug #721427 - Alert about missing condition in a filter rule editor
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #721427 - Alert about missing condition in a filter rule editor
- Date: Tue, 21 Jan 2014 18:16:54 +0000 (UTC)
commit bc084f0bff62254acb5f06cbbacb87ba01795552
Author: Milan Crha <mcrha redhat com>
Date: Tue Jan 21 19:15:55 2014 +0100
Bug #721427 - Alert about missing condition in a filter rule editor
e-util/e-filter-rule.c | 3 +++
e-util/filter.error.xml | 5 +++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-filter-rule.c b/e-util/e-filter-rule.c
index aabd0a6..33b626f 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 62b7519..0b35f05 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]