From b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 7 Nov 2002 21:20:30 +0000 Subject: Use GtkDialog instead of GnomeDialog here. 2002-11-07 Jeffrey Stedfast * 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 --- filter/filter-part.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'filter/filter-part.c') diff --git a/filter/filter-part.c b/filter/filter-part.c index ce61750161..062cc02e0c 100644 --- a/filter/filter-part.c +++ b/filter/filter-part.c @@ -507,37 +507,37 @@ filter_part_expand_code (FilterPart *ff, const char *source, GString *out) #if 0 int main(int argc, char **argv) { + GtkWidget *dialog, *w; xmlDocPtr system; - FilterPart *ff; - GtkWidget *w; - GnomeDialog *gd; xmlNodePtr node; + FilterPart *ff; GString *code; - - gnome_init("test", "0.0", argc, argv); - - system = xmlParseFile("form.xml"); - if (system==NULL) { + + gnome_init ("test", "0.0", argc, argv); + + system = xmlParseFile ("form.xml"); + if (system == NULL) { printf("i/o error\n"); return 1; } - - ff = filter_part_new(); - filter_part_xml_create(ff, system->root); - - w = filter_part_get_widget(ff); - - gd = (GnomeDialog *)gnome_dialog_new(_("Test"), GNOME_STOCK_BUTTON_OK, NULL); - gtk_window_set_policy(GTK_WINDOW(gd), FALSE, TRUE, FALSE); - gtk_box_pack_start((GtkBox *)gd->vbox, w, TRUE, TRUE, 0); - gtk_widget_show((GtkWidget *)gd); - - gnome_dialog_run_and_close(gd); - - code = g_string_new(""); - filter_part_build_code(ff, code); + + ff = filter_part_new (); + filter_part_xml_create (ff, system->root); + + w = filter_part_get_widget (ff); + + dialog = gtk_dialog_new (); + gtk_dialog_add_buttons ((GtkDialog *) dialog, GTK_BUTTONS_OK, NULL); + gtk_window_set_title ((GtkWindow *) dialog, _("Test")); + gtk_window_set_policy ((GtkWindow *) dialog, FALSE, TRUE, FALSE); + gtk_box_pack_start ((GtkBox *) dialog->vbox, w, TRUE, TRUE, 0); + + gtk_dialog_run ((GtkDialog *) dialog); + + code = g_string_new (""); + filter_part_build_code (ff, code); printf("code is:\n%s\n", code->str); - + return 0; } #endif -- cgit