[gimp] app, pdb, libgimp: rename values of enum GimpConvertPaletteType
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, pdb, libgimp: rename values of enum GimpConvertPaletteType
- Date: Sun, 26 Feb 2017 19:56:23 +0000 (UTC)
commit fb3d1e4508a6d7563b0f73fbbec6285df68893ec
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 26 20:55:00 2017 +0100
app, pdb, libgimp: rename values of enum GimpConvertPaletteType
app/config/gimpdialogconfig.c | 2 +-
app/core/gimpimage-convert-indexed.c | 36 +++++++++++++++++-----------------
app/dialogs/convert-indexed-dialog.c | 10 ++++----
app/pdb/image-convert-cmds.c | 12 +++++-----
libgimp/gimpexport.c | 18 +++++++++++-----
libgimp/gimpimageconvert_pdb.c | 6 ++--
libgimpbase/gimpbase-private.c | 2 +
libgimpbase/gimpbaseenums.c | 16 +++++++-------
libgimpbase/gimpbaseenums.h | 18 ++++++++++++----
libgimpbase/gimpcompatenums.c | 36 ++++++++++++++++++++++++++++++++++
libgimpbase/gimpcompatenums.h | 14 +++++++++++++
plug-ins/file-ico/ico-dialog.c | 4 +-
plug-ins/file-ico/ico-save.c | 4 +-
tools/pdbgen/enums.pl | 17 ++++++++-------
tools/pdbgen/pdb/image_convert.pdb | 11 +++++----
15 files changed, 137 insertions(+), 69 deletions(-)
---
diff --git a/app/config/gimpdialogconfig.c b/app/config/gimpdialogconfig.c
index 3b5c889..3171dbf 100644
--- a/app/config/gimpdialogconfig.c
+++ b/app/config/gimpdialogconfig.c
@@ -223,7 +223,7 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
"Default palette type for indexed conversion",
IMAGE_CONVERT_INDEXED_PALETTE_TYPE_BLURB,
GIMP_TYPE_CONVERT_PALETTE_TYPE,
- GIMP_MAKE_PALETTE,
+ GIMP_CONVERT_PALETTE_GENERATE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_INT (object_class,
diff --git a/app/core/gimpimage-convert-indexed.c b/app/core/gimpimage-convert-indexed.c
index df3e2e8..abe75c1 100644
--- a/app/core/gimpimage-convert-indexed.c
+++ b/app/core/gimpimage-convert-indexed.c
@@ -778,10 +778,10 @@ gimp_image_convert_indexed (GimpImage *image,
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- if (palette_type == GIMP_CUSTOM_PALETTE)
+ if (palette_type == GIMP_CONVERT_PALETTE_CUSTOM)
{
if (! custom_palette)
- palette_type = GIMP_MONO_PALETTE;
+ palette_type = GIMP_CONVERT_PALETTE_MONO;
if (gimp_palette_get_n_colors (custom_palette) == 0)
{
@@ -830,7 +830,7 @@ gimp_image_convert_indexed (GimpImage *image,
*/
if (old_type == GIMP_GRAY &&
max_colors == 256 &&
- palette_type == GIMP_MAKE_PALETTE)
+ palette_type == GIMP_CONVERT_PALETTE_GENERATE)
{
dither_type = GIMP_CONVERT_DITHER_NONE;
}
@@ -840,7 +840,7 @@ gimp_image_convert_indexed (GimpImage *image,
dither_alpha,
progress);
- if (palette_type == GIMP_MAKE_PALETTE)
+ if (palette_type == GIMP_CONVERT_PALETTE_GENERATE)
{
if (old_type == GIMP_GRAY)
zero_histogram_gray (quantobj->histogram);
@@ -885,7 +885,7 @@ gimp_image_convert_indexed (GimpImage *image,
if (old_type == GIMP_RGB &&
! needs_quantize &&
- palette_type == GIMP_MAKE_PALETTE)
+ palette_type == GIMP_CONVERT_PALETTE_GENERATE)
{
gint i;
@@ -922,7 +922,7 @@ gimp_image_convert_indexed (GimpImage *image,
quantobj->first_pass (quantobj);
}
- if (palette_type == GIMP_MAKE_PALETTE)
+ if (palette_type == GIMP_CONVERT_PALETTE_GENERATE)
qsort (quantobj->cmap,
quantobj->actual_number_of_colors, sizeof (Color),
color_quicksort);
@@ -1004,7 +1004,7 @@ gimp_image_convert_indexed (GimpImage *image,
}
/* Set the final palette on the image */
- if (remove_duplicates && (palette_type != GIMP_MAKE_PALETTE))
+ if (remove_duplicates && (palette_type != GIMP_CONVERT_PALETTE_GENERATE))
{
guchar colormap[GIMP_IMAGE_COLORMAP_SIZE];
gint i, j;
@@ -4333,7 +4333,7 @@ initialize_median_cut (GimpImageBaseType type,
/* Initialize the data structures */
quantobj = g_new (QuantizeObj, 1);
- if (type == GIMP_GRAY && palette_type == GIMP_MAKE_PALETTE)
+ if (type == GIMP_GRAY && palette_type == GIMP_CONVERT_PALETTE_GENERATE)
quantobj->histogram = g_new (ColorFreq, 256);
else
quantobj->histogram = g_new (ColorFreq,
@@ -4349,23 +4349,23 @@ initialize_median_cut (GimpImageBaseType type,
case GIMP_GRAY:
switch (palette_type)
{
- case GIMP_MAKE_PALETTE:
+ case GIMP_CONVERT_PALETTE_GENERATE:
quantobj->first_pass = median_cut_pass1_gray;
break;
- case GIMP_WEB_PALETTE:
+ case GIMP_CONVERT_PALETTE_WEB:
quantobj->first_pass = webpal_pass1;
break;
- case GIMP_CUSTOM_PALETTE:
+ case GIMP_CONVERT_PALETTE_CUSTOM:
quantobj->first_pass = custompal_pass1;
needs_quantize = TRUE;
break;
- case GIMP_MONO_PALETTE:
+ case GIMP_CONVERT_PALETTE_MONO:
default:
quantobj->first_pass = monopal_pass1;
}
- if (palette_type == GIMP_WEB_PALETTE ||
- palette_type == GIMP_CUSTOM_PALETTE)
+ if (palette_type == GIMP_CONVERT_PALETTE_WEB ||
+ palette_type == GIMP_CONVERT_PALETTE_CUSTOM)
{
switch (dither_type)
{
@@ -4424,18 +4424,18 @@ initialize_median_cut (GimpImageBaseType type,
case GIMP_RGB:
switch (palette_type)
{
- case GIMP_MAKE_PALETTE:
+ case GIMP_CONVERT_PALETTE_GENERATE:
quantobj->first_pass = median_cut_pass1_rgb;
break;
- case GIMP_WEB_PALETTE:
+ case GIMP_CONVERT_PALETTE_WEB:
quantobj->first_pass = webpal_pass1;
needs_quantize = TRUE;
break;
- case GIMP_CUSTOM_PALETTE:
+ case GIMP_CONVERT_PALETTE_CUSTOM:
quantobj->first_pass = custompal_pass1;
needs_quantize = TRUE;
break;
- case GIMP_MONO_PALETTE:
+ case GIMP_CONVERT_PALETTE_MONO:
default:
quantobj->first_pass = monopal_pass1;
}
diff --git a/app/dialogs/convert-indexed-dialog.c b/app/dialogs/convert-indexed-dialog.c
index 36edd59..c479645 100644
--- a/app/dialogs/convert-indexed-dialog.c
+++ b/app/dialogs/convert-indexed-dialog.c
@@ -167,10 +167,10 @@ convert_indexed_dialog_new (GimpImage *image,
frame =
gimp_enum_radio_frame_new_with_range (GIMP_TYPE_CONVERT_PALETTE_TYPE,
- GIMP_MAKE_PALETTE,
+ GIMP_CONVERT_PALETTE_GENERATE,
(palette_box ?
- GIMP_CUSTOM_PALETTE :
- GIMP_MONO_PALETTE),
+ GIMP_CONVERT_PALETTE_CUSTOM :
+ GIMP_CONVERT_PALETTE_MONO),
gtk_label_new (_("Colormap")),
G_CALLBACK (gimp_radio_button_update),
&private->palette_type,
@@ -184,7 +184,7 @@ convert_indexed_dialog_new (GimpImage *image,
/* max n_colors */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gimp_enum_radio_frame_add (GTK_FRAME (frame), hbox,
- GIMP_MAKE_PALETTE, TRUE);
+ GIMP_CONVERT_PALETTE_GENERATE, TRUE);
gtk_widget_show (hbox);
label = gtk_label_new_with_mnemonic (_("_Maximum number of colors:"));
@@ -210,7 +210,7 @@ convert_indexed_dialog_new (GimpImage *image,
if (palette_box)
{
gimp_enum_radio_frame_add (GTK_FRAME (frame), palette_box,
- GIMP_CUSTOM_PALETTE, TRUE);
+ GIMP_CONVERT_PALETTE_CUSTOM, TRUE);
gtk_widget_show (palette_box);
}
diff --git a/app/pdb/image-convert-cmds.c b/app/pdb/image-convert-cmds.c
index 01f6410..58d4a92 100644
--- a/app/pdb/image-convert-cmds.c
+++ b/app/pdb/image-convert-cmds.c
@@ -140,12 +140,12 @@ image_convert_indexed_invoker (GimpProcedure *procedure,
{
switch (palette_type)
{
- case GIMP_MAKE_PALETTE:
+ case GIMP_CONVERT_PALETTE_GENERATE:
if (num_cols < 1 || num_cols > MAXNUMCOLORS)
success = FALSE;
break;
- case GIMP_CUSTOM_PALETTE:
+ case GIMP_CONVERT_PALETTE_CUSTOM:
pal = gimp_pdb_get_palette (gimp, palette, FALSE, error);
if (! pal)
{
@@ -343,12 +343,12 @@ register_image_convert_procs (GimpPDB *pdb)
"palette type",
"The type of palette to use",
GIMP_TYPE_CONVERT_PALETTE_TYPE,
- GIMP_MAKE_PALETTE,
+ GIMP_CONVERT_PALETTE_GENERATE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("num-cols",
"num cols",
- "The number of colors to quantize to, ignored unless
(palette_type == GIMP_MAKE_PALETTE)",
+ "The number of colors to quantize to, ignored unless
(palette_type == GIMP_CONVERT_PALETTE_GENERATE)",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
@@ -360,13 +360,13 @@ register_image_convert_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("remove-unused",
"remove unused",
- "Remove unused or duplicate color entries from final
palette, ignored if (palette_type == GIMP_MAKE_PALETTE)",
+ "Remove unused or duplicate color entries from final
palette, ignored if (palette_type == GIMP_CONVERT_PALETTE_GENERATE)",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("palette",
"palette",
- "The name of the custom palette to use, ignored
unless (palette_type == GIMP_CUSTOM_PALETTE)",
+ "The name of the custom palette to use, ignored
unless (palette_type == GIMP_CONVERT_PALETTE_CUSTOM)",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
diff --git a/libgimp/gimpexport.c b/libgimp/gimpexport.c
index df7cf2d..b18bdcc 100644
--- a/libgimp/gimpexport.c
+++ b/libgimp/gimpexport.c
@@ -191,11 +191,15 @@ export_convert_indexed (gint32 image_ID,
/* check alpha */
g_free (gimp_image_get_layers (image_ID, &nlayers));
if (nlayers > 1 || gimp_drawable_has_alpha (*drawable_ID))
- gimp_image_convert_indexed (image_ID, GIMP_CONVERT_DITHER_NONE,
- GIMP_MAKE_PALETTE, 255, FALSE, FALSE, "");
+ gimp_image_convert_indexed (image_ID,
+ GIMP_CONVERT_DITHER_NONE,
+ GIMP_CONVERT_PALETTE_GENERATE,
+ 255, FALSE, FALSE, "");
else
- gimp_image_convert_indexed (image_ID, GIMP_CONVERT_DITHER_NONE,
- GIMP_MAKE_PALETTE, 256, FALSE, FALSE, "");
+ gimp_image_convert_indexed (image_ID,
+ GIMP_CONVERT_DITHER_NONE,
+ GIMP_CONVERT_PALETTE_GENERATE,
+ 256, FALSE, FALSE, "");
}
static void
@@ -205,8 +209,10 @@ export_convert_bitmap (gint32 image_ID,
if (gimp_image_base_type (image_ID) == GIMP_INDEXED)
gimp_image_convert_rgb (image_ID);
- gimp_image_convert_indexed (image_ID, GIMP_CONVERT_DITHER_FS,
- GIMP_MAKE_PALETTE, 2, FALSE, FALSE, "");
+ gimp_image_convert_indexed (image_ID,
+ GIMP_CONVERT_DITHER_FS,
+ GIMP_CONVERT_PALETTE_GENERATE,
+ 2, FALSE, FALSE, "");
}
static void
diff --git a/libgimp/gimpimageconvert_pdb.c b/libgimp/gimpimageconvert_pdb.c
index dccd3cb..2b52752 100644
--- a/libgimp/gimpimageconvert_pdb.c
+++ b/libgimp/gimpimageconvert_pdb.c
@@ -101,10 +101,10 @@ gimp_image_convert_grayscale (gint32 image_ID)
* @image_ID: The image.
* @dither_type: The dither type to use.
* @palette_type: The type of palette to use.
- * @num_cols: The number of colors to quantize to, ignored unless (palette_type == GIMP_MAKE_PALETTE).
+ * @num_cols: The number of colors to quantize to, ignored unless (palette_type ==
GIMP_CONVERT_PALETTE_GENERATE).
* @alpha_dither: Dither transparency to fake partial opacity.
- * @remove_unused: Remove unused or duplicate color entries from final palette, ignored if (palette_type ==
GIMP_MAKE_PALETTE).
- * @palette: The name of the custom palette to use, ignored unless (palette_type == GIMP_CUSTOM_PALETTE).
+ * @remove_unused: Remove unused or duplicate color entries from final palette, ignored if (palette_type ==
GIMP_CONVERT_PALETTE_GENERATE).
+ * @palette: The name of the custom palette to use, ignored unless (palette_type ==
GIMP_CONVERT_PALETTE_CUSTOM).
*
* Convert specified image to and Indexed image
*
diff --git a/libgimpbase/gimpbase-private.c b/libgimpbase/gimpbase-private.c
index 180d83a..31d881b 100644
--- a/libgimpbase/gimpbase-private.c
+++ b/libgimpbase/gimpbase-private.c
@@ -57,6 +57,8 @@ gimp_base_init (GimpUnitVtable *vtable)
(gpointer) GIMP_TYPE_CHANNEL_TYPE_COMPAT);
g_type_set_qdata (GIMP_TYPE_CLONE_TYPE, quark,
(gpointer) GIMP_TYPE_CLONE_TYPE_COMPAT);
+ g_type_set_qdata (GIMP_TYPE_CONVERT_PALETTE_TYPE, quark,
+ (gpointer) GIMP_TYPE_CONVERT_PALETTE_TYPE_COMPAT);
g_type_set_qdata (GIMP_TYPE_CONVOLVE_TYPE, quark,
(gpointer) GIMP_TYPE_CONVOLVE_TYPE_COMPAT);
g_type_set_qdata (GIMP_TYPE_DESATURATE_MODE, quark,
diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c
index b809c0d..6cd34ce 100644
--- a/libgimpbase/gimpbaseenums.c
+++ b/libgimpbase/gimpbaseenums.c
@@ -437,19 +437,19 @@ gimp_convert_palette_type_get_type (void)
{
static const GEnumValue values[] =
{
- { GIMP_MAKE_PALETTE, "GIMP_MAKE_PALETTE", "make-palette" },
- { GIMP_WEB_PALETTE, "GIMP_WEB_PALETTE", "web-palette" },
- { GIMP_MONO_PALETTE, "GIMP_MONO_PALETTE", "mono-palette" },
- { GIMP_CUSTOM_PALETTE, "GIMP_CUSTOM_PALETTE", "custom-palette" },
+ { GIMP_CONVERT_PALETTE_GENERATE, "GIMP_CONVERT_PALETTE_GENERATE", "generate" },
+ { GIMP_CONVERT_PALETTE_WEB, "GIMP_CONVERT_PALETTE_WEB", "web" },
+ { GIMP_CONVERT_PALETTE_MONO, "GIMP_CONVERT_PALETTE_MONO", "mono" },
+ { GIMP_CONVERT_PALETTE_CUSTOM, "GIMP_CONVERT_PALETTE_CUSTOM", "custom" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
- { GIMP_MAKE_PALETTE, NC_("convert-palette-type", "Generate optimum palette"), NULL },
- { GIMP_WEB_PALETTE, NC_("convert-palette-type", "Use web-optimized palette"), NULL },
- { GIMP_MONO_PALETTE, NC_("convert-palette-type", "Use black and white (1-bit) palette"), NULL },
- { GIMP_CUSTOM_PALETTE, NC_("convert-palette-type", "Use custom palette"), NULL },
+ { GIMP_CONVERT_PALETTE_GENERATE, NC_("convert-palette-type", "Generate optimum palette"), NULL },
+ { GIMP_CONVERT_PALETTE_WEB, NC_("convert-palette-type", "Use web-optimized palette"), NULL },
+ { GIMP_CONVERT_PALETTE_MONO, NC_("convert-palette-type", "Use black and white (1-bit) palette"), NULL },
+ { GIMP_CONVERT_PALETTE_CUSTOM, NC_("convert-palette-type", "Use custom palette"), NULL },
{ 0, NULL, NULL }
};
diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h
index 52b10eb..2959408 100644
--- a/libgimpbase/gimpbaseenums.h
+++ b/libgimpbase/gimpbaseenums.h
@@ -241,11 +241,19 @@ GType gimp_convert_palette_type_get_type (void) G_GNUC_CONST;
typedef enum
{
- GIMP_MAKE_PALETTE, /*< desc="Generate optimum palette" >*/
- GIMP_REUSE_PALETTE, /*< skip >*/
- GIMP_WEB_PALETTE, /*< desc="Use web-optimized palette" >*/
- GIMP_MONO_PALETTE, /*< desc="Use black and white (1-bit) palette" >*/
- GIMP_CUSTOM_PALETTE /*< desc="Use custom palette" >*/
+ GIMP_CONVERT_PALETTE_GENERATE, /*< desc="Generate optimum palette" >*/
+ GIMP_CONVERT_PALETTE_REUSE, /*< skip >*/
+ GIMP_CONVERT_PALETTE_WEB, /*< desc="Use web-optimized palette" >*/
+ GIMP_CONVERT_PALETTE_MONO, /*< desc="Use black and white (1-bit) palette" >*/
+ GIMP_CONVERT_PALETTE_CUSTOM, /*< desc="Use custom palette" >*/
+
+#ifndef GIMP_DISABLE_DEPRECATED
+ GIMP_MAKE_PALETTE = GIMP_CONVERT_PALETTE_GENERATE, /*< skip, pdb-skip >*/
+ GIMP_REUSE_PALETTE = GIMP_CONVERT_PALETTE_REUSE, /*< skip, pdb-skip >*/
+ GIMP_WEB_PALETTE = GIMP_CONVERT_PALETTE_WEB, /*< skip, pdb-skip >*/
+ GIMP_MONO_PALETTE = GIMP_CONVERT_PALETTE_MONO, /*< skip, pdb-skip >*/
+ GIMP_CUSTOM_PALETTE = GIMP_CONVERT_PALETTE_CUSTOM /*< skip, pdb-skip >*/
+#endif /* GIMP_DISABLE_DEPRECATED */
} GimpConvertPaletteType;
diff --git a/libgimpbase/gimpcompatenums.c b/libgimpbase/gimpcompatenums.c
index 0d9da85..0cb84bc 100644
--- a/libgimpbase/gimpcompatenums.c
+++ b/libgimpbase/gimpcompatenums.c
@@ -217,6 +217,42 @@ gimp_convert_dither_type_compat_get_type (void)
}
GType
+gimp_convert_palette_type_compat_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_MAKE_PALETTE, "GIMP_MAKE_PALETTE", "make-palette" },
+ { GIMP_REUSE_PALETTE, "GIMP_REUSE_PALETTE", "reuse-palette" },
+ { GIMP_WEB_PALETTE, "GIMP_WEB_PALETTE", "web-palette" },
+ { GIMP_MONO_PALETTE, "GIMP_MONO_PALETTE", "mono-palette" },
+ { GIMP_CUSTOM_PALETTE, "GIMP_CUSTOM_PALETTE", "custom-palette" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_MAKE_PALETTE, "GIMP_MAKE_PALETTE", NULL },
+ { GIMP_REUSE_PALETTE, "GIMP_REUSE_PALETTE", NULL },
+ { GIMP_WEB_PALETTE, "GIMP_WEB_PALETTE", NULL },
+ { GIMP_MONO_PALETTE, "GIMP_MONO_PALETTE", NULL },
+ { GIMP_CUSTOM_PALETTE, "GIMP_CUSTOM_PALETTE", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpConvertPaletteTypeCompat", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "convert-palette-type-compat");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
gimp_convolve_type_compat_get_type (void)
{
static const GEnumValue values[] =
diff --git a/libgimpbase/gimpcompatenums.h b/libgimpbase/gimpcompatenums.h
index 7578f4b..0060e59 100644
--- a/libgimpbase/gimpcompatenums.h
+++ b/libgimpbase/gimpcompatenums.h
@@ -107,6 +107,20 @@ typedef enum
} GimpConvertDitherTypeCompat;
+#define GIMP_TYPE_CONVERT_PALETTE_TYPE_COMPAT (gimp_convert_palette_type_compat_get_type ())
+
+GType gimp_convert_palette_type_compat_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_MAKE_PALETTE,
+ GIMP_REUSE_PALETTE,
+ GIMP_WEB_PALETTE,
+ GIMP_MONO_PALETTE,
+ GIMP_CUSTOM_PALETTE
+} GimpConvertPaletteTypeCompat;
+
+
#define GIMP_TYPE_CONVOLVE_TYPE_COMPAT (gimp_convolve_type_compat_get_type ())
GType gimp_convolve_type_compat_get_type (void) G_GNUC_CONST;
diff --git a/plug-ins/file-ico/ico-dialog.c b/plug-ins/file-ico/ico-dialog.c
index adb2dc4..c06b55f 100644
--- a/plug-ins/file-ico/ico-dialog.c
+++ b/plug-ins/file-ico/ico-dialog.c
@@ -310,7 +310,7 @@ ico_dialog_update_icon_preview (GtkWidget *dialog,
gimp_image_convert_indexed (tmp_image,
GIMP_CONVERT_DITHER_FS,
- GIMP_MAKE_PALETTE,
+ GIMP_CONVERT_PALETTE_GENERATE,
1 << bpp, TRUE, FALSE, "dummy");
cmap = gimp_image_get_colormap (tmp_image, &num_colors);
@@ -348,7 +348,7 @@ ico_dialog_update_icon_preview (GtkWidget *dialog,
gimp_image_convert_indexed (tmp_image,
GIMP_CONVERT_DITHER_FS,
- GIMP_MAKE_PALETTE,
+ GIMP_CONVERT_PALETTE_GENERATE,
(1 << bpp) - 1, TRUE, FALSE, "dummy");
}
diff --git a/plug-ins/file-ico/ico-save.c b/plug-ins/file-ico/ico-save.c
index 70500b7..6bc7fd3 100644
--- a/plug-ins/file-ico/ico-save.c
+++ b/plug-ins/file-ico/ico-save.c
@@ -648,7 +648,7 @@ ico_image_get_reduced_buf (guint32 layer,
{
gimp_image_convert_indexed (tmp_image,
GIMP_CONVERT_DITHER_FS,
- GIMP_MAKE_PALETTE,
+ GIMP_CONVERT_PALETTE_GENERATE,
1 << bpp, TRUE, FALSE, "dummy");
cmap = gimp_image_get_colormap (tmp_image, num_colors);
@@ -687,7 +687,7 @@ ico_image_get_reduced_buf (guint32 layer,
gimp_image_convert_indexed (tmp_image,
GIMP_CONVERT_DITHER_FS,
- GIMP_MAKE_PALETTE,
+ GIMP_CONVERT_PALETTE_GENERATE,
(1<<bpp) - 1, TRUE, FALSE, "dummy");
g_free (cmap);
cmap = gimp_image_get_colormap (tmp_image, num_colors);
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 066e9d1..66da9d4 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -136,14 +136,15 @@ package Gimp::CodeGen::enums;
GimpConvertPaletteType =>
{ contig => 1,
header => 'libgimpbase/gimpbaseenums.h',
- symbols => [ qw(GIMP_MAKE_PALETTE GIMP_REUSE_PALETTE
- GIMP_WEB_PALETTE GIMP_MONO_PALETTE
- GIMP_CUSTOM_PALETTE) ],
- mapping => { GIMP_MAKE_PALETTE => '0',
- GIMP_REUSE_PALETTE => '1',
- GIMP_WEB_PALETTE => '2',
- GIMP_MONO_PALETTE => '3',
- GIMP_CUSTOM_PALETTE => '4' }
+ symbols => [ qw(GIMP_CONVERT_PALETTE_GENERATE
+ GIMP_CONVERT_PALETTE_REUSE
+ GIMP_CONVERT_PALETTE_WEB GIMP_CONVERT_PALETTE_MONO
+ GIMP_CONVERT_PALETTE_CUSTOM) ],
+ mapping => { GIMP_CONVERT_PALETTE_GENERATE => '0',
+ GIMP_CONVERT_PALETTE_REUSE => '1',
+ GIMP_CONVERT_PALETTE_WEB => '2',
+ GIMP_CONVERT_PALETTE_MONO => '3',
+ GIMP_CONVERT_PALETTE_CUSTOM => '4' }
},
GimpConvolveType =>
{ contig => 1,
diff --git a/tools/pdbgen/pdb/image_convert.pdb b/tools/pdbgen/pdb/image_convert.pdb
index 9219fcd..e65dfa9 100644
--- a/tools/pdbgen/pdb/image_convert.pdb
+++ b/tools/pdbgen/pdb/image_convert.pdb
@@ -109,15 +109,16 @@ HELP
desc => 'The type of palette to use' },
{ name => 'num_cols', type => 'int32',
desc => 'The number of colors to quantize to, ignored unless
- (palette_type == GIMP_MAKE_PALETTE)' },
+ (palette_type == GIMP_CONVERT_PALETTE_GENERATE)' },
{ name => 'alpha_dither', type => 'boolean',
desc => 'Dither transparency to fake partial opacity' },
{ name => 'remove_unused', type => 'boolean',
desc => 'Remove unused or duplicate color entries from final
- palette, ignored if (palette_type == GIMP_MAKE_PALETTE)' },
+ palette, ignored if (palette_type ==
+ GIMP_CONVERT_PALETTE_GENERATE)' },
{ name => 'palette', type => 'string',
desc => 'The name of the custom palette to use, ignored unless
- (palette_type == GIMP_CUSTOM_PALETTE)' }
+ (palette_type == GIMP_CONVERT_PALETTE_CUSTOM)' }
);
%invoke = (
@@ -131,12 +132,12 @@ HELP
{
switch (palette_type)
{
- case GIMP_MAKE_PALETTE:
+ case GIMP_CONVERT_PALETTE_GENERATE:
if (num_cols < 1 || num_cols > MAXNUMCOLORS)
success = FALSE;
break;
- case GIMP_CUSTOM_PALETTE:
+ case GIMP_CONVERT_PALETTE_CUSTOM:
pal = gimp_pdb_get_palette (gimp, palette, FALSE, error);
if (! pal)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]