Use GimpContainer getters instead of poking into the class

instance struct.

* app/actions/context-commands.c
* app/actions/data-commands.c
* app/actions/plug-in-commands.c
* app/actions/templates-commands.c
* app/core/gimp-utils.c
* app/core/gimpdrawablestack.c
* app/core/gimpitemstack.c
* app/core/gimplist.c
* app/gui/gui-vtable.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview-utils.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c

svn path=/trunk/; revision=27693
This commit is contained in:
Martin Nordholts 2008-11-20 23:43:58 +00:00
parent 5aeb568650
commit 2f25fb132f
24 changed files with 116 additions and 76 deletions

View File

@ -1,3 +1,32 @@
2008-11-20 Martin Nordholts <martinn@svn.gnome.org>
Use GimpContainer getters instead of poking into the class
instance struct.
* app/actions/context-commands.c
* app/actions/data-commands.c
* app/actions/plug-in-commands.c
* app/actions/templates-commands.c
* app/core/gimp-utils.c
* app/core/gimpdrawablestack.c
* app/core/gimpitemstack.c
* app/core/gimplist.c
* app/gui/gui-vtable.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview-utils.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c
2008-11-20 Martin Nordholts <martinn@svn.gnome.org>
s/gimp_container_children_type/gimp_container_get_children_type/

View File

@ -679,12 +679,14 @@ context_select_object (GimpActionSelectType select_type,
{
GimpObject *current;
current = gimp_context_get_by_type (context, container->children_type);
current = gimp_context_get_by_type (context,
gimp_container_get_children_type (container));
current = action_select_object (select_type, container, current);
if (current)
gimp_context_set_by_type (context, container->children_type, current);
gimp_context_set_by_type (context,
gimp_container_get_children_type (container), current);
}
static gint

View File

@ -82,7 +82,7 @@ data_open_as_image_cmd_callback (GtkAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
view->factory->container->children_type);
gimp_container_get_children_type (view->factory->container));
if (data && data->filename)
{
@ -135,7 +135,7 @@ data_new_cmd_callback (GtkAction *action,
if (data)
{
gimp_context_set_by_type (context,
view->factory->container->children_type,
gimp_container_get_children_type (view->factory->container),
GIMP_OBJECT (data));
gtk_button_clicked (GTK_BUTTON (view->edit_button));
@ -155,7 +155,7 @@ data_duplicate_cmd_callback (GtkAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
view->factory->container->children_type);
gimp_container_get_children_type (view->factory->container));
if (data && gimp_container_have (view->factory->container,
GIMP_OBJECT (data)))
@ -167,7 +167,7 @@ data_duplicate_cmd_callback (GtkAction *action,
if (new_data)
{
gimp_context_set_by_type (context,
view->factory->container->children_type,
gimp_container_get_children_type (view->factory->container),
GIMP_OBJECT (new_data));
gtk_button_clicked (GTK_BUTTON (view->edit_button));
@ -187,7 +187,7 @@ data_copy_location_cmd_callback (GtkAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
view->factory->container->children_type);
gimp_container_get_children_type (view->factory->container));
if (data && data->filename && *data->filename)
{
@ -214,7 +214,7 @@ data_delete_cmd_callback (GtkAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
view->factory->container->children_type);
gimp_container_get_children_type (view->factory->container));
if (data && data->deletable && gimp_container_have (view->factory->container,
GIMP_OBJECT (data)))
@ -288,7 +288,7 @@ data_edit_cmd_callback (GtkAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
view->factory->container->children_type);
gimp_container_get_children_type (view->factory->container));
if (data && gimp_container_have (view->factory->container,
GIMP_OBJECT (data)))
@ -335,7 +335,7 @@ data_delete_confirm_response (GtkWidget *dialog,
if (new_active)
gimp_context_set_by_type (delete_data->context,
factory->container->children_type,
gimp_container_get_children_type (factory->container),
new_active);
}

View File

@ -135,7 +135,7 @@ plug_in_run_cmd_callback (GtkAction *action,
context = gimp_container_view_get_context (editor->view);
object = gimp_context_get_by_type (context,
container->children_type);
gimp_container_get_children_type (container));
n_args = plug_in_collect_data_args (action, object,
procedure->args,

View File

@ -144,7 +144,8 @@ templates_duplicate_cmd_callback (GtkAction *action,
new_template = gimp_config_duplicate (GIMP_CONFIG (template));
gimp_container_add (container, GIMP_OBJECT (new_template));
gimp_context_set_by_type (context, container->children_type,
gimp_context_set_by_type (context,
gimp_container_get_children_type (container),
GIMP_OBJECT (new_template));
g_object_unref (new_template);
@ -299,7 +300,7 @@ templates_delete_response (GtkWidget *dialog,
{
if (new_active)
gimp_context_set_by_type (delete_data->context,
delete_data->container->children_type,
gimp_container_get_children_type (delete_data->container),
new_active);
gimp_container_remove (delete_data->container,

View File

@ -508,7 +508,8 @@ gimp_container_get_neighbor_of_active (GimpContainer *container,
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (GIMP_IS_OBJECT (active), NULL);
if (active == gimp_context_get_by_type (context, container->children_type))
if (active == gimp_context_get_by_type (context,
gimp_container_get_children_type (container)))
{
gint index = gimp_container_get_child_index (container, active);

View File

@ -136,7 +136,8 @@ gimp_drawable_stack_constructor (GType type,
container = GIMP_CONTAINER (object);
g_assert (g_type_is_a (container->children_type, GIMP_TYPE_DRAWABLE));
g_assert (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_DRAWABLE));
gimp_container_add_handler (container, "update",
G_CALLBACK (gimp_drawable_stack_drawable_update),

View File

@ -75,7 +75,8 @@ gimp_item_stack_constructor (GType type,
container = GIMP_CONTAINER (object);
g_assert (g_type_is_a (container->children_type, GIMP_TYPE_ITEM));
g_assert (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_ITEM));
return object;
}

View File

@ -259,7 +259,8 @@ gimp_list_reorder (GimpContainer *container,
list->list = g_list_remove (list->list, object);
if (new_index == -1 || new_index == container->num_children - 1)
if (new_index == -1 ||
new_index == gimp_container_get_n_children (container) - 1)
list->list = g_list_append (list->list, object);
else
list->list = g_list_insert (list->list, object, new_index);
@ -414,7 +415,7 @@ gimp_list_reverse (GimpList *list)
{
g_return_if_fail (GIMP_IS_LIST (list));
if (GIMP_CONTAINER (list)->num_children > 1)
if (gimp_container_get_n_children (GIMP_CONTAINER (list)) > 1)
{
gimp_container_freeze (GIMP_CONTAINER (list));
list->list = g_list_reverse (list->list);
@ -462,7 +463,7 @@ gimp_list_sort (GimpList *list,
g_return_if_fail (GIMP_IS_LIST (list));
g_return_if_fail (sort_func != NULL);
if (GIMP_CONTAINER (list)->num_children > 1)
if (gimp_container_get_n_children (GIMP_CONTAINER (list)) > 1)
{
gimp_container_freeze (GIMP_CONTAINER (list));
list->list = g_list_sort (list->list, sort_func);

View File

@ -421,31 +421,31 @@ gui_pdb_dialog_new (Gimp *gimp,
const gchar *dialog_role = NULL;
const gchar *help_id = NULL;
if (container->children_type == GIMP_TYPE_BRUSH)
if (gimp_container_get_children_type (container) == GIMP_TYPE_BRUSH)
{
dialog_type = GIMP_TYPE_BRUSH_SELECT;
dialog_role = "gimp-brush-selection";
help_id = GIMP_HELP_BRUSH_DIALOG;
}
else if (container->children_type == GIMP_TYPE_FONT)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_FONT)
{
dialog_type = GIMP_TYPE_FONT_SELECT;
dialog_role = "gimp-font-selection";
help_id = GIMP_HELP_FONT_DIALOG;
}
else if (container->children_type == GIMP_TYPE_GRADIENT)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_GRADIENT)
{
dialog_type = GIMP_TYPE_GRADIENT_SELECT;
dialog_role = "gimp-gradient-selection";
help_id = GIMP_HELP_GRADIENT_DIALOG;
}
else if (container->children_type == GIMP_TYPE_PALETTE)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_PALETTE)
{
dialog_type = GIMP_TYPE_PALETTE_SELECT;
dialog_role = "gimp-palette-selection";
help_id = GIMP_HELP_PALETTE_DIALOG;
}
else if (container->children_type == GIMP_TYPE_PATTERN)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_PATTERN)
{
dialog_type = GIMP_TYPE_PATTERN_SELECT;
dialog_role = "gimp-pattern-selection";
@ -460,7 +460,8 @@ gui_pdb_dialog_new (Gimp *gimp,
object = gimp_container_get_child_by_name (container, object_name);
if (! object)
object = gimp_context_get_by_type (context, container->children_type);
object = gimp_context_get_by_type (context,
gimp_container_get_children_type (container));
if (object)
{
@ -476,7 +477,7 @@ gui_pdb_dialog_new (Gimp *gimp,
"help-id", help_id,
"pdb", gimp->pdb,
"context", context,
"select-type", container->children_type,
"select-type", gimp_container_get_children_type (container),
"initial-object", object,
"callback-name", callback_name,
"menu-factory", global_menu_factory,
@ -533,15 +534,15 @@ gui_pdb_dialog_set (Gimp *gimp,
{
GimpPdbDialogClass *klass = NULL;
if (container->children_type == GIMP_TYPE_BRUSH)
if (gimp_container_get_children_type (container) == GIMP_TYPE_BRUSH)
klass = g_type_class_peek (GIMP_TYPE_BRUSH_SELECT);
else if (container->children_type == GIMP_TYPE_FONT)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_FONT)
klass = g_type_class_peek (GIMP_TYPE_FONT_SELECT);
else if (container->children_type == GIMP_TYPE_GRADIENT)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_GRADIENT)
klass = g_type_class_peek (GIMP_TYPE_GRADIENT_SELECT);
else if (container->children_type == GIMP_TYPE_PALETTE)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_PALETTE)
klass = g_type_class_peek (GIMP_TYPE_PALETTE_SELECT);
else if (container->children_type == GIMP_TYPE_PATTERN)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_PATTERN)
klass = g_type_class_peek (GIMP_TYPE_PATTERN_SELECT);
if (klass)
@ -550,7 +551,7 @@ gui_pdb_dialog_set (Gimp *gimp,
dialog = gimp_pdb_dialog_get_by_callback (klass, callback_name);
if (dialog && dialog->select_type == container->children_type)
if (dialog && dialog->select_type == gimp_container_get_children_type (container))
{
GimpObject *object;
@ -583,15 +584,15 @@ gui_pdb_dialog_close (Gimp *gimp,
{
GimpPdbDialogClass *klass = NULL;
if (container->children_type == GIMP_TYPE_BRUSH)
if (gimp_container_get_children_type (container) == GIMP_TYPE_BRUSH)
klass = g_type_class_peek (GIMP_TYPE_BRUSH_SELECT);
else if (container->children_type == GIMP_TYPE_FONT)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_FONT)
klass = g_type_class_peek (GIMP_TYPE_FONT_SELECT);
else if (container->children_type == GIMP_TYPE_GRADIENT)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_GRADIENT)
klass = g_type_class_peek (GIMP_TYPE_GRADIENT_SELECT);
else if (container->children_type == GIMP_TYPE_PALETTE)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_PALETTE)
klass = g_type_class_peek (GIMP_TYPE_PALETTE_SELECT);
else if (container->children_type == GIMP_TYPE_PATTERN)
else if (gimp_container_get_children_type (container) == GIMP_TYPE_PATTERN)
klass = g_type_class_peek (GIMP_TYPE_PATTERN_SELECT);
if (klass)
@ -600,7 +601,7 @@ gui_pdb_dialog_close (Gimp *gimp,
dialog = gimp_pdb_dialog_get_by_callback (klass, callback_name);
if (dialog && dialog->select_type == container->children_type)
if (dialog && dialog->select_type == gimp_container_get_children_type (container))
{
gtk_widget_destroy (GTK_WIDGET (dialog));
return TRUE;

View File

@ -175,7 +175,7 @@ gimp_container_box_get_preview (GimpDocked *docked,
gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (GTK_WIDGET (box)),
size, &width, &height);
prop_name = gimp_context_type_to_prop_name (container->children_type);
prop_name = gimp_context_type_to_prop_name (gimp_container_get_children_type (container));
preview = gimp_prop_view_new (G_OBJECT (context), prop_name,
context, height);

View File

@ -379,7 +379,7 @@ gimp_container_combo_box_reorder_item (GimpContainerView *view,
if (!iter)
return;
if (new_index == -1 || new_index == container->num_children - 1)
if (new_index == -1 || new_index == gimp_container_get_n_children (container) - 1)
{
gtk_list_store_move_before (GTK_LIST_STORE (model), iter, NULL);
}

View File

@ -175,7 +175,7 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
{
GimpObject *object = gimp_context_get_by_type (context,
container->children_type);
gimp_container_get_children_type (container));
gimp_container_editor_select_item (GTK_WIDGET (editor->view),
(GimpViewable *) object, NULL,

View File

@ -297,7 +297,8 @@ gimp_container_entry_reorder_item (GimpContainerView *view,
if (!iter)
return;
if (new_index == -1 || new_index == container->num_children - 1)
if (new_index == -1 ||
new_index == gimp_container_get_n_children (container) - 1)
{
gtk_list_store_move_before (GTK_LIST_STORE (model), iter, NULL);
}

View File

@ -263,12 +263,12 @@ gimp_container_grid_view_move_by (GimpContainerGridView *grid_view,
index = gimp_container_get_child_index (container, GIMP_OBJECT (item));
index += x;
index = CLAMP (index, 0, container->num_children - 1);
index = CLAMP (index, 0, gimp_container_get_n_children (container) - 1);
index += y * grid_view->columns;
while (index < 0)
index += grid_view->columns;
while (index >= container->num_children)
while (index >= gimp_container_get_n_children (container))
index -= grid_view->columns;
item = (GimpViewable *) gimp_container_get_child_by_index (container, index);
@ -299,7 +299,7 @@ gimp_container_grid_view_move_cursor (GimpContainerGridView *grid_view,
count * grid_view->visible_rows);
case GTK_MOVEMENT_BUFFER_ENDS:
count = count < 0 ? 0 : container->num_children - 1;
count = count < 0 ? 0 : gimp_container_get_n_children (container) - 1;
item = (GimpViewable *) gimp_container_get_child_by_index (container,
count);

View File

@ -287,9 +287,9 @@ gimp_container_popup_real_confirm (GimpContainerPopup *popup)
GimpObject *object;
object = gimp_context_get_by_type (popup->context,
popup->container->children_type);
gimp_container_get_children_type (popup->container));
gimp_context_set_by_type (popup->orig_context,
popup->container->children_type,
gimp_container_get_children_type (popup->container),
object);
if (gtk_grab_get_current () == widget)
@ -369,7 +369,7 @@ gimp_container_popup_new (GimpContainer *container,
popup->view_border_width = view_border_width;
g_signal_connect (popup->context,
gimp_context_type_to_signal_name (container->children_type),
gimp_context_type_to_signal_name (gimp_container_get_children_type (container)),
G_CALLBACK (gimp_container_popup_context_changed),
popup);

View File

@ -485,7 +485,7 @@ gimp_container_tree_view_real_drop_possible (GimpContainerTreeView *tree_view,
gint dest_index = -1;
if (src_viewable && g_type_is_a (G_TYPE_FROM_INSTANCE (src_viewable),
container->children_type))
gimp_container_get_children_type (container)))
{
if (src_viewable == dest_viewable)
return FALSE;
@ -525,7 +525,7 @@ gimp_container_tree_view_real_drop_possible (GimpContainerTreeView *tree_view,
if (return_drag_action)
{
if (src_viewable && g_type_is_a (G_TYPE_FROM_INSTANCE (src_viewable),
container->children_type))
gimp_container_get_children_type (container)))
*return_drag_action = GDK_ACTION_MOVE;
else
*return_drag_action = GDK_ACTION_COPY;

View File

@ -509,9 +509,9 @@ gimp_container_tree_view_set_container (GimpContainerView *view,
if (! container)
{
if (gimp_dnd_viewable_source_remove (GTK_WIDGET (tree_view->view),
old_container->children_type))
gimp_container_get_children_type (old_container)))
{
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (old_container->children_type))->get_size)
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_children_type (old_container)))->get_size)
gimp_dnd_pixbuf_source_remove (GTK_WIDGET (tree_view->view));
gtk_drag_source_unset (GTK_WIDGET (tree_view->view));
@ -526,15 +526,15 @@ gimp_container_tree_view_set_container (GimpContainerView *view,
{
if (gimp_dnd_drag_source_set_by_type (GTK_WIDGET (tree_view->view),
GDK_BUTTON1_MASK | GDK_BUTTON2_MASK,
container->children_type,
gimp_container_get_children_type (container),
GDK_ACTION_COPY))
{
gimp_dnd_viewable_source_add (GTK_WIDGET (tree_view->view),
container->children_type,
gimp_container_get_children_type (container),
gimp_container_tree_view_drag_viewable,
tree_view);
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (container->children_type))->get_size)
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_children_type (container)))->get_size)
gimp_dnd_pixbuf_source_add (GTK_WIDGET (tree_view->view),
gimp_container_tree_view_drag_pixbuf,
tree_view);
@ -663,7 +663,8 @@ gimp_container_tree_view_reorder_item (GimpContainerView *view,
g_object_unref (renderer);
}
if (new_index == -1 || new_index == container->num_children - 1)
if (new_index == -1 ||
new_index == gimp_container_get_n_children (container) - 1)
{
gtk_list_store_move_before (GTK_LIST_STORE (tree_view->model),
iter, NULL);

View File

@ -73,7 +73,7 @@ gimp_container_view_remove_active (GimpContainerView *view)
{
GimpObject *active;
active = gimp_context_get_by_type (context, container->children_type);
active = gimp_context_get_by_type (context, gimp_container_get_children_type (container));
if (active)
{
@ -83,7 +83,8 @@ gimp_container_view_remove_active (GimpContainerView *view)
active);
if (new)
gimp_context_set_by_type (context, container->children_type,
gimp_context_set_by_type (context,
gimp_container_get_children_type (container),
new);
gimp_container_remove (container, active);

View File

@ -347,7 +347,7 @@ gimp_container_view_set_container (GimpContainerView *view,
g_return_if_fail (GIMP_IS_CONTAINER_VIEW (view));
g_return_if_fail (container == NULL || GIMP_IS_CONTAINER (container));
if (container)
g_return_if_fail (g_type_is_a (container->children_type,
g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_VIEWABLE));
private = GIMP_CONTAINER_VIEW_GET_PRIVATE (view);
@ -392,7 +392,7 @@ gimp_container_view_real_set_container (GimpContainerView *view,
if (private->context)
{
GType children_type = private->container->children_type;
GType children_type = gimp_container_get_children_type (private->container);
const gchar *signal_name;
signal_name = gimp_context_type_to_signal_name (children_type);
@ -417,7 +417,7 @@ gimp_container_view_real_set_container (GimpContainerView *view,
if (private->container)
{
GType children_type = private->container->children_type;
GType children_type = gimp_container_get_children_type (private->container);
GimpViewableClass *viewable_class;
viewable_class = g_type_class_ref (children_type);
@ -526,7 +526,7 @@ gimp_container_view_real_set_context (GimpContainerView *view,
{
if (private->container)
{
GType children_type = private->container->children_type;
GType children_type = gimp_container_get_children_type (private->container);
const gchar *signal_name;
signal_name = gimp_context_type_to_signal_name (children_type);
@ -557,7 +557,7 @@ gimp_container_view_real_set_context (GimpContainerView *view,
if (private->container)
{
GType children_type = private->container->children_type;
GType children_type = gimp_container_get_children_type (private->container);
const gchar *signal_name;
signal_name = gimp_context_type_to_signal_name (children_type);
@ -800,7 +800,7 @@ gimp_container_view_item_selected (GimpContainerView *view,
/* HACK */
if (private->container && private->context)
{
GType children_type = private->container->children_type;
GType children_type = gimp_container_get_children_type (private->container);
const gchar *signal_name;
signal_name = gimp_context_type_to_signal_name (children_type);
@ -830,7 +830,7 @@ gimp_container_view_item_selected (GimpContainerView *view,
view);
gimp_context_set_by_type (context,
private->container->children_type,
gimp_container_get_children_type (private->container),
GIMP_OBJECT (viewable));
g_signal_handlers_unblock_by_func (context,
@ -1081,7 +1081,7 @@ gimp_container_view_thaw (GimpContainerView *view,
if (private->context)
{
GType children_type = private->container->children_type;
GType children_type = gimp_container_get_children_type (private->container);
const gchar *signal_name;
signal_name = gimp_context_type_to_signal_name (children_type);

View File

@ -353,7 +353,7 @@ gimp_data_editor_set_context (GimpDocked *docked,
g_object_ref (editor->context);
data_type = editor->data_factory->container->children_type;
data_type = gimp_container_get_children_type (editor->data_factory->container);
data = GIMP_DATA (gimp_context_get_by_type (editor->context, data_type));
g_signal_connect (editor->context,
@ -496,7 +496,7 @@ gimp_data_editor_set_data (GimpDataEditor *editor,
g_return_if_fail (data == NULL || GIMP_IS_DATA (data));
g_return_if_fail (data == NULL ||
g_type_is_a (G_TYPE_FROM_INSTANCE (data),
editor->data_factory->container->children_type));
gimp_container_get_children_type (editor->data_factory->container)));
if (editor->data != data)
{
@ -533,7 +533,7 @@ gimp_data_editor_set_edit_active (GimpDataEditor *editor,
GType data_type;
GimpData *data;
data_type = editor->data_factory->container->children_type;
data_type = gimp_container_get_children_type (editor->data_factory->container);
data = GIMP_DATA (gimp_context_get_by_type (editor->context,
data_type));

View File

@ -198,13 +198,13 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (factory_view->edit_button),
factory->container->children_type);
gimp_container_get_children_type (factory->container));
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (factory_view->duplicate_button),
factory->container->children_type);
gimp_container_get_children_type (factory->container));
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (factory_view->delete_button),
factory->container->children_type);
gimp_container_get_children_type (factory->container));
gimp_ui_manager_update (GIMP_EDITOR (editor->view)->ui_manager, editor);

View File

@ -427,7 +427,7 @@ gimp_settings_box_get_property (GObject *object,
static void
gimp_settings_box_separator_add (GimpContainer *container)
{
GimpObject *sep = g_object_new (container->children_type, NULL);
GimpObject *sep = g_object_new (gimp_container_get_children_type (container), NULL);
gimp_container_add (container, sep);
g_object_unref (sep);

View File

@ -190,7 +190,7 @@ gimp_viewable_button_scroll_event (GtkWidget *widget,
gint index;
object = gimp_context_get_by_type (button->context,
button->container->children_type);
gimp_container_get_children_type (button->container));
index = gimp_container_get_child_index (button->container, object);
@ -223,7 +223,7 @@ gimp_viewable_button_scroll_event (GtkWidget *widget,
if (object)
gimp_context_set_by_type (button->context,
button->container->children_type,
gimp_container_get_children_type (button->container),
object);
}
}
@ -321,7 +321,7 @@ gimp_viewable_button_new (GimpContainer *container,
button->dialog_tooltip = g_strdup (dialog_tooltip);
}
prop_name = gimp_context_type_to_prop_name (container->children_type);
prop_name = gimp_context_type_to_prop_name (gimp_container_get_children_type (container));
button->view = gimp_prop_view_new (G_OBJECT (context), prop_name,
context, button->button_view_size);