diff options
author | Owen Taylor <otaylor@gtk.org> | 1998-06-15 21:27:17 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-06-15 21:27:17 +0000 |
commit | 48a9f44f3172d362eab8a0084865b42084cef383 (patch) | |
tree | 3b700a14292130d483e58d7c9164ee23826f1269 /tests/testgtk.c | |
parent | e144ff2bb588d9e0f2c6237aaa6b9d4c3ec04d6e (diff) | |
download | gtk+-48a9f44f3172d362eab8a0084865b42084cef383.tar.gz |
gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h gtk/Makefile.am gtk/makenums.pl
Mon Jun 15 16:29:45 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
gtk/Makefile.am gtk/makenums.pl
Removed out the G_ENUM/FLAGS mechanism in favor
of a perl script that parses the standard headers
(with occasional /*< nick=foo >*/ style overrides)
and extracts the enumerations.
gtk/maketypes.awk: Small improvments to the
translation of names. (Avoid splitting gc into
g_c_.)
Mon Jun 15 16:25:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/Makefile.am gtk/gtk.h gtk/gtkfontsel.[ch] gtk/testgtk.c:
Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget,
and a simple example for testgtk.
Mon Jun 15 15:58:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c:
- Restored gtk_entry_adjust_scroll to static
- Changed text positioning code so that we always
display as large a portion of the text as possible.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Diffstat (limited to 'tests/testgtk.c')
-rw-r--r-- | tests/testgtk.c | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c index ed1d72244f..493ed3995d 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -4337,7 +4337,7 @@ void file_selection_ok (GtkWidget *w, GtkFileSelection *fs) { - g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs))); + g_print ("%s\n", gtk_file_selection_get_filename (fs)); gtk_widget_destroy (GTK_WIDGET (fs)); } @@ -4392,6 +4392,43 @@ create_file_selection (void) gtk_widget_destroy (window); } +void +font_selection_ok (GtkWidget *w, + GtkFontSelection *fs) +{ + g_print ("%s\n", gtk_font_selection_get_font_name (fs)); + gtk_widget_destroy (GTK_WIDGET (fs)); +} + +void +create_font_selection (void) +{ + static GtkWidget *window = NULL; + + if (!window) + { + window = gtk_font_selection_dialog_new ("Font Selection Dialog"); + + gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE); + + gtk_signal_connect (GTK_OBJECT (window), "destroy", + GTK_SIGNAL_FUNC(gtk_widget_destroyed), + &window); + + gtk_signal_connect (GTK_OBJECT (GTK_FONT_SELECTION_DIALOG (window)->ok_button), + "clicked", GTK_SIGNAL_FUNC(font_selection_ok), + GTK_FONT_SELECTION_DIALOG (window)->fontsel); + gtk_signal_connect_object (GTK_OBJECT (GTK_FONT_SELECTION_DIALOG (window)->cancel_button), + "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), + GTK_OBJECT (window)); + } + + if (!GTK_WIDGET_VISIBLE (window)) + gtk_widget_show (window); + else + gtk_widget_destroy (window); +} + /* * GtkDialog @@ -6664,6 +6701,7 @@ create_main_window (void) { "dnd", create_dnd }, { "entry", create_entry }, { "file selection", create_file_selection }, + { "font selection", create_font_selection }, { "gamma curve", create_gamma_curve }, { "handle box", create_handle_box }, { "list", create_list }, |