Add prop editors to testfontchooser{,dialog}

This commit is contained in:
Christian Persch 2011-09-05 14:10:08 +02:00
parent eb9efc9fd2
commit eb2a54decf
3 changed files with 14 additions and 1 deletions

View File

@ -361,9 +361,11 @@ testfontselectiondialog_SOURCES = \
testfontselectiondialog.c
testfontchooser_SOURCES = \
prop-editor.c \
testfontchooser.c
testfontchooserdialog_SOURCES = \
prop-editor.c \
testfontchooserdialog.c
testgrid_SOURCES = \

View File

@ -18,6 +18,7 @@
*/
#include <gtk/gtk.h>
#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;

View File

@ -18,18 +18,26 @@
*/
#include <gtk/gtk.h>
#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;