libgimpwidgets: add GimpColorDisplayClass::icon_name

and deprecate its stock_id.
This commit is contained in:
Michael Natterer 2014-05-10 11:53:07 +02:00
parent 1ec64abb8b
commit 4b629e984b
8 changed files with 16 additions and 14 deletions

View File

@ -401,7 +401,7 @@ gimp_color_display_editor_new (GimpColorDisplayStack *stack,
gtk_list_store_append (editor->src, &iter);
gtk_list_store_set (editor->src, &iter,
SRC_COLUMN_ICON, display_class->stock_id,
SRC_COLUMN_ICON, display_class->icon_name,
SRC_COLUMN_NAME, display_class->name,
SRC_COLUMN_TYPE, display_types[i],
-1);
@ -422,7 +422,7 @@ gimp_color_display_editor_new (GimpColorDisplayStack *stack,
enabled = gimp_color_display_get_enabled (display);
name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->name;
icon_name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->stock_id;
icon_name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->icon_name;
gtk_list_store_append (editor->dest, &iter);
@ -625,7 +625,7 @@ gimp_color_display_editor_added (GimpColorDisplayStack *stack,
enabled = gimp_color_display_get_enabled (display);
name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->name;
icon_name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->stock_id;
icon_name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->icon_name;
gtk_list_store_insert (editor->dest, &iter, position);

View File

@ -33,8 +33,6 @@
#include "gimpwidgetstypes.h"
#include "gimpstock.h"
#undef GIMP_DISABLE_DEPRECATED
#include "gimpcolordisplay.h"
@ -138,7 +136,7 @@ gimp_color_display_class_init (GimpColorDisplayClass *klass)
klass->name = "Unnamed";
klass->help_id = NULL;
klass->stock_id = GIMP_STOCK_DISPLAY_FILTER;
klass->icon_name = GIMP_STOCK_DISPLAY_FILTER;
klass->clone = NULL;
klass->convert_buffer = NULL;

View File

@ -83,7 +83,11 @@ struct _GimpColorDisplayClass
/* signals */
void (* changed) (GimpColorDisplay *display);
const gchar *stock_id;
#ifdef GIMP_DISABLE_DEPRECATED
gpointer deprecated_stock_id;
#else
const gchar *stock_id;
#endif
/* implementing the GimpColorDisplay::convert_surface method is deprecated */
void (* convert_surface) (GimpColorDisplay *display,
@ -93,8 +97,8 @@ struct _GimpColorDisplayClass
GeglBuffer *buffer,
GeglRectangle *area);
/* Padding for future expansion */
void (* _gimp_reserved4) (void);
/* icon name */
const gchar *icon_name;
};

View File

@ -255,7 +255,7 @@ cdisplay_colorblind_class_init (CdisplayColorblindClass *klass)
display_class->name = _("Color Deficient Vision");
display_class->help_id = "gimp-colordisplay-colorblind";
display_class->stock_id = GIMP_STOCK_DISPLAY_FILTER_COLORBLIND;
display_class->icon_name = GIMP_STOCK_DISPLAY_FILTER_COLORBLIND;
display_class->convert_buffer = cdisplay_colorblind_convert_buffer;
display_class->configure = cdisplay_colorblind_configure;

View File

@ -126,7 +126,7 @@ cdisplay_gamma_class_init (CdisplayGammaClass *klass)
display_class->name = _("Gamma");
display_class->help_id = "gimp-colordisplay-gamma";
display_class->stock_id = GIMP_STOCK_DISPLAY_FILTER_GAMMA;
display_class->icon_name = GIMP_STOCK_DISPLAY_FILTER_GAMMA;
display_class->convert_buffer = cdisplay_gamma_convert_buffer;
display_class->configure = cdisplay_gamma_configure;

View File

@ -126,7 +126,7 @@ cdisplay_contrast_class_init (CdisplayContrastClass *klass)
display_class->name = _("Contrast");
display_class->help_id = "gimp-colordisplay-contrast";
display_class->stock_id = GIMP_STOCK_DISPLAY_FILTER_CONTRAST;
display_class->icon_name = GIMP_STOCK_DISPLAY_FILTER_CONTRAST;
display_class->convert_buffer = cdisplay_contrast_convert_buffer;
display_class->configure = cdisplay_contrast_configure;

View File

@ -133,7 +133,7 @@ cdisplay_lcms_class_init (CdisplayLcmsClass *klass)
display_class->name = _("Color Management");
display_class->help_id = "gimp-colordisplay-lcms";
display_class->stock_id = GIMP_STOCK_DISPLAY_FILTER_LCMS;
display_class->icon_name = GIMP_STOCK_DISPLAY_FILTER_LCMS;
display_class->configure = cdisplay_lcms_configure;
display_class->convert_buffer = cdisplay_lcms_convert_buffer;

View File

@ -142,7 +142,7 @@ cdisplay_proof_class_init (CdisplayProofClass *klass)
display_class->name = _("Color Proof");
display_class->help_id = "gimp-colordisplay-proof";
display_class->stock_id = GIMP_STOCK_DISPLAY_FILTER_PROOF;
display_class->icon_name = GIMP_STOCK_DISPLAY_FILTER_PROOF;
display_class->convert_buffer = cdisplay_proof_convert_buffer;
display_class->configure = cdisplay_proof_configure;