aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-part.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-11-08 05:20:30 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-11-08 05:20:30 +0800
commitb0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0 (patch)
treee6975a4d32699cffbd2c5c2898b1609c1301c406 /filter/filter-part.c
parent19414d4335bf0b3e2a07435d967c4756540c8aaa (diff)
downloadgsoc2013-evolution-b0978f82a3a5f2869bab4cfb1b5036bc3cc8f3e0.tar.gz
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-part.c')
-rw-r--r--filter/filter-part.c48
1 files changed, 24 insertions, 24 deletions
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