aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-file.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-13 22:24:10 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-13 22:24:10 +0800
commite06b88c4fda627599d7c1a33ddec0a35a4374e4f (patch)
treea862b4d3909923719ab03936ec60dfc00f185ba8 /filter/filter-file.c
parentdc2953040b0fb9576411d2f145e7e6ff11dd989a (diff)
downloadgsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.gz
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.bz2
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.lz
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.xz
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.zst
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.zip
Bug #594471 - Shouldn't call e_error_new/run with NULL 'parent'
Diffstat (limited to 'filter/filter-file.c')
-rw-r--r--filter/filter-file.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/filter/filter-file.c b/filter/filter-file.c
index 72d7bac458..b541022554 100644
--- a/filter/filter-file.c
+++ b/filter/filter-file.c
@@ -37,7 +37,7 @@
#define d(x)
-static gboolean validate (FilterElement *fe);
+static gboolean validate (FilterElement *fe, GtkWindow *error_parent);
static gint file_eq (FilterElement *fe, FilterElement *cm);
static void xml_create (FilterElement *fe, xmlNodePtr node);
static xmlNodePtr xml_encode (FilterElement *fe);
@@ -146,16 +146,12 @@ filter_file_set_path (FilterFile *file, const gchar *path)
}
static gboolean
-validate (FilterElement *fe)
+validate (FilterElement *fe, GtkWindow *error_parent)
{
FilterFile *file = (FilterFile *) fe;
if (!file->path) {
- /* FIXME: FilterElement should probably have a
- GtkWidget member pointing to the value gotten with
- ::get_widget() so that we can get the parent window
- here. */
- e_error_run(NULL, "filter:no-file", NULL);
+ e_error_run (error_parent, "filter:no-file", NULL);
return FALSE;
}
@@ -164,11 +160,7 @@ validate (FilterElement *fe)
if (strcmp (file->type, "file") == 0) {
if (!g_file_test (file->path, G_FILE_TEST_IS_REGULAR)) {
- /* FIXME: FilterElement should probably have a
- GtkWidget member pointing to the value gotten with
- ::get_widget() so that we can get the parent window
- here. */
- e_error_run(NULL, "filter:bad-file", file->path, NULL);
+ e_error_run (error_parent, "filter:bad-file", file->path, NULL);
return FALSE;
}