Add complex dialogs to gallery.

This commit is contained in:
Matthias Clasen 2004-12-07 06:22:19 +00:00
parent a1178ee76d
commit 750e4ae0cf
12 changed files with 121 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* docs/tools/widgets.h (enum): Add an ASIS widget size.
* docs/tools/widgets.c (get_all_widgets): Add file chooser,
font selection and color selection dialogs.
2004-12-06 Matthias Clasen <mclasen@redhat.com>
* modules/input/gtkimcontextime.c: Prevent double commits,

View File

@ -1,3 +1,10 @@
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* docs/tools/widgets.h (enum): Add an ASIS widget size.
* docs/tools/widgets.c (get_all_widgets): Add file chooser,
font selection and color selection dialogs.
2004-12-06 Matthias Clasen <mclasen@redhat.com>
* modules/input/gtkimcontextime.c: Prevent double commits,

View File

@ -1,3 +1,10 @@
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* docs/tools/widgets.h (enum): Add an ASIS widget size.
* docs/tools/widgets.c (get_all_widgets): Add file chooser,
font selection and color selection dialogs.
2004-12-06 Matthias Clasen <mclasen@redhat.com>
* modules/input/gtkimcontextime.c: Prevent double commits,

View File

@ -1,3 +1,10 @@
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* docs/tools/widgets.h (enum): Add an ASIS widget size.
* docs/tools/widgets.c (get_all_widgets): Add file chooser,
font selection and color selection dialogs.
2004-12-06 Matthias Clasen <mclasen@redhat.com>
* modules/input/gtkimcontextime.c: Prevent double commits,

View File

@ -1,3 +1,11 @@
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* gtk/images/colorsel.png:
* gtk/images/fontsel.png:
* gtk/images/filechooser.png:
* gtk/visual_index.xml:
* gtk/Makefile.am (HTML_IMAGES): Add new images.
2004-12-02 Matthias Clasen <mclasen@redhat.com>
* === Released 2.5.6 ===

View File

@ -210,11 +210,14 @@ HTML_IMAGES = \
$(srcdir)/images/button.png \
$(srcdir)/images/check-button.png \
$(srcdir)/images/color-button.png \
$(srcdir)/images/colorsel.png \
$(srcdir)/images/combo-box.png \
$(srcdir)/images/combo-box-entry.png \
$(srcdir)/images/entry.png \
$(srcdir)/images/file-button.png \
$(srcdir)/images/filechooser.png \
$(srcdir)/images/font-button.png \
$(srcdir)/images/fontsel.png \
$(srcdir)/images/frame.png \
$(srcdir)/images/icon-view.png \
$(srcdir)/images/image.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -41,9 +41,6 @@
<link linkend="GtkMenuBar">
<inlinegraphic fileref="menubar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkMessageDialog">
<inlinegraphic fileref="messagedialog.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkNotebook">
<inlinegraphic fileref="notebook.png" format="PNG"></inlinegraphic>
</link>
@ -86,4 +83,16 @@
<link linkend="GtkWindow">
<inlinegraphic fileref="window.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkMessageDialog">
<inlinegraphic fileref="messagedialog.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkFontSelectionDialog">
<inlinegraphic fileref="fontsel.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkColorSelectionDialog">
<inlinegraphic fileref="colorsel.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkFileChooserDialog">
<inlinegraphic fileref="filechooser.png" format="PNG"></inlinegraphic>
</link>
</para>

View File

@ -68,6 +68,10 @@ adjust_size_callback (WidgetInfo *info)
target_width = LARGE_WIDTH;
target_height = LARGE_HEIGHT;
break;
case ASIS:
target_width = twidth;
target_height = theight;
break;
}
if (twidth > target_width ||
@ -568,6 +572,67 @@ create_window (void)
return info;
}
static WidgetInfo *
create_colorsel (void)
{
WidgetInfo *info;
GtkWidget *widget;
GtkColorSelection *colorsel;
GdkColor color;
widget = gtk_color_selection_dialog_new ("Color Selection Dialog");
colorsel = GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (widget)->colorsel);
color.red = 0x7979;
color.green = 0xdbdb;
color.blue = 0x9595;
gtk_color_selection_set_previous_color (colorsel, &color);
color.red = 0x7d7d;
color.green = 0x9393;
color.blue = 0xc3c3;
gtk_color_selection_set_current_color (colorsel, &color);
info = new_widget_info ("colorsel", widget, ASIS);
info->include_decorations = TRUE;
return info;
}
static WidgetInfo *
create_fontsel (void)
{
WidgetInfo *info;
GtkWidget *widget;
widget = gtk_font_selection_dialog_new ("Font Selection Dialog");
info = new_widget_info ("fontsel", widget, ASIS);
info->include_decorations = TRUE;
return info;
}
static WidgetInfo *
create_filesel (void)
{
WidgetInfo *info;
GtkWidget *widget;
widget = gtk_file_chooser_dialog_new ("File Chooser Dialog",
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
gtk_window_set_default_size (GTK_WINDOW (widget), 505, 305);
info = new_widget_info ("filechooser", widget, ASIS);
info->include_decorations = TRUE;
return info;
}
static WidgetInfo *
create_toolbar (void)
{
@ -786,7 +851,6 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_combo_box ());
retval = g_list_prepend (retval, create_combo_box_entry ());
retval = g_list_prepend (retval, create_entry ());
retval = g_list_prepend (retval, create_file_button ());
retval = g_list_prepend (retval, create_font_button ());
retval = g_list_prepend (retval, create_frame ());
retval = g_list_prepend (retval, create_icon_view ());
@ -808,6 +872,9 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_toolbar ());
retval = g_list_prepend (retval, create_tree_view ());
retval = g_list_prepend (retval, create_window ());
retval = g_list_prepend (retval, create_colorsel ());
retval = g_list_prepend (retval, create_filesel ());
retval = g_list_prepend (retval, create_fontsel ());
return retval;
}

View File

@ -8,7 +8,8 @@ typedef enum
{
SMALL,
MEDIUM,
LARGE
LARGE,
ASIS
} WidgetSize;
typedef struct WidgetInfo