Commit 957cf2cf authored by Martin Nordholts's avatar Martin Nordholts

app: Always use gimp_object_get_name()

Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
parent 0e82aca2
......@@ -253,11 +253,11 @@ data_delete_cmd_callback (GtkAction *action,
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
_("Delete '%s'?"),
GIMP_OBJECT (data)->name);
gimp_object_get_name (data));
gimp_message_box_set_text(GIMP_MESSAGE_DIALOG (dialog)->box,
_("Are you sure you want to remove '%s' "
"from the list and delete it on disk?"),
GIMP_OBJECT (data)->name);
gimp_object_get_name (data));
gtk_widget_show (dialog);
}
......
......@@ -277,7 +277,7 @@ file_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("file-save", image && drawable);
SET_SENSITIVE ("file-save-as", image && drawable);
SET_SENSITIVE ("file-save-a-copy", image && drawable);
SET_SENSITIVE ("file-revert", image && (GIMP_OBJECT (image)->name || source));
SET_SENSITIVE ("file-revert", image && (gimp_object_get_name (image) || source));
SET_SENSITIVE ("file-export-to", export_to);
SET_VISIBLE ("file-export-to", export_to || ! show_overwrite);
SET_SENSITIVE ("file-overwrite", show_overwrite);
......
......@@ -181,13 +181,13 @@ file_open_recent_cmd_callback (GtkAction *action,
image = file_open_with_display (gimp, action_data_get_context (data),
progress,
GIMP_OBJECT (imagefile)->name, FALSE,
gimp_object_get_name (imagefile), FALSE,
&status, &error);
if (! image && status != GIMP_PDB_CANCEL)
{
gchar *filename =
file_utils_uri_display_name (GIMP_OBJECT (imagefile)->name);
file_utils_uri_display_name (gimp_object_get_name (imagefile));
gimp_message (gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
_("Opening '%s' failed:\n\n%s"),
......
......@@ -63,7 +63,7 @@ gradients_save_as_pov_ray_cmd_callback (GtkAction *action,
return;
title = g_strdup_printf (_("Save '%s' as POV-Ray"),
GIMP_OBJECT (gradient)->name);
gimp_object_get_name (gradient));
chooser = GTK_FILE_CHOOSER
(gtk_file_chooser_dialog_new (title, NULL,
......
......@@ -258,7 +258,7 @@ plug_in_actions_update (GimpActionGroup *group,
drawable);
gimp_action_group_set_action_sensitive (group,
GIMP_OBJECT (proc)->name,
gimp_object_get_name (proc),
sensitive);
}
}
......@@ -374,7 +374,7 @@ plug_in_actions_unregister_procedure (GimpPDB *pdb,
#endif
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
GIMP_OBJECT (procedure)->name);
gimp_object_get_name (procedure));
if (action)
gtk_action_group_remove_action (GTK_ACTION_GROUP (group), action);
......@@ -444,7 +444,7 @@ plug_in_actions_add_proc (GimpActionGroup *group,
label = p2 + 1;
}
entry.name = GIMP_OBJECT (proc)->name;
entry.name = gimp_object_get_name (proc);
entry.stock_id = gimp_plug_in_procedure_get_stock_id (proc);
entry.label = label;
entry.accelerator = NULL;
......@@ -454,7 +454,7 @@ plug_in_actions_add_proc (GimpActionGroup *group,
#if 0
g_print ("adding plug-in action '%s' (%s)\n",
GIMP_OBJECT (proc)->name, label);
gimp_object_get_name (proc), label);
#endif
gimp_action_group_add_plug_in_actions (group, &entry, 1,
......@@ -511,7 +511,7 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
* all images' actions. See bug #517683.
*/
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
GIMP_OBJECT (proc)->name);
gimp_object_get_name (proc));
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
......@@ -566,7 +566,7 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
/* see comment above */
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
GIMP_OBJECT (proc)->name);
gimp_object_get_name (proc));
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
......
......@@ -239,7 +239,7 @@ templates_delete_cmd_callback (GtkAction *action,
_("Are you sure you want to delete "
"template '%s' from the list and "
"from disk?"),
GIMP_OBJECT (template)->name);
gimp_object_get_name (template));
gtk_widget_show (dialog);
}
}
......
......@@ -140,7 +140,7 @@ tool_options_rename_saved_cmd_callback (GtkAction *action,
gimp_standard_help_func,
GIMP_HELP_TOOL_OPTIONS_DIALOG,
_("Enter a new name for the saved options"),
GIMP_OBJECT (options)->name,
gimp_object_get_name (options),
NULL, NULL,
tool_options_rename_callback, options);
gtk_widget_show (dialog);
......
......@@ -127,7 +127,7 @@ gimp_templates_migrate_get_child_by_name (const GimpContainer *container,
for (glist = list->list; glist; glist = g_list_next (glist))
{
GimpObject *object = glist->data;
gchar *str1 = g_ascii_strdown (object->name, -1);
gchar *str1 = g_ascii_strdown (gimp_object_get_name (object), -1);
gchar *str2 = g_ascii_strdown (name, -1);
if (! strcmp (str1, str2))
......
......@@ -344,7 +344,7 @@ gimp_brush_get_description (GimpViewable *viewable,
GimpBrush *brush = GIMP_BRUSH (viewable);
return g_strdup_printf ("%s (%d × %d)",
GIMP_OBJECT (brush)->name,
gimp_object_get_name (brush),
brush->mask->width,
brush->mask->height);
}
......
......@@ -279,7 +279,7 @@ gimp_brush_generated_duplicate (GimpData *data)
{
GimpBrushGenerated *brush = GIMP_BRUSH_GENERATED (data);
return gimp_brush_generated_new (GIMP_OBJECT (brush)->name,
return gimp_brush_generated_new (gimp_object_get_name (brush),
brush->shape,
brush->radius,
brush->spikes,
......
......@@ -210,7 +210,7 @@ gimp_buffer_get_description (GimpViewable *viewable,
GimpBuffer *buffer = GIMP_BUFFER (viewable);
return g_strdup_printf ("%s (%d × %d)",
GIMP_OBJECT (buffer)->name,
gimp_object_get_name (buffer),
gimp_buffer_get_width (buffer),
gimp_buffer_get_height (buffer));
}
......
......@@ -1836,7 +1836,7 @@ gimp_context_tool_dirty (GimpToolInfo *tool_info,
GimpContext *context)
{
g_free (context->tool_name);
context->tool_name = g_strdup (GIMP_OBJECT (tool_info)->name);
context->tool_name = g_strdup (gimp_object_get_name (tool_info));
}
/* the global tool list is there again after refresh */
......@@ -1913,7 +1913,7 @@ gimp_context_real_set_tool (GimpContext *context,
0);
if (tool_info != standard_tool_info)
context->tool_name = g_strdup (GIMP_OBJECT (tool_info)->name);
context->tool_name = g_strdup (gimp_object_get_name (tool_info));
if (tool_info->paint_info)
gimp_context_real_set_paint_info (context, tool_info->paint_info);
......@@ -1962,7 +1962,7 @@ gimp_context_paint_info_dirty (GimpPaintInfo *paint_info,
GimpContext *context)
{
g_free (context->paint_name);
context->paint_name = g_strdup (GIMP_OBJECT (paint_info)->name);
context->paint_name = g_strdup (gimp_object_get_name (paint_info));
}
/* the global paint info list is there again after refresh */
......@@ -2039,7 +2039,7 @@ gimp_context_real_set_paint_info (GimpContext *context,
0);
if (paint_info != standard_paint_info)
context->paint_name = g_strdup (GIMP_OBJECT (paint_info)->name);
context->paint_name = g_strdup (gimp_object_get_name (paint_info));
}
g_object_notify (G_OBJECT (context), "paint-info");
......@@ -2319,7 +2319,7 @@ gimp_context_brush_dirty (GimpBrush *brush,
GimpContext *context)
{
g_free (context->brush_name);
context->brush_name = g_strdup (GIMP_OBJECT (brush)->name);
context->brush_name = g_strdup (gimp_object_get_name (brush));
}
/* the global brush list is there again after refresh */
......@@ -2396,7 +2396,7 @@ gimp_context_real_set_brush (GimpContext *context,
0);
if (brush != standard_brush)
context->brush_name = g_strdup (GIMP_OBJECT (brush)->name);
context->brush_name = g_strdup (gimp_object_get_name (brush));
}
g_object_notify (G_OBJECT (context), "brush");
......@@ -2441,7 +2441,7 @@ gimp_context_pattern_dirty (GimpPattern *pattern,
GimpContext *context)
{
g_free (context->pattern_name);
context->pattern_name = g_strdup (GIMP_OBJECT (pattern)->name);
context->pattern_name = g_strdup (gimp_object_get_name (pattern));
}
/* the global pattern list is there again after refresh */
......@@ -2518,7 +2518,7 @@ gimp_context_real_set_pattern (GimpContext *context,
0);
if (pattern != standard_pattern)
context->pattern_name = g_strdup (GIMP_OBJECT (pattern)->name);
context->pattern_name = g_strdup (gimp_object_get_name (pattern));
}
g_object_notify (G_OBJECT (context), "pattern");
......@@ -2563,7 +2563,7 @@ gimp_context_gradient_dirty (GimpGradient *gradient,
GimpContext *context)
{
g_free (context->gradient_name);
context->gradient_name = g_strdup (GIMP_OBJECT (gradient)->name);
context->gradient_name = g_strdup (gimp_object_get_name (gradient));
}
/* the global gradient list is there again after refresh */
......@@ -2640,7 +2640,7 @@ gimp_context_real_set_gradient (GimpContext *context,
0);
if (gradient != standard_gradient)
context->gradient_name = g_strdup (GIMP_OBJECT (gradient)->name);
context->gradient_name = g_strdup (gimp_object_get_name (gradient));
}
g_object_notify (G_OBJECT (context), "gradient");
......@@ -2685,7 +2685,7 @@ gimp_context_palette_dirty (GimpPalette *palette,
GimpContext *context)
{
g_free (context->palette_name);
context->palette_name = g_strdup (GIMP_OBJECT (palette)->name);
context->palette_name = g_strdup (gimp_object_get_name (palette));
}
/* the global palette list is there again after refresh */
......@@ -2762,7 +2762,7 @@ gimp_context_real_set_palette (GimpContext *context,
0);
if (palette != standard_palette)
context->palette_name = g_strdup (GIMP_OBJECT (palette)->name);
context->palette_name = g_strdup (gimp_object_get_name (palette));
}
g_object_notify (G_OBJECT (context), "palette");
......@@ -2829,7 +2829,7 @@ gimp_context_font_dirty (GimpFont *font,
GimpContext *context)
{
g_free (context->font_name);
context->font_name = g_strdup (GIMP_OBJECT (font)->name);
context->font_name = g_strdup (gimp_object_get_name (font));
}
/* the global font list is there again after refresh */
......@@ -2906,7 +2906,7 @@ gimp_context_real_set_font (GimpContext *context,
0);
if (font != standard_font)
context->font_name = g_strdup (GIMP_OBJECT (font)->name);
context->font_name = g_strdup (gimp_object_get_name (font));
}
g_object_notify (G_OBJECT (context), "font");
......@@ -2955,7 +2955,7 @@ gimp_context_buffer_dirty (GimpBuffer *buffer,
GimpContext *context)
{
g_free (context->buffer_name);
context->buffer_name = g_strdup (GIMP_OBJECT (buffer)->name);
context->buffer_name = g_strdup (gimp_object_get_name (buffer));
}
/* the global buffer list is there again after refresh */
......@@ -3046,7 +3046,7 @@ gimp_context_real_set_buffer (GimpContext *context,
/*
if (buffer != standard_buffer)
*/
context->buffer_name = g_strdup (GIMP_OBJECT (buffer)->name);
context->buffer_name = g_strdup (gimp_object_get_name (buffer));
}
g_object_notify (G_OBJECT (context), "buffer");
......@@ -3095,7 +3095,7 @@ gimp_context_imagefile_dirty (GimpImagefile *imagefile,
GimpContext *context)
{
g_free (context->imagefile_name);
context->imagefile_name = g_strdup (GIMP_OBJECT (imagefile)->name);
context->imagefile_name = g_strdup (gimp_object_get_name (imagefile));
}
/* the global imagefile list is there again after refresh */
......@@ -3186,7 +3186,7 @@ gimp_context_real_set_imagefile (GimpContext *context,
/*
if (imagefile != standard_imagefile)
*/
context->imagefile_name = g_strdup (GIMP_OBJECT (imagefile)->name);
context->imagefile_name = g_strdup (gimp_object_get_name (imagefile));
}
g_object_notify (G_OBJECT (context), "imagefile");
......@@ -3235,7 +3235,7 @@ gimp_context_template_dirty (GimpTemplate *template,
GimpContext *context)
{
g_free (context->template_name);
context->template_name = g_strdup (GIMP_OBJECT (template)->name);
context->template_name = g_strdup (gimp_object_get_name (template));
}
/* the global template list is there again after refresh */
......@@ -3326,7 +3326,7 @@ gimp_context_real_set_template (GimpContext *context,
/*
if (template != standard_template)
*/
context->template_name = g_strdup (GIMP_OBJECT (template)->name);
context->template_name = g_strdup (gimp_object_get_name (template));
}
g_object_notify (G_OBJECT (context), "template");
......
......@@ -410,7 +410,7 @@ gimp_curve_get_description (GimpViewable *viewable,
{
GimpCurve *curve = GIMP_CURVE (viewable);
return g_strdup_printf ("%s", GIMP_OBJECT (curve)->name);
return g_strdup_printf ("%s", gimp_object_get_name (curve));
}
static void
......
......@@ -405,7 +405,7 @@ gimp_drawable_duplicate (GimpItem *item,
gimp_item_get_width (item),
gimp_item_get_height (item),
gimp_drawable_type (drawable),
GIMP_OBJECT (new_drawable)->name);
gimp_object_get_name (new_drawable));
pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
0, 0,
......
......@@ -65,7 +65,7 @@ gimp_gradient_save (GimpData *data,
fprintf (file, "GIMP Gradient\n");
fprintf (file, "Name: %s\n", GIMP_OBJECT (gradient)->name);
fprintf (file, "Name: %s\n", gimp_object_get_name (gradient));
/* Count number of segments */
num_segments = 0;
......
......@@ -835,7 +835,7 @@ undo_pop_cantundo (GimpUndo *undo,
{
case GIMP_UNDO_MODE_UNDO:
gimp_message (undo->image->gimp, NULL, GIMP_MESSAGE_WARNING,
_("Can't undo %s"), GIMP_OBJECT (undo)->name);
_("Can't undo %s"), gimp_object_get_name (undo));
break;
case GIMP_UNDO_MODE_REDO:
......
......@@ -304,7 +304,7 @@ gimp_list_get_child_by_name (const GimpContainer *container,
{
GimpObject *object = glist->data;
if (! strcmp (object->name, name))
if (! strcmp (gimp_object_get_name (object), name))
return object;
}
......
......@@ -272,11 +272,12 @@ gimp_object_take_name (GimpObject *object,
* Return value: a pointer to the @object's name
**/
const gchar *
gimp_object_get_name (const GimpObject *object)
gimp_object_get_name (gconstpointer object)
{
g_return_val_if_fail (GIMP_IS_OBJECT (object), NULL);
const GimpObject *object_typed = object;
g_return_val_if_fail (GIMP_IS_OBJECT (object_typed), NULL);
return object->name;
return object_typed->name;
}
/**
......
......@@ -33,9 +33,8 @@ struct _GimpObject
{
GObject parent_instance;
gchar *name;
/*< private >*/
gchar *name;
gchar *normalized;
guint static_name : 1;
guint disconnected : 1;
......@@ -65,7 +64,7 @@ void gimp_object_set_static_name (GimpObject *object,
const gchar *name);
void gimp_object_take_name (GimpObject *object,
gchar *name);
const gchar * gimp_object_get_name (const GimpObject *object);
const gchar * gimp_object_get_name (gconstpointer object);
void gimp_object_name_changed (GimpObject *object);
void gimp_object_name_free (GimpObject *object);
......
......@@ -59,7 +59,7 @@ gimp_palette_save (GimpData *data,
}
fprintf (file, "GIMP Palette\n");
fprintf (file, "Name: %s\n", GIMP_OBJECT (palette)->name);
fprintf (file, "Name: %s\n", gimp_object_get_name (palette));
fprintf (file, "Columns: %d\n#\n", CLAMP (palette->n_columns, 0, 256));
for (list = palette->colors; list; list = g_list_next (list))
......
......@@ -267,7 +267,7 @@ gimp_palette_get_description (GimpViewable *viewable,
GimpPalette *palette = GIMP_PALETTE (viewable);
return g_strdup_printf ("%s (%d)",
GIMP_OBJECT (palette)->name,
gimp_object_get_name (palette),
palette->n_colors);
}
......
......@@ -167,7 +167,7 @@ gimp_pattern_get_description (GimpViewable *viewable,
GimpPattern *pattern = GIMP_PATTERN (viewable);
return g_strdup_printf ("%s (%d × %d)",
GIMP_OBJECT (pattern)->name,
gimp_object_get_name (pattern),
pattern->mask->width,
pattern->mask->height);
}
......
......@@ -169,9 +169,9 @@ gimp_tool_options_serialize (GimpToolOptions *tool_options,
g_print ("Writing '%s'\n", gimp_filename_to_utf8 (filename));
header = g_strdup_printf ("GIMP %s options",
GIMP_OBJECT (tool_options->tool_info)->name);
gimp_object_get_name (tool_options->tool_info));
footer = g_strdup_printf ("end of %s options",
GIMP_OBJECT (tool_options->tool_info)->name);
gimp_object_get_name (tool_options->tool_info));
retval = gimp_config_serialize_to_file (GIMP_CONFIG (tool_options),
filename,
......
......@@ -256,10 +256,10 @@ gimp_tool_presets_save (GimpToolPresets *presets,
gimp_tool_options_create_folder ();
footer = g_strdup_printf ("end of %s", GIMP_OBJECT (presets)->name);
footer = g_strdup_printf ("end of %s", gimp_object_get_name (presets));
retval = gimp_config_serialize_to_file (GIMP_CONFIG (presets), filename,
GIMP_OBJECT (presets)->name,
gimp_object_get_name (presets),
footer,
NULL, error);
......
......@@ -361,7 +361,7 @@ convert_dialog_palette_box (IndexedDialog *dialog)
/* Preferentially, the initial default is 'Web' if available */
if (web_palette == NULL &&
g_ascii_strcasecmp (GIMP_OBJECT (palette)->name, "Web") == 0)
g_ascii_strcasecmp (gimp_object_get_name (palette), "Web") == 0)
{
web_palette = palette;
}
......
......@@ -314,7 +314,7 @@ palette_import_dialog_new (GimpContext *context)
dialog->entry = gtk_entry_new ();
gtk_entry_set_text (GTK_ENTRY (dialog->entry),
gradient ?
GIMP_OBJECT (gradient)->name : _("New import"));
gimp_object_get_name (gradient) : _("New import"));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Palette _name:"), 0.0, 0.5,
dialog->entry, 2, FALSE);
......@@ -476,7 +476,7 @@ palette_import_gradient_changed (GimpContext *context,
if (gradient && dialog->import_type == GRADIENT_IMPORT)
{
gtk_entry_set_text (GTK_ENTRY (dialog->entry),
GIMP_OBJECT (gradient)->name);
gimp_object_get_name (gradient));
palette_import_make_palette (dialog);
}
......@@ -654,7 +654,7 @@ palette_import_grad_callback (GtkWidget *widget,
gradient = gimp_context_get_gradient (dialog->context);
gtk_entry_set_text (GTK_ENTRY (dialog->entry),
GIMP_OBJECT (gradient)->name);
gimp_object_get_name (gradient));
palette_import_set_sensitive (dialog);
......
......@@ -159,7 +159,7 @@ layer_select_new (GimpImage *image,
gtk_widget_show (alignment);
/* the layer name label */
layer_select->label = gtk_label_new (GIMP_OBJECT (layer)->name);
layer_select->label = gtk_label_new (gimp_object_get_name (layer));
gtk_box_pack_start (GTK_BOX (hbox), layer_select->label, FALSE, FALSE, 0);
gtk_widget_show (layer_select->label);
......@@ -224,7 +224,7 @@ layer_select_advance (LayerSelect *layer_select,
gimp_view_set_viewable (GIMP_VIEW (layer_select->view),
GIMP_VIEWABLE (current_layer));
gtk_label_set_text (GTK_LABEL (layer_select->label),
GIMP_OBJECT (current_layer)->name);
gimp_object_get_name (current_layer));
}
}
}
......
......@@ -154,7 +154,7 @@ file_open_image (Gimp *gimp,
return_vals =
gimp_pdb_execute_procedure_by_name (gimp->pdb,
context, progress, error,
GIMP_OBJECT (file_proc)->name,
gimp_object_get_name (file_proc),
GIMP_TYPE_INT32, run_mode,
G_TYPE_STRING, filename,
G_TYPE_STRING, entered_filename,
......@@ -293,7 +293,7 @@ file_open_thumbnail (Gimp *gimp,
return_vals =
gimp_pdb_execute_procedure_by_name (gimp->pdb,
context, progress, error,
GIMP_OBJECT (procedure)->name,
gimp_object_get_name (procedure),
G_TYPE_STRING, filename,
GIMP_TYPE_INT32, size,
G_TYPE_NONE);
......
......@@ -138,7 +138,7 @@ file_save (Gimp *gimp,
gimp_pdb_execute_procedure_by_name (image->gimp->pdb,
gimp_get_user_context (gimp),
progress, error,
GIMP_OBJECT (file_proc)->name,
gimp_object_get_name (file_proc),
GIMP_TYPE_INT32, run_mode,
GIMP_TYPE_IMAGE_ID, image_ID,
GIMP_TYPE_DRAWABLE_ID, drawable_ID,
......
......@@ -259,7 +259,7 @@ plug_in_menus_unregister_procedure (GimpPDB *pdb,
guint merge_id;
merge_key = g_strdup_printf ("%s-merge-id",
GIMP_OBJECT (plug_in_proc)->name);
gimp_object_get_name (plug_in_proc));
merge_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (manager),
merge_key));
g_free (merge_key);
......@@ -386,7 +386,7 @@ plug_in_menus_add_proc (GimpUIManager *manager,
*p = '\0';
}
merge_key = g_strdup_printf ("%s-merge-id", GIMP_OBJECT (proc)->name);
merge_key = g_strdup_printf ("%s-merge-id", gimp_object_get_name (proc));
merge_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (manager),
merge_key));
......@@ -422,12 +422,12 @@ plug_in_menus_add_proc (GimpUIManager *manager,
}
GIMP_LOG (MENUS, "adding menu item for '%s' (@ %s)",
GIMP_OBJECT (proc)->name, action_path);
gimp_object_get_name (proc), action_path);
gtk_ui_manager_add_ui (GTK_UI_MANAGER (manager), merge_id,
action_path,
GIMP_OBJECT (proc)->name,
GIMP_OBJECT (proc)->name,
gimp_object_get_name (proc),
gimp_object_get_name (proc),
GTK_UI_MANAGER_MENUITEM,
FALSE);
......
......@@ -1197,7 +1197,7 @@ gimp_paint_options_new (GimpPaintInfo *paint_info)
options = g_object_new (paint_info->paint_options_type,
"gimp", paint_info->gimp,
"name", GIMP_OBJECT (paint_info)->name,
"name", gimp_object_get_name (paint_info),
"paint-info", paint_info,
NULL);
......
......@@ -91,7 +91,7 @@ file_load_invoker (GimpProcedure *procedure,
return_vals =
gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
context, progress, error,
GIMP_OBJECT (proc)->name,
gimp_object_get_name (proc),
new_args);
g_value_array_free (new_args);
......@@ -280,7 +280,7 @@ file_save_invoker (GimpProcedure *procedure,
return_vals =
gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
context, progress, error,
GIMP_OBJECT (proc)->name,
gimp_object_get_name (proc),
new_args);
g_value_array_free (new_args);
......
......@@ -579,7 +579,7 @@ gimp_pdb_get_strings (PDBStrings *strings,
if (compat)
{
strings->blurb = g_strdup_printf (COMPAT_BLURB,
GIMP_OBJECT (procedure)->name);
gimp_object_get_name (procedure));
strings->help = g_strdup (strings->blurb);
strings->author = NULL;
strings->copyright = NULL;
......
......@@ -983,7 +983,7 @@ gimp_plug_in_add_temp_proc (GimpPlugIn *plug_in,
g_return_if_fail (GIMP_IS_TEMPORARY_PROCEDURE (proc));
overridden = gimp_plug_in_procedure_find (plug_in->temp_procedures,
GIMP_OBJECT (proc)->name);
gimp_object_get_name (proc));
if (overridden)
gimp_plug_in_remove_temp_proc (plug_in,
......
......@@ -119,7 +119,7 @@ gimp_plug_in_def_add_procedure (GimpPlugInDef *plug_in_def,
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc));
overridden = gimp_plug_in_procedure_find (plug_in_def->procedures,
GIMP_OBJECT (proc)->name);
gimp_object_get_name (proc));
if (overridden)
gimp_plug_in_def_remove_procedure (plug_in_def, overridden);
......
......@@ -144,7 +144,7 @@ gimp_plug_in_manager_query (GimpPlugInManager *manager,
(*accel_strs)[i] = NULL;
(*prog_strs)[i] = g_strdup (proc->prog);
(*types_strs)[i] = g_strdup (proc->image_types);
(*realname_strs)[i] = g_strdup (GIMP_OBJECT (proc)->name);
(*realname_strs)[i] = g_strdup (gimp_object_get_name (proc));
(*time_ints)[i] = proc->mtime;
g_free (name);
......
......@@ -438,9 +438,9 @@ gimp_plug_in_manager_run_extensions (GimpPlugInManager *manager,
GError *error = NULL;
if (gimp->be_verbose)
g_print ("Starting extension: '%s'\n", GIMP_OBJECT (proc)->name);
g_print ("Starting extension: '%s'\n", gimp_object_get_name (proc));
status_callback (NULL, GIMP_OBJECT (proc)->name,
status_callback (NULL, gimp_object_get_name (proc),
(gdouble) nth / (gdouble) n_extensions);
args = g_value_array_new (0);
......@@ -633,7 +633,7 @@ gimp_plug_in_manager_add_to_db (GimpPlugInManager *manager,
gimp_pdb_execute_procedure_by_name (manager->gimp->pdb,
context, NULL, &error,
"gimp-register-save-handler",
G_TYPE_STRING, GIMP_OBJECT (proc)->name,
G_TYPE_STRING, gimp_object_get_name (proc),
G_TYPE_STRING, proc->extensions,
G_TYPE_STRING, proc->prefixes,
G_TYPE_NONE);
......@@ -644,7 +644,7 @@ gimp_plug_in_manager_add_to_db (GimpPlugInManager *manager,
gimp_pdb_execute_procedure_by_name (manager->gimp->pdb,
context, NULL, &error,
"gimp-register-magic-load-handler",
G_TYPE_STRING, GIMP_OBJECT (proc)->name,
G_TYPE_STRING, gimp_object_get_name (proc),
G_TYPE_STRING, proc->extensions,
G_TYPE_STRING, proc->prefixes,
G_TYPE_STRING, proc->magics,
......
......@@ -346,8 +346,8 @@ gimp_plug_in_manager_add_procedure (GimpPlugInManager *manager,
{
GimpPlugInProcedure *tmp_proc = list->data;
if (strcmp (GIMP_OBJECT (procedure)->name,
GIMP_OBJECT (tmp_proc)->name) == 0)
if (strcmp (gimp_object_get_name (procedure),
gimp_object_get_name (tmp_proc)) == 0)