Add GtkActionBar and GtkSearchBar to visual index

These were missing.
This commit is contained in:
Matthias Clasen 2014-06-09 21:09:40 -04:00
parent 4b793dd508
commit 5b5cf89a63
5 changed files with 78 additions and 0 deletions

View File

@ -300,6 +300,7 @@ HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/24/gtk-page-setup.png \
$(srcdir)/images/aboutdialog.png \
$(srcdir)/images/accel-label.png \
$(srcdir)/images/action-bar.png \
$(srcdir)/images/appchooserbutton.png \
$(srcdir)/images/appchooserdialog.png \
$(srcdir)/images/assistant.png \
@ -348,6 +349,7 @@ HTML_IMAGES = \
$(srcdir)/images/scales.png \
$(srcdir)/images/scrollbar.png \
$(srcdir)/images/scrolledwindow.png \
$(srcdir)/images/search-bar.png \
$(srcdir)/images/search-entry.png \
$(srcdir)/images/separator.png \
$(srcdir)/images/spinbutton.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -123,6 +123,12 @@
<link linkend="GtkHeaderBar">
<inlinegraphic fileref="headerbar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkSearchBar">
<inlinegraphic fileref="search-bar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkActionBar">
<inlinegraphic fileref="action-bar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkListBox">
<inlinegraphic fileref="list-box.png" format="PNG"></inlinegraphic>
</link>

View File

@ -395,6 +395,74 @@ create_info_bar (void)
return info;
}
static WidgetInfo *
create_search_bar (void)
{
GtkWidget *widget;
GtkWidget *entry;
GtkWidget *align;
WidgetInfo *info;
GtkWidget *view;
GtkWidget *box;
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
widget = gtk_search_bar_new ();
entry = gtk_search_entry_new ();
gtk_entry_set_text (GTK_ENTRY (entry), "Search Bar");
gtk_container_add (GTK_CONTAINER (widget), entry);
gtk_widget_show (entry);
gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (widget), TRUE);
gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (widget), TRUE);
gtk_container_add (GTK_CONTAINER (box), widget);
view = gtk_text_view_new ();
gtk_widget_show (view);
gtk_box_pack_start (GTK_BOX (box), view, TRUE, TRUE, 0);
info = new_widget_info ("search-bar", box, SMALL);
gtk_container_set_border_width (GTK_CONTAINER (info->window), 0);
return info;
}
static WidgetInfo *
create_action_bar (void)
{
GtkWidget *widget;
GtkWidget *button;
WidgetInfo *info;
GtkWidget *view;
GtkWidget *box;
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
view = gtk_text_view_new ();
gtk_widget_show (view);
gtk_box_pack_start (GTK_BOX (box), view, TRUE, TRUE, 0);
widget = gtk_action_bar_new ();
button = gtk_button_new_from_icon_name ("object-select-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (widget), button);
button = gtk_button_new_from_icon_name ("call-start-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (widget), button);
g_object_set (gtk_widget_get_parent (button), "margin", 6, "spacing", 6, NULL);
gtk_widget_show (widget);
gtk_container_add (GTK_CONTAINER (box), widget);
info = new_widget_info ("action-bar", box, SMALL);
gtk_container_set_border_width (GTK_CONTAINER (info->window), 0);
return info;
}
static WidgetInfo *
create_recent_chooser_dialog (void)
{
@ -1409,6 +1477,8 @@ get_all_widgets (void)
{
GList *retval = NULL;
retval = g_list_prepend (retval, create_search_bar ());
retval = g_list_prepend (retval, create_action_bar ());
retval = g_list_prepend (retval, create_list_box());
retval = g_list_prepend (retval, create_flow_box());
retval = g_list_prepend (retval, create_headerbar ());