Commit a3558e3c authored by Michael Natterer's avatar Michael Natterer 😴

Remove GIMP_OBJECT() casts when calling gimp_object_get_name()

parent a0e1fe6a
......@@ -81,7 +81,7 @@ channels_edit_attributes_cmd_callback (GtkAction *action,
action_data_get_context (data),
widget,
&channel->color,
gimp_object_get_name (GIMP_OBJECT (channel)),
gimp_object_get_name (channel),
_("Channel Attributes"),
"gimp-channel-edit",
GTK_STOCK_EDIT,
......@@ -392,7 +392,7 @@ channels_edit_channel_response (GtkWidget *widget,
gimp_color_button_get_color (GIMP_COLOR_BUTTON (options->color_panel),
&color);
if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (channel))))
if (strcmp (new_name, gimp_object_get_name (channel)))
name_changed = TRUE;
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
......
......@@ -113,7 +113,7 @@ documents_raise_or_open_cmd_callback (GtkAction *action,
{
RaiseClosure closure;
closure.name = gimp_object_get_name (GIMP_OBJECT (imagefile));
closure.name = gimp_object_get_name (imagefile);
closure.found = FALSE;
gimp_container_foreach (context->gimp->displays,
......@@ -142,7 +142,7 @@ documents_file_open_dialog_cmd_callback (GtkAction *action,
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
{
file_file_open_dialog (context->gimp,
gimp_object_get_name (GIMP_OBJECT (imagefile)),
gimp_object_get_name (imagefile),
GTK_WIDGET (editor));
}
}
......@@ -160,7 +160,7 @@ documents_copy_location_cmd_callback (GtkAction *action,
if (imagefile)
gimp_clipboard_set_text (context->gimp,
gimp_object_get_name (GIMP_OBJECT (imagefile)));
gimp_object_get_name (imagefile));
}
void
......@@ -172,7 +172,7 @@ documents_remove_cmd_callback (GtkAction *action,
GimpImagefile *imagefile = gimp_context_get_imagefile (context);
const gchar *uri;
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
uri = gimp_object_get_name (imagefile);
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri, NULL);
......@@ -293,7 +293,7 @@ documents_remove_dangling_foreach (GimpImagefile *imagefile,
if (gimp_thumbnail_peek_image (imagefile->thumbnail) ==
GIMP_THUMB_STATE_NOT_FOUND)
{
const gchar *uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
const gchar *uri = gimp_object_get_name (imagefile);
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri,
NULL);
......@@ -329,7 +329,7 @@ documents_open_image (GtkWidget *editor,
GimpPDBStatusType status;
GError *error = NULL;
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
uri = gimp_object_get_name (imagefile);
image = file_open_with_display (context->gimp, context, NULL, uri, FALSE,
&status, &error);
......@@ -351,7 +351,7 @@ static void
documents_raise_display (GimpDisplay *display,
RaiseClosure *closure)
{
const gchar *uri = gimp_object_get_name (GIMP_OBJECT (display->image));
const gchar *uri = gimp_object_get_name (display->image);
if (uri && ! strcmp (closure->name, uri))
{
......
......@@ -291,14 +291,14 @@ edit_actions_update (GimpActionGroup *group,
{
undo_name =
g_strdup_printf (_("_Undo %s"),
gimp_object_get_name (GIMP_OBJECT (undo)));
gimp_object_get_name (undo));
}
if (redo)
{
redo_name =
g_strdup_printf (_("_Redo %s"),
gimp_object_get_name (GIMP_OBJECT (redo)));
gimp_object_get_name (redo));
}
undo = gimp_image_undo_get_fadeable (image);
......@@ -313,7 +313,7 @@ edit_actions_update (GimpActionGroup *group,
{
fade_name =
g_strdup_printf (_("_Fade %s..."),
gimp_object_get_name (GIMP_OBJECT (undo)));
gimp_object_get_name (undo));
}
}
}
......
......@@ -346,7 +346,7 @@ file_actions_last_opened_update (GimpContainer *container,
gchar *basename;
gchar *escaped;
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
uri = gimp_object_get_name (imagefile);
filename = file_utils_uri_display_name (uri);
basename = file_utils_uri_display_basename (uri);
......
......@@ -225,7 +225,7 @@ file_save_cmd_callback (GtkAction *action,
if (! gimp_image_get_active_drawable (image))
return;
uri = gimp_object_get_name (GIMP_OBJECT (image));
uri = gimp_object_get_name (image);
switch (save_mode)
{
......@@ -355,7 +355,7 @@ file_revert_cmd_callback (GtkAction *action,
image = display->image;
uri = gimp_object_get_name (GIMP_OBJECT (image));
uri = gimp_object_get_name (image);
if (! uri)
{
......@@ -491,7 +491,7 @@ file_open_dialog_show (Gimp *gimp,
if (dialog)
{
if (! uri && image)
uri = gimp_object_get_name (GIMP_OBJECT (image));
uri = gimp_object_get_name (image);
if (! uri)
uri = g_object_get_data (G_OBJECT (gimp), GIMP_FILE_OPEN_LAST_URI_KEY);
......@@ -654,7 +654,7 @@ file_revert_confirm_response (GtkWidget *dialog,
GimpPDBStatusType status;
GError *error = NULL;
uri = gimp_object_get_name (GIMP_OBJECT (old_image));
uri = gimp_object_get_name (old_image);
if (! uri)
uri = g_object_get_data (G_OBJECT (old_image),
......
......@@ -198,7 +198,7 @@ layers_edit_attributes_cmd_callback (GtkAction *action,
layer,
action_data_get_context (data),
widget,
gimp_object_get_name (GIMP_OBJECT (layer)),
gimp_object_get_name (layer),
layer_fill_type,
_("Layer Attributes"),
"gimp-layer-edit",
......@@ -1019,7 +1019,7 @@ layers_edit_layer_response (GtkWidget *widget,
new_name = gtk_entry_get_text (GTK_ENTRY (dialog->name_entry));
if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (layer))))
if (strcmp (new_name, gimp_object_get_name (layer)))
{
GError *error = NULL;
......
......@@ -342,7 +342,7 @@ plug_in_actions_register_procedure (GimpPDB *pdb,
{
#if 0
g_print ("%s: %s\n", G_STRFUNC,
gimp_object_get_name (GIMP_OBJECT (procedure)));
gimp_object_get_name (procedure));
#endif
plug_in_actions_add_proc (group, plug_in_proc);
......@@ -370,7 +370,7 @@ plug_in_actions_unregister_procedure (GimpPDB *pdb,
#if 0
g_print ("%s: %s\n", G_STRFUNC,
gimp_object_get_name (GIMP_OBJECT (procedure)));
gimp_object_get_name (procedure));
#endif
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
......@@ -392,7 +392,7 @@ plug_in_actions_menu_path_added (GimpPlugInProcedure *plug_in_proc,
#if 0
g_print ("%s: %s (%s)\n", G_STRFUNC,
gimp_object_get_name (GIMP_OBJECT (plug_in_proc)), menu_path);
gimp_object_get_name (plug_in_proc), menu_path);
#endif
locale_domain = gimp_plug_in_procedure_get_locale_domain (plug_in_proc);
......
......@@ -200,7 +200,7 @@ tool_options_actions_update_presets (GimpActionGroup *group,
GimpToolOptions *options = list->data;
entry.name = g_strdup_printf ("%s%03d", action_prefix, i);
entry.label = gimp_object_get_name (GIMP_OBJECT (options));
entry.label = gimp_object_get_name (options);
entry.value = i;
gimp_action_group_add_enum_actions (group, NULL, &entry, 1, callback);
......
......@@ -92,7 +92,7 @@ tool_options_save_to_cmd_callback (GtkAction *action,
if (options)
{
gchar *name = g_strdup (gimp_object_get_name (GIMP_OBJECT (options)));
gchar *name = g_strdup (gimp_object_get_name (options));
gimp_config_sync (G_OBJECT (tool_info->tool_options),
G_OBJECT (options),
......
......@@ -688,7 +688,7 @@ tools_actions_setup (GimpActionGroup *group)
gchar *name;
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
identifier = gimp_object_get_name (GIMP_OBJECT (tool_info));
identifier = gimp_object_get_name (tool_info);
tmp = g_strndup (identifier + strlen ("gimp-"),
strlen (identifier) - strlen ("gimp--tool"));
......
......@@ -134,7 +134,7 @@ vectors_edit_attributes_cmd_callback (GtkAction *action,
options = vectors_options_dialog_new (image, vectors,
action_data_get_context (data),
widget,
gimp_object_get_name (GIMP_OBJECT (vectors)),
gimp_object_get_name (vectors),
_("Path Attributes"),
"gimp-vectors-edit",
GTK_STOCK_EDIT,
......@@ -686,7 +686,7 @@ vectors_edit_vectors_response (GtkWidget *widget,
new_name = gtk_entry_get_text (GTK_ENTRY (options->name_entry));
if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (vectors))))
if (strcmp (new_name, gimp_object_get_name (vectors)))
{
gimp_item_rename (GIMP_ITEM (vectors), new_name, NULL);
gimp_image_flush (options->image);
......
......@@ -364,9 +364,9 @@ windows_actions_recent_add (GimpContainer *container,
entry.name = action_name;
entry.stock_id = NULL;
entry.label = gimp_object_get_name (GIMP_OBJECT (info));
entry.label = gimp_object_get_name (info);
entry.accelerator = NULL;
entry.tooltip = gimp_object_get_name (GIMP_OBJECT (info));
entry.tooltip = gimp_object_get_name (info);
entry.callback = G_CALLBACK (windows_open_recent_cmd_callback);
entry.help_id = GIMP_HELP_WINDOWS_OPEN_RECENT_DOCK;
......
......@@ -362,7 +362,7 @@ gimp_edit_named_cut (GimpImage *image,
gimp_container_add (image->gimp->named_buffers, GIMP_OBJECT (buffer));
g_object_unref (buffer);
return gimp_object_get_name (GIMP_OBJECT (buffer));
return gimp_object_get_name (buffer);
}
return NULL;
......@@ -393,7 +393,7 @@ gimp_edit_named_copy (GimpImage *image,
gimp_container_add (image->gimp->named_buffers, GIMP_OBJECT (buffer));
g_object_unref (buffer);
return gimp_object_get_name (GIMP_OBJECT (buffer));
return gimp_object_get_name (buffer);
}
return NULL;
......@@ -421,7 +421,7 @@ gimp_edit_named_copy_visible (GimpImage *image,
gimp_container_add (image->gimp->named_buffers, GIMP_OBJECT (buffer));
g_object_unref (buffer);
return gimp_object_get_name (GIMP_OBJECT (buffer));
return gimp_object_get_name (buffer);
}
return NULL;
......@@ -523,7 +523,7 @@ gimp_edit_fade (GimpImage *image,
gimp_drawable_apply_region (drawable, &src2PR,
TRUE,
gimp_object_get_name (GIMP_OBJECT (undo)),
gimp_object_get_name (undo),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
NULL, NULL,
......
......@@ -47,7 +47,7 @@ gimp_brush_generated_save (GimpData *data,
GError **error)
{
GimpBrushGenerated *brush = GIMP_BRUSH_GENERATED (data);
const gchar *name = gimp_object_get_name (GIMP_OBJECT (data));
const gchar *name = gimp_object_get_name (data);
FILE *file;
gchar buf[G_ASCII_DTOSTR_BUF_SIZE];
gboolean have_shape = FALSE;
......
......@@ -366,7 +366,7 @@ gimp_channel_get_description (GimpViewable *viewable,
gchar **tooltip)
{
if (! strcmp (GIMP_IMAGE_QUICK_MASK_NAME,
gimp_object_get_name (GIMP_OBJECT (viewable))))
gimp_object_get_name (viewable)))
{
return g_strdup (_("Quick Mask"));
}
......
......@@ -363,7 +363,7 @@ gimp_container_serialize_foreach (GObject *object,
gimp_config_writer_open (serialize_data->writer,
g_type_name (G_TYPE_FROM_INSTANCE (object)));
name = gimp_object_get_name (GIMP_OBJECT (object));
name = gimp_object_get_name (object);
if (name)
gimp_config_writer_string (serialize_data->writer, name);
......
......@@ -2796,8 +2796,7 @@ gimp_context_get_font_name (GimpContext *context)
{
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
return (context->font ?
gimp_object_get_name (GIMP_OBJECT (context->font)) : NULL);
return (context->font ? gimp_object_get_name (context->font) : NULL);
}
void
......
......@@ -672,13 +672,13 @@ gimp_data_create_filename (GimpData *data,
if (data->internal)
return;
safename = g_filename_from_utf8 (gimp_object_get_name (GIMP_OBJECT (data)),
safename = g_filename_from_utf8 (gimp_object_get_name (data),
-1, NULL, NULL, &error);
if (! safename)
{
g_warning ("gimp_data_create_filename:\n"
"g_filename_from_utf8() failed for '%s': %s",
gimp_object_get_name (GIMP_OBJECT (data)), error->message);
gimp_object_get_name (data), error->message);
g_error_free (error);
return;
}
......
......@@ -222,7 +222,7 @@ gimp_data_factory_data_init (GimpDataFactory *factory,
{
if (factory->priv->gimp->be_verbose)
{
const gchar *name = gimp_object_get_name (GIMP_OBJECT (factory));
const gchar *name = gimp_object_get_name (factory);
g_print ("Loading '%s' data\n", name ? name : "???");
}
......@@ -522,14 +522,12 @@ gimp_data_factory_data_duplicate (GimpDataFactory *factory,
if (new_data)
{
const gchar *name;
const gchar *name = gimp_object_get_name (data);
gchar *ext;
gint copy_len;
gint number;
gchar *new_name;
name = gimp_object_get_name (GIMP_OBJECT (data));
ext = strrchr (name, '#');
copy_len = strlen (_("copy"));
......
......@@ -340,7 +340,7 @@ gimp_group_layer_duplicate (GimpItem *item,
new_child = gimp_item_duplicate (child, G_TYPE_FROM_INSTANCE (child));
gimp_object_set_name (GIMP_OBJECT (new_child),
gimp_object_get_name (GIMP_OBJECT (child)));
gimp_object_get_name (child));
mask = gimp_layer_get_mask (GIMP_LAYER (child));
......@@ -351,7 +351,7 @@ gimp_group_layer_duplicate (GimpItem *item,
new_mask = gimp_layer_get_mask (GIMP_LAYER (new_child));
gimp_object_set_name (GIMP_OBJECT (new_mask),
gimp_object_get_name (GIMP_OBJECT (mask)));
gimp_object_get_name (mask));
}
gimp_viewable_set_parent (GIMP_VIEWABLE (new_child),
......@@ -889,7 +889,7 @@ gimp_group_layer_stack_update (GimpDrawableStack *stack,
{
#if 0
g_printerr ("%s (%s) %d, %d (%d, %d)\n",
G_STRFUNC, gimp_object_get_name (GIMP_OBJECT (group)),
G_STRFUNC, gimp_object_get_name (group),
x, y, width, height);
#endif
......@@ -919,7 +919,7 @@ gimp_group_layer_proj_update (GimpProjection *proj,
{
#if 0
g_printerr ("%s (%s) %d, %d (%d, %d)\n",
G_STRFUNC, gimp_object_get_name (GIMP_OBJECT (group)),
G_STRFUNC, gimp_object_get_name (group),
x, y, width, height);
#endif
......
......@@ -178,7 +178,7 @@ gimp_image_duplicate_save_source_uri (GimpImage *image,
GimpImage *new_image)
{
g_object_set_data_full (G_OBJECT (new_image), "gimp-image-source-uri",
g_strdup (gimp_object_get_name (GIMP_OBJECT (image))),
g_strdup (gimp_object_get_name (image)),
(GDestroyNotify) g_free);
}
......@@ -224,14 +224,14 @@ gimp_image_duplicate_layers (GimpImage *image,
/* Make sure the copied layer doesn't say: "<old layer> copy" */
gimp_object_set_name (GIMP_OBJECT (new_layer),
gimp_object_get_name (GIMP_OBJECT (layer)));
gimp_object_get_name (layer));
/* Make sure that if the layer has a layer mask,
* its name isn't screwed up
*/
if (new_layer->mask)
gimp_object_set_name (GIMP_OBJECT (new_layer->mask),
gimp_object_get_name (GIMP_OBJECT (layer->mask)));
gimp_object_get_name (layer->mask));
if (gimp_image_get_active_layer (image) == layer)
active_layer = new_layer;
......@@ -273,7 +273,7 @@ gimp_image_duplicate_channels (GimpImage *image,
/* Make sure the copied channel doesn't say: "<old channel> copy" */
gimp_object_set_name (GIMP_OBJECT (new_channel),
gimp_object_get_name (GIMP_OBJECT (channel)));
gimp_object_get_name (channel));
if (gimp_image_get_active_channel (image) == channel)
active_channel = new_channel;
......@@ -309,7 +309,7 @@ gimp_image_duplicate_vectors (GimpImage *image,
/* Make sure the copied vectors doesn't say: "<old vectors> copy" */
gimp_object_set_name (GIMP_OBJECT (new_vectors),
gimp_object_get_name (GIMP_OBJECT (vectors)));
gimp_object_get_name (vectors));
if (gimp_image_get_active_vectors (image) == vectors)
active_vectors = new_vectors;
......
......@@ -294,7 +294,7 @@ gimp_image_merge_visible_vectors (GimpImage *image,
cur_item = merge_list;
vectors = GIMP_VECTORS (cur_item->data);
name = g_strdup (gimp_object_get_name (GIMP_OBJECT (vectors)));
name = g_strdup (gimp_object_get_name (vectors));
target_vectors = GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors),
GIMP_TYPE_VECTORS));
pos = gimp_item_get_index (GIMP_ITEM (vectors));
......@@ -455,7 +455,7 @@ gimp_image_merge_layers (GimpImage *image,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE,
undo_desc);
name = g_strdup (gimp_object_get_name (GIMP_OBJECT (layer)));
name = g_strdup (gimp_object_get_name (layer));
if (merge_type == GIMP_FLATTEN_IMAGE ||
gimp_drawable_type (GIMP_DRAWABLE (layer)) == GIMP_INDEXED_IMAGE)
......@@ -466,7 +466,7 @@ gimp_image_merge_layers (GimpImage *image,
merge_layer = gimp_layer_new (image, (x2 - x1), (y2 - y1),
type,
gimp_object_get_name (GIMP_OBJECT (layer)),
gimp_object_get_name (layer),
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
if (! merge_layer)
{
......
......@@ -1279,7 +1279,7 @@ gimp_image_channel_add (GimpContainer *container,
GimpImage *image)
{
if (! strcmp (GIMP_IMAGE_QUICK_MASK_NAME,
gimp_object_get_name (GIMP_OBJECT (channel))))
gimp_object_get_name (channel)))
{
gimp_image_set_quick_mask_state (image, TRUE);
}
......@@ -1291,7 +1291,7 @@ gimp_image_channel_remove (GimpContainer *container,
GimpImage *image)
{
if (! strcmp (GIMP_IMAGE_QUICK_MASK_NAME,
gimp_object_get_name (GIMP_OBJECT (channel))))
gimp_object_get_name (channel)))
{
gimp_image_set_quick_mask_state (image, FALSE);
}
......@@ -1302,7 +1302,7 @@ gimp_image_channel_name_changed (GimpChannel *channel,
GimpImage *image)
{
if (! strcmp (GIMP_IMAGE_QUICK_MASK_NAME,
gimp_object_get_name (GIMP_OBJECT (channel))))
gimp_object_get_name (channel)))
{
gimp_image_set_quick_mask_state (image, TRUE);
}
......@@ -1318,7 +1318,7 @@ gimp_image_channel_color_changed (GimpChannel *channel,
GimpImage *image)
{
if (! strcmp (GIMP_IMAGE_QUICK_MASK_NAME,
gimp_object_get_name (GIMP_OBJECT (channel))))
gimp_object_get_name (channel)))
{
image->quick_mask_color = channel->color;
}
......@@ -1420,7 +1420,7 @@ gimp_image_get_uri (const GimpImage *image)
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
uri = gimp_object_get_name (GIMP_OBJECT (image));
uri = gimp_object_get_name (image);
return uri ? uri : _("Untitled");
}
......@@ -1451,7 +1451,7 @@ gimp_image_get_filename (const GimpImage *image)
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
uri = gimp_object_get_name (GIMP_OBJECT (image));
uri = gimp_object_get_name (image);
if (! uri)
return NULL;
......
......@@ -242,7 +242,7 @@ gimp_imagefile_create_thumbnail (GimpImagefile *imagefile,
thumbnail = imagefile->thumbnail;
gimp_thumbnail_set_uri (thumbnail,
gimp_object_get_name (GIMP_OBJECT (imagefile)));
gimp_object_get_name (imagefile));
image_state = gimp_thumbnail_peek_image (thumbnail);
......@@ -334,7 +334,7 @@ gimp_imagefile_create_thumbnail_weak (GimpImagefile *imagefile,
if (size < 1)
return;
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
uri = gimp_object_get_name (imagefile);
if (! uri)
return;
......@@ -346,10 +346,10 @@ gimp_imagefile_create_thumbnail_weak (GimpImagefile *imagefile,
if (imagefile)
{
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
uri = gimp_object_get_name (imagefile);
if (uri &&
strcmp (uri, gimp_object_get_name (GIMP_OBJECT (local))) == 0)
strcmp (uri, gimp_object_get_name (local)) == 0)
{
gimp_imagefile_update (imagefile);
}
......@@ -459,7 +459,7 @@ gimp_imagefile_get_new_pixbuf (GimpViewable *viewable,
{
GimpImagefile *imagefile = GIMP_IMAGEFILE (viewable);
if (! gimp_object_get_name (GIMP_OBJECT (imagefile)))
if (! gimp_object_get_name (imagefile))
return NULL;
return gimp_imagefile_load_thumb (imagefile, width, height);
......
......@@ -136,8 +136,8 @@ gint
gimp_image_map_config_compare (GimpImageMapConfig *a,
GimpImageMapConfig *b)
{
const gchar *name_a = gimp_object_get_name (GIMP_OBJECT (a));
const gchar *name_b = gimp_object_get_name (GIMP_OBJECT (b));
const gchar *name_a = gimp_object_get_name (a);
const gchar *name_b = gimp_object_get_name (b);
if (a->time > 0 && b->time > 0)
{
......
......@@ -414,7 +414,7 @@ gimp_item_real_duplicate (GimpItem *item,
gint number;
gint len;
name = gimp_object_get_name (GIMP_OBJECT (item));
name = gimp_object_get_name (item);
g_return_val_if_fail (name != NULL, NULL);
......@@ -837,7 +837,7 @@ gimp_item_rename (GimpItem *item,
if (! new_name || ! *new_name)
new_name = item_class->default_name;
if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (item))))
if (strcmp (new_name, gimp_object_get_name (item)))
return item_class->rename (item, new_name, item_class->rename_desc, error);
return TRUE;
......
......@@ -110,7 +110,7 @@ gimp_item_prop_undo_constructor (GType type,
switch (GIMP_UNDO (object)->undo_type)
{
case GIMP_UNDO_ITEM_RENAME:
item_prop_undo->name = g_strdup (gimp_object_get_name (GIMP_OBJECT (item)));
item_prop_undo->name = g_strdup (gimp_object_get_name (item));
break;
case GIMP_UNDO_ITEM_DISPLACE:
......@@ -213,7 +213,7 @@ gimp_item_prop_undo_pop (GimpUndo *undo,
{
gchar *name;
name = g_strdup (gimp_object_get_name (GIMP_OBJECT (item)));
name = g_strdup (gimp_object_get_name (item));
gimp_object_take_name (GIMP_OBJECT (item), item_prop_undo->name);
item_prop_undo->name = name;
}
......
......@@ -229,7 +229,7 @@ gimp_item_stack_get_item_by_name (GimpItemStack *stack,
GimpItem *item = list->data;
GimpContainer *children;
if (! strcmp (gimp_object_get_name (GIMP_OBJECT (item)), name))
if (! strcmp (gimp_object_get_name (item), name))
return item;
children = gimp_viewable_get_children (GIMP_VIEWABLE (item));
......
......@@ -453,7 +453,7 @@ gimp_layer_get_description (GimpViewable *viewable,
if (gimp_layer_is_floating_sel (GIMP_LAYER (viewable)))
{
return g_strdup_printf (_("Floating Selection\n(%s)"),
gimp_object_get_name (GIMP_OBJECT (viewable)));
gimp_object_get_name (viewable));
}
return GIMP_VIEWABLE_CLASS (parent_class)->get_description (viewable,
......@@ -1390,7 +1390,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
image = gimp_item_get_image (item);
mask_name = g_strdup_printf (_("%s mask"),
gimp_object_get_name (GIMP_OBJECT (layer)));
gimp_object_get_name (layer));
mask = gimp_layer_mask_new (image,
gimp_item_get_width (item),
......
......@@ -231,8 +231,7 @@ gimp_layer_mask_set_layer (GimpLayerMask *layer_mask,
gimp_item_get_offset (GIMP_ITEM (layer), &offset_x, &offset_y);
gimp_item_set_offset (GIMP_ITEM (layer_mask), offset_x, offset_y);
mask_name = g_strdup_printf (_("%s mask"),
gimp_object_get_name (GIMP_OBJECT (layer)));
mask_name = g_strdup_printf (_("%s mask"), gimp_object_get_name (layer));
gimp_object_take_name (GIMP_OBJECT (layer_mask), mask_name);
}
......
......@@ -324,7 +324,7 @@ gimp_tool_info_build_options_filename (GimpToolInfo *tool_info,
g_return_val_if_fail (GIMP_IS_TOOL_INFO (tool_info), NULL);
name = gimp_object_get_name (GIMP_OBJECT (tool_info));
name = gimp_object_get_name (tool_info);
if (suffix)
basename = g_strconcat (name, suffix, NULL);
......
......@@ -213,8 +213,7 @@ gimp_tool_presets_new (GimpToolInfo *tool_info)
"policy", GIMP_CONTAINER_POLICY_STRONG,
NULL);
name = g_strdup_printf ("%s options",
gimp_object_get_name (GIMP_OBJECT (tool_info)));
name = g_strdup_printf ("%s options", gimp_object_get_name (tool_info));
gimp_object_take_name (GIMP_OBJECT (presets), name);
......
......@@ -374,7 +374,7 @@ static gchar *
gimp_viewable_real_get_description (GimpViewable *viewable,
gchar **tooltip)
{
return g_strdup (gimp_object_get_name (GIMP_OBJECT (viewable)));
return g_strdup (gimp_object_get_name (viewable));
}
static GimpContainer *
......
......@@ -107,8 +107,7 @@ fade_dialog_new (GimpImage *image,
"opacity", undo->opacity,
NULL);
title = g_strdup_printf (_("Fade %s"),
gimp_object_get_name (GIMP_OBJECT (undo)));
title = g_strdup_printf (_("Fade %s"), gimp_object_get_name (undo));