diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-11-08 07:09:45 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-11-08 07:09:45 +0800 |
commit | 59ca4efdbb7dafa2c70ee3f8f9b5bcef0153d75a (patch) | |
tree | 722db509bf8b725208a18c548293be703abaaad3 /filter/filter-datespec.c | |
parent | 0783b601b0f6cc882ca6d4f22a6ac052d3658ba4 (diff) | |
download | gsoc2013-evolution-59ca4efdbb7dafa2c70ee3f8f9b5bcef0153d75a.tar.gz gsoc2013-evolution-59ca4efdbb7dafa2c70ee3f8f9b5bcef0153d75a.tar.zst gsoc2013-evolution-59ca4efdbb7dafa2c70ee3f8f9b5bcef0153d75a.zip |
Use a GtkDialog instead of a GnomeDialog for reporting errors.
2002-11-07 Jeffrey Stedfast <fejj@ximian.com>
* vfolder-rule.c (validate): Use a GtkDialog instead of a
GnomeDialog for reporting errors.
* rule-editor.c (rule_add): Use a GtkDialog instead of
GnomeDialog.
(rule_edit): Same.
(add_editor_response): Use a GtkMessageDialog for the error
reporting instead of a GnomeDialog.
(edit_editor_response): Same.
* rule-context.c (rule_context_add_rule_gui): Use a GtkDialog
instead of a GnomeDialog.
* 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=18651
Diffstat (limited to 'filter/filter-datespec.c')
-rw-r--r-- | filter/filter-datespec.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c index 197140218d..fb5013ca4b 100644 --- a/filter/filter-datespec.c +++ b/filter/filter-datespec.c @@ -176,6 +176,7 @@ validate (FilterElement *fe) "%s", _("You must choose a date.")); gtk_dialog_run ((GtkDialog *) dialog); + gtk_widget_destroy (dialog); } return valid; @@ -391,14 +392,14 @@ set_option_relative (GtkMenu *menu, FilterDatespec *fds) } static void -dialog_response (GtkDialog *dialog, int button, FilterDatespec *fds) +dialog_response (GtkWidget *dialog, int button, FilterDatespec *fds) { - /* FIXME: this may have changed with GtkDialog??? */ - if (button != 0) - return; + if (button == GTK_RESPONSE_ACCEPT) { + get_values (fds); + set_button (fds); + } - get_values (fds); - set_button (fds); + gtk_widget_destroy (dialog); } static void @@ -414,7 +415,8 @@ button_clicked (GtkButton *button, FilterDatespec *fds) dialog = (GtkDialog *) gtk_dialog_new (); gtk_window_set_title ((GtkWindow *) dialog, _("Select a time to compare against")); - gtk_dialog_add_buttons (dialog, GTK_BUTTONS_OK, GTK_BUTTONS_CANCEL, NULL); + gtk_dialog_add_buttons (dialog, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, + GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); p->notebook_type = glade_xml_get_widget (gui, "notebook_type"); p->option_type = glade_xml_get_widget (gui, "option_type"); |