Commit f20e559b authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/widgets/gimpbrushfactoryview.[ch] app/widgets/gimpbufferview.[ch]

2003-04-08  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpbrushfactoryview.[ch]
	* app/widgets/gimpbufferview.[ch]
	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpcontainergridview.[ch]
	* app/widgets/gimpcontainertreeview.[ch]
	* app/widgets/gimpcontainerview.[ch]
	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimpdocumentview.[ch]
	* app/widgets/gimpimageview.[ch]
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimptemplateview.[ch]: removed "min_item_x" and
	"min_item_y" parameters all over the place. Added
	"preview_border_width" instead.

	* app/widgets/gimpmenuitem.c: ensure that all menu items have the
	same height.

	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpundoeditor.c
	* app/gui/brush-select.c
	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/font-select.c
	* app/gui/gradient-select.c
	* app/gui/palette-select.c
	* app/gui/pattern-select.c: changed accordingly.

	* app/gui/dialogs-constructors.c: removed the borders from the tool
	and template lists.
parent 5797c032
2003-04-08 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimpbufferview.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpcontainergridview.[ch]
* app/widgets/gimpcontainertreeview.[ch]
* app/widgets/gimpcontainerview.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpdocumentview.[ch]
* app/widgets/gimpimageview.[ch]
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimptemplateview.[ch]: removed "min_item_x" and
"min_item_y" parameters all over the place. Added
"preview_border_width" instead.
* app/widgets/gimpmenuitem.c: ensure that all menu items have the
same height.
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpundoeditor.c
* app/gui/brush-select.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/font-select.c
* app/gui/gradient-select.c
* app/gui/palette-select.c
* app/gui/pattern-select.c: changed accordingly.
* app/gui/dialogs-constructors.c: removed the borders from the tool
and template lists.
2003-04-08 Michael Natterer <mitch@gimp.org>
 
* app/config/gimpguiconfig.[ch]
......@@ -253,7 +253,8 @@ dialogs_preview_size_cmd_callback (GtkWidget *widget,
view = gimp_container_view_get_by_dockable (dockable);
if (view)
gimp_container_view_set_preview_size (view, preview_size);
gimp_container_view_set_preview_size (view, preview_size,
view->preview_border_width);
}
}
}
......
......@@ -307,8 +307,7 @@ dialogs_image_list_view_new (GimpDialogFactory *factory,
view = gimp_image_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->images,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -329,8 +328,7 @@ dialogs_brush_list_view_new (GimpDialogFactory *factory,
dialogs_edit_brush_func,
context,
TRUE,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -350,8 +348,7 @@ dialogs_pattern_list_view_new (GimpDialogFactory *factory,
context->gimp->pattern_factory,
NULL,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Patterns>");
return dialogs_dockable_new (view,
......@@ -371,8 +368,7 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory,
context->gimp->gradient_factory,
dialogs_edit_gradient_func,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Gradients>");
return dialogs_dockable_new (view,
......@@ -392,8 +388,7 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory,
context->gimp->palette_factory,
dialogs_edit_palette_func,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Palettes>");
return dialogs_dockable_new (view,
......@@ -411,9 +406,8 @@ dialogs_font_list_view_new (GimpDialogFactory *factory,
view = gimp_container_tree_view_new (context->gimp->fonts,
context,
preview_size,
FALSE,
5, 3);
preview_size, 1,
FALSE);
return dialogs_dockable_new (view,
_("Font List"), _("Fonts"), NULL,
......@@ -430,9 +424,8 @@ dialogs_tool_list_view_new (GimpDialogFactory *factory,
view = gimp_container_tree_view_new (context->gimp->tool_info_list,
context,
preview_size,
FALSE,
5, 3);
preview_size, 0,
FALSE);
return dialogs_dockable_new (view,
_("Tool List"), _("Tools"), NULL,
......@@ -450,8 +443,7 @@ dialogs_buffer_list_view_new (GimpDialogFactory *factory,
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->named_buffers,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -474,8 +466,7 @@ dialogs_image_grid_view_new (GimpDialogFactory *factory,
view = gimp_image_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->images,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -496,8 +487,7 @@ dialogs_brush_grid_view_new (GimpDialogFactory *factory,
dialogs_edit_brush_func,
context,
TRUE,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -517,8 +507,7 @@ dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
context->gimp->pattern_factory,
NULL,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Patterns>");
return dialogs_dockable_new (view,
......@@ -538,8 +527,7 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
context->gimp->gradient_factory,
dialogs_edit_gradient_func,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Gradients>");
return dialogs_dockable_new (view,
......@@ -559,8 +547,7 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory,
context->gimp->palette_factory,
dialogs_edit_palette_func,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Palettes>");
return dialogs_dockable_new (view,
......@@ -578,9 +565,8 @@ dialogs_font_grid_view_new (GimpDialogFactory *factory,
view = gimp_container_grid_view_new (context->gimp->fonts,
context,
preview_size,
FALSE,
5, 3);
preview_size, 1,
FALSE);
return dialogs_dockable_new (view,
_("Font Grid"), _("Fonts"), NULL,
......@@ -597,9 +583,8 @@ dialogs_tool_grid_view_new (GimpDialogFactory *factory,
view = gimp_container_grid_view_new (context->gimp->tool_info_list,
context,
preview_size,
FALSE,
5, 3);
preview_size, 1,
FALSE);
return dialogs_dockable_new (view,
_("Tool Grid"), _("Tools"), NULL,
......@@ -617,8 +602,7 @@ dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->named_buffers,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -646,7 +630,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
preview_size = context->gimp->config->layer_preview_size;
view =
gimp_item_tree_view_new (preview_size,
gimp_item_tree_view_new (preview_size, 2,
gimage,
GIMP_TYPE_LAYER,
"active_layer_changed",
......@@ -680,7 +664,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
preview_size = context->gimp->config->layer_preview_size;
view =
gimp_item_tree_view_new (preview_size,
gimp_item_tree_view_new (preview_size, 1,
gimage,
GIMP_TYPE_CHANNEL,
"active_channel_changed",
......@@ -715,7 +699,7 @@ dialogs_vectors_list_view_new (GimpDialogFactory *factory,
preview_size = context->gimp->config->layer_preview_size;
view =
gimp_item_tree_view_new (preview_size,
gimp_item_tree_view_new (preview_size, 1,
gimage,
GIMP_TYPE_VECTORS,
"active_vectors_changed",
......@@ -868,8 +852,7 @@ dialogs_document_list_new (GimpDialogFactory *factory,
view = gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->documents,
context,
preview_size,
5, 3,
preview_size, 1,
file_file_open_dialog,
factory->menu_factory);
......@@ -890,8 +873,7 @@ dialogs_document_grid_new (GimpDialogFactory *factory,
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->documents,
context,
preview_size,
5, 3,
preview_size, 1,
file_file_open_dialog,
factory->menu_factory);
......@@ -912,8 +894,7 @@ dialogs_template_list_new (GimpDialogFactory *factory,
view = gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->templates,
context,
preview_size,
5, 3,
preview_size, 0,
factory->menu_factory);
return dialogs_dockable_new (view,
......
......@@ -36,6 +36,7 @@
#include "pdb/procedural_db.h"
#include "widgets/gimpcontainerview.h"
#include "widgets/gimpbrushfactoryview.h"
#include "widgets/gimpwidgets-constructors.h"
......@@ -159,10 +160,13 @@ brush_select_new (Gimp *gimp,
dialogs_edit_brush_func,
bsp->context,
FALSE,
GIMP_PREVIEW_SIZE_MEDIUM,
5, 5,
GIMP_PREVIEW_SIZE_MEDIUM, 1,
global_menu_factory);
gimp_container_view_set_size_request (GIMP_CONTAINER_VIEW (GIMP_CONTAINER_EDITOR (bsp->view)->view),
5 * (GIMP_PREVIEW_SIZE_MEDIUM + 2),
5 * (GIMP_PREVIEW_SIZE_MEDIUM + 2));
gtk_container_set_border_width (GTK_CONTAINER (bsp->view), 4);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (bsp->shell)->vbox), bsp->view);
gtk_widget_show (bsp->view);
......
......@@ -253,7 +253,8 @@ dialogs_preview_size_cmd_callback (GtkWidget *widget,
view = gimp_container_view_get_by_dockable (dockable);
if (view)
gimp_container_view_set_preview_size (view, preview_size);
gimp_container_view_set_preview_size (view, preview_size,
view->preview_border_width);
}
}
}
......
......@@ -307,8 +307,7 @@ dialogs_image_list_view_new (GimpDialogFactory *factory,
view = gimp_image_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->images,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -329,8 +328,7 @@ dialogs_brush_list_view_new (GimpDialogFactory *factory,
dialogs_edit_brush_func,
context,
TRUE,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -350,8 +348,7 @@ dialogs_pattern_list_view_new (GimpDialogFactory *factory,
context->gimp->pattern_factory,
NULL,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Patterns>");
return dialogs_dockable_new (view,
......@@ -371,8 +368,7 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory,
context->gimp->gradient_factory,
dialogs_edit_gradient_func,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Gradients>");
return dialogs_dockable_new (view,
......@@ -392,8 +388,7 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory,
context->gimp->palette_factory,
dialogs_edit_palette_func,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Palettes>");
return dialogs_dockable_new (view,
......@@ -411,9 +406,8 @@ dialogs_font_list_view_new (GimpDialogFactory *factory,
view = gimp_container_tree_view_new (context->gimp->fonts,
context,
preview_size,
FALSE,
5, 3);
preview_size, 1,
FALSE);
return dialogs_dockable_new (view,
_("Font List"), _("Fonts"), NULL,
......@@ -430,9 +424,8 @@ dialogs_tool_list_view_new (GimpDialogFactory *factory,
view = gimp_container_tree_view_new (context->gimp->tool_info_list,
context,
preview_size,
FALSE,
5, 3);
preview_size, 0,
FALSE);
return dialogs_dockable_new (view,
_("Tool List"), _("Tools"), NULL,
......@@ -450,8 +443,7 @@ dialogs_buffer_list_view_new (GimpDialogFactory *factory,
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->named_buffers,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -474,8 +466,7 @@ dialogs_image_grid_view_new (GimpDialogFactory *factory,
view = gimp_image_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->images,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -496,8 +487,7 @@ dialogs_brush_grid_view_new (GimpDialogFactory *factory,
dialogs_edit_brush_func,
context,
TRUE,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -517,8 +507,7 @@ dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
context->gimp->pattern_factory,
NULL,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Patterns>");
return dialogs_dockable_new (view,
......@@ -538,8 +527,7 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
context->gimp->gradient_factory,
dialogs_edit_gradient_func,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Gradients>");
return dialogs_dockable_new (view,
......@@ -559,8 +547,7 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory,
context->gimp->palette_factory,
dialogs_edit_palette_func,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory, "<Palettes>");
return dialogs_dockable_new (view,
......@@ -578,9 +565,8 @@ dialogs_font_grid_view_new (GimpDialogFactory *factory,
view = gimp_container_grid_view_new (context->gimp->fonts,
context,
preview_size,
FALSE,
5, 3);
preview_size, 1,
FALSE);
return dialogs_dockable_new (view,
_("Font Grid"), _("Fonts"), NULL,
......@@ -597,9 +583,8 @@ dialogs_tool_grid_view_new (GimpDialogFactory *factory,
view = gimp_container_grid_view_new (context->gimp->tool_info_list,
context,
preview_size,
FALSE,
5, 3);
preview_size, 1,
FALSE);
return dialogs_dockable_new (view,
_("Tool Grid"), _("Tools"), NULL,
......@@ -617,8 +602,7 @@ dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->named_buffers,
context,
preview_size,
5, 3,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
......@@ -646,7 +630,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
preview_size = context->gimp->config->layer_preview_size;
view =
gimp_item_tree_view_new (preview_size,
gimp_item_tree_view_new (preview_size, 2,
gimage,
GIMP_TYPE_LAYER,
"active_layer_changed",
......@@ -680,7 +664,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
preview_size = context->gimp->config->layer_preview_size;
view =
gimp_item_tree_view_new (preview_size,
gimp_item_tree_view_new (preview_size, 1,
gimage,
GIMP_TYPE_CHANNEL,
"active_channel_changed",
......@@ -715,7 +699,7 @@ dialogs_vectors_list_view_new (GimpDialogFactory *factory,
preview_size = context->gimp->config->layer_preview_size;
view =
gimp_item_tree_view_new (preview_size,
gimp_item_tree_view_new (preview_size, 1,
gimage,
GIMP_TYPE_VECTORS,
"active_vectors_changed",
......@@ -868,8 +852,7 @@ dialogs_document_list_new (GimpDialogFactory *factory,
view = gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->documents,
context,
preview_size,
5, 3,
preview_size, 1,
file_file_open_dialog,
factory->menu_factory);
......@@ -890,8 +873,7 @@ dialogs_document_grid_new (GimpDialogFactory *factory,
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->documents,
context,
preview_size,
5, 3,
preview_size, 1,
file_file_open_dialog,
factory->menu_factory);
......@@ -912,8 +894,7 @@ dialogs_template_list_new (GimpDialogFactory *factory,
view = gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->templates,
context,
preview_size,
5, 3,
preview_size, 0,
factory->menu_factory);
return dialogs_dockable_new (view,
......
......@@ -113,9 +113,12 @@ font_select_new (Gimp *gimp,
/* The Font List */
font_select->view = gimp_container_tree_view_new (gimp->fonts,
font_select->context,
GIMP_PREVIEW_SIZE_MEDIUM,
FALSE,
5, 8);
GIMP_PREVIEW_SIZE_MEDIUM, 1,
FALSE);
gimp_container_view_set_size_request (GIMP_CONTAINER_VIEW (font_select->view),
5 * (GIMP_PREVIEW_SIZE_MEDIUM + 2),
5 * (GIMP_PREVIEW_SIZE_MEDIUM + 2));
gtk_container_set_border_width (GTK_CONTAINER (font_select->view), 4);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (font_select->shell)->vbox),
......
......@@ -35,6 +35,7 @@
#include "pdb/procedural_db.h"
#include "widgets/gimpcontainerview.h"
#include "widgets/gimpdatafactoryview.h"
#include "dialogs-constructors.h"
......@@ -129,10 +130,13 @@ gradient_select_new (Gimp *gimp,
gimp->gradient_factory,
dialogs_edit_gradient_func,
gsp->context,
GIMP_PREVIEW_SIZE_MEDIUM,
6, 6,
GIMP_PREVIEW_SIZE_MEDIUM, 1,
global_menu_factory, "<Gradients>");
gimp_container_view_set_size_request (GIMP_CONTAINER_VIEW (GIMP_CONTAINER_EDITOR (gsp->view)->view),
6 * (GIMP_PREVIEW_SIZE_MEDIUM + 2),
6 * (GIMP_PREVIEW_SIZE_MEDIUM + 2));
gtk_container_set_border_width (GTK_CONTAINER (gsp->view), 4);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (gsp->shell)->vbox), gsp->view);
gtk_widget_show (gsp->view);
......
......@@ -35,6 +35,7 @@
#include "pdb/procedural_db.h"
#include "widgets/gimpcontainerview.h"
#include "widgets/gimpdatafactoryview.h"
#include "dialogs-constructors.h"
......@@ -131,10 +132,13 @@ palette_select_new (Gimp *gimp,
gimp->palette_factory,
dialogs_edit_palette_func,
psp->context,
GIMP_PREVIEW_SIZE_MEDIUM,
5, 8,
GIMP_PREVIEW_SIZE_MEDIUM, 1,
global_menu_factory, "<Palettes>");
gimp_container_view_set_size_request (GIMP_CONTAINER_VIEW (GIMP_CONTAINER_EDITOR (psp->view)->view),
5 * (GIMP_PREVIEW_SIZE_MEDIUM + 2),
8 * (GIMP_PREVIEW_SIZE_MEDIUM + 2));
gtk_container_set_border_width (GTK_CONTAINER (psp->view), 4);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (psp->shell)->vbox), psp->view);
gtk_widget_show (psp->view);
......
......@@ -36,6 +36,7 @@
#include "pdb/procedural_db.h"
#include "widgets/gimpcontainerview.h"
#include "widgets/gimpdatafactoryview.h"
#include "menus.h"
......@@ -127,10 +128,13 @@ pattern_select_new (Gimp *gimp,
gimp->pattern_factory,
NULL,
psp->context,
GIMP_PREVIEW_SIZE_MEDIUM,
6, 6,
GIMP_PREVIEW_SIZE_MEDIUM, 1,
global_menu_factory, "<Patterns>");
gimp_container_view_set_size_request (GIMP_CONTAINER_VIEW (GIMP_CONTAINER_EDITOR (psp->view)->view),
6 * (GIMP_PREVIEW_SIZE_MEDIUM + 2),
6 * (GIMP_PREVIEW_SIZE_MEDIUM + 2));
gtk_container_set_border_width (GTK_CONTAINER (psp->view), 4);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (psp->shell)->vbox), psp->view);
gtk_widget_show (psp->view);
......
......@@ -36,6 +36,7 @@
#include "gimpcontainerview.h"
#include "gimpbrushfactoryview.h"
#include "gimppreviewrenderer.h"
#include "gimp-intl.h"
......@@ -150,8 +151,7 @@ gimp_brush_factory_view_new (GimpViewType view_type,
GimpContext *context,
gboolean change_brush_spacing,
gint preview_size,
gint min_items_x,
gint min_items_y,
gint preview_border_width,
GimpMenuFactory *menu_factory)
{
GimpBrushFactoryView *factory_view;
......@@ -160,8 +160,9 @@ gimp_brush_factory_view_new (GimpViewType view_type,
g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), NULL);
g_return_val_if_fail (preview_size > 0 &&
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
g_return_val_if_fail (min_items_x > 0 && min_items_x <= 64, NULL);
g_return_val_if_fail (min_items_y > 0 && min_items_y <= 64, NULL);
g_return_val_if_fail (preview_border_width >= 0 &&
preview_border_width <= GIMP_PREVIEW_MAX_BORDER_WIDTH,
NULL);
factory_view = g_object_new (GIMP_TYPE_BRUSH_FACTORY_VIEW, NULL);
......@@ -172,9 +173,7 @@ gimp_brush_factory_view_new (GimpViewType view_type,
factory,