mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
app, pdb: rename gimp_container_get_children_type() to get_child_type()
This commit is contained in:
@@ -895,17 +895,16 @@ context_select_object (GimpActionSelectType select_type,
|
||||
GimpContainer *container)
|
||||
{
|
||||
GimpObject *current;
|
||||
GType child_type;
|
||||
|
||||
current =
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_container_get_children_type (container));
|
||||
child_type = gimp_container_get_child_type (container);
|
||||
|
||||
current = gimp_context_get_by_type (context, child_type);
|
||||
|
||||
current = action_select_object (select_type, container, current);
|
||||
|
||||
if (current)
|
||||
gimp_context_set_by_type (context,
|
||||
gimp_container_get_children_type (container),
|
||||
current);
|
||||
gimp_context_set_by_type (context, child_type, current);
|
||||
}
|
||||
|
||||
static gint
|
||||
|
@@ -102,7 +102,7 @@ plug_in_run_cmd_callback (GimpAction *action,
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
|
||||
object = gimp_context_get_by_type (context,
|
||||
gimp_container_get_children_type (container));
|
||||
gimp_container_get_child_type (container));
|
||||
|
||||
args = procedure_commands_get_data_args (procedure, object);
|
||||
}
|
||||
|
@@ -166,7 +166,7 @@ templates_duplicate_cmd_callback (GimpAction *action,
|
||||
|
||||
gimp_container_add (container, GIMP_OBJECT (new_template));
|
||||
gimp_context_set_by_type (context,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
GIMP_OBJECT (new_template));
|
||||
g_object_unref (new_template);
|
||||
|
||||
@@ -326,7 +326,7 @@ templates_delete_response (GtkWidget *dialog,
|
||||
{
|
||||
if (new_active)
|
||||
gimp_context_set_by_type (delete_data->context,
|
||||
gimp_container_get_children_type (delete_data->container),
|
||||
gimp_container_get_child_type (delete_data->container),
|
||||
new_active);
|
||||
|
||||
gimp_container_remove (delete_data->container,
|
||||
|
@@ -71,7 +71,7 @@ gimp_container_filter (GimpContainer *container,
|
||||
|
||||
result =
|
||||
g_object_new (G_TYPE_FROM_INSTANCE (container),
|
||||
"child-type", gimp_container_get_children_type (container),
|
||||
"child-type", gimp_container_get_child_type (container),
|
||||
"policy", GIMP_CONTAINER_POLICY_WEAK,
|
||||
NULL);
|
||||
|
||||
|
@@ -363,7 +363,7 @@ gimp_container_real_remove (GimpContainer *container,
|
||||
static GType
|
||||
gimp_container_get_item_type (GListModel *list)
|
||||
{
|
||||
return gimp_container_get_children_type (GIMP_CONTAINER (list));
|
||||
return gimp_container_get_child_type (GIMP_CONTAINER (list));
|
||||
}
|
||||
|
||||
static guint
|
||||
@@ -603,7 +603,7 @@ gimp_container_free_handler (GimpContainer *container,
|
||||
}
|
||||
|
||||
GType
|
||||
gimp_container_get_children_type (GimpContainer *container)
|
||||
gimp_container_get_child_type (GimpContainer *container)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), G_TYPE_NONE);
|
||||
|
||||
|
@@ -84,7 +84,7 @@ struct _GimpContainerClass
|
||||
|
||||
GType gimp_container_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GType gimp_container_get_children_type (GimpContainer *container);
|
||||
GType gimp_container_get_child_type (GimpContainer *container);
|
||||
GimpContainerPolicy gimp_container_get_policy (GimpContainer *container);
|
||||
gint gimp_container_get_n_children (GimpContainer *container);
|
||||
|
||||
|
@@ -850,7 +850,7 @@ gimp_data_factory_get_data_type (GimpDataFactory *factory)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), G_TYPE_NONE);
|
||||
|
||||
return gimp_container_get_children_type (factory->priv->container);
|
||||
return gimp_container_get_child_type (factory->priv->container);
|
||||
}
|
||||
|
||||
GimpContainer *
|
||||
|
@@ -104,7 +104,7 @@ gimp_drawable_stack_constructed (GObject *object)
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
|
||||
gimp_assert (g_type_is_a (gimp_container_get_child_type (container),
|
||||
GIMP_TYPE_DRAWABLE));
|
||||
|
||||
gimp_container_add_handler (container, "update",
|
||||
|
@@ -309,7 +309,7 @@ gimp_filtered_container_new (GimpContainer *src_container,
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_LIST (src_container), NULL);
|
||||
|
||||
child_type = gimp_container_get_children_type (src_container);
|
||||
child_type = gimp_container_get_child_type (src_container);
|
||||
sort_func = gimp_list_get_sort_func (GIMP_LIST (src_container));
|
||||
|
||||
return g_object_new (GIMP_TYPE_FILTERED_CONTAINER,
|
||||
|
@@ -83,7 +83,7 @@ gimp_filter_stack_constructed (GObject *object)
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
|
||||
gimp_assert (g_type_is_a (gimp_container_get_child_type (container),
|
||||
GIMP_TYPE_FILTER));
|
||||
|
||||
gimp_container_add_handler (container, "active-changed",
|
||||
|
@@ -73,7 +73,7 @@ gimp_item_stack_constructed (GObject *object)
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
|
||||
gimp_assert (g_type_is_a (gimp_container_get_child_type (container),
|
||||
GIMP_TYPE_ITEM));
|
||||
}
|
||||
|
||||
|
@@ -85,7 +85,7 @@ gimp_layer_stack_constructed (GObject *object)
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
|
||||
gimp_assert (g_type_is_a (gimp_container_get_child_type (container),
|
||||
GIMP_TYPE_LAYER));
|
||||
|
||||
gimp_container_add_handler (container, "active-changed",
|
||||
|
@@ -266,7 +266,7 @@ gimp_tagged_container_new (GimpContainer *src_container)
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_LIST (src_container), NULL);
|
||||
|
||||
child_type = gimp_container_get_children_type (src_container);
|
||||
child_type = gimp_container_get_child_type (src_container);
|
||||
sort_func = gimp_list_get_sort_func (GIMP_LIST (src_container));
|
||||
|
||||
tagged_container = g_object_new (GIMP_TYPE_TAGGED_CONTAINER,
|
||||
|
@@ -532,7 +532,7 @@ gimp_tree_proxy_new_for_container (GimpContainer *container)
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), NULL);
|
||||
|
||||
tree_proxy = GIMP_TREE_PROXY (
|
||||
gimp_tree_proxy_new (gimp_container_get_children_type (container)));
|
||||
gimp_tree_proxy_new (gimp_container_get_child_type (container)));
|
||||
|
||||
gimp_tree_proxy_set_container (tree_proxy, container);
|
||||
|
||||
@@ -551,12 +551,12 @@ gimp_tree_proxy_set_container (GimpTreeProxy *tree_proxy,
|
||||
GTypeClass *children_class;
|
||||
|
||||
children_class = g_type_class_ref (
|
||||
gimp_container_get_children_type (container));
|
||||
gimp_container_get_child_type (container));
|
||||
|
||||
g_return_if_fail (
|
||||
G_TYPE_CHECK_CLASS_TYPE (
|
||||
children_class,
|
||||
gimp_container_get_children_type (GIMP_CONTAINER (tree_proxy))));
|
||||
gimp_container_get_child_type (GIMP_CONTAINER (tree_proxy))));
|
||||
|
||||
g_type_class_unref (children_class);
|
||||
}
|
||||
|
@@ -136,7 +136,7 @@ data_delete_dialog_response (GtkWidget *dialog,
|
||||
if (private->context &&
|
||||
GIMP_OBJECT (data) ==
|
||||
gimp_context_get_by_type (private->context,
|
||||
gimp_container_get_children_type (container)))
|
||||
gimp_container_get_child_type (container)))
|
||||
{
|
||||
new_active = gimp_container_get_neighbor_of (container,
|
||||
GIMP_OBJECT (data));
|
||||
@@ -152,7 +152,7 @@ data_delete_dialog_response (GtkWidget *dialog,
|
||||
|
||||
if (new_active)
|
||||
gimp_context_set_by_type (private->context,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
new_active);
|
||||
}
|
||||
|
||||
|
@@ -296,7 +296,7 @@ gimp_operation_config_serialize (Gimp *gimp,
|
||||
}
|
||||
else
|
||||
{
|
||||
GType config_type = gimp_container_get_children_type (container);
|
||||
GType config_type = gimp_container_get_child_type (container);
|
||||
|
||||
file = gimp_operation_config_get_file (config_type);
|
||||
}
|
||||
@@ -339,7 +339,7 @@ gimp_operation_config_deserialize (Gimp *gimp,
|
||||
}
|
||||
else
|
||||
{
|
||||
GType config_type = gimp_container_get_children_type (container);
|
||||
GType config_type = gimp_container_get_child_type (container);
|
||||
|
||||
file = gimp_operation_config_get_file (config_type);
|
||||
}
|
||||
@@ -631,7 +631,7 @@ gimp_operation_config_add_sep (GimpContainer *container)
|
||||
|
||||
if (! sep)
|
||||
{
|
||||
sep = g_object_new (gimp_container_get_children_type (container),
|
||||
sep = g_object_new (gimp_container_get_child_type (container),
|
||||
NULL);
|
||||
|
||||
gimp_container_add (container, sep);
|
||||
|
@@ -66,7 +66,7 @@ brushes_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, brush_callback,
|
||||
GIMP_OBJECT (initial_brush), NULL))
|
||||
success = FALSE;
|
||||
@@ -96,7 +96,7 @@ brushes_close_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
brush_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ brushes_set_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
brush_callback, GIMP_OBJECT (brush), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ fonts_popup_invoker (GimpProcedure *procedure,
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
|
||||
! gimp_data_factory_data_wait (gimp->font_factory) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, font_callback,
|
||||
GIMP_OBJECT (initial_font), NULL))
|
||||
success = FALSE;
|
||||
@@ -97,7 +97,7 @@ fonts_close_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
font_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ fonts_set_popup_invoker (GimpProcedure *procedure,
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
|
||||
! gimp_data_factory_data_wait (gimp->font_factory) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
font_callback, GIMP_OBJECT (font), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ gradients_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, gradient_callback,
|
||||
GIMP_OBJECT (initial_gradient), NULL))
|
||||
success = FALSE;
|
||||
@@ -102,7 +102,7 @@ gradients_close_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
gradient_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ gradients_set_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
gradient_callback, GIMP_OBJECT (gradient), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ palettes_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, palette_callback,
|
||||
GIMP_OBJECT (initial_palette), NULL))
|
||||
success = FALSE;
|
||||
@@ -96,7 +96,7 @@ palettes_close_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
palette_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ palettes_set_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
palette_callback, GIMP_OBJECT (palette), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ patterns_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, pattern_callback,
|
||||
GIMP_OBJECT (initial_pattern), NULL))
|
||||
success = FALSE;
|
||||
@@ -96,7 +96,7 @@ patterns_close_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
pattern_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ patterns_set_popup_invoker (GimpProcedure *procedure,
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
pattern_callback, GIMP_OBJECT (pattern), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
@@ -203,7 +203,8 @@ gimp_container_box_get_preview (GimpDocked *docked,
|
||||
|
||||
gtk_icon_size_lookup (size, &width, &height);
|
||||
|
||||
prop_name = gimp_context_type_to_prop_name (gimp_container_get_children_type (container));
|
||||
prop_name =
|
||||
gimp_context_type_to_prop_name (gimp_container_get_child_type (container));
|
||||
|
||||
preview = gimp_prop_view_new (G_OBJECT (context), prop_name,
|
||||
context, height);
|
||||
|
@@ -291,7 +291,7 @@ gimp_container_editor_constructed (GObject *object)
|
||||
{
|
||||
GList *objects = NULL;
|
||||
GimpObject *object = gimp_context_get_by_type (editor->priv->context,
|
||||
gimp_container_get_children_type (editor->priv->container));
|
||||
gimp_container_get_child_type (editor->priv->container));
|
||||
|
||||
if (object)
|
||||
objects = g_list_prepend (objects, object);
|
||||
@@ -464,7 +464,7 @@ gimp_container_editor_select_items (GimpContainerView *view,
|
||||
const gchar *signal_name;
|
||||
GType child_type;
|
||||
|
||||
child_type = gimp_container_get_children_type (editor->priv->container);
|
||||
child_type = gimp_container_get_child_type (editor->priv->container);
|
||||
signal_name = gimp_context_type_to_signal_name (child_type);
|
||||
|
||||
if (signal_name)
|
||||
|
@@ -322,9 +322,9 @@ gimp_container_icon_view_set_container (GimpContainerView *view,
|
||||
if (! container)
|
||||
{
|
||||
if (gimp_dnd_viewable_source_remove (GTK_WIDGET (icon_view->view),
|
||||
gimp_container_get_children_type (old_container)))
|
||||
gimp_container_get_child_type (old_container)))
|
||||
{
|
||||
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_children_type (old_container)))->get_size)
|
||||
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_child_type (old_container)))->get_size)
|
||||
gimp_dnd_pixbuf_source_remove (GTK_WIDGET (icon_view->view));
|
||||
|
||||
gtk_drag_source_unset (GTK_WIDGET (icon_view->view));
|
||||
@@ -339,15 +339,15 @@ gimp_container_icon_view_set_container (GimpContainerView *view,
|
||||
{
|
||||
if (gimp_dnd_drag_source_set_by_type (GTK_WIDGET (icon_view->view),
|
||||
GDK_BUTTON1_MASK | GDK_BUTTON2_MASK,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
GDK_ACTION_COPY))
|
||||
{
|
||||
gimp_dnd_viewable_source_add (GTK_WIDGET (icon_view->view),
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
gimp_container_icon_view_drag_viewable,
|
||||
icon_view);
|
||||
|
||||
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_children_type (container)))->get_size)
|
||||
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_child_type (container)))->get_size)
|
||||
gimp_dnd_pixbuf_source_add (GTK_WIDGET (icon_view->view),
|
||||
gimp_container_icon_view_drag_pixbuf,
|
||||
icon_view);
|
||||
@@ -908,7 +908,7 @@ gimp_container_icon_view_get_selected (GimpContainerView *view,
|
||||
GType child_type;
|
||||
|
||||
context = gimp_container_view_get_context (view);
|
||||
child_type = gimp_container_get_children_type (container);
|
||||
child_type = gimp_container_get_child_type (container);
|
||||
signal_name = gimp_context_type_to_signal_name (child_type);
|
||||
|
||||
/* As a special case, for containers tied to a context object, we
|
||||
|
@@ -118,9 +118,9 @@ gimp_container_popup_confirm (GimpPopup *popup)
|
||||
GimpObject *object;
|
||||
|
||||
object = gimp_context_get_by_type (c_popup->context,
|
||||
gimp_container_get_children_type (c_popup->container));
|
||||
gimp_container_get_child_type (c_popup->container));
|
||||
gimp_context_set_by_type (c_popup->orig_context,
|
||||
gimp_container_get_children_type (c_popup->container),
|
||||
gimp_container_get_child_type (c_popup->container),
|
||||
object);
|
||||
|
||||
GIMP_POPUP_CLASS (parent_class)->confirm (popup);
|
||||
@@ -174,7 +174,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 (gimp_container_get_children_type (container)),
|
||||
gimp_context_type_to_signal_name (gimp_container_get_child_type (container)),
|
||||
G_CALLBACK (gimp_container_popup_context_changed),
|
||||
popup);
|
||||
|
||||
@@ -341,7 +341,7 @@ gimp_container_popup_create_view (GimpContainerPopup *popup)
|
||||
/* Special-casing the object types managed by the context to make sure
|
||||
* the right items are selected when opening the popup.
|
||||
*/
|
||||
child_type = gimp_container_get_children_type (popup->container);
|
||||
child_type = gimp_container_get_child_type (popup->container);
|
||||
signal_name = gimp_context_type_to_signal_name (child_type);
|
||||
|
||||
if (signal_name)
|
||||
|
@@ -765,7 +765,7 @@ gimp_container_tree_view_real_drop_possible (GimpContainerTreeView *tree_view,
|
||||
|
||||
|
||||
if (g_type_is_a (G_TYPE_FROM_INSTANCE (src_viewable),
|
||||
gimp_container_get_children_type (container)))
|
||||
gimp_container_get_child_type (container)))
|
||||
{
|
||||
/* The drop won't change a thing. This is not a fatal drop
|
||||
* failure, unless there is only one source viewable.
|
||||
@@ -805,7 +805,7 @@ gimp_container_tree_view_real_drop_possible (GimpContainerTreeView *tree_view,
|
||||
if (return_drag_action)
|
||||
{
|
||||
if (! g_type_is_a (G_TYPE_FROM_INSTANCE (src_viewable),
|
||||
gimp_container_get_children_type (container)))
|
||||
gimp_container_get_child_type (container)))
|
||||
*return_drag_action = GDK_ACTION_COPY;
|
||||
}
|
||||
}
|
||||
|
@@ -650,9 +650,9 @@ gimp_container_tree_view_set_container (GimpContainerView *view,
|
||||
if (! container)
|
||||
{
|
||||
if (gimp_dnd_viewable_list_source_remove (GTK_WIDGET (tree_view->view),
|
||||
gimp_container_get_children_type (old_container)))
|
||||
gimp_container_get_child_type (old_container)))
|
||||
{
|
||||
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_children_type (old_container)))->get_size)
|
||||
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_child_type (old_container)))->get_size)
|
||||
gimp_dnd_pixbuf_source_remove (GTK_WIDGET (tree_view->view));
|
||||
|
||||
gtk_drag_source_unset (GTK_WIDGET (tree_view->view));
|
||||
@@ -667,19 +667,19 @@ 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,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
GDK_ACTION_COPY))
|
||||
{
|
||||
gimp_dnd_viewable_list_source_add (GTK_WIDGET (tree_view->view),
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
gimp_container_tree_view_drag_viewable_list,
|
||||
tree_view);
|
||||
gimp_dnd_viewable_source_add (GTK_WIDGET (tree_view->view),
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
gimp_container_tree_view_drag_viewable,
|
||||
tree_view);
|
||||
|
||||
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_children_type (container)))->get_size)
|
||||
if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_child_type (container)))->get_size)
|
||||
gimp_dnd_pixbuf_source_add (GTK_WIDGET (tree_view->view),
|
||||
gimp_container_tree_view_drag_pixbuf,
|
||||
tree_view);
|
||||
|
@@ -73,7 +73,7 @@ gimp_container_view_remove_active (GimpContainerView *view)
|
||||
GType child_type;
|
||||
GimpObject *active;
|
||||
|
||||
child_type = gimp_container_get_children_type (container);
|
||||
child_type = gimp_container_get_child_type (container);
|
||||
|
||||
active = gimp_context_get_by_type (context, child_type);
|
||||
|
||||
|
@@ -323,7 +323,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 (gimp_container_get_children_type (container),
|
||||
g_return_if_fail (g_type_is_a (gimp_container_get_child_type (container),
|
||||
GIMP_TYPE_VIEWABLE));
|
||||
|
||||
private = GIMP_CONTAINER_VIEW_GET_PRIVATE (view);
|
||||
@@ -623,7 +623,7 @@ gimp_container_view_item_selected (GimpContainerView *view,
|
||||
GType child_type;
|
||||
const gchar *signal_name;
|
||||
|
||||
child_type = gimp_container_get_children_type (private->container);
|
||||
child_type = gimp_container_get_child_type (private->container);
|
||||
signal_name = gimp_context_type_to_signal_name (child_type);
|
||||
|
||||
if (signal_name)
|
||||
@@ -646,7 +646,7 @@ gimp_container_view_item_selected (GimpContainerView *view,
|
||||
* become NULL by calling gimp_context_set_by_type()
|
||||
*/
|
||||
context = g_object_ref (private->context);
|
||||
child_type = gimp_container_get_children_type (private->container);
|
||||
child_type = gimp_container_get_child_type (private->container);
|
||||
|
||||
g_signal_handlers_block_by_func (context,
|
||||
gimp_container_view_context_changed,
|
||||
@@ -981,7 +981,7 @@ gimp_container_view_real_get_selected (GimpContainerView *view,
|
||||
if (! private->container || ! private->context)
|
||||
return 0;
|
||||
|
||||
child_type = gimp_container_get_children_type (private->container);
|
||||
child_type = gimp_container_get_child_type (private->container);
|
||||
if (gimp_context_type_to_property (child_type) == -1)
|
||||
{
|
||||
/* If you experience this warning, it means you should implement
|
||||
@@ -1021,7 +1021,7 @@ gimp_container_view_add_container (GimpContainerView *view,
|
||||
GType child_type;
|
||||
GimpViewableClass *viewable_class;
|
||||
|
||||
child_type = gimp_container_get_children_type (container);
|
||||
child_type = gimp_container_get_child_type (container);
|
||||
viewable_class = g_type_class_ref (child_type);
|
||||
|
||||
private->name_changed_handler =
|
||||
@@ -1237,7 +1237,7 @@ gimp_container_view_thaw (GimpContainerView *view,
|
||||
GType child_type;
|
||||
const gchar *signal_name;
|
||||
|
||||
child_type = gimp_container_get_children_type (private->container);
|
||||
child_type = gimp_container_get_child_type (private->container);
|
||||
signal_name = gimp_context_type_to_signal_name (child_type);
|
||||
|
||||
if (signal_name)
|
||||
@@ -1292,7 +1292,7 @@ gimp_container_view_connect_context (GimpContainerView *view)
|
||||
GType child_type;
|
||||
const gchar *signal_name;
|
||||
|
||||
child_type = gimp_container_get_children_type (private->container);
|
||||
child_type = gimp_container_get_child_type (private->container);
|
||||
signal_name = gimp_context_type_to_signal_name (child_type);
|
||||
|
||||
if (signal_name)
|
||||
@@ -1325,7 +1325,7 @@ gimp_container_view_disconnect_context (GimpContainerView *view)
|
||||
GType child_type;
|
||||
const gchar *signal_name;
|
||||
|
||||
child_type = gimp_container_get_children_type (private->container);
|
||||
child_type = gimp_container_get_child_type (private->container);
|
||||
signal_name = gimp_context_type_to_signal_name (child_type);
|
||||
|
||||
if (signal_name)
|
||||
|
@@ -179,7 +179,7 @@ gimp_viewable_button_scroll_event (GtkWidget *widget,
|
||||
gint index;
|
||||
|
||||
object = gimp_context_get_by_type (button->context,
|
||||
gimp_container_get_children_type (button->container));
|
||||
gimp_container_get_child_type (button->container));
|
||||
|
||||
index = gimp_container_get_child_index (button->container, object);
|
||||
|
||||
@@ -212,7 +212,7 @@ gimp_viewable_button_scroll_event (GtkWidget *widget,
|
||||
|
||||
if (object)
|
||||
gimp_context_set_by_type (button->context,
|
||||
gimp_container_get_children_type (button->container),
|
||||
gimp_container_get_child_type (button->container),
|
||||
object);
|
||||
}
|
||||
}
|
||||
@@ -310,7 +310,7 @@ gimp_viewable_button_new (GimpContainer *container,
|
||||
button->dialog_tooltip = g_strdup (dialog_tooltip);
|
||||
}
|
||||
|
||||
prop_name = gimp_context_type_to_prop_name (gimp_container_get_children_type (container));
|
||||
prop_name = gimp_context_type_to_prop_name (gimp_container_get_child_type (container));
|
||||
|
||||
button->view = gimp_prop_view_new (G_OBJECT (context), prop_name,
|
||||
context, button->button_view_size);
|
||||
|
@@ -41,7 +41,7 @@ sub brushes_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, brush_callback,
|
||||
GIMP_OBJECT (initial_brush), NULL))
|
||||
success = FALSE;
|
||||
@@ -69,7 +69,7 @@ sub brushes_close_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
brush_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ sub brushes_set_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
brush_callback, GIMP_OBJECT (brush), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ sub fonts_popup {
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
|
||||
! gimp_data_factory_data_wait (gimp->font_factory) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, font_callback,
|
||||
GIMP_OBJECT (initial_font), NULL))
|
||||
success = FALSE;
|
||||
@@ -71,7 +71,7 @@ sub fonts_close_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
font_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ sub fonts_set_popup {
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
|
||||
! gimp_data_factory_data_wait (gimp->font_factory) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
font_callback, GIMP_OBJECT (font), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@ sub gradients_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, gradient_callback,
|
||||
GIMP_OBJECT (initial_gradient), NULL))
|
||||
success = FALSE;
|
||||
@@ -76,7 +76,7 @@ sub gradients_close_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
gradient_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ sub gradients_set_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
gradient_callback, GIMP_OBJECT (gradient), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ sub palettes_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, palette_callback,
|
||||
GIMP_OBJECT (initial_palette), NULL))
|
||||
success = FALSE;
|
||||
@@ -69,7 +69,7 @@ sub palettes_close_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
palette_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ sub palettes_set_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
palette_callback, GIMP_OBJECT (palette), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ sub patterns_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
|
||||
! gimp_pdb_dialog_new (gimp, context, progress,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
parent_window, popup_title, pattern_callback,
|
||||
GIMP_OBJECT (initial_pattern), NULL))
|
||||
success = FALSE;
|
||||
@@ -69,7 +69,7 @@ sub patterns_close_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
|
||||
! gimp_pdb_dialog_close (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
pattern_callback))
|
||||
success = FALSE;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ sub patterns_set_popup {
|
||||
if (gimp->no_interface ||
|
||||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
|
||||
! gimp_pdb_dialog_set (gimp,
|
||||
gimp_container_get_children_type (container),
|
||||
gimp_container_get_child_type (container),
|
||||
pattern_callback, GIMP_OBJECT (pattern), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user