Commit 2b6a5f45 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

add GimpViewType parameter.

2005-10-31  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpviewablebutton.[ch] (gimp_viewable_button_new):
	add GimpViewType parameter.

	* app/widgets/gimptemplateeditor.c
	* app/widgets/gimpviewablebox.c: pass view types, using grid view
	for brushes and patterns ass suggested in bug #315443.
parent e3e53dca
2005-10-31 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpviewablebutton.[ch] (gimp_viewable_button_new):
add GimpViewType parameter.
* app/widgets/gimptemplateeditor.c
* app/widgets/gimpviewablebox.c: pass view types, using grid view
for brushes and patterns ass suggested in bug #315443.
2005-10-30 Michael Natterer <mitch@gimp.org> 2005-10-30 Michael Natterer <mitch@gimp.org>
Fixed bug #316395: Fixed bug #316395:
......
...@@ -563,6 +563,7 @@ gimp_template_editor_new (GimpTemplate *template, ...@@ -563,6 +563,7 @@ gimp_template_editor_new (GimpTemplate *template,
button = gimp_viewable_button_new (editor->stock_id_container, button = gimp_viewable_button_new (editor->stock_id_container,
editor->stock_id_context, editor->stock_id_context,
GIMP_VIEW_TYPE_LIST,
GIMP_VIEW_SIZE_SMALL, 0, GIMP_VIEW_SIZE_SMALL, 0,
NULL, NULL, NULL, NULL); NULL, NULL, NULL, NULL);
gimp_viewable_button_set_view_type (GIMP_VIEWABLE_BUTTON (button), gimp_viewable_button_set_view_type (GIMP_VIEWABLE_BUTTON (button),
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
static GtkWidget * gimp_viewable_box_new (GimpContainer *container, static GtkWidget * gimp_viewable_box_new (GimpContainer *container,
GimpContext *context, GimpContext *context,
gint spacing, gint spacing,
GimpViewType view_type,
GimpViewSize view_size, GimpViewSize view_size,
const gchar *dialog_identifier, const gchar *dialog_identifier,
const gchar *dialog_stock_id, const gchar *dialog_stock_id,
...@@ -69,7 +70,7 @@ gimp_brush_box_new (GimpContainer *container, ...@@ -69,7 +70,7 @@ gimp_brush_box_new (GimpContainer *container,
container = context->gimp->brush_factory->container; container = context->gimp->brush_factory->container;
return gimp_viewable_box_new (container, context, spacing, return gimp_viewable_box_new (container, context, spacing,
GIMP_VIEW_SIZE_SMALL, GIMP_VIEW_TYPE_GRID, GIMP_VIEW_SIZE_SMALL,
"gimp-brush-grid|gimp-brush-list", "gimp-brush-grid|gimp-brush-list",
GIMP_STOCK_BRUSH, GIMP_STOCK_BRUSH,
_("Open the brush selection dialog")); _("Open the brush selection dialog"));
...@@ -88,7 +89,7 @@ gimp_pattern_box_new (GimpContainer *container, ...@@ -88,7 +89,7 @@ gimp_pattern_box_new (GimpContainer *container,
container = context->gimp->pattern_factory->container; container = context->gimp->pattern_factory->container;
return gimp_viewable_box_new (container, context, spacing, return gimp_viewable_box_new (container, context, spacing,
GIMP_VIEW_SIZE_SMALL, GIMP_VIEW_TYPE_GRID, GIMP_VIEW_SIZE_SMALL,
"gimp-pattern-grid|gimp-pattern-list", "gimp-pattern-grid|gimp-pattern-list",
GIMP_STOCK_PATTERN, GIMP_STOCK_PATTERN,
_("Open the pattern selection dialog")); _("Open the pattern selection dialog"));
...@@ -113,6 +114,7 @@ gimp_gradient_box_new (GimpContainer *container, ...@@ -113,6 +114,7 @@ gimp_gradient_box_new (GimpContainer *container,
hbox = gtk_hbox_new (FALSE, spacing); hbox = gtk_hbox_new (FALSE, spacing);
button = gimp_viewable_button_new (container, context, button = gimp_viewable_button_new (container, context,
GIMP_VIEW_TYPE_LIST,
GIMP_VIEW_SIZE_LARGE, 1, GIMP_VIEW_SIZE_LARGE, 1,
gimp_dialog_factory_from_name ("dock"), gimp_dialog_factory_from_name ("dock"),
"gimp-gradient-list|gimp-gradient-grid", "gimp-gradient-list|gimp-gradient-grid",
...@@ -162,7 +164,7 @@ gimp_palette_box_new (GimpContainer *container, ...@@ -162,7 +164,7 @@ gimp_palette_box_new (GimpContainer *container,
container = context->gimp->palette_factory->container; container = context->gimp->palette_factory->container;
return gimp_viewable_box_new (container, context, spacing, return gimp_viewable_box_new (container, context, spacing,
GIMP_VIEW_SIZE_MEDIUM, GIMP_VIEW_TYPE_LIST, GIMP_VIEW_SIZE_MEDIUM,
"gimp-palette-list|gimp-palette-grid", "gimp-palette-list|gimp-palette-grid",
GIMP_STOCK_PALETTE, GIMP_STOCK_PALETTE,
_("Open the palette selection dialog")); _("Open the palette selection dialog"));
...@@ -181,7 +183,7 @@ gimp_font_box_new (GimpContainer *container, ...@@ -181,7 +183,7 @@ gimp_font_box_new (GimpContainer *container,
container = context->gimp->fonts; container = context->gimp->fonts;
return gimp_viewable_box_new (container, context, spacing, return gimp_viewable_box_new (container, context, spacing,
GIMP_VIEW_SIZE_SMALL, GIMP_VIEW_TYPE_LIST, GIMP_VIEW_SIZE_SMALL,
"gimp-font-list|gimp-font-grid", "gimp-font-list|gimp-font-grid",
GIMP_STOCK_FONT, GIMP_STOCK_FONT,
_("Open the font selection dialog")); _("Open the font selection dialog"));
...@@ -194,6 +196,7 @@ static GtkWidget * ...@@ -194,6 +196,7 @@ static GtkWidget *
gimp_viewable_box_new (GimpContainer *container, gimp_viewable_box_new (GimpContainer *container,
GimpContext *context, GimpContext *context,
gint spacing, gint spacing,
GimpViewType view_type,
GimpViewSize view_size, GimpViewSize view_size,
const gchar *dialog_identifier, const gchar *dialog_identifier,
const gchar *dialog_stock_id, const gchar *dialog_stock_id,
...@@ -206,7 +209,7 @@ gimp_viewable_box_new (GimpContainer *container, ...@@ -206,7 +209,7 @@ gimp_viewable_box_new (GimpContainer *container,
hbox = gtk_hbox_new (FALSE, spacing); hbox = gtk_hbox_new (FALSE, spacing);
button = gimp_viewable_button_new (container, context, button = gimp_viewable_button_new (container, context,
view_size, 1, view_type, view_size, 1,
gimp_dialog_factory_from_name ("dock"), gimp_dialog_factory_from_name ("dock"),
dialog_identifier, dialog_identifier,
dialog_stock_id, dialog_stock_id,
......
...@@ -305,6 +305,7 @@ gimp_viewable_button_popup_closed (GimpContainerPopup *popup, ...@@ -305,6 +305,7 @@ gimp_viewable_button_popup_closed (GimpContainerPopup *popup,
GtkWidget * GtkWidget *
gimp_viewable_button_new (GimpContainer *container, gimp_viewable_button_new (GimpContainer *container,
GimpContext *context, GimpContext *context,
GimpViewType view_type,
gint preview_size, gint preview_size,
gint preview_border_width, gint preview_border_width,
GimpDialogFactory *dialog_factory, GimpDialogFactory *dialog_factory,
...@@ -331,7 +332,10 @@ gimp_viewable_button_new (GimpContainer *container, ...@@ -331,7 +332,10 @@ gimp_viewable_button_new (GimpContainer *container,
g_return_val_if_fail (dialog_tooltip != NULL, NULL); g_return_val_if_fail (dialog_tooltip != NULL, NULL);
} }
button = g_object_new (GIMP_TYPE_VIEWABLE_BUTTON, NULL); button = g_object_new (GIMP_TYPE_VIEWABLE_BUTTON,
"popup-view-type", view_type,
"popup-preview-size", preview_size,
NULL);
button->container = container; button->container = container;
button->context = context; button->context = context;
......
...@@ -67,6 +67,7 @@ GType gimp_viewable_button_get_type (void) G_GNUC_CONST; ...@@ -67,6 +67,7 @@ GType gimp_viewable_button_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_viewable_button_new (GimpContainer *container, GtkWidget * gimp_viewable_button_new (GimpContainer *container,
GimpContext *context, GimpContext *context,
GimpViewType view_type,
gint preview_size, gint preview_size,
gint preview_border_width, gint preview_border_width,
GimpDialogFactory *dialog_factory, GimpDialogFactory *dialog_factory,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment