Commit 23037b52 authored by Michael Natterer's avatar Michael Natterer 😴

app: convert all stock IDs kept around by the core by icon names

Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
parent 9ed5b3f4
......@@ -692,11 +692,11 @@ action_message (GimpDisplay *display,
{
GimpToolInfo *tool_info = GIMP_TOOL_OPTIONS (object)->tool_info;
icon_name = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
}
else if (GIMP_IS_VIEWABLE (object))
{
icon_name = gimp_viewable_get_stock_id (GIMP_VIEWABLE (object));
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (object));
}
va_start (args, format);
......
......@@ -459,7 +459,7 @@ plug_in_actions_add_proc (GimpActionGroup *group,
}
entry.name = gimp_object_get_name (proc);
entry.icon_name = gimp_plug_in_procedure_get_stock_id (proc);
entry.icon_name = gimp_plug_in_procedure_get_icon_name (proc);
entry.label = label;
entry.accelerator = NULL;
entry.tooltip = gimp_plug_in_procedure_get_blurb (proc);
......@@ -608,7 +608,7 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
"sensitive", sensitive,
"procedure", proc,
"label", label,
"icon-name", gimp_plug_in_procedure_get_stock_id (proc),
"icon-name", gimp_plug_in_procedure_get_icon_name (proc),
"tooltip", gimp_plug_in_procedure_get_blurb (proc),
NULL);
}
......
......@@ -209,7 +209,7 @@ tool_options_actions_update_presets (GimpActionGroup *group,
entry.name = g_strdup_printf ("%s-%03d", action_prefix, i);
entry.label = gimp_object_get_name (preset);
entry.icon_name = gimp_viewable_get_stock_id (GIMP_VIEWABLE (preset));
entry.icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (preset));
entry.value = i;
gimp_action_group_add_enum_actions (group, NULL, &entry, 1, callback);
......
......@@ -479,7 +479,7 @@ tools_actions_setup (GimpActionGroup *group)
gchar *tmp;
gchar *name;
icon_name = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
identifier = gimp_object_get_name (tool_info);
tmp = g_strndup (identifier + strlen ("gimp-"),
......
......@@ -119,29 +119,29 @@ gimp_brush_class_init (GimpBrushClass *klass)
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
object_class->finalize = gimp_brush_finalize;
object_class->get_property = gimp_brush_get_property;
object_class->set_property = gimp_brush_set_property;
gimp_object_class->get_memsize = gimp_brush_get_memsize;
viewable_class->default_stock_id = "gimp-tool-paintbrush";
viewable_class->get_size = gimp_brush_get_size;
viewable_class->get_new_preview = gimp_brush_get_new_preview;
viewable_class->get_description = gimp_brush_get_description;
data_class->dirty = gimp_brush_dirty;
data_class->get_extension = gimp_brush_get_extension;
klass->begin_use = gimp_brush_real_begin_use;
klass->end_use = gimp_brush_real_end_use;
klass->select_brush = gimp_brush_real_select_brush;
klass->want_null_motion = gimp_brush_real_want_null_motion;
klass->transform_size = gimp_brush_real_transform_size;
klass->transform_mask = gimp_brush_real_transform_mask;
klass->transform_pixmap = gimp_brush_real_transform_pixmap;
klass->transform_boundary = gimp_brush_real_transform_boundary;
klass->spacing_changed = NULL;
object_class->finalize = gimp_brush_finalize;
object_class->get_property = gimp_brush_get_property;
object_class->set_property = gimp_brush_set_property;
gimp_object_class->get_memsize = gimp_brush_get_memsize;
viewable_class->default_icon_name = "gimp-tool-paintbrush";
viewable_class->get_size = gimp_brush_get_size;
viewable_class->get_new_preview = gimp_brush_get_new_preview;
viewable_class->get_description = gimp_brush_get_description;
data_class->dirty = gimp_brush_dirty;
data_class->get_extension = gimp_brush_get_extension;
klass->begin_use = gimp_brush_real_begin_use;
klass->end_use = gimp_brush_real_end_use;
klass->select_brush = gimp_brush_real_select_brush;
klass->want_null_motion = gimp_brush_real_want_null_motion;
klass->transform_size = gimp_brush_real_transform_size;
klass->transform_mask = gimp_brush_real_transform_mask;
klass->transform_pixmap = gimp_brush_real_transform_pixmap;
klass->transform_boundary = gimp_brush_real_transform_boundary;
klass->spacing_changed = NULL;
g_object_class_install_property (object_class, PROP_SPACING,
g_param_spec_double ("spacing", NULL,
......
......@@ -73,16 +73,16 @@ gimp_buffer_class_init (GimpBufferClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
object_class->finalize = gimp_buffer_finalize;
object_class->finalize = gimp_buffer_finalize;
gimp_object_class->get_memsize = gimp_buffer_get_memsize;
gimp_object_class->get_memsize = gimp_buffer_get_memsize;
viewable_class->default_stock_id = "gtk-paste";
viewable_class->get_size = gimp_buffer_get_size;
viewable_class->get_preview_size = gimp_buffer_get_preview_size;
viewable_class->get_popup_size = gimp_buffer_get_popup_size;
viewable_class->get_new_preview = gimp_buffer_get_new_preview;
viewable_class->get_description = gimp_buffer_get_description;
viewable_class->default_icon_name = "gtk-paste";
viewable_class->get_size = gimp_buffer_get_size;
viewable_class->get_preview_size = gimp_buffer_get_preview_size;
viewable_class->get_popup_size = gimp_buffer_get_popup_size;
viewable_class->get_new_preview = gimp_buffer_get_new_preview;
viewable_class->get_description = gimp_buffer_get_description;
}
static void
......
......@@ -251,14 +251,14 @@ gimp_channel_class_init (GimpChannelClass *klass)
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
object_class->finalize = gimp_channel_finalize;
object_class->finalize = gimp_channel_finalize;
gimp_object_class->get_memsize = gimp_channel_get_memsize;
gimp_object_class->get_memsize = gimp_channel_get_memsize;
viewable_class->get_description = gimp_channel_get_description;
viewable_class->default_stock_id = "gimp-channel";
viewable_class->get_description = gimp_channel_get_description;
viewable_class->default_icon_name = "gimp-channel";
filter_class->get_node = gimp_channel_get_node;
filter_class->get_node = gimp_channel_get_node;
item_class->is_attached = gimp_channel_is_attached;
item_class->get_tree = gimp_channel_get_tree;
......
......@@ -131,22 +131,22 @@ gimp_curve_class_init (GimpCurveClass *klass)
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
GParamSpec *array_spec;
object_class->finalize = gimp_curve_finalize;
object_class->set_property = gimp_curve_set_property;
object_class->get_property = gimp_curve_get_property;
gimp_object_class->get_memsize = gimp_curve_get_memsize;
viewable_class->default_stock_id = "FIXME";
viewable_class->get_preview_size = gimp_curve_get_preview_size;
viewable_class->get_popup_size = gimp_curve_get_popup_size;
viewable_class->get_new_preview = gimp_curve_get_new_preview;
viewable_class->get_description = gimp_curve_get_description;
data_class->dirty = gimp_curve_dirty;
data_class->save = gimp_curve_save;
data_class->get_extension = gimp_curve_get_extension;
data_class->duplicate = gimp_curve_duplicate;
object_class->finalize = gimp_curve_finalize;
object_class->set_property = gimp_curve_set_property;
object_class->get_property = gimp_curve_get_property;
gimp_object_class->get_memsize = gimp_curve_get_memsize;
viewable_class->default_icon_name = "FIXME icon name";
viewable_class->get_preview_size = gimp_curve_get_preview_size;
viewable_class->get_popup_size = gimp_curve_get_popup_size;
viewable_class->get_new_preview = gimp_curve_get_new_preview;
viewable_class->get_description = gimp_curve_get_description;
data_class->dirty = gimp_curve_dirty;
data_class->save = gimp_curve_save;
data_class->get_extension = gimp_curve_get_extension;
data_class->duplicate = gimp_curve_duplicate;
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CURVE_TYPE,
"curve-type",
......
......@@ -933,8 +933,8 @@ gimp_drawable_sync_fs_filter (GimpDrawable *drawable,
gboolean linear;
private->fs_filter = gimp_filter_new ("Floating Selection");
gimp_viewable_set_stock_id (GIMP_VIEWABLE (private->fs_filter),
"gimp-floating-selection");
gimp_viewable_set_icon_name (GIMP_VIEWABLE (private->fs_filter),
"gimp-floating-selection");
node = gimp_filter_get_node (private->fs_filter);
......
......@@ -123,7 +123,7 @@ gimp_dynamics_class_init (GimpDynamicsClass *klass)
object_class->get_property = gimp_dynamics_get_property;
object_class->dispatch_properties_changed = gimp_dynamics_dispatch_properties_changed;
viewable_class->default_stock_id = "gimp-dynamics";
viewable_class->default_icon_name = "gimp-dynamics";
data_class->save = gimp_dynamics_save;
data_class->get_extension = gimp_dynamics_get_extension;
......
......@@ -99,18 +99,18 @@ gimp_gradient_class_init (GimpGradientClass *klass)
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
object_class->finalize = gimp_gradient_finalize;
object_class->finalize = gimp_gradient_finalize;
gimp_object_class->get_memsize = gimp_gradient_get_memsize;
gimp_object_class->get_memsize = gimp_gradient_get_memsize;
viewable_class->default_stock_id = "gimp-gradient";
viewable_class->get_preview_size = gimp_gradient_get_preview_size;
viewable_class->get_popup_size = gimp_gradient_get_popup_size;
viewable_class->get_new_preview = gimp_gradient_get_new_preview;
viewable_class->default_icon_name = "gimp-gradient";
viewable_class->get_preview_size = gimp_gradient_get_preview_size;
viewable_class->get_popup_size = gimp_gradient_get_popup_size;
viewable_class->get_new_preview = gimp_gradient_get_new_preview;
data_class->save = gimp_gradient_save;
data_class->get_extension = gimp_gradient_get_extension;
data_class->duplicate = gimp_gradient_duplicate;
data_class->save = gimp_gradient_save;
data_class->get_extension = gimp_gradient_get_extension;
data_class->duplicate = gimp_gradient_duplicate;
}
static void
......
......@@ -197,39 +197,39 @@ gimp_group_layer_class_init (GimpGroupLayerClass *klass)
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
GimpDrawableClass *drawable_class = GIMP_DRAWABLE_CLASS (klass);
object_class->set_property = gimp_group_layer_set_property;
object_class->get_property = gimp_group_layer_get_property;
object_class->finalize = gimp_group_layer_finalize;
gimp_object_class->get_memsize = gimp_group_layer_get_memsize;
viewable_class->default_stock_id = "gtk-directory";
viewable_class->get_size = gimp_group_layer_get_size;
viewable_class->get_children = gimp_group_layer_get_children;
viewable_class->set_expanded = gimp_group_layer_set_expanded;
viewable_class->get_expanded = gimp_group_layer_get_expanded;
item_class->is_position_locked = gimp_group_layer_is_position_locked;
item_class->duplicate = gimp_group_layer_duplicate;
item_class->convert = gimp_group_layer_convert;
item_class->translate = gimp_group_layer_translate;
item_class->scale = gimp_group_layer_scale;
item_class->resize = gimp_group_layer_resize;
item_class->flip = gimp_group_layer_flip;
item_class->rotate = gimp_group_layer_rotate;
item_class->transform = gimp_group_layer_transform;
item_class->default_name = _("Layer Group");
item_class->rename_desc = C_("undo-type", "Rename Layer Group");
item_class->translate_desc = C_("undo-type", "Move Layer Group");
item_class->scale_desc = C_("undo-type", "Scale Layer Group");
item_class->resize_desc = C_("undo-type", "Resize Layer Group");
item_class->flip_desc = C_("undo-type", "Flip Layer Group");
item_class->rotate_desc = C_("undo-type", "Rotate Layer Group");
item_class->transform_desc = C_("undo-type", "Transform Layer Group");
drawable_class->estimate_memsize = gimp_group_layer_estimate_memsize;
drawable_class->convert_type = gimp_group_layer_convert_type;
object_class->set_property = gimp_group_layer_set_property;
object_class->get_property = gimp_group_layer_get_property;
object_class->finalize = gimp_group_layer_finalize;
gimp_object_class->get_memsize = gimp_group_layer_get_memsize;
viewable_class->default_icon_name = "gtk-directory";
viewable_class->get_size = gimp_group_layer_get_size;
viewable_class->get_children = gimp_group_layer_get_children;
viewable_class->set_expanded = gimp_group_layer_set_expanded;
viewable_class->get_expanded = gimp_group_layer_get_expanded;
item_class->is_position_locked = gimp_group_layer_is_position_locked;
item_class->duplicate = gimp_group_layer_duplicate;
item_class->convert = gimp_group_layer_convert;
item_class->translate = gimp_group_layer_translate;
item_class->scale = gimp_group_layer_scale;
item_class->resize = gimp_group_layer_resize;
item_class->flip = gimp_group_layer_flip;
item_class->rotate = gimp_group_layer_rotate;
item_class->transform = gimp_group_layer_transform;
item_class->default_name = _("Layer Group");
item_class->rename_desc = C_("undo-type", "Rename Layer Group");
item_class->translate_desc = C_("undo-type", "Move Layer Group");
item_class->scale_desc = C_("undo-type", "Scale Layer Group");
item_class->resize_desc = C_("undo-type", "Resize Layer Group");
item_class->flip_desc = C_("undo-type", "Flip Layer Group");
item_class->rotate_desc = C_("undo-type", "Rotate Layer Group");
item_class->transform_desc = C_("undo-type", "Transform Layer Group");
drawable_class->estimate_memsize = gimp_group_layer_estimate_memsize;
drawable_class->convert_type = gimp_group_layer_convert_type;
g_type_class_add_private (klass, sizeof (GimpGroupLayerPrivate));
}
......
......@@ -541,7 +541,7 @@ gimp_image_class_init (GimpImageClass *klass)
gimp_object_class->name_changed = gimp_image_name_changed;
gimp_object_class->get_memsize = gimp_image_get_memsize;
viewable_class->default_stock_id = "gimp-image";
viewable_class->default_icon_name = "gimp-image";
viewable_class->get_size = gimp_image_get_size;
viewable_class->size_changed = gimp_image_size_changed;
viewable_class->get_preview_size = gimp_image_get_preview_size;
......
......@@ -65,7 +65,7 @@ struct _GimpImageMap
GimpDrawable *drawable;
gchar *undo_desc;
GeglNode *operation;
gchar *stock_id;
gchar *icon_name;
GimpImageMapRegion region;
gboolean gamma_hack;
......@@ -150,10 +150,10 @@ gimp_image_map_finalize (GObject *object)
image_map->operation = NULL;
}
if (image_map->stock_id)
if (image_map->icon_name)
{
g_free (image_map->stock_id);
image_map->stock_id = NULL;
g_free (image_map->icon_name);
image_map->icon_name = NULL;
}
if (image_map->filter)
......@@ -181,7 +181,7 @@ GimpImageMap *
gimp_image_map_new (GimpDrawable *drawable,
const gchar *undo_desc,
GeglNode *operation,
const gchar *stock_id)
const gchar *icon_name)
{
GimpImageMap *image_map;
......@@ -195,7 +195,7 @@ gimp_image_map_new (GimpDrawable *drawable,
image_map->undo_desc = g_strdup (undo_desc);
image_map->operation = g_object_ref (operation);
image_map->stock_id = g_strdup (stock_id);
image_map->icon_name = g_strdup (icon_name);
gimp_viewable_preview_freeze (GIMP_VIEWABLE (drawable));
......@@ -278,8 +278,8 @@ gimp_image_map_apply (GimpImageMap *image_map,
GeglNode *input;
image_map->filter = gimp_filter_new (image_map->undo_desc);
gimp_viewable_set_stock_id (GIMP_VIEWABLE (image_map->filter),
image_map->stock_id);
gimp_viewable_set_icon_name (GIMP_VIEWABLE (image_map->filter),
image_map->icon_name);
filter_node = gimp_filter_get_node (image_map->filter);
......
......@@ -59,7 +59,7 @@ GType gimp_image_map_get_type (void) G_GNUC_CONST;
GimpImageMap * gimp_image_map_new (GimpDrawable *drawable,
const gchar *undo_desc,
GeglNode *operation,
const gchar *stock_id);
const gchar *icon_name);
void gimp_image_map_set_region (GimpImageMap *image_map,
GimpImageMapRegion region);
......
......@@ -278,7 +278,7 @@ gimp_layer_class_init (GimpLayerClass *klass)
gimp_object_class->name_changed = gimp_layer_name_changed;
gimp_object_class->get_memsize = gimp_layer_get_memsize;
viewable_class->default_stock_id = "gimp-layer";
viewable_class->default_icon_name = "gimp-layer";
viewable_class->invalidate_preview = gimp_layer_invalidate_preview;
viewable_class->get_description = gimp_layer_get_description;
......
......@@ -71,7 +71,7 @@ gimp_layer_mask_class_init (GimpLayerMaskClass *klass)
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
GimpDrawableClass *drawable_class = GIMP_DRAWABLE_CLASS (klass);
viewable_class->default_stock_id = "gimp-layer-mask";
viewable_class->default_icon_name = "gimp-layer-mask";
item_class->is_attached = gimp_layer_mask_is_attached;
item_class->is_content_locked = gimp_layer_mask_is_content_locked;
......@@ -82,7 +82,7 @@ gimp_layer_mask_class_init (GimpLayerMaskClass *klass)
item_class->translate_desc = C_("undo-type", "Move Layer Mask");
item_class->to_selection_desc = C_("undo-type", "Layer Mask to Selection");
drawable_class->convert_type = gimp_layer_mask_convert_type;
drawable_class->convert_type = gimp_layer_mask_convert_type;
}
static void
......
......@@ -104,18 +104,18 @@ gimp_paint_info_new (Gimp *gimp,
GType paint_options_type,
const gchar *identifier,
const gchar *blurb,
const gchar *stock_id)
const gchar *icon_name)
{
GimpPaintInfo *paint_info;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (identifier != NULL, NULL);
g_return_val_if_fail (blurb != NULL, NULL);
g_return_val_if_fail (stock_id != NULL, NULL);
g_return_val_if_fail (icon_name != NULL, NULL);
paint_info = g_object_new (GIMP_TYPE_PAINT_INFO,
"name", identifier,
"stock-id", stock_id,
"name", identifier,
"icon-name", icon_name,
NULL);
paint_info->gimp = gimp;
......
......@@ -59,7 +59,7 @@ GimpPaintInfo * gimp_paint_info_new (Gimp *gimp,
GType paint_options_type,
const gchar *identifier,
const gchar *blurb,
const gchar *stock_id);
const gchar *icon_name);
void gimp_paint_info_set_standard (Gimp *gimp,
GimpPaintInfo *paint_info);
......
......@@ -90,19 +90,19 @@ gimp_palette_class_init (GimpPaletteClass *klass)
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
object_class->finalize = gimp_palette_finalize;
object_class->finalize = gimp_palette_finalize;
gimp_object_class->get_memsize = gimp_palette_get_memsize;
gimp_object_class->get_memsize = gimp_palette_get_memsize;
viewable_class->default_stock_id = "gtk-select-color";
viewable_class->get_preview_size = gimp_palette_get_preview_size;
viewable_class->get_popup_size = gimp_palette_get_popup_size;
viewable_class->get_new_preview = gimp_palette_get_new_preview;
viewable_class->get_description = gimp_palette_get_description;
viewable_class->default_icon_name = "gtk-select-color";
viewable_class->get_preview_size = gimp_palette_get_preview_size;
viewable_class->get_popup_size = gimp_palette_get_popup_size;
viewable_class->get_new_preview = gimp_palette_get_new_preview;
viewable_class->get_description = gimp_palette_get_description;
data_class->save = gimp_palette_save;
data_class->get_extension = gimp_palette_get_extension;
data_class->duplicate = gimp_palette_duplicate;
data_class->save = gimp_palette_save;
data_class->get_extension = gimp_palette_get_extension;
data_class->duplicate = gimp_palette_duplicate;
}
static void
......
......@@ -71,17 +71,17 @@ gimp_pattern_class_init (GimpPatternClass *klass)
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
object_class->finalize = gimp_pattern_finalize;
object_class->finalize = gimp_pattern_finalize;
gimp_object_class->get_memsize = gimp_pattern_get_memsize;
gimp_object_class->get_memsize = gimp_pattern_get_memsize;
viewable_class->default_stock_id = "gimp-tool-bucket-fill";
viewable_class->get_size = gimp_pattern_get_size;
viewable_class->get_new_preview = gimp_pattern_get_new_preview;
viewable_class->get_description = gimp_pattern_get_description;
viewable_class->default_icon_name = "gimp-tool-bucket-fill";
viewable_class->get_size = gimp_pattern_get_size;
viewable_class->get_new_preview = gimp_pattern_get_new_preview;
viewable_class->get_description = gimp_pattern_get_description;
data_class->get_extension = gimp_pattern_get_extension;
data_class->duplicate = gimp_pattern_duplicate;
data_class->get_extension = gimp_pattern_get_extension;
data_class->duplicate = gimp_pattern_duplicate;
}
static void
......
......@@ -148,7 +148,7 @@ gimp_selection_class_init (GimpSelectionClass *klass)
GimpDrawableClass *drawable_class = GIMP_DRAWABLE_CLASS (klass);
GimpChannelClass *channel_class = GIMP_CHANNEL_CLASS (klass);
viewable_class->default_stock_id = "gimp-selection";
viewable_class->default_icon_name = "gimp-selection";
item_class->is_attached = gimp_selection_is_attached;
item_class->get_tree = gimp_selection_get_tree;
......
......@@ -119,7 +119,7 @@ gimp_template_class_init (GimpTemplateClass *klass)
object_class->get_property = gimp_template_get_property;
object_class->notify = gimp_template_notify;
viewable_class->default_stock_id = "gimp-template";
viewable_class->default_icon_name = "gimp-template";
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_WIDTH, "width",
NULL,
......@@ -346,7 +346,7 @@ gimp_template_notify (GObject *object,
private->precision,
private->width, private->height);
if (! strcmp (pspec->name, "stock-id"))
if (! strcmp (pspec->name, "icon-name"))
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (object));
}
......
......@@ -235,7 +235,7 @@ gimp_tool_info_new (Gimp *gimp,
const gchar *help_domain,
const gchar *help_id,
const gchar *paint_core_name,
const gchar *stock_id)
const gchar *icon_name)
{
GimpPaintInfo *paint_info;
GimpToolInfo *tool_info;
......@@ -247,7 +247,7 @@ gimp_tool_info_new (Gimp *gimp,
g_return_val_if_fail (menu_label != NULL, NULL);
g_return_val_if_fail (help_id != NULL, NULL);
g_return_val_if_fail (paint_core_name != NULL, NULL);
g_return_val_if_fail (stock_id != NULL, NULL);
g_return_val_if_fail (icon_name != NULL, NULL);
paint_info = (GimpPaintInfo *)
gimp_container_get_child_by_name (gimp->paint_info_list, paint_core_name);
......@@ -255,8 +255,8 @@ gimp_tool_info_new (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_PAINT_INFO (paint_info), NULL);
tool_info = g_object_new (GIMP_TYPE_TOOL_INFO,
"name", identifier,
"stock-id", stock_id,
"name", identifier,
"icon-name", icon_name,
NULL);
tool_info->gimp = gimp;
......
......@@ -78,7 +78,7 @@ GimpToolInfo * gimp_tool_info_new (Gimp *gimp,
const gchar *help_domain,
const gchar *help_id,
const gchar *paint_core_name,
const gchar *stock_id);
const gchar *icon_name);
void gimp_tool_info_set_standard (Gimp *gimp,
GimpToolInfo *tool_info);
......
......@@ -498,7 +498,7 @@ gimp_tool_preset_new (GimpContext *context,
const gchar *unused)
{
GimpToolInfo *tool_info;
const gchar *stock_id;
const gchar *icon_name;
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
......@@ -506,11 +506,11 @@ gimp_tool_preset_new (GimpContext *context,
g_return_val_if_fail (tool_info != NULL, NULL);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
return g_object_new (GIMP_TYPE_TOOL_PRESET,
"name", tool_info->blurb,
"stock-id", stock_id,
"icon-name", icon_name,
"gimp", context->gimp,
"tool-options", tool_info->tool_options,
NULL);
......
......@@ -128,19 +128,19 @@ gimp_undo_class_init (GimpUndoClass *klass)
G_TYPE_NONE, 1,
GIMP_TYPE_UNDO_MODE);
object_class->constructed = gimp_undo_constructed;
object_class->finalize = gimp_undo_finalize;
object_class->set_property = gimp_undo_set_property;
object_class->get_property = gimp_undo_get_property;
object_class->constructed = gimp_undo_constructed;
object_class->finalize = gimp_undo_finalize;
object_class->set_property = gimp_undo_set_property;
object_class->get_property = gimp_undo_get_property;
gimp_object_class->get_memsize = gimp_undo_get_memsize;
gimp_object_class->get_memsize = gimp_undo_get_memsize;
viewable_class->default_stock_id = "gtk-undo";
viewable_class->get_popup_size = gimp_undo_get_popup_size;
viewable_class->get_new_preview = gimp_undo_get_new_preview;
viewable_class->default_icon_name = "gtk-undo";
viewable_class->get_popup_size = gimp_undo_get_popup_size;
viewable_class->get_new_preview = gimp_undo_get_new_preview;
klass->pop = gimp_undo_real_pop;
klass->free = gimp_undo_real_free;
klass->pop = gimp_undo_real_pop;
klass->free = gimp_undo_real_free;
g_object_class_install_property (object_class, PROP_IMAGE,
g_param_spec_object ("image", NULL, NULL,
......
......@@ -44,7 +44,8 @@
enum
{
PROP_0,
PROP_STOCK_ID,
PROP_STOCK_ID, /* compat */
PROP_ICON_NAME,
PROP_ICON_PIXBUF,
PROP_FROZEN
};
......@@ -61,7 +62,7 @@ typedef struct _GimpViewablePrivate GimpViewablePrivate;
struct _GimpViewablePrivate
{
gchar *stock_id;
gchar *icon_name;
GdkPixbuf *icon_pixbuf;
gint freeze_count;
GimpViewable *parent;
......@@ -164,7 +165,7 @@ gimp_viewable_class_init (GimpViewableClass *klass)
gimp_object_class->get_memsize = gimp_viewable_get_memsize;
klass->default_stock_id = "gimp-question";
klass->default_icon_name = "gimp-question";
klass->name_changed_signal = "name-changed";
klass->invalidate_preview = gimp_viewable_real_invalidate_preview;
......@@ -182,10 +183,15 @@ gimp_viewable_class_init (GimpViewableClass *klass)
klass->set_expanded = NULL;
klass->get_expanded = NULL;
/* compat property */
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_STOCK_ID, "stock-id",
NULL, NULL,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_ICON_NAME, "icon-name",
NULL, NULL,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_ICON_PIXBUF,
"icon-pixbuf", NULL,
GDK_TYPE_PIXBUF,
......@@ -218,10 +224,10 @@ gimp_viewable_finalize (GObject *object)
{
GimpViewablePrivate *private = GET_PRIVATE (object);
if (private->stock_id)
if (private->icon_name)
{
g_free (private->stock_id);
private->stock_id = NULL;
g_free (private->icon_name);
private->icon_name = NULL;
}
if (private->icon_pixbuf)
......@@ -257,7 +263,8 @@ gimp_viewable_set_property (GObject *object,
switch (property_id)
{
case PROP_STOCK_ID:
gimp_viewable_set_stock_id (viewable, g_value_get_string (value));
case PROP_ICON_NAME:
gimp_viewable_set_icon_name (viewable, g_value_get_string (value));
break;
case PROP_ICON_PIXBUF:
if (private->icon_pixbuf)
......@@ -286,7 +293,8 @@ gimp_viewable_get_property (GObject *object,
switch (property_id)
{
case PROP_STOCK_ID:
g_value_set_string (value, gimp_viewable_get_stock_id (viewable));
case PROP_ICON_NAME:
g_value_set_string (value, gimp_viewable_get_icon_name (viewable));
break;
case PROP_ICON_PIXBUF: