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.
This commit is contained in:

committed by
Michael Natterer

parent
5797c03295
commit
f20e559bbf
33
ChangeLog
33
ChangeLog
@ -1,3 +1,36 @@
|
|||||||
|
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>
|
2003-04-08 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/config/gimpguiconfig.[ch]
|
* app/config/gimpguiconfig.[ch]
|
||||||
|
@ -253,7 +253,8 @@ dialogs_preview_size_cmd_callback (GtkWidget *widget,
|
|||||||
view = gimp_container_view_get_by_dockable (dockable);
|
view = gimp_container_view_get_by_dockable (dockable);
|
||||||
|
|
||||||
if (view)
|
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,
|
view = gimp_image_view_new (GIMP_VIEW_TYPE_LIST,
|
||||||
context->gimp->images,
|
context->gimp->images,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -329,8 +328,7 @@ dialogs_brush_list_view_new (GimpDialogFactory *factory,
|
|||||||
dialogs_edit_brush_func,
|
dialogs_edit_brush_func,
|
||||||
context,
|
context,
|
||||||
TRUE,
|
TRUE,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -350,8 +348,7 @@ dialogs_pattern_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->pattern_factory,
|
context->gimp->pattern_factory,
|
||||||
NULL,
|
NULL,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Patterns>");
|
factory->menu_factory, "<Patterns>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -371,8 +368,7 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->gradient_factory,
|
context->gimp->gradient_factory,
|
||||||
dialogs_edit_gradient_func,
|
dialogs_edit_gradient_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Gradients>");
|
factory->menu_factory, "<Gradients>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -392,8 +388,7 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->palette_factory,
|
context->gimp->palette_factory,
|
||||||
dialogs_edit_palette_func,
|
dialogs_edit_palette_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Palettes>");
|
factory->menu_factory, "<Palettes>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
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,
|
view = gimp_container_tree_view_new (context->gimp->fonts,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
FALSE,
|
FALSE);
|
||||||
5, 3);
|
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
_("Font List"), _("Fonts"), NULL,
|
_("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,
|
view = gimp_container_tree_view_new (context->gimp->tool_info_list,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 0,
|
||||||
FALSE,
|
FALSE);
|
||||||
5, 3);
|
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
_("Tool List"), _("Tools"), NULL,
|
_("Tool List"), _("Tools"), NULL,
|
||||||
@ -450,8 +443,7 @@ dialogs_buffer_list_view_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
|
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
|
||||||
context->gimp->named_buffers,
|
context->gimp->named_buffers,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
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,
|
view = gimp_image_view_new (GIMP_VIEW_TYPE_GRID,
|
||||||
context->gimp->images,
|
context->gimp->images,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -496,8 +487,7 @@ dialogs_brush_grid_view_new (GimpDialogFactory *factory,
|
|||||||
dialogs_edit_brush_func,
|
dialogs_edit_brush_func,
|
||||||
context,
|
context,
|
||||||
TRUE,
|
TRUE,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -517,8 +507,7 @@ dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->pattern_factory,
|
context->gimp->pattern_factory,
|
||||||
NULL,
|
NULL,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Patterns>");
|
factory->menu_factory, "<Patterns>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -538,8 +527,7 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->gradient_factory,
|
context->gimp->gradient_factory,
|
||||||
dialogs_edit_gradient_func,
|
dialogs_edit_gradient_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Gradients>");
|
factory->menu_factory, "<Gradients>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -559,8 +547,7 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->palette_factory,
|
context->gimp->palette_factory,
|
||||||
dialogs_edit_palette_func,
|
dialogs_edit_palette_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Palettes>");
|
factory->menu_factory, "<Palettes>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
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,
|
view = gimp_container_grid_view_new (context->gimp->fonts,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
FALSE,
|
FALSE);
|
||||||
5, 3);
|
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
_("Font Grid"), _("Fonts"), NULL,
|
_("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,
|
view = gimp_container_grid_view_new (context->gimp->tool_info_list,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
FALSE,
|
FALSE);
|
||||||
5, 3);
|
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
_("Tool Grid"), _("Tools"), NULL,
|
_("Tool Grid"), _("Tools"), NULL,
|
||||||
@ -617,8 +602,7 @@ dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
|
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
|
||||||
context->gimp->named_buffers,
|
context->gimp->named_buffers,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -646,7 +630,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
|
|||||||
preview_size = context->gimp->config->layer_preview_size;
|
preview_size = context->gimp->config->layer_preview_size;
|
||||||
|
|
||||||
view =
|
view =
|
||||||
gimp_item_tree_view_new (preview_size,
|
gimp_item_tree_view_new (preview_size, 2,
|
||||||
gimage,
|
gimage,
|
||||||
GIMP_TYPE_LAYER,
|
GIMP_TYPE_LAYER,
|
||||||
"active_layer_changed",
|
"active_layer_changed",
|
||||||
@ -680,7 +664,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
|||||||
preview_size = context->gimp->config->layer_preview_size;
|
preview_size = context->gimp->config->layer_preview_size;
|
||||||
|
|
||||||
view =
|
view =
|
||||||
gimp_item_tree_view_new (preview_size,
|
gimp_item_tree_view_new (preview_size, 1,
|
||||||
gimage,
|
gimage,
|
||||||
GIMP_TYPE_CHANNEL,
|
GIMP_TYPE_CHANNEL,
|
||||||
"active_channel_changed",
|
"active_channel_changed",
|
||||||
@ -715,7 +699,7 @@ dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
|||||||
preview_size = context->gimp->config->layer_preview_size;
|
preview_size = context->gimp->config->layer_preview_size;
|
||||||
|
|
||||||
view =
|
view =
|
||||||
gimp_item_tree_view_new (preview_size,
|
gimp_item_tree_view_new (preview_size, 1,
|
||||||
gimage,
|
gimage,
|
||||||
GIMP_TYPE_VECTORS,
|
GIMP_TYPE_VECTORS,
|
||||||
"active_vectors_changed",
|
"active_vectors_changed",
|
||||||
@ -868,8 +852,7 @@ dialogs_document_list_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
|
view = gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
|
||||||
context->gimp->documents,
|
context->gimp->documents,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
file_file_open_dialog,
|
file_file_open_dialog,
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
@ -890,8 +873,7 @@ dialogs_document_grid_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
|
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
|
||||||
context->gimp->documents,
|
context->gimp->documents,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
file_file_open_dialog,
|
file_file_open_dialog,
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
@ -912,8 +894,7 @@ dialogs_template_list_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
|
view = gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
|
||||||
context->gimp->templates,
|
context->gimp->templates,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 0,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include "pdb/procedural_db.h"
|
#include "pdb/procedural_db.h"
|
||||||
|
|
||||||
|
#include "widgets/gimpcontainerview.h"
|
||||||
#include "widgets/gimpbrushfactoryview.h"
|
#include "widgets/gimpbrushfactoryview.h"
|
||||||
#include "widgets/gimpwidgets-constructors.h"
|
#include "widgets/gimpwidgets-constructors.h"
|
||||||
|
|
||||||
@ -159,10 +160,13 @@ brush_select_new (Gimp *gimp,
|
|||||||
dialogs_edit_brush_func,
|
dialogs_edit_brush_func,
|
||||||
bsp->context,
|
bsp->context,
|
||||||
FALSE,
|
FALSE,
|
||||||
GIMP_PREVIEW_SIZE_MEDIUM,
|
GIMP_PREVIEW_SIZE_MEDIUM, 1,
|
||||||
5, 5,
|
|
||||||
global_menu_factory);
|
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_set_border_width (GTK_CONTAINER (bsp->view), 4);
|
||||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (bsp->shell)->vbox), bsp->view);
|
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (bsp->shell)->vbox), bsp->view);
|
||||||
gtk_widget_show (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);
|
view = gimp_container_view_get_by_dockable (dockable);
|
||||||
|
|
||||||
if (view)
|
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,
|
view = gimp_image_view_new (GIMP_VIEW_TYPE_LIST,
|
||||||
context->gimp->images,
|
context->gimp->images,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -329,8 +328,7 @@ dialogs_brush_list_view_new (GimpDialogFactory *factory,
|
|||||||
dialogs_edit_brush_func,
|
dialogs_edit_brush_func,
|
||||||
context,
|
context,
|
||||||
TRUE,
|
TRUE,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -350,8 +348,7 @@ dialogs_pattern_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->pattern_factory,
|
context->gimp->pattern_factory,
|
||||||
NULL,
|
NULL,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Patterns>");
|
factory->menu_factory, "<Patterns>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -371,8 +368,7 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->gradient_factory,
|
context->gimp->gradient_factory,
|
||||||
dialogs_edit_gradient_func,
|
dialogs_edit_gradient_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Gradients>");
|
factory->menu_factory, "<Gradients>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -392,8 +388,7 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->palette_factory,
|
context->gimp->palette_factory,
|
||||||
dialogs_edit_palette_func,
|
dialogs_edit_palette_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Palettes>");
|
factory->menu_factory, "<Palettes>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
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,
|
view = gimp_container_tree_view_new (context->gimp->fonts,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
FALSE,
|
FALSE);
|
||||||
5, 3);
|
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
_("Font List"), _("Fonts"), NULL,
|
_("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,
|
view = gimp_container_tree_view_new (context->gimp->tool_info_list,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 0,
|
||||||
FALSE,
|
FALSE);
|
||||||
5, 3);
|
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
_("Tool List"), _("Tools"), NULL,
|
_("Tool List"), _("Tools"), NULL,
|
||||||
@ -450,8 +443,7 @@ dialogs_buffer_list_view_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
|
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
|
||||||
context->gimp->named_buffers,
|
context->gimp->named_buffers,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
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,
|
view = gimp_image_view_new (GIMP_VIEW_TYPE_GRID,
|
||||||
context->gimp->images,
|
context->gimp->images,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -496,8 +487,7 @@ dialogs_brush_grid_view_new (GimpDialogFactory *factory,
|
|||||||
dialogs_edit_brush_func,
|
dialogs_edit_brush_func,
|
||||||
context,
|
context,
|
||||||
TRUE,
|
TRUE,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -517,8 +507,7 @@ dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->pattern_factory,
|
context->gimp->pattern_factory,
|
||||||
NULL,
|
NULL,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Patterns>");
|
factory->menu_factory, "<Patterns>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -538,8 +527,7 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->gradient_factory,
|
context->gimp->gradient_factory,
|
||||||
dialogs_edit_gradient_func,
|
dialogs_edit_gradient_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Gradients>");
|
factory->menu_factory, "<Gradients>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -559,8 +547,7 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->palette_factory,
|
context->gimp->palette_factory,
|
||||||
dialogs_edit_palette_func,
|
dialogs_edit_palette_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory, "<Palettes>");
|
factory->menu_factory, "<Palettes>");
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
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,
|
view = gimp_container_grid_view_new (context->gimp->fonts,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
FALSE,
|
FALSE);
|
||||||
5, 3);
|
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
_("Font Grid"), _("Fonts"), NULL,
|
_("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,
|
view = gimp_container_grid_view_new (context->gimp->tool_info_list,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
FALSE,
|
FALSE);
|
||||||
5, 3);
|
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
_("Tool Grid"), _("Tools"), NULL,
|
_("Tool Grid"), _("Tools"), NULL,
|
||||||
@ -617,8 +602,7 @@ dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
|
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
|
||||||
context->gimp->named_buffers,
|
context->gimp->named_buffers,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
@ -646,7 +630,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
|
|||||||
preview_size = context->gimp->config->layer_preview_size;
|
preview_size = context->gimp->config->layer_preview_size;
|
||||||
|
|
||||||
view =
|
view =
|
||||||
gimp_item_tree_view_new (preview_size,
|
gimp_item_tree_view_new (preview_size, 2,
|
||||||
gimage,
|
gimage,
|
||||||
GIMP_TYPE_LAYER,
|
GIMP_TYPE_LAYER,
|
||||||
"active_layer_changed",
|
"active_layer_changed",
|
||||||
@ -680,7 +664,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
|||||||
preview_size = context->gimp->config->layer_preview_size;
|
preview_size = context->gimp->config->layer_preview_size;
|
||||||
|
|
||||||
view =
|
view =
|
||||||
gimp_item_tree_view_new (preview_size,
|
gimp_item_tree_view_new (preview_size, 1,
|
||||||
gimage,
|
gimage,
|
||||||
GIMP_TYPE_CHANNEL,
|
GIMP_TYPE_CHANNEL,
|
||||||
"active_channel_changed",
|
"active_channel_changed",
|
||||||
@ -715,7 +699,7 @@ dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
|||||||
preview_size = context->gimp->config->layer_preview_size;
|
preview_size = context->gimp->config->layer_preview_size;
|
||||||
|
|
||||||
view =
|
view =
|
||||||
gimp_item_tree_view_new (preview_size,
|
gimp_item_tree_view_new (preview_size, 1,
|
||||||
gimage,
|
gimage,
|
||||||
GIMP_TYPE_VECTORS,
|
GIMP_TYPE_VECTORS,
|
||||||
"active_vectors_changed",
|
"active_vectors_changed",
|
||||||
@ -868,8 +852,7 @@ dialogs_document_list_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
|
view = gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
|
||||||
context->gimp->documents,
|
context->gimp->documents,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
file_file_open_dialog,
|
file_file_open_dialog,
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
@ -890,8 +873,7 @@ dialogs_document_grid_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
|
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
|
||||||
context->gimp->documents,
|
context->gimp->documents,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 1,
|
||||||
5, 3,
|
|
||||||
file_file_open_dialog,
|
file_file_open_dialog,
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
@ -912,8 +894,7 @@ dialogs_template_list_new (GimpDialogFactory *factory,
|
|||||||
view = gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
|
view = gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
|
||||||
context->gimp->templates,
|
context->gimp->templates,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, 0,
|
||||||
5, 3,
|
|
||||||
factory->menu_factory);
|
factory->menu_factory);
|
||||||
|
|
||||||
return dialogs_dockable_new (view,
|
return dialogs_dockable_new (view,
|
||||||
|
@ -113,9 +113,12 @@ font_select_new (Gimp *gimp,
|
|||||||
/* The Font List */
|
/* The Font List */
|
||||||
font_select->view = gimp_container_tree_view_new (gimp->fonts,
|
font_select->view = gimp_container_tree_view_new (gimp->fonts,
|
||||||
font_select->context,
|
font_select->context,
|
||||||
GIMP_PREVIEW_SIZE_MEDIUM,
|
GIMP_PREVIEW_SIZE_MEDIUM, 1,
|
||||||
FALSE,
|
FALSE);
|
||||||
5, 8);
|
|
||||||
|
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_set_border_width (GTK_CONTAINER (font_select->view), 4);
|
||||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (font_select->shell)->vbox),
|
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (font_select->shell)->vbox),
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "pdb/procedural_db.h"
|
#include "pdb/procedural_db.h"
|
||||||
|
|
||||||
|
#include "widgets/gimpcontainerview.h"
|
||||||
#include "widgets/gimpdatafactoryview.h"
|
#include "widgets/gimpdatafactoryview.h"
|
||||||
|
|
||||||
#include "dialogs-constructors.h"
|
#include "dialogs-constructors.h"
|
||||||
@ -129,10 +130,13 @@ gradient_select_new (Gimp *gimp,
|
|||||||
gimp->gradient_factory,
|
gimp->gradient_factory,
|
||||||
dialogs_edit_gradient_func,
|
dialogs_edit_gradient_func,
|
||||||
gsp->context,
|
gsp->context,
|
||||||
GIMP_PREVIEW_SIZE_MEDIUM,
|
GIMP_PREVIEW_SIZE_MEDIUM, 1,
|
||||||
6, 6,
|
|
||||||
global_menu_factory, "<Gradients>");
|
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_set_border_width (GTK_CONTAINER (gsp->view), 4);
|
||||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (gsp->shell)->vbox), gsp->view);
|
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (gsp->shell)->vbox), gsp->view);
|
||||||
gtk_widget_show (gsp->view);
|
gtk_widget_show (gsp->view);
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "pdb/procedural_db.h"
|
#include "pdb/procedural_db.h"
|
||||||
|
|
||||||
|
#include "widgets/gimpcontainerview.h"
|
||||||
#include "widgets/gimpdatafactoryview.h"
|
#include "widgets/gimpdatafactoryview.h"
|
||||||
|
|
||||||
#include "dialogs-constructors.h"
|
#include "dialogs-constructors.h"
|
||||||
@ -131,10 +132,13 @@ palette_select_new (Gimp *gimp,
|
|||||||
gimp->palette_factory,
|
gimp->palette_factory,
|
||||||
dialogs_edit_palette_func,
|
dialogs_edit_palette_func,
|
||||||
psp->context,
|
psp->context,
|
||||||
GIMP_PREVIEW_SIZE_MEDIUM,
|
GIMP_PREVIEW_SIZE_MEDIUM, 1,
|
||||||
5, 8,
|
|
||||||
global_menu_factory, "<Palettes>");
|
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_set_border_width (GTK_CONTAINER (psp->view), 4);
|
||||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (psp->shell)->vbox), psp->view);
|
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (psp->shell)->vbox), psp->view);
|
||||||
gtk_widget_show (psp->view);
|
gtk_widget_show (psp->view);
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include "pdb/procedural_db.h"
|
#include "pdb/procedural_db.h"
|
||||||
|
|
||||||
|
#include "widgets/gimpcontainerview.h"
|
||||||
#include "widgets/gimpdatafactoryview.h"
|
#include "widgets/gimpdatafactoryview.h"
|
||||||
|
|
||||||
#include "menus.h"
|
#include "menus.h"
|
||||||
@ -127,10 +128,13 @@ pattern_select_new (Gimp *gimp,
|
|||||||
gimp->pattern_factory,
|
gimp->pattern_factory,
|
||||||
NULL,
|
NULL,
|
||||||
psp->context,
|
psp->context,
|
||||||
GIMP_PREVIEW_SIZE_MEDIUM,
|
GIMP_PREVIEW_SIZE_MEDIUM, 1,
|
||||||
6, 6,
|
|
||||||
global_menu_factory, "<Patterns>");
|
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_set_border_width (GTK_CONTAINER (psp->view), 4);
|
||||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (psp->shell)->vbox), psp->view);
|
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (psp->shell)->vbox), psp->view);
|
||||||
gtk_widget_show (psp->view);
|
gtk_widget_show (psp->view);
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include "gimpcontainerview.h"
|
#include "gimpcontainerview.h"
|
||||||
#include "gimpbrushfactoryview.h"
|
#include "gimpbrushfactoryview.h"
|
||||||
|
#include "gimppreviewrenderer.h"
|
||||||
|
|
||||||
#include "gimp-intl.h"
|
#include "gimp-intl.h"
|
||||||
|
|
||||||
@ -150,8 +151,7 @@ gimp_brush_factory_view_new (GimpViewType view_type,
|
|||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gboolean change_brush_spacing,
|
gboolean change_brush_spacing,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory)
|
GimpMenuFactory *menu_factory)
|
||||||
{
|
{
|
||||||
GimpBrushFactoryView *factory_view;
|
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 (GIMP_IS_DATA_FACTORY (factory), NULL);
|
||||||
g_return_val_if_fail (preview_size > 0 &&
|
g_return_val_if_fail (preview_size > 0 &&
|
||||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
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 (preview_border_width >= 0 &&
|
||||||
g_return_val_if_fail (min_items_y > 0 && min_items_y <= 64, NULL);
|
preview_border_width <= GIMP_PREVIEW_MAX_BORDER_WIDTH,
|
||||||
|
NULL);
|
||||||
|
|
||||||
factory_view = g_object_new (GIMP_TYPE_BRUSH_FACTORY_VIEW, 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,
|
factory,
|
||||||
edit_func,
|
edit_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size, preview_border_width,
|
||||||
min_items_x,
|
|
||||||
min_items_y,
|
|
||||||
menu_factory, "<Brushes>"))
|
menu_factory, "<Brushes>"))
|
||||||
{
|
{
|
||||||
g_object_unref (factory_view);
|
g_object_unref (factory_view);
|
||||||
|
@ -60,8 +60,7 @@ GtkWidget * gimp_brush_factory_view_new (GimpViewType view_type,
|
|||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gboolean change_brush_spacing,
|
gboolean change_brush_spacing,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory);
|
GimpMenuFactory *menu_factory);
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,8 +116,7 @@ gimp_buffer_view_new (GimpViewType view_type,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory)
|
GimpMenuFactory *menu_factory)
|
||||||
{
|
{
|
||||||
GimpBufferView *buffer_view;
|
GimpBufferView *buffer_view;
|
||||||
@ -127,12 +126,9 @@ gimp_buffer_view_new (GimpViewType view_type,
|
|||||||
|
|
||||||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (buffer_view),
|
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (buffer_view),
|
||||||
view_type,
|
view_type,
|
||||||
container,
|
container,context,
|
||||||
context,
|
preview_size, preview_border_width,
|
||||||
preview_size,
|
|
||||||
TRUE, /* reorderable */
|
TRUE, /* reorderable */
|
||||||
min_items_x,
|
|
||||||
min_items_y,
|
|
||||||
menu_factory, "<Buffers>"))
|
menu_factory, "<Buffers>"))
|
||||||
{
|
{
|
||||||
g_object_unref (buffer_view);
|
g_object_unref (buffer_view);
|
||||||
|
@ -58,8 +58,7 @@ GtkWidget * gimp_buffer_view_new (GimpViewType view_type,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory);
|
GimpMenuFactory *menu_factory);
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "gimpcontainertreeview.h"
|
#include "gimpcontainertreeview.h"
|
||||||
#include "gimpitemfactory.h"
|
#include "gimpitemfactory.h"
|
||||||
#include "gimpmenufactory.h"
|
#include "gimpmenufactory.h"
|
||||||
|
#include "gimppreviewrenderer.h"
|
||||||
|
|
||||||
|
|
||||||
static void gimp_container_editor_class_init (GimpContainerEditorClass *klass);
|
static void gimp_container_editor_class_init (GimpContainerEditorClass *klass);
|
||||||
@ -110,9 +111,8 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
|
gint preview_border_width,
|
||||||
gboolean reorderable,
|
gboolean reorderable,
|
||||||
gint min_items_x,
|
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory,
|
GimpMenuFactory *menu_factory,
|
||||||
const gchar *menu_identifier)
|
const gchar *menu_identifier)
|
||||||
{
|
{
|
||||||
@ -121,8 +121,9 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
|
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
|
||||||
g_return_val_if_fail (preview_size > 0 &&
|
g_return_val_if_fail (preview_size > 0 &&
|
||||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, FALSE);
|
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, FALSE);
|
||||||
g_return_val_if_fail (min_items_x <= 64, FALSE);
|
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||||
g_return_val_if_fail (min_items_y <= 64, FALSE);
|
preview_border_width <= GIMP_PREVIEW_MAX_BORDER_WIDTH,
|
||||||
|
FALSE);
|
||||||
g_return_val_if_fail (menu_factory == NULL ||
|
g_return_val_if_fail (menu_factory == NULL ||
|
||||||
GIMP_IS_MENU_FACTORY (menu_factory), FALSE);
|
GIMP_IS_MENU_FACTORY (menu_factory), FALSE);
|
||||||
|
|
||||||
@ -133,9 +134,8 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||||||
GIMP_CONTAINER_VIEW (gimp_container_grid_view_new (container,
|
GIMP_CONTAINER_VIEW (gimp_container_grid_view_new (container,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size,
|
||||||
reorderable,
|
preview_border_width,
|
||||||
min_items_x,
|
reorderable));
|
||||||
min_items_y));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_VIEW_TYPE_LIST:
|
case GIMP_VIEW_TYPE_LIST:
|
||||||
@ -143,9 +143,8 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||||||
GIMP_CONTAINER_VIEW (gimp_container_tree_view_new (container,
|
GIMP_CONTAINER_VIEW (gimp_container_tree_view_new (container,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size,
|
||||||
reorderable,
|
preview_border_width,
|
||||||
min_items_x,
|
reorderable));
|
||||||
min_items_y));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -66,9 +66,8 @@ gboolean gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
|
gint preview_border_width,
|
||||||
gboolean reorderable,
|
gboolean reorderable,
|
||||||
gint min_items_x,
|
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory,
|
GimpMenuFactory *menu_factory,
|
||||||
const gchar *menu_identifier);
|
const gchar *menu_identifier);
|
||||||
|
|
||||||
|
@ -225,9 +225,8 @@ GtkWidget *
|
|||||||
gimp_container_grid_view_new (GimpContainer *container,
|
gimp_container_grid_view_new (GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gboolean reorderable,
|
gint preview_border_width,
|
||||||
gint min_items_x,
|
gboolean reorderable)
|
||||||
gint min_items_y)
|
|
||||||
{
|
{
|
||||||
GimpContainerGridView *grid_view;
|
GimpContainerGridView *grid_view;
|
||||||
|
|
||||||
@ -236,15 +235,16 @@ gimp_container_grid_view_new (GimpContainer *container,
|
|||||||
g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL);
|
g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL);
|
||||||
g_return_val_if_fail (preview_size > 0 &&
|
g_return_val_if_fail (preview_size > 0 &&
|
||||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
||||||
g_return_val_if_fail (min_items_x <= 64, NULL);
|
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||||
g_return_val_if_fail (min_items_y <= 64, NULL);
|
preview_border_width <= GIMP_PREVIEW_MAX_BORDER_WIDTH,
|
||||||
|
NULL);
|
||||||
|
|
||||||
grid_view = g_object_new (GIMP_TYPE_CONTAINER_GRID_VIEW, NULL);
|
grid_view = g_object_new (GIMP_TYPE_CONTAINER_GRID_VIEW, NULL);
|
||||||
|
|
||||||
gimp_container_view_construct (GIMP_CONTAINER_VIEW (grid_view),
|
gimp_container_view_construct (GIMP_CONTAINER_VIEW (grid_view),
|
||||||
container, context,
|
container, context,
|
||||||
preview_size, reorderable,
|
preview_size, preview_border_width,
|
||||||
min_items_x, min_items_y);
|
reorderable);
|
||||||
|
|
||||||
return GTK_WIDGET (grid_view);
|
return GTK_WIDGET (grid_view);
|
||||||
}
|
}
|
||||||
|
@ -63,9 +63,8 @@ GType gimp_container_grid_view_get_type (void) G_GNUC_CONST;
|
|||||||
GtkWidget * gimp_container_grid_view_new (GimpContainer *container,
|
GtkWidget * gimp_container_grid_view_new (GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gboolean reorderable,
|
gint preview_border_width,
|
||||||
gint min_items_x,
|
gboolean reorderable);
|
||||||
gint min_items_y);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_CONTAINER_GRID_VIEW_H__ */
|
#endif /* __GIMP_CONTAINER_GRID_VIEW_H__ */
|
||||||
|
@ -454,9 +454,13 @@ gimp_container_popup_create_view (GimpContainerPopup *popup,
|
|||||||
view_type,
|
view_type,
|
||||||
popup->container,
|
popup->container,
|
||||||
popup->context,
|
popup->context,
|
||||||
GIMP_PREVIEW_SIZE_SMALL,
|
GIMP_PREVIEW_SIZE_SMALL, 1,
|
||||||
FALSE, /* reorderable */
|
FALSE, /* reorderable */
|
||||||
6, 8, NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
|
gimp_container_view_set_size_request (GIMP_CONTAINER_VIEW (GIMP_CONTAINER_EDITOR (popup->editor)->view),
|
||||||
|
6 * (GIMP_PREVIEW_SIZE_SMALL + 2),
|
||||||
|
8 * (GIMP_PREVIEW_SIZE_SMALL + 2));
|
||||||
|
|
||||||
if (GIMP_IS_CONTAINER_GRID_VIEW (popup->editor->view))
|
if (GIMP_IS_CONTAINER_GRID_VIEW (popup->editor->view))
|
||||||
gtk_widget_hide (GIMP_CONTAINER_GRID_VIEW (popup->editor->view)->name_label);
|
gtk_widget_hide (GIMP_CONTAINER_GRID_VIEW (popup->editor->view)->name_label);
|
||||||
@ -503,7 +507,7 @@ gimp_container_popup_smaller_clicked (GtkWidget *button,
|
|||||||
popup->editor->view->preview_size * 0.8);
|
popup->editor->view->preview_size * 0.8);
|
||||||
|
|
||||||
gimp_container_view_set_preview_size (popup->editor->view,
|
gimp_container_view_set_preview_size (popup->editor->view,
|
||||||
preview_size);
|
preview_size, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -516,7 +520,7 @@ gimp_container_popup_larger_clicked (GtkWidget *button,
|
|||||||
popup->editor->view->preview_size * 1.2);
|
popup->editor->view->preview_size * 1.2);
|
||||||
|
|
||||||
gimp_container_view_set_preview_size (popup->editor->view,
|
gimp_container_view_set_preview_size (popup->editor->view,
|
||||||
preview_size);
|
preview_size, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -251,9 +251,8 @@ GtkWidget *
|
|||||||
gimp_container_tree_view_new (GimpContainer *container,
|
gimp_container_tree_view_new (GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gboolean reorderable,
|
gint preview_border_width,
|
||||||
gint min_items_x,
|
gboolean reorderable)
|
||||||
gint min_items_y)
|
|
||||||
{
|
{
|
||||||
GimpContainerTreeView *tree_view;
|
GimpContainerTreeView *tree_view;
|
||||||
|
|
||||||
@ -262,15 +261,16 @@ gimp_container_tree_view_new (GimpContainer *container,
|
|||||||
g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL);
|
g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL);
|
||||||
g_return_val_if_fail (preview_size > 0 &&
|
g_return_val_if_fail (preview_size > 0 &&
|
||||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
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 (preview_border_width >= 0 &&
|
||||||
g_return_val_if_fail (min_items_y > 0 && min_items_y <= 64, NULL);
|
preview_border_width <= GIMP_PREVIEW_MAX_BORDER_WIDTH,
|
||||||
|
NULL);
|
||||||
|
|
||||||
tree_view = g_object_new (GIMP_TYPE_CONTAINER_TREE_VIEW, NULL);
|
tree_view = g_object_new (GIMP_TYPE_CONTAINER_TREE_VIEW, NULL);
|
||||||
|
|
||||||
gimp_container_view_construct (GIMP_CONTAINER_VIEW (tree_view),
|
gimp_container_view_construct (GIMP_CONTAINER_VIEW (tree_view),
|
||||||
container, context,
|
container, context,
|
||||||
preview_size, reorderable,
|
preview_size, preview_border_width,
|
||||||
min_items_x, min_items_y);
|
reorderable);
|
||||||
|
|
||||||
return GTK_WIDGET (tree_view);
|
return GTK_WIDGET (tree_view);
|
||||||
}
|
}
|
||||||
|
@ -85,9 +85,8 @@ GType gimp_container_tree_view_get_type (void) G_GNUC_CONST;
|
|||||||
GtkWidget * gimp_container_tree_view_new (GimpContainer *container,
|
GtkWidget * gimp_container_tree_view_new (GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gboolean reorderable,
|
gint preview_border_width,
|
||||||
gint min_items_x,
|
gboolean reorderable);
|
||||||
gint min_items_y);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_CONTAINER_TREE_VIEW_H__ */
|
#endif /* __GIMP_CONTAINER_TREE_VIEW_H__ */
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "gimpcontainerview.h"
|
#include "gimpcontainerview.h"
|
||||||
#include "gimpcontainerview-utils.h"
|
#include "gimpcontainerview-utils.h"
|
||||||
#include "gimpdnd.h"
|
#include "gimpdnd.h"
|
||||||
|
#include "gimppreviewrenderer.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -344,25 +345,21 @@ gimp_container_view_construct (GimpContainerView *view,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gboolean reorderable,
|
gint preview_border_width,
|
||||||
gint min_items_x,
|
gboolean reorderable)
|
||||||
gint min_items_y)
|
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_CONTAINER_VIEW (view));
|
g_return_if_fail (GIMP_IS_CONTAINER_VIEW (view));
|
||||||
g_return_if_fail (container == NULL || GIMP_IS_CONTAINER (container));
|
g_return_if_fail (container == NULL || GIMP_IS_CONTAINER (container));
|
||||||
g_return_if_fail (context == NULL || GIMP_IS_CONTEXT (context));
|
g_return_if_fail (context == NULL || GIMP_IS_CONTEXT (context));
|
||||||
g_return_if_fail (preview_size > 0 &&
|
g_return_if_fail (preview_size > 0 &&
|
||||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE);
|
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE);
|
||||||
g_return_if_fail (min_items_x <= 64);
|
g_return_if_fail (preview_border_width >= 0 &&
|
||||||
g_return_if_fail (min_items_y <= 64);
|
preview_border_width <= GIMP_PREVIEW_MAX_BORDER_WIDTH);
|
||||||
|
|
||||||
view->reorderable = reorderable ? TRUE : FALSE;
|
view->reorderable = reorderable ? TRUE : FALSE;
|
||||||
|
|
||||||
gimp_container_view_set_preview_size (view, preview_size);
|
gimp_container_view_set_preview_size (view, preview_size,
|
||||||
|
preview_border_width);
|
||||||
gimp_container_view_set_size_request (view,
|
|
||||||
(preview_size + 2) * min_items_x,
|
|
||||||
(preview_size + 2) * min_items_y);
|
|
||||||
|
|
||||||
if (container)
|
if (container)
|
||||||
gimp_container_view_set_container (view, container);
|
gimp_container_view_set_container (view, container);
|
||||||
@ -435,15 +432,20 @@ gimp_container_view_set_context (GimpContainerView *view,
|
|||||||
|
|
||||||
void
|
void
|
||||||
gimp_container_view_set_preview_size (GimpContainerView *view,
|
gimp_container_view_set_preview_size (GimpContainerView *view,
|
||||||
gint preview_size)
|
gint preview_size,
|
||||||
|
gint preview_border_width)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_CONTAINER_VIEW (view));
|
g_return_if_fail (GIMP_IS_CONTAINER_VIEW (view));
|
||||||
g_return_if_fail (preview_size > 0 &&
|
g_return_if_fail (preview_size > 0 &&
|
||||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE);
|
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE);
|
||||||
|
g_return_if_fail (preview_border_width >= 0 &&
|
||||||
|
preview_border_width <= GIMP_PREVIEW_MAX_BORDER_WIDTH);
|
||||||
|
|
||||||
if (view->preview_size != preview_size)
|
if (view->preview_size != preview_size ||
|
||||||
|
view->preview_border_width != preview_border_width)
|
||||||
{
|
{
|
||||||
view->preview_size = preview_size;
|
view->preview_size = preview_size;
|
||||||
|
view->preview_border_width = preview_border_width;
|
||||||
|
|
||||||
GIMP_CONTAINER_VIEW_GET_CLASS (view)->set_preview_size (view);
|
GIMP_CONTAINER_VIEW_GET_CLASS (view)->set_preview_size (view);
|
||||||
}
|
}
|
||||||
|
@ -99,16 +99,16 @@ void gimp_container_view_construct (GimpContainerView *view,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gboolean reorderable,
|
gint preview_border_width,
|
||||||
gint min_items_x,
|
gboolean reorderable);
|
||||||
gint min_items_y);
|
|
||||||
|
|
||||||
void gimp_container_view_set_container (GimpContainerView *view,
|
void gimp_container_view_set_container (GimpContainerView *view,
|
||||||
GimpContainer *container);
|
GimpContainer *container);
|
||||||
void gimp_container_view_set_context (GimpContainerView *view,
|
void gimp_container_view_set_context (GimpContainerView *view,
|
||||||
GimpContext *context);
|
GimpContext *context);
|
||||||
void gimp_container_view_set_preview_size (GimpContainerView *view,
|
void gimp_container_view_set_preview_size (GimpContainerView *view,
|
||||||
gint preview_size);
|
gint preview_size,
|
||||||
|
gint preview_border_width);
|
||||||
void gimp_container_view_set_name_func (GimpContainerView *view,
|
void gimp_container_view_set_name_func (GimpContainerView *view,
|
||||||
GimpItemGetNameFunc get_name_func);
|
GimpItemGetNameFunc get_name_func);
|
||||||
|
|
||||||
|
@ -132,8 +132,7 @@ gimp_data_factory_view_new (GimpViewType view_type,
|
|||||||
GimpDataEditFunc edit_func,
|
GimpDataEditFunc edit_func,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory,
|
GimpMenuFactory *menu_factory,
|
||||||
const gchar *menu_identifier)
|
const gchar *menu_identifier)
|
||||||
{
|
{
|
||||||
@ -147,8 +146,7 @@ gimp_data_factory_view_new (GimpViewType view_type,
|
|||||||
edit_func,
|
edit_func,
|
||||||
context,
|
context,
|
||||||
preview_size,
|
preview_size,
|
||||||
min_items_x,
|
preview_border_width,
|
||||||
min_items_y,
|
|
||||||
menu_factory,
|
menu_factory,
|
||||||
menu_identifier))
|
menu_identifier))
|
||||||
{
|
{
|
||||||
@ -166,8 +164,7 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
|
|||||||
GimpDataEditFunc edit_func,
|
GimpDataEditFunc edit_func,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory,
|
GimpMenuFactory *menu_factory,
|
||||||
const gchar *menu_identifier)
|
const gchar *menu_identifier)
|
||||||
{
|
{
|
||||||
@ -177,22 +174,19 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
|
|||||||
g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), FALSE);
|
g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), FALSE);
|
||||||
g_return_val_if_fail (preview_size > 0 &&
|
g_return_val_if_fail (preview_size > 0 &&
|
||||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, FALSE);
|
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, FALSE);
|
||||||
g_return_val_if_fail (min_items_x > 0 && min_items_x <= 64, FALSE);
|
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||||
g_return_val_if_fail (min_items_y > 0 && min_items_y <= 64, FALSE);
|
preview_border_width <= GIMP_PREVIEW_MAX_BORDER_WIDTH,
|
||||||
|
FALSE);
|
||||||
|
|
||||||
factory_view->factory = factory;
|
factory_view->factory = factory;
|
||||||
factory_view->data_edit_func = edit_func;
|
factory_view->data_edit_func = edit_func;
|
||||||
|
|
||||||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (factory_view),
|
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (factory_view),
|
||||||
view_type,
|
view_type,
|
||||||
factory->container,
|
factory->container, context,
|
||||||
context,
|
preview_size, preview_border_width,
|
||||||
preview_size,
|
|
||||||
FALSE, /* reorderable */
|
FALSE, /* reorderable */
|
||||||
min_items_x,
|
menu_factory, menu_identifier))
|
||||||
min_items_y,
|
|
||||||
menu_factory,
|
|
||||||
menu_identifier))
|
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -67,8 +67,7 @@ GtkWidget * gimp_data_factory_view_new (GimpViewType view_type,
|
|||||||
GimpDataEditFunc edit_func,
|
GimpDataEditFunc edit_func,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory,
|
GimpMenuFactory *menu_factory,
|
||||||
const gchar *menu_identifier);
|
const gchar *menu_identifier);
|
||||||
|
|
||||||
@ -81,8 +80,7 @@ gboolean gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
|
|||||||
GimpDataEditFunc edit_func,
|
GimpDataEditFunc edit_func,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory,
|
GimpMenuFactory *menu_factory,
|
||||||
const gchar *menu_identifier);
|
const gchar *menu_identifier);
|
||||||
|
|
||||||
|
@ -135,8 +135,7 @@ gimp_document_view_new (GimpViewType view_type,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpFileOpenDialogFunc file_open_dialog_func,
|
GimpFileOpenDialogFunc file_open_dialog_func,
|
||||||
GimpMenuFactory *menu_factory)
|
GimpMenuFactory *menu_factory)
|
||||||
{
|
{
|
||||||
@ -150,12 +149,9 @@ gimp_document_view_new (GimpViewType view_type,
|
|||||||
|
|
||||||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (document_view),
|
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (document_view),
|
||||||
view_type,
|
view_type,
|
||||||
container,
|
container, context,
|
||||||
context,
|
preview_size, preview_border_width,
|
||||||
preview_size,
|
|
||||||
TRUE, /* reorderable */
|
TRUE, /* reorderable */
|
||||||
min_items_x,
|
|
||||||
min_items_y,
|
|
||||||
menu_factory, "<Documents>"))
|
menu_factory, "<Documents>"))
|
||||||
{
|
{
|
||||||
g_object_unref (document_view);
|
g_object_unref (document_view);
|
||||||
|
@ -63,8 +63,7 @@ GtkWidget * gimp_document_view_new (GimpViewType view_type,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpFileOpenDialogFunc file_open_dialog_func,
|
GimpFileOpenDialogFunc file_open_dialog_func,
|
||||||
GimpMenuFactory *menu_factory);
|
GimpMenuFactory *menu_factory);
|
||||||
|
|
||||||
|
@ -112,8 +112,7 @@ gimp_image_view_new (GimpViewType view_type,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory)
|
GimpMenuFactory *menu_factory)
|
||||||
{
|
{
|
||||||
GimpImageView *image_view;
|
GimpImageView *image_view;
|
||||||
@ -123,12 +122,9 @@ gimp_image_view_new (GimpViewType view_type,
|
|||||||
|
|
||||||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (image_view),
|
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (image_view),
|
||||||
view_type,
|
view_type,
|
||||||
container,
|
container, context,
|
||||||
context,
|
preview_size, preview_border_width,
|
||||||
preview_size,
|
|
||||||
TRUE, /* reorderable */
|
TRUE, /* reorderable */
|
||||||
min_items_x,
|
|
||||||
min_items_y,
|
|
||||||
menu_factory, "<Images>"))
|
menu_factory, "<Images>"))
|
||||||
{
|
{
|
||||||
g_object_unref (image_view);
|
g_object_unref (image_view);
|
||||||
|
@ -57,8 +57,7 @@ GtkWidget * gimp_image_view_new (GimpViewType view_type,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory);
|
GimpMenuFactory *menu_factory);
|
||||||
|
|
||||||
|
|
||||||
|
@ -340,6 +340,7 @@ gimp_item_tree_view_destroy (GtkObject *object)
|
|||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_item_tree_view_new (gint preview_size,
|
gimp_item_tree_view_new (gint preview_size,
|
||||||
|
gint preview_border_width,
|
||||||
GimpImage *gimage,
|
GimpImage *gimage,
|
||||||
GType item_type,
|
GType item_type,
|
||||||
const gchar *signal_name,
|
const gchar *signal_name,
|
||||||
@ -355,6 +356,9 @@ gimp_item_tree_view_new (gint preview_size,
|
|||||||
|
|
||||||
g_return_val_if_fail (preview_size > 0 &&
|
g_return_val_if_fail (preview_size > 0 &&
|
||||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
||||||
|
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||||
|
preview_border_width <= GIMP_PREVIEW_MAX_BORDER_WIDTH,
|
||||||
|
NULL);
|
||||||
g_return_val_if_fail (gimage == NULL || GIMP_IS_IMAGE (gimage), NULL);
|
g_return_val_if_fail (gimage == NULL || GIMP_IS_IMAGE (gimage), NULL);
|
||||||
g_return_val_if_fail (signal_name != NULL, NULL);
|
g_return_val_if_fail (signal_name != NULL, NULL);
|
||||||
g_return_val_if_fail (new_item_func != NULL, NULL);
|
g_return_val_if_fail (new_item_func != NULL, NULL);
|
||||||
@ -387,8 +391,7 @@ gimp_item_tree_view_new (gint preview_size,
|
|||||||
|
|
||||||
gimp_container_view_construct (GIMP_CONTAINER_VIEW (item_view),
|
gimp_container_view_construct (GIMP_CONTAINER_VIEW (item_view),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
preview_size, TRUE,
|
preview_size, preview_border_width, TRUE);
|
||||||
-1, -1);
|
|
||||||
|
|
||||||
view->dnd_widget = NULL;
|
view->dnd_widget = NULL;
|
||||||
|
|
||||||
@ -919,12 +922,13 @@ static void
|
|||||||
gimp_item_tree_view_size_changed (GimpImage *gimage,
|
gimp_item_tree_view_size_changed (GimpImage *gimage,
|
||||||
GimpItemTreeView *view)
|
GimpItemTreeView *view)
|
||||||
{
|
{
|
||||||
gint preview_size;
|
GimpContainerView *container_view;
|
||||||
|
|
||||||
preview_size = GIMP_CONTAINER_VIEW (view)->preview_size;
|
container_view = GIMP_CONTAINER_VIEW (view);
|
||||||
|
|
||||||
gimp_container_view_set_preview_size (GIMP_CONTAINER_VIEW (view),
|
gimp_container_view_set_preview_size (GIMP_CONTAINER_VIEW (view),
|
||||||
preview_size);
|
container_view->preview_size,
|
||||||
|
container_view->preview_border_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -114,6 +114,7 @@ struct _GimpItemTreeViewClass
|
|||||||
GType gimp_item_tree_view_get_type (void) G_GNUC_CONST;
|
GType gimp_item_tree_view_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GtkWidget * gimp_item_tree_view_new (gint preview_size,
|
GtkWidget * gimp_item_tree_view_new (gint preview_size,
|
||||||
|
gint preview_border_width,
|
||||||
GimpImage *gimage,
|
GimpImage *gimage,
|
||||||
GType item_type,
|
GType item_type,
|
||||||
const gchar *signal_name,
|
const gchar *signal_name,
|
||||||
|
@ -231,8 +231,6 @@ gimp_layer_tree_view_init (GimpLayerTreeView *view)
|
|||||||
view->model_column_mask_visible = tree_view->n_model_columns;
|
view->model_column_mask_visible = tree_view->n_model_columns;
|
||||||
tree_view->model_columns[tree_view->n_model_columns++] = G_TYPE_BOOLEAN;
|
tree_view->model_columns[tree_view->n_model_columns++] = G_TYPE_BOOLEAN;
|
||||||
|
|
||||||
GIMP_CONTAINER_VIEW (view)->preview_border_width = 2;
|
|
||||||
|
|
||||||
view->options_box = gtk_table_new (2, 3, FALSE);
|
view->options_box = gtk_table_new (2, 3, FALSE);
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (view->options_box), 2);
|
gtk_table_set_col_spacings (GTK_TABLE (view->options_box), 2);
|
||||||
gtk_box_pack_start (GTK_BOX (view), view->options_box, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (view), view->options_box, FALSE, FALSE, 0);
|
||||||
|
@ -147,7 +147,9 @@ gimp_menu_item_real_set_viewable (GimpMenuItem *menu_item,
|
|||||||
gtk_widget_set_size_request (menu_item->preview,
|
gtk_widget_set_size_request (menu_item->preview,
|
||||||
menu_item->preview_size +
|
menu_item->preview_size +
|
||||||
2 * menu_item->preview_border_width,
|
2 * menu_item->preview_border_width,
|
||||||
-1);
|
menu_item->preview_size +
|
||||||
|
2 * menu_item->preview_border_width);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (menu_item->hbox), menu_item->preview,
|
gtk_box_pack_start (GTK_BOX (menu_item->hbox), menu_item->preview,
|
||||||
FALSE, FALSE, 0);
|
FALSE, FALSE, 0);
|
||||||
gtk_widget_show (menu_item->preview);
|
gtk_widget_show (menu_item->preview);
|
||||||
|
@ -121,8 +121,7 @@ gimp_template_view_new (GimpViewType view_type,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory)
|
GimpMenuFactory *menu_factory)
|
||||||
{
|
{
|
||||||
GimpTemplateView *template_view;
|
GimpTemplateView *template_view;
|
||||||
@ -132,12 +131,9 @@ gimp_template_view_new (GimpViewType view_type,
|
|||||||
|
|
||||||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (template_view),
|
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (template_view),
|
||||||
view_type,
|
view_type,
|
||||||
container,
|
container, context,
|
||||||
context,
|
preview_size, preview_border_width,
|
||||||
preview_size,
|
|
||||||
TRUE, /* reorderable */
|
TRUE, /* reorderable */
|
||||||
min_items_x,
|
|
||||||
min_items_y,
|
|
||||||
menu_factory, "<Templates>"))
|
menu_factory, "<Templates>"))
|
||||||
{
|
{
|
||||||
g_object_unref (template_view);
|
g_object_unref (template_view);
|
||||||
|
@ -58,8 +58,7 @@ GtkWidget * gimp_template_view_new (GimpViewType view_type,
|
|||||||
GimpContainer *container,
|
GimpContainer *container,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
gint min_items_x,
|
gint preview_border_width,
|
||||||
gint min_items_y,
|
|
||||||
GimpMenuFactory *menu_factory);
|
GimpMenuFactory *menu_factory);
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,10 +106,9 @@ gimp_undo_editor_init (GimpUndoEditor *undo_editor)
|
|||||||
{
|
{
|
||||||
undo_editor->container = NULL;
|
undo_editor->container = NULL;
|
||||||
|
|
||||||
undo_editor->view = gimp_container_tree_view_new (NULL,
|
undo_editor->view = gimp_container_tree_view_new (NULL, NULL,
|
||||||
NULL,
|
GIMP_UNDO_PREVIEW_SIZE, 1,
|
||||||
GIMP_UNDO_PREVIEW_SIZE,
|
FALSE);
|
||||||
FALSE, 3, 3);
|
|
||||||
gtk_container_add (GTK_CONTAINER (undo_editor), undo_editor->view);
|
gtk_container_add (GTK_CONTAINER (undo_editor), undo_editor->view);
|
||||||
gtk_widget_show (undo_editor->view);
|
gtk_widget_show (undo_editor->view);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user