[gimp] libgimpwidgets: add GimpColorDisplayClass::icon_name
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpwidgets: add GimpColorDisplayClass::icon_name
- Date: Sat, 10 May 2014 09:55:10 +0000 (UTC)
commit 4b629e984baaaefabfe464508eb0dcd873b4221b
Author: Michael Natterer <mitch gimp org>
Date: Sat May 10 11:53:07 2014 +0200
libgimpwidgets: add GimpColorDisplayClass::icon_name
and deprecate its stock_id.
app/widgets/gimpcolordisplayeditor.c | 6 +++---
libgimpwidgets/gimpcolordisplay.c | 4 +---
libgimpwidgets/gimpcolordisplay.h | 10 +++++++---
modules/display-filter-color-blind.c | 2 +-
modules/display-filter-gamma.c | 2 +-
modules/display-filter-high-contrast.c | 2 +-
modules/display-filter-lcms.c | 2 +-
modules/display-filter-proof.c | 2 +-
8 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/app/widgets/gimpcolordisplayeditor.c b/app/widgets/gimpcolordisplayeditor.c
index fd77c65..e4fb41f 100644
--- a/app/widgets/gimpcolordisplayeditor.c
+++ b/app/widgets/gimpcolordisplayeditor.c
@@ -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);
diff --git a/libgimpwidgets/gimpcolordisplay.c b/libgimpwidgets/gimpcolordisplay.c
index c3dcc80..46ed138 100644
--- a/libgimpwidgets/gimpcolordisplay.c
+++ b/libgimpwidgets/gimpcolordisplay.c
@@ -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;
diff --git a/libgimpwidgets/gimpcolordisplay.h b/libgimpwidgets/gimpcolordisplay.h
index 1556928..34fd4f0 100644
--- a/libgimpwidgets/gimpcolordisplay.h
+++ b/libgimpwidgets/gimpcolordisplay.h
@@ -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;
};
diff --git a/modules/display-filter-color-blind.c b/modules/display-filter-color-blind.c
index 8a2a455..91b25c7 100644
--- a/modules/display-filter-color-blind.c
+++ b/modules/display-filter-color-blind.c
@@ -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;
diff --git a/modules/display-filter-gamma.c b/modules/display-filter-gamma.c
index 749c74f..df5ac44 100644
--- a/modules/display-filter-gamma.c
+++ b/modules/display-filter-gamma.c
@@ -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;
diff --git a/modules/display-filter-high-contrast.c b/modules/display-filter-high-contrast.c
index 4058a12..0f7da7b 100644
--- a/modules/display-filter-high-contrast.c
+++ b/modules/display-filter-high-contrast.c
@@ -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;
diff --git a/modules/display-filter-lcms.c b/modules/display-filter-lcms.c
index 2561f14..5e16b03 100644
--- a/modules/display-filter-lcms.c
+++ b/modules/display-filter-lcms.c
@@ -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;
diff --git a/modules/display-filter-proof.c b/modules/display-filter-proof.c
index b92aaae..206b728 100644
--- a/modules/display-filter-proof.c
+++ b/modules/display-filter-proof.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]