Add GtkMenuButton and GtkSearchEntry to gallery

At the same time, remove GtkComboBoxEntry, which no longer exists.
This commit is contained in:
Matthias Clasen 2012-07-13 22:31:34 -04:00
parent bd3ca2b30e
commit aa21c34911
5 changed files with 45 additions and 4 deletions

View File

@ -296,6 +296,7 @@ HTML_IMAGES = \
$(srcdir)/images/combo-box.png \ $(srcdir)/images/combo-box.png \
$(srcdir)/images/combo-box-entry.png \ $(srcdir)/images/combo-box-entry.png \
$(srcdir)/images/entry.png \ $(srcdir)/images/entry.png \
$(srcdir)/images/search-entry.png \
$(srcdir)/images/figure-hierarchical-drawing.png \ $(srcdir)/images/figure-hierarchical-drawing.png \
$(srcdir)/images/figure-windowed-label.png \ $(srcdir)/images/figure-windowed-label.png \
$(srcdir)/images/file-button.png \ $(srcdir)/images/file-button.png \
@ -310,11 +311,12 @@ HTML_IMAGES = \
$(srcdir)/images/link-button.png \ $(srcdir)/images/link-button.png \
$(srcdir)/images/list-and-tree.png \ $(srcdir)/images/list-and-tree.png \
$(srcdir)/images/lock-button.png \ $(srcdir)/images/lock-button.png \
$(srcdir)/images/lockbutton.png \ $(srcdir)/images/lockbutton.png \
$(srcdir)/images/lockbutton-locked.png \ $(srcdir)/images/lockbutton-locked.png \
$(srcdir)/images/lockbutton-unlocked.png \ $(srcdir)/images/lockbutton-unlocked.png \
$(srcdir)/images/lockbutton-sorry.png \ $(srcdir)/images/lockbutton-sorry.png \
$(srcdir)/images/menubar.png \ $(srcdir)/images/menubar.png \
$(srcdir)/images/menu-button.png \
$(srcdir)/images/messagedialog.png \ $(srcdir)/images/messagedialog.png \
$(srcdir)/images/multiline-text.png \ $(srcdir)/images/multiline-text.png \
$(srcdir)/images/notebook.png \ $(srcdir)/images/notebook.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -18,12 +18,12 @@
<link linkend="GtkComboBox"> <link linkend="GtkComboBox">
<inlinegraphic fileref="combo-box.png" format="PNG"></inlinegraphic> <inlinegraphic fileref="combo-box.png" format="PNG"></inlinegraphic>
</link> </link>
<link linkend="GtkComboBoxEntry">
<inlinegraphic fileref="combo-box-entry.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkEntry"> <link linkend="GtkEntry">
<inlinegraphic fileref="entry.png" format="PNG"></inlinegraphic> <inlinegraphic fileref="entry.png" format="PNG"></inlinegraphic>
</link> </link>
<link linkend="GtkSearchEntry">
<inlinegraphic fileref="search-entry.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkFileChooserButton"> <link linkend="GtkFileChooserButton">
<inlinegraphic fileref="file-button.png" format="PNG"></inlinegraphic> <inlinegraphic fileref="file-button.png" format="PNG"></inlinegraphic>
</link> </link>
@ -54,6 +54,9 @@
<link linkend="GtkLockButton"> <link linkend="GtkLockButton">
<inlinegraphic fileref="lockbutton.png" format="PNG"></inlinegraphic> <inlinegraphic fileref="lockbutton.png" format="PNG"></inlinegraphic>
</link> </link>
<link linkend="GtkMenuButton">
<inlinegraphic fileref="menu-button.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkMenuBar"> <link linkend="GtkMenuBar">
<inlinegraphic fileref="menubar.png" format="PNG"></inlinegraphic> <inlinegraphic fileref="menubar.png" format="PNG"></inlinegraphic>
</link> </link>

View File

@ -224,6 +224,26 @@ create_link_button (void)
return new_widget_info ("link-button", align, SMALL); 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_TYPE_TEST_PERMISSION (g_test_permission_get_type ())
#define G_TEST_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ #define G_TEST_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_TEST_PERMISSION, \ G_TYPE_TEST_PERMISSION, \
@ -287,6 +307,20 @@ create_entry (void)
return new_widget_info ("entry", align, SMALL); return new_widget_info ("entry", align, SMALL);
} }
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 * static WidgetInfo *
create_radio (void) create_radio (void)
{ {
@ -1233,6 +1267,8 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_lockbutton ()); retval = g_list_prepend (retval, create_lockbutton ());
retval = g_list_prepend (retval, create_fontchooserdialog ()); retval = g_list_prepend (retval, create_fontchooserdialog ());
retval = g_list_prepend (retval, create_colorchooserdialog ()); 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; return retval;
} }