Add some more images for the widget gallery.

This commit is contained in:
Matthias Clasen 2004-10-10 20:35:16 +00:00
parent 0d12c6ad0d
commit 5a44b7ca15
31 changed files with 225 additions and 23 deletions

View File

@ -1,3 +1,11 @@
2004-10-10 Matthias Clasen <matthias@localhost.localdomain>
* docs/tools/widgets.c: Create a toolbar, menubar and
messagedialog images.
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_all):
Avoid a warning.
Sun Oct 10 11:24:56 2004 Jonathan Blandford <jrb@redhat.com> Sun Oct 10 11:24:56 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcontainer.h (struct _GtkContainer): add /*< private >*/ * gtk/gtkcontainer.h (struct _GtkContainer): add /*< private >*/

View File

@ -1,3 +1,11 @@
2004-10-10 Matthias Clasen <matthias@localhost.localdomain>
* docs/tools/widgets.c: Create a toolbar, menubar and
messagedialog images.
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_all):
Avoid a warning.
Sun Oct 10 11:24:56 2004 Jonathan Blandford <jrb@redhat.com> Sun Oct 10 11:24:56 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcontainer.h (struct _GtkContainer): add /*< private >*/ * gtk/gtkcontainer.h (struct _GtkContainer): add /*< private >*/

View File

@ -1,3 +1,11 @@
2004-10-10 Matthias Clasen <matthias@localhost.localdomain>
* docs/tools/widgets.c: Create a toolbar, menubar and
messagedialog images.
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_all):
Avoid a warning.
Sun Oct 10 11:24:56 2004 Jonathan Blandford <jrb@redhat.com> Sun Oct 10 11:24:56 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcontainer.h (struct _GtkContainer): add /*< private >*/ * gtk/gtkcontainer.h (struct _GtkContainer): add /*< private >*/

View File

@ -1,3 +1,11 @@
2004-10-10 Matthias Clasen <matthias@localhost.localdomain>
* docs/tools/widgets.c: Create a toolbar, menubar and
messagedialog images.
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_all):
Avoid a warning.
Sun Oct 10 11:24:56 2004 Jonathan Blandford <jrb@redhat.com> Sun Oct 10 11:24:56 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcontainer.h (struct _GtkContainer): add /*< private >*/ * gtk/gtkcontainer.h (struct _GtkContainer): add /*< private >*/

View File

@ -1,3 +1,15 @@
2004-10-10 Matthias Clasen <matthias@localhost.localdomain>
* gtk/images/progressbar.png:
* gtk/images/notebook.png:
* gtk/images/toolbar.png:
* gtk/images/menubar.png:
* gtk/images/messagedialog.png: New images.
* gtk/Makefile.am (HTML_IMAGES):
* gtk/visual_index.xml: Add toolbar, menubar, progressbar,
notebook and message dialog.
2004-10-09 Matthias Clasen <mclasen@redhat.com> 2004-10-09 Matthias Clasen <mclasen@redhat.com>
* gtk/visual_index.xml: Correct some linkends. * gtk/visual_index.xml: Correct some linkends.

View File

@ -219,7 +219,12 @@ HTML_IMAGES = \
$(srcdir)/images/window.png \ $(srcdir)/images/window.png \
$(srcdir)/images/accel-label.png \ $(srcdir)/images/accel-label.png \
$(srcdir)/images/file-button.png \ $(srcdir)/images/file-button.png \
$(srcdir)/images/icon-view.png $(srcdir)/images/icon-view.png \
$(srcdir)/images/toolbar.png \
$(srcdir)/images/menubar.png \
$(srcdir)/images/notebook.png \
$(srcdir)/images/progressbar.png \
$(srcdir)/images/messagedialog.png
# Extra options to supply to gtkdoc-fixref # Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -1,20 +1,48 @@
<para role="gallery"> <para role="gallery">
<link linkend="GtkAccelLabel"><inlinegraphic fileref="accel-label.png" format="PNG"></inlinegraphic></link> <link linkend="GtkAccelLabel"><inlinegraphic fileref="accel-label.png"
<link linkend="GtkButton"><inlinegraphic fileref="button.png" format="PNG"></inlinegraphic></link> format="PNG"></inlinegraphic></link> <link
<link linkend="GtkCheckButton"><inlinegraphic fileref="check-button.png" format="PNG"></inlinegraphic></link> linkend="GtkButton"><inlinegraphic fileref="button.png"
<link linkend="GtkColorButton"><inlinegraphic fileref="color-button.png" format="PNG"></inlinegraphic></link> format="PNG"></inlinegraphic></link> <link
<link linkend="GtkComboBoxEntry"><inlinegraphic fileref="combo-box-entry.png" format="PNG"></inlinegraphic></link> linkend="GtkCheckButton"><inlinegraphic fileref="check-button.png"
<link linkend="GtkEntry"><inlinegraphic fileref="entry.png" format="PNG"></inlinegraphic></link> format="PNG"></inlinegraphic></link> <link
<link linkend="gtk-GtkFileChooserButton"><inlinegraphic fileref="file-button.png" format="PNG"></inlinegraphic></link> linkend="GtkColorButton"><inlinegraphic fileref="color-button.png"
<link linkend="GtkFontButton"><inlinegraphic fileref="font-button.png" format="PNG"></inlinegraphic></link> format="PNG"></inlinegraphic></link> <link
<link linkend="GtkFrame"><inlinegraphic fileref="frame.png" format="PNG"></inlinegraphic></link> linkend="GtkComboBoxEntry"><inlinegraphic
<link linkend="GtkIconView"><inlinegraphic fileref="icon-view.png" format="PNG"></inlinegraphic></link> fileref="combo-box-entry.png" format="PNG"></inlinegraphic></link>
<link linkend="GtkLabel"><inlinegraphic fileref="label.png" format="PNG"></inlinegraphic></link> <link linkend="GtkEntry"><inlinegraphic fileref="entry.png"
<link linkend="GtkTreeView"><inlinegraphic fileref="list-and-tree.png" format="PNG"></inlinegraphic></link> format="PNG"></inlinegraphic></link> <link
<link linkend="GtkTextView"><inlinegraphic fileref="multiline-text.png" format="PNG"></inlinegraphic></link> linkend="gtk-GtkFileChooserButton"><inlinegraphic
<link linkend="GtkPaned"><inlinegraphic fileref="panes.png" format="PNG"></inlinegraphic></link> fileref="file-button.png" format="PNG"></inlinegraphic></link> <link
<link linkend="GtkRadioButton"><inlinegraphic fileref="radio-group.png" format="PNG"></inlinegraphic></link> linkend="GtkFontButton"><inlinegraphic fileref="font-button.png"
<link linkend="GtkSeparator"><inlinegraphic fileref="separator.png" format="PNG"></inlinegraphic></link> format="PNG"></inlinegraphic></link> <link
<link linkend="GtkToggleButton"><inlinegraphic fileref="toggle-button.png" format="PNG"></inlinegraphic></link> linkend="GtkFrame"><inlinegraphic fileref="frame.png"
<link linkend="GtkWindow"><inlinegraphic fileref="window.png" format="PNG"></inlinegraphic></link> format="PNG"></inlinegraphic></link> <link
linkend="GtkIconView"><inlinegraphic fileref="icon-view.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkLabel"><inlinegraphic fileref="label.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkTreeView"><inlinegraphic fileref="list-and-tree.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkTextView"><inlinegraphic fileref="multiline-text.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkPaned"><inlinegraphic fileref="panes.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkRadioButton"><inlinegraphic fileref="radio-group.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkSeparator"><inlinegraphic fileref="separator.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkToggleButton"><inlinegraphic fileref="toggle-button.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkWindow"><inlinegraphic fileref="window.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkNotebook"><inlinegraphic fileref="notebook.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkMessageDialog"><inlinegraphic fileref="messagedialog.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkToolbar"><inlinegraphic fileref="toolbar.png"
format="PNG"></inlinegraphic></link> <link
linkend="GtkMenuBar"><inlinegraphic fileref="menubar.png"
format="PNG"></inlinegraphic></link>
linkend="GtkProgressBar"><inlinegraphic fileref="progressbar.png"
format="PNG"></inlinegraphic></link>
</para> </para>

View File

@ -17,15 +17,23 @@ new_widget_info (const char *name,
info = g_new0 (WidgetInfo, 1); info = g_new0 (WidgetInfo, 1);
info->name = g_strdup (name); info->name = g_strdup (name);
info->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); if (GTK_IS_WINDOW (widget))
{
info->window = widget;
info->include_decorations = TRUE;
}
else
{
info->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
info->include_decorations = FALSE;
gtk_widget_show_all (widget);
gtk_container_add (GTK_CONTAINER (info->window), widget);
}
info->no_focus = TRUE; info->no_focus = TRUE;
info->include_decorations = FALSE;
gtk_widget_set_app_paintable (info->window, TRUE); gtk_widget_set_app_paintable (info->window, TRUE);
g_signal_connect (info->window, "focus", G_CALLBACK (gtk_true), NULL); g_signal_connect (info->window, "focus", G_CALLBACK (gtk_true), NULL);
gtk_container_set_border_width (GTK_CONTAINER (info->window), 12); gtk_container_set_border_width (GTK_CONTAINER (info->window), 12);
gtk_widget_show_all (widget);
gtk_container_add (GTK_CONTAINER (info->window), widget);
switch (size) switch (size)
{ {
@ -432,6 +440,118 @@ create_window (void)
return info; return info;
} }
static WidgetInfo *
create_toolbar (void)
{
GtkWidget *widget, *menu, *vbox, *align;
GtkToolItem *item;
widget = gtk_toolbar_new ();
item = gtk_tool_button_new_from_stock (GTK_STOCK_NEW);
gtk_toolbar_insert (GTK_TOOLBAR (widget), item, -1);
item = gtk_menu_tool_button_new_from_stock (GTK_STOCK_OPEN);
menu = gtk_menu_new ();
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (item), menu);
gtk_toolbar_insert (GTK_TOOLBAR (widget), item, -1);
item = gtk_tool_button_new_from_stock (GTK_STOCK_REFRESH);
gtk_toolbar_insert (GTK_TOOLBAR (widget), item, -1);
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (widget), FALSE);
#if 0
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 ("Toolbar"),
FALSE, FALSE, 0);
#endif
return new_widget_info ("toolbar", widget, SMALL);
}
static WidgetInfo *
create_menubar (void)
{
GtkWidget *widget, *vbox, *align, *item;
widget = gtk_menu_bar_new ();
item = gtk_menu_item_new_with_mnemonic ("_File");
gtk_menu_shell_append (GTK_MENU_SHELL (widget), item);
item = gtk_menu_item_new_with_mnemonic ("_Edit");
gtk_menu_shell_append (GTK_MENU_SHELL (widget), item);
item = gtk_menu_item_new_with_mnemonic ("_Help");
gtk_menu_shell_append (GTK_MENU_SHELL (widget), item);
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 ("Menu Bar"),
FALSE, FALSE, 0);
return new_widget_info ("menubar", vbox, SMALL);
}
static WidgetInfo *
create_message_dialog (void)
{
GtkWidget *widget;
widget = gtk_message_dialog_new (NULL,
0,
GTK_MESSAGE_INFO,
GTK_BUTTONS_OK,
NULL);
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (widget),
"<b>Message Dialog</b>");
return new_widget_info ("messagedialog", widget, MEDIUM);
}
static WidgetInfo *
create_notebook (void)
{
GtkWidget *widget;
widget = gtk_notebook_new ();
gtk_notebook_append_page (GTK_NOTEBOOK (widget),
gtk_label_new ("Notebook"),
NULL);
gtk_notebook_append_page (GTK_NOTEBOOK (widget), gtk_event_box_new (), NULL);
gtk_notebook_append_page (GTK_NOTEBOOK (widget), gtk_event_box_new (), NULL);
return new_widget_info ("notebook", widget, MEDIUM);
}
static WidgetInfo *
create_progressbar (void)
{
GtkWidget *vbox;
GtkWidget *widget;
GtkWidget *align;
vbox = gtk_vbox_new (FALSE, 3);
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
widget = gtk_progress_bar_new ();
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (widget), 0.5);
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 ("Progress Bar"),
FALSE, FALSE, 0);
return new_widget_info ("progressbar", vbox, SMALL);
}
GList * GList *
get_all_widgets (void) get_all_widgets (void)
{ {
@ -455,6 +575,11 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_accel_label ()); retval = g_list_prepend (retval, create_accel_label ());
retval = g_list_prepend (retval, create_file_button ()); retval = g_list_prepend (retval, create_file_button ());
retval = g_list_prepend (retval, create_icon_view ()); retval = g_list_prepend (retval, create_icon_view ());
retval = g_list_prepend (retval, create_toolbar ());
retval = g_list_prepend (retval, create_menubar ());
retval = g_list_prepend (retval, create_notebook ());
retval = g_list_prepend (retval, create_message_dialog ());
retval = g_list_prepend (retval, create_progressbar ());
return retval; return retval;
} }