diff options
author | Milan Crha <mcrha@redhat.com> | 2014-01-22 02:15:55 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2014-01-22 02:15:55 +0800 |
commit | bc084f0bff62254acb5f06cbbacb87ba01795552 (patch) | |
tree | 4f349c0ce24b13be3d0ae8a3c3a43043c70a94f1 /e-util | |
parent | 0b5057da0807ea4af2f685544e697b3baa5471ab (diff) | |
download | gsoc2013-evolution-bc084f0bff62254acb5f06cbbacb87ba01795552.tar gsoc2013-evolution-bc084f0bff62254acb5f06cbbacb87ba01795552.tar.gz gsoc2013-evolution-bc084f0bff62254acb5f06cbbacb87ba01795552.tar.bz2 gsoc2013-evolution-bc084f0bff62254acb5f06cbbacb87ba01795552.tar.lz gsoc2013-evolution-bc084f0bff62254acb5f06cbbacb87ba01795552.tar.xz gsoc2013-evolution-bc084f0bff62254acb5f06cbbacb87ba01795552.tar.zst gsoc2013-evolution-bc084f0bff62254acb5f06cbbacb87ba01795552.zip |
Bug #721427 - Alert about missing condition in a filter rule editor
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-filter-rule.c | 3 | ||||
-rw-r--r-- | 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 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> |