diff options
author | Not Zed <NotZed@Ximian.com> | 2004-04-28 14:38:20 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-04-28 14:38:20 +0800 |
commit | 6674bdd55b8b29b1bde4b032f6933dfcfb967107 (patch) | |
tree | 34edbe55104d4083ef559df43ff93f8888228d37 /filter/rule-editor.c | |
parent | 4e99c39bcf70a2b15d4bd6dbb609ef0aba8d9675 (diff) | |
download | gsoc2013-evolution-6674bdd55b8b29b1bde4b032f6933dfcfb967107.tar gsoc2013-evolution-6674bdd55b8b29b1bde4b032f6933dfcfb967107.tar.gz gsoc2013-evolution-6674bdd55b8b29b1bde4b032f6933dfcfb967107.tar.bz2 gsoc2013-evolution-6674bdd55b8b29b1bde4b032f6933dfcfb967107.tar.lz gsoc2013-evolution-6674bdd55b8b29b1bde4b032f6933dfcfb967107.tar.xz gsoc2013-evolution-6674bdd55b8b29b1bde4b032f6933dfcfb967107.tar.zst gsoc2013-evolution-6674bdd55b8b29b1bde4b032f6933dfcfb967107.zip |
fix a warning.
2004-04-28 Not Zed <NotZed@Ximian.com>
* filter-option.c (filter_option_add): fix a warning.
** Changed error messages to use EError.
svn path=/trunk/; revision=25651
Diffstat (limited to 'filter/rule-editor.c')
-rw-r--r-- | filter/rule-editor.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/filter/rule-editor.c b/filter/rule-editor.c index a868e25d73..907f1f917e 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -27,9 +27,11 @@ /* for getenv only, remove when getenv need removed */ #include <stdlib.h> +#include <string.h> #include <libgnome/gnome-i18n.h> +#include "widgets/misc/e-error.h" #include "rule-editor.h" static int enable_undo = 0; @@ -234,15 +236,7 @@ add_editor_response (GtkWidget *dialog, int button, RuleEditor *re) } if (rule_context_find_rule (re->context, re->edit->name, re->edit->source)) { - dialog = gtk_message_dialog_new ((GtkWindow *) dialog, GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - _("Rule name '%s' is not unique, choose another."), - re->edit->name); - - gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); - gtk_dialog_run ((GtkDialog *) dialog); - gtk_widget_destroy (dialog); - + e_error_run((GtkWindow *)dialog, "filter:bad-name-notunique", re->edit->name, NULL); return; } @@ -320,15 +314,7 @@ edit_editor_response (GtkWidget *dialog, int button, RuleEditor *re) rule = rule_context_find_rule (re->context, re->edit->name, re->edit->source); if (rule != NULL && rule != re->current) { - dialog = gtk_message_dialog_new ((GtkWindow *) dialog, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - _("Rule name '%s' is not unique, choose another."), - re->edit->name); - - gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); - gtk_dialog_run ((GtkDialog *) dialog); - gtk_widget_destroy (dialog); + e_error_run((GtkWindow *)dialog, "filter:bad-name-notunique", rule->name, NULL); return; } |