diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-11-08 05:20:30 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-11-08 05:20:30 +0800 |
commit | b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0 (patch) | |
tree | e6975a4d32699cffbd2c5c2898b1609c1301c406 /filter/filter-file.c | |
parent | 19414d4335bf0b3e2a07435d967c4756540c8aaa (diff) | |
download | gsoc2013-evolution-b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0.tar gsoc2013-evolution-b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0.tar.gz gsoc2013-evolution-b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0.tar.bz2 gsoc2013-evolution-b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0.tar.lz gsoc2013-evolution-b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0.tar.xz gsoc2013-evolution-b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0.tar.zst gsoc2013-evolution-b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0.zip |
Use GtkDialog instead of GnomeDialog here.
2002-11-07 Jeffrey Stedfast <fejj@ximian.com>
* filter-rule.c (validate): Use GtkDialog instead of GnomeDialog
here.
* filter-input.c (validate): Use GtkDialog instead of GnomeDialog
here.
* filter-folder.c (validate): Use GtkDialog instead of GnomeDialog
here.
* filter-file.c (validate): Use GtkDialog instead of GnomeDialog
here.
* rule-editor.c: Subclass GtkDialog instead of GnomeDialog.
* filter-datespec.c (validate): Use GtkDialog instead of
GnomeDialog.
(button_clicked): Same.
svn path=/trunk/; revision=18635
Diffstat (limited to 'filter/filter-file.c')
-rw-r--r-- | filter/filter-file.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/filter/filter-file.c b/filter/filter-file.c index 4f663efadb..aca2485a37 100644 --- a/filter/filter-file.c +++ b/filter/filter-file.c @@ -31,8 +31,6 @@ #include <gtk/gtk.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-dialog.h> -#include <libgnomeui/gnome-dialog-util.h> #include <libgnomeui/gnome-file-entry.h> #include "filter-file.h" @@ -54,7 +52,7 @@ static void filter_file_init (FilterFile *ff); static void filter_file_finalise (GObject *obj); -static FilterElementClass *parent_class; +static FilterElementClass *parent_class = NULL; GType @@ -159,9 +157,16 @@ validate (FilterElement *fe) struct stat st; if (!file->path) { - dialog = gnome_ok_dialog (_("You must specify a file name")); + /* 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. */ + 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_run ((GtkDialog *) dialog); - gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); return FALSE; } @@ -169,14 +174,17 @@ validate (FilterElement *fe) if (strcmp (file->type, "file") == 0) { if (stat (file->path, &st) == -1 || !S_ISREG (st.st_mode)) { - char *errmsg; + /* 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. */ + 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); - errmsg = g_strdup_printf (_("File '%s' does not exist or is not a regular file."), - file->path); - dialog = gnome_ok_dialog (errmsg); - g_free (errmsg); + gtk_dialog_run ((GtkDialog *) dialog); - gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); return FALSE; } } else if (strcmp (file->type, "command") == 0) { |