From eb2a54decf108f537afef37fe652efbeef6ad29c Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 5 Sep 2011 14:10:08 +0200 Subject: [PATCH] Add prop editors to testfontchooser{,dialog} --- tests/Makefile.am | 2 ++ tests/testfontchooser.c | 3 +++ tests/testfontchooserdialog.c | 10 +++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index ac05e62e90..8b8494dc56 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -361,9 +361,11 @@ testfontselectiondialog_SOURCES = \ testfontselectiondialog.c testfontchooser_SOURCES = \ + prop-editor.c \ testfontchooser.c testfontchooserdialog_SOURCES = \ + prop-editor.c \ testfontchooserdialog.c testgrid_SOURCES = \ diff --git a/tests/testfontchooser.c b/tests/testfontchooser.c index 4c6f42c4a8..4ff3668b42 100644 --- a/tests/testfontchooser.c +++ b/tests/testfontchooser.c @@ -18,6 +18,7 @@ */ #include +#include "prop-editor.h" static void notify_font_name_cb (GObject *fontchooser, GParamSpec *pspec, gpointer data) @@ -61,6 +62,8 @@ main (int argc, char *argv[]) gtk_font_chooser_set_preview_text (GTK_FONT_CHOOSER (fontchooser), "[user@host ~]$ &>>"); gtk_font_chooser_set_show_preview_entry (GTK_FONT_CHOOSER (fontchooser), FALSE); + create_prop_editor (G_OBJECT (fontchooser), GTK_TYPE_FONT_CHOOSER); + gtk_main (); return 0; diff --git a/tests/testfontchooserdialog.c b/tests/testfontchooserdialog.c index 23be106124..bc76652522 100644 --- a/tests/testfontchooserdialog.c +++ b/tests/testfontchooserdialog.c @@ -18,18 +18,26 @@ */ #include +#include "prop-editor.h" int main (int argc, char *argv[]) { GtkWidget *window; + GtkWidget *font_button; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_container_add (GTK_CONTAINER (window), gtk_font_button_new ()); + font_button = gtk_font_button_new (); + gtk_container_add (GTK_CONTAINER (window), font_button); gtk_widget_show_all (window); + g_signal_connect (window, "delete-event", + G_CALLBACK (gtk_main_quit), NULL); + + create_prop_editor (G_OBJECT (font_button), 0); + gtk_main (); return 0;