diff options
author | Matthias Clasen <mclasen@redhat.com> | 2012-07-13 22:31:34 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-07-13 23:07:24 -0400 |
commit | aa21c34911e9137fab841b9b0a8179f26ca034f1 (patch) | |
tree | 1b6b5d0e673fcef106ddddfc059d9f3cd2bb7eec /docs | |
parent | bd3ca2b30efc534f8b7c18dfd8a9f072592044c7 (diff) | |
download | gtk+-aa21c34911e9137fab841b9b0a8179f26ca034f1.tar.gz |
Add GtkMenuButton and GtkSearchEntry to gallery
At the same time, remove GtkComboBoxEntry, which no longer exists.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/gtk/Makefile.am | 4 | ||||
-rw-r--r-- | docs/reference/gtk/images/menu-button.png | bin | 0 -> 1809 bytes | |||
-rw-r--r-- | docs/reference/gtk/images/search-entry.png | bin | 0 -> 2628 bytes | |||
-rw-r--r-- | docs/reference/gtk/visual_index.xml | 9 | ||||
-rw-r--r-- | docs/tools/widgets.c | 36 |
5 files changed, 45 insertions, 4 deletions
diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am index ca821e9403..db1f0123a8 100644 --- a/docs/reference/gtk/Makefile.am +++ b/docs/reference/gtk/Makefile.am @@ -296,6 +296,7 @@ HTML_IMAGES = \ $(srcdir)/images/combo-box.png \ $(srcdir)/images/combo-box-entry.png \ $(srcdir)/images/entry.png \ + $(srcdir)/images/search-entry.png \ $(srcdir)/images/figure-hierarchical-drawing.png \ $(srcdir)/images/figure-windowed-label.png \ $(srcdir)/images/file-button.png \ @@ -310,11 +311,12 @@ HTML_IMAGES = \ $(srcdir)/images/link-button.png \ $(srcdir)/images/list-and-tree.png \ $(srcdir)/images/lock-button.png \ - $(srcdir)/images/lockbutton.png \ + $(srcdir)/images/lockbutton.png \ $(srcdir)/images/lockbutton-locked.png \ $(srcdir)/images/lockbutton-unlocked.png \ $(srcdir)/images/lockbutton-sorry.png \ $(srcdir)/images/menubar.png \ + $(srcdir)/images/menu-button.png \ $(srcdir)/images/messagedialog.png \ $(srcdir)/images/multiline-text.png \ $(srcdir)/images/notebook.png \ diff --git a/docs/reference/gtk/images/menu-button.png b/docs/reference/gtk/images/menu-button.png Binary files differnew file mode 100644 index 0000000000..71ced34f9a --- /dev/null +++ b/docs/reference/gtk/images/menu-button.png diff --git a/docs/reference/gtk/images/search-entry.png b/docs/reference/gtk/images/search-entry.png Binary files differnew file mode 100644 index 0000000000..8fc2f4930f --- /dev/null +++ b/docs/reference/gtk/images/search-entry.png diff --git a/docs/reference/gtk/visual_index.xml b/docs/reference/gtk/visual_index.xml index 7fb63932d4..1609ab2917 100644 --- a/docs/reference/gtk/visual_index.xml +++ b/docs/reference/gtk/visual_index.xml @@ -18,12 +18,12 @@ <link linkend="GtkComboBox"> <inlinegraphic fileref="combo-box.png" format="PNG"></inlinegraphic> </link> - <link linkend="GtkComboBoxEntry"> - <inlinegraphic fileref="combo-box-entry.png" format="PNG"></inlinegraphic> - </link> <link linkend="GtkEntry"> <inlinegraphic fileref="entry.png" format="PNG"></inlinegraphic> </link> + <link linkend="GtkSearchEntry"> + <inlinegraphic fileref="search-entry.png" format="PNG"></inlinegraphic> + </link> <link linkend="GtkFileChooserButton"> <inlinegraphic fileref="file-button.png" format="PNG"></inlinegraphic> </link> @@ -54,6 +54,9 @@ <link linkend="GtkLockButton"> <inlinegraphic fileref="lockbutton.png" format="PNG"></inlinegraphic> </link> + <link linkend="GtkMenuButton"> + <inlinegraphic fileref="menu-button.png" format="PNG"></inlinegraphic> + </link> <link linkend="GtkMenuBar"> <inlinegraphic fileref="menubar.png" format="PNG"></inlinegraphic> </link> diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c index 5b326090f4..708f9b5588 100644 --- a/docs/tools/widgets.c +++ b/docs/tools/widgets.c @@ -224,6 +224,26 @@ create_link_button (void) return new_widget_info ("link-button", align, SMALL); } +static WidgetInfo * +create_menu_button (void) +{ + GtkWidget *widget; + GtkWidget *align; + GtkWidget *image; + GtkWidget *menu; + + widget = gtk_menu_button_new (); + image = gtk_image_new (); + gtk_image_set_from_icon_name (GTK_IMAGE (image), "emblem-system-symbolic", GTK_ICON_SIZE_MENU); + gtk_button_set_image (GTK_BUTTON (widget), image); + menu = gtk_menu_new (); + gtk_menu_button_set_menu (GTK_MENU_BUTTON (widget), menu); + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_container_add (GTK_CONTAINER (align), widget); + + return new_widget_info ("menu-button", align, SMALL); +} + #define G_TYPE_TEST_PERMISSION (g_test_permission_get_type ()) #define G_TEST_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ G_TYPE_TEST_PERMISSION, \ @@ -288,6 +308,20 @@ create_entry (void) } static WidgetInfo * +create_search_entry (void) +{ + GtkWidget *widget; + GtkWidget *align; + + widget = gtk_search_entry_new (); + gtk_entry_set_placeholder_text (GTK_ENTRY (widget), "Search..."); + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_container_add (GTK_CONTAINER (align), widget); + + return new_widget_info ("search-entry", align, SMALL); +} + +static WidgetInfo * create_radio (void) { GtkWidget *widget; @@ -1233,6 +1267,8 @@ get_all_widgets (void) retval = g_list_prepend (retval, create_lockbutton ()); retval = g_list_prepend (retval, create_fontchooserdialog ()); retval = g_list_prepend (retval, create_colorchooserdialog ()); + retval = g_list_prepend (retval, create_menu_button ()); + retval = g_list_prepend (retval, create_search_entry ()); return retval; } |