diff --git a/ChangeLog b/ChangeLog index 1a17c02b8f..255f661623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Sep 15 00:57:37 2004 Matthias Clasen + + * docs/tools/widgets.c: Add accel label, file button + and icon view. + Tue Sep 14 22:01:49 2004 Matthias Clasen * configure.in: New option --disable-visibility to disable diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1a17c02b8f..255f661623 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Wed Sep 15 00:57:37 2004 Matthias Clasen + + * docs/tools/widgets.c: Add accel label, file button + and icon view. + Tue Sep 14 22:01:49 2004 Matthias Clasen * configure.in: New option --disable-visibility to disable diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 1a17c02b8f..255f661623 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Wed Sep 15 00:57:37 2004 Matthias Clasen + + * docs/tools/widgets.c: Add accel label, file button + and icon view. + Tue Sep 14 22:01:49 2004 Matthias Clasen * configure.in: New option --disable-visibility to disable diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1a17c02b8f..255f661623 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Wed Sep 15 00:57:37 2004 Matthias Clasen + + * docs/tools/widgets.c: Add accel label, file button + and icon view. + Tue Sep 14 22:01:49 2004 Matthias Clasen * configure.in: New option --disable-visibility to disable diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index d7f2151a8c..455071bcc2 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,12 @@ +Wed Sep 15 01:01:11 2004 Matthias Clasen + + * docs/reference/gtk/images/accel-label.png: + * docs/reference/gtk/images/file-button.png: + * docs/reference/gtk/images/icon-view.png: + * gtk/visual_index.xml: + * gtk/Makefile.am (HTML_IMAGES): Add accel label, file button + and icon view. + Tue Sep 14 22:13:51 2004 Matthias Clasen * gtk/building.sgml: Document --disable-visibility. diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am index f438eb8969..04b57ccfcb 100644 --- a/docs/reference/gtk/Makefile.am +++ b/docs/reference/gtk/Makefile.am @@ -220,7 +220,10 @@ HTML_IMAGES = \ $(srcdir)/images/radio-group.png \ $(srcdir)/images/separator.png \ $(srcdir)/images/toggle-button.png \ - $(srcdir)/images/window.png + $(srcdir)/images/window.png \ + $(srcdir)/images/accel-label.png \ + $(srcdir)/images/file-button.png \ + $(srcdir)/images/icon-view.png # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html diff --git a/docs/reference/gtk/images/accel-label.png b/docs/reference/gtk/images/accel-label.png new file mode 100644 index 0000000000..bcc3324b4a Binary files /dev/null and b/docs/reference/gtk/images/accel-label.png differ diff --git a/docs/reference/gtk/images/file-button.png b/docs/reference/gtk/images/file-button.png new file mode 100644 index 0000000000..59974c2835 Binary files /dev/null and b/docs/reference/gtk/images/file-button.png differ diff --git a/docs/reference/gtk/images/icon-view.png b/docs/reference/gtk/images/icon-view.png new file mode 100644 index 0000000000..b3a6ab77fd Binary files /dev/null and b/docs/reference/gtk/images/icon-view.png differ diff --git a/docs/reference/gtk/visual_index.xml b/docs/reference/gtk/visual_index.xml index 26e93ca90e..d9673eeb5f 100644 --- a/docs/reference/gtk/visual_index.xml +++ b/docs/reference/gtk/visual_index.xml @@ -1,11 +1,14 @@ + + + diff --git a/docs/tools/gnome-foot.png b/docs/tools/gnome-foot.png new file mode 100644 index 0000000000..0476658517 Binary files /dev/null and b/docs/tools/gnome-foot.png differ diff --git a/docs/tools/gnome-gmush.png b/docs/tools/gnome-gmush.png new file mode 100644 index 0000000000..0a4b0d04e6 Binary files /dev/null and b/docs/tools/gnome-gmush.png differ diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c index 582de79975..f4e0d73829 100644 --- a/docs/tools/widgets.c +++ b/docs/tools/widgets.c @@ -1,3 +1,4 @@ +#include #include "widgets.h" @@ -93,6 +94,45 @@ create_label (void) return new_widget_info ("label", widget); } +static WidgetInfo * +create_accel_label (void) +{ + WidgetInfo *info; + GtkWidget *widget, *button, *box; + GtkAccelGroup *accel_group; + + widget = gtk_accel_label_new ("Accel Label"); + + button = gtk_button_new_with_label ("Quit"); + gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (widget), button); + gtk_widget_set_no_show_all (button, TRUE); + + box = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (box), widget); + gtk_container_add (GTK_CONTAINER (box), button); + + gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (widget), button); + accel_group = gtk_accel_group_new(); + + info = g_new0 (WidgetInfo, 1); + info->name = g_strdup ("accel-label"); + info->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_widget_set_size_request (info->window, 200, -1); + gtk_widget_show_all (box); + gtk_container_add (GTK_CONTAINER (info->window), box); + + info->no_focus = TRUE; + info->include_decorations = FALSE; + + gtk_widget_set_app_paintable (info->window, TRUE); + g_signal_connect (info->window, "focus", G_CALLBACK (gtk_true), NULL); + gtk_container_set_border_width (GTK_CONTAINER (info->window), 12); + gtk_widget_add_accelerator (button, "activate", accel_group, GDK_Q, GDK_CONTROL_MASK, + GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED); + + return info; +} + static WidgetInfo * create_combo_box_entry (void) { @@ -155,6 +195,51 @@ create_tree_view (void) return info; } +static WidgetInfo * +create_icon_view (void) +{ + GtkWidget *widget; + GtkWidget *vbox; + GtkWidget *align; + GtkWidget *icon_view; + GtkListStore *list_store; + GtkTreeIter iter; + GdkPixbuf *pixbuf; + WidgetInfo *info; + + widget = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN); + list_store = gtk_list_store_new (2, G_TYPE_STRING, GDK_TYPE_PIXBUF); + gtk_list_store_append (list_store, &iter); + pixbuf = gdk_pixbuf_new_from_file_at_size ("gnome-gmush.png", 20, 20, NULL); + gtk_list_store_set (list_store, &iter, 0, "One", 1, pixbuf, -1); + gtk_list_store_append (list_store, &iter); + pixbuf = gdk_pixbuf_new_from_file_at_size ("gnome-foot.png", 20, 20, NULL); + gtk_list_store_set (list_store, &iter, 0, "Two", 1, pixbuf, -1); + + icon_view = gtk_icon_view_new(); + + gtk_icon_view_set_model (GTK_ICON_VIEW (icon_view), GTK_TREE_MODEL (list_store)); + gtk_icon_view_set_text_column (GTK_ICON_VIEW (icon_view), 0); + gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (icon_view), 1); + gtk_widget_set_size_request (icon_view, 220, 60); + + gtk_container_add (GTK_CONTAINER (widget), icon_view); + + vbox = gtk_vbox_new (FALSE, 3); + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_container_add (GTK_CONTAINER (align), widget); + gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), + gtk_label_new ("Icon View"), + FALSE, FALSE, 0); + + info = new_widget_info ("icon-view", vbox); + info->no_focus = FALSE; + + return info; +} + static WidgetInfo * create_color_button (void) { @@ -197,6 +282,27 @@ create_font_button (void) return new_widget_info ("font-button", vbox); } +static WidgetInfo * +create_file_button (void) +{ + GtkWidget *vbox; + GtkWidget *picker; + GtkWidget *align; + + vbox = gtk_vbox_new (FALSE, 3); + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + picker = gtk_file_chooser_button_new ("File Button"); + gtk_widget_set_size_request (picker, 150, -1); + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (picker), "/etc/yum.conf"); + gtk_container_add (GTK_CONTAINER (align), picker); + gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), + gtk_label_new ("File Button"), + FALSE, FALSE, 0); + + return new_widget_info ("file-button", vbox); +} + static WidgetInfo * create_separator (void) { @@ -311,6 +417,9 @@ get_all_widgets (void) retval = g_list_prepend (retval, create_panes ()); retval = g_list_prepend (retval, create_frame ()); retval = g_list_prepend (retval, create_window ()); + retval = g_list_prepend (retval, create_accel_label ()); + retval = g_list_prepend (retval, create_file_button ()); + retval = g_list_prepend (retval, create_icon_view ()); return retval; }