aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'filter/filter-file.c')
-rw-r--r--filter/filter-file.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/filter/filter-file.c b/filter/filter-file.c
index 2a79fdc172..e163cb0562 100644
--- a/filter/filter-file.c
+++ b/filter/filter-file.c
@@ -35,6 +35,7 @@
#include "filter-file.h"
#include "e-util/e-sexp.h"
+#include "widgets/misc/e-error.h"
#define d(x)
@@ -153,7 +154,6 @@ static gboolean
validate (FilterElement *fe)
{
FilterFile *file = (FilterFile *) fe;
- GtkWidget *dialog;
struct stat st;
if (!file->path) {
@@ -161,14 +161,8 @@ validate (FilterElement *fe)
GtkWidget member pointing to the value gotten with
::get_widget() so that we can get the parent window
here. */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", _("You must specify a file name."));
-
- gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE);
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
+ e_error_run(NULL, "filter:no-file", NULL);
+
return FALSE;
}
@@ -180,14 +174,7 @@ validate (FilterElement *fe)
GtkWidget member pointing to the value gotten with
::get_widget() so that we can get the parent window
here. */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("File '%s' does not exist or is not a regular file."),
- file->path);
-
- gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE);
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
+ e_error_run(NULL, "filter:bad-file", file->path, NULL);
return FALSE;
}