use the GimpColorRenderingIntent enum from libgimpconfig instead of
2006-06-27 Sven Neumann <sven@gimp.org> * modules/cdisplay_proof.c: use the GimpColorRenderingIntent enum from libgimpconfig instead of duplicating it.
This commit is contained in:

committed by
Sven Neumann

parent
8b1765e060
commit
71d1c678cd
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
||||
2006-06-27 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* modules/cdisplay_proof.c: use the GimpColorRenderingIntent enum
|
||||
from libgimpconfig instead of duplicating it.
|
||||
|
||||
2006-06-27 Sven Neumann <sven@gimp.org>
|
||||
|
||||
Changes based on a patch from Zbigniew Chyla (bug #345982):
|
||||
|
||||
* libgimpbase/gimputils.c: strip translation context from enum
|
||||
descriptions.
|
||||
|
||||
* libgimpbase/gimpbaseenums.h
|
||||
* libgimpconfig/gimpcolorconfig-enums.h: added translation context
|
||||
to some enums.
|
||||
|
||||
* libgimpbase/gimpbaseenums.c
|
||||
* libgimpconfig/gimpcolorconfig-enums.c: regenerated.
|
||||
|
||||
2006-06-27 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpunit.c: applied patch from Zbigniew Chyla that adds
|
||||
|
@ -385,7 +385,7 @@ gimp_gradient_type_get_type (void)
|
||||
|
||||
static const GimpEnumDesc descs[] =
|
||||
{
|
||||
{ GIMP_GRADIENT_LINEAR, N_("Linear"), NULL },
|
||||
{ GIMP_GRADIENT_LINEAR, N_("gradient|Linear"), NULL },
|
||||
{ GIMP_GRADIENT_BILINEAR, N_("Bi-linear"), NULL },
|
||||
{ GIMP_GRADIENT_RADIAL, N_("Radial"), NULL },
|
||||
{ GIMP_GRADIENT_SQUARE, N_("Square"), NULL },
|
||||
@ -560,7 +560,7 @@ gimp_interpolation_type_get_type (void)
|
||||
static const GimpEnumDesc descs[] =
|
||||
{
|
||||
{ GIMP_INTERPOLATION_NONE, N_("None (Fastest)"), NULL },
|
||||
{ GIMP_INTERPOLATION_LINEAR, N_("Linear"), NULL },
|
||||
{ GIMP_INTERPOLATION_LINEAR, N_("interpolation|Linear"), NULL },
|
||||
{ GIMP_INTERPOLATION_CUBIC, N_("Cubic"), NULL },
|
||||
{ GIMP_INTERPOLATION_LANCZOS, N_("Lanczos (Best)"), NULL },
|
||||
{ 0, NULL, NULL }
|
||||
|
@ -172,7 +172,7 @@ GType gimp_gradient_type_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_GRADIENT_LINEAR, /*< desc="Linear" >*/
|
||||
GIMP_GRADIENT_LINEAR, /*< desc="gradient|Linear" >*/
|
||||
GIMP_GRADIENT_BILINEAR, /*< desc="Bi-linear" >*/
|
||||
GIMP_GRADIENT_RADIAL, /*< desc="Radial" >*/
|
||||
GIMP_GRADIENT_SQUARE, /*< desc="Square" >*/
|
||||
@ -245,10 +245,10 @@ GType gimp_interpolation_type_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_INTERPOLATION_NONE, /*< desc="None (Fastest)" >*/
|
||||
GIMP_INTERPOLATION_LINEAR, /*< desc="Linear" >*/
|
||||
GIMP_INTERPOLATION_CUBIC, /*< desc="Cubic" >*/
|
||||
GIMP_INTERPOLATION_LANCZOS /*< desc="Lanczos (Best)" >*/
|
||||
GIMP_INTERPOLATION_NONE, /*< desc="None (Fastest)" >*/
|
||||
GIMP_INTERPOLATION_LINEAR, /*< desc="interpolation|Linear" >*/
|
||||
GIMP_INTERPOLATION_CUBIC, /*< desc="Cubic" >*/
|
||||
GIMP_INTERPOLATION_LANCZOS /*< desc="Lanczos (Best)" >*/
|
||||
} GimpInterpolationType;
|
||||
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
@ -458,11 +459,13 @@ gimp_enum_get_value (GType enum_type,
|
||||
|
||||
enum_desc = gimp_enum_get_desc (enum_class, value);
|
||||
|
||||
if (value_desc)
|
||||
if (value_desc) {
|
||||
*value_desc = ((enum_desc && enum_desc->value_desc) ?
|
||||
dgettext (gimp_type_get_translation_domain (enum_type),
|
||||
enum_desc->value_desc) :
|
||||
g_strip_context (enum_desc->value_desc,
|
||||
dgettext (gimp_type_get_translation_domain (enum_type),
|
||||
enum_desc->value_desc)) :
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (value_help)
|
||||
*value_help = ((enum_desc && enum_desc->value_desc) ?
|
||||
@ -500,8 +503,9 @@ gimp_enum_value_get_desc (GEnumClass *enum_class,
|
||||
enum_desc = gimp_enum_get_desc (enum_class, enum_value->value);
|
||||
|
||||
if (enum_desc && enum_desc->value_desc)
|
||||
return dgettext (gimp_type_get_translation_domain (type),
|
||||
enum_desc->value_desc);
|
||||
return g_strip_context (enum_desc->value_desc,
|
||||
dgettext (gimp_type_get_translation_domain (type),
|
||||
enum_desc->value_desc));
|
||||
|
||||
return enum_value->value_name;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ gimp_color_rendering_intent_get_type (void)
|
||||
{
|
||||
{ GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL, N_("Perceptual"), NULL },
|
||||
{ GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC, N_("Relative colorimetric"), NULL },
|
||||
{ GIMP_COLOR_RENDERING_INTENT_SATURATION, N_("Saturation"), NULL },
|
||||
{ GIMP_COLOR_RENDERING_INTENT_SATURATION, N_("intent|Saturation"), NULL },
|
||||
{ GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC, N_("Absolute colorimetric"), NULL },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
@ -45,7 +45,7 @@ typedef enum
|
||||
{
|
||||
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL, /*< desc="Perceptual" >*/
|
||||
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC, /*< desc="Relative colorimetric" >*/
|
||||
GIMP_COLOR_RENDERING_INTENT_SATURATION, /*< desc="Saturation" >*/
|
||||
GIMP_COLOR_RENDERING_INTENT_SATURATION, /*< desc="intent|Saturation" >*/
|
||||
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC /*< desc="Absolute colorimetric" >*/
|
||||
} GimpColorRenderingIntent;
|
||||
|
||||
|
@ -35,33 +35,6 @@
|
||||
|
||||
#include "libgimp/libgimp-intl.h"
|
||||
|
||||
|
||||
#define CDISPLAY_TYPE_PROOF_INTENT (cdisplay_proof_intent_type)
|
||||
static GType cdisplay_proof_intent_get_type (GTypeModule *module);
|
||||
|
||||
static const GEnumValue enum_values[] =
|
||||
{
|
||||
{ INTENT_PERCEPTUAL,
|
||||
"INTENT_PERCEPTUAL", "perceptual" },
|
||||
{ INTENT_RELATIVE_COLORIMETRIC,
|
||||
"INTENT_RELATIVE_COLORIMETRIC", "relative-colorimetric" },
|
||||
{ INTENT_SATURATION,
|
||||
"INTENT_SATURATION", "saturation" },
|
||||
{ INTENT_ABSOLUTE_COLORIMETRIC,
|
||||
"INTENT_ABSOLUTE_COLORIMETRIC" "absolute-colorimetric" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
static const GimpEnumDesc enum_descs[] =
|
||||
{
|
||||
{ INTENT_PERCEPTUAL, N_("Perceptual"), NULL },
|
||||
{ INTENT_RELATIVE_COLORIMETRIC, N_("Relative colorimetric"), NULL },
|
||||
{ INTENT_SATURATION, N_("Saturation"), NULL },
|
||||
{ INTENT_ABSOLUTE_COLORIMETRIC, N_("Absolute colorimetric"), NULL },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
#define CDISPLAY_TYPE_PROOF (cdisplay_proof_type)
|
||||
#define CDISPLAY_PROOF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CDISPLAY_TYPE_PROOF, CdisplayProof))
|
||||
#define CDISPLAY_PROOF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CDISPLAY_TYPE_PROOF, CdisplayProofClass))
|
||||
@ -133,9 +106,8 @@ static const GimpModuleInfo cdisplay_proof_info =
|
||||
"November 14, 2003"
|
||||
};
|
||||
|
||||
static GType cdisplay_proof_type = 0;
|
||||
static GType cdisplay_proof_intent_type = 0;
|
||||
static GimpColorDisplayClass *parent_class = NULL;
|
||||
static GType cdisplay_proof_type = 0;
|
||||
static GimpColorDisplayClass *parent_class = NULL;
|
||||
|
||||
|
||||
G_MODULE_EXPORT const GimpModuleInfo *
|
||||
@ -148,7 +120,6 @@ G_MODULE_EXPORT gboolean
|
||||
gimp_module_register (GTypeModule *module)
|
||||
{
|
||||
cdisplay_proof_get_type (module);
|
||||
cdisplay_proof_intent_get_type (module);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -179,22 +150,6 @@ cdisplay_proof_get_type (GTypeModule *module)
|
||||
return cdisplay_proof_type;
|
||||
}
|
||||
|
||||
static GType
|
||||
cdisplay_proof_intent_get_type (GTypeModule *module)
|
||||
{
|
||||
if (! cdisplay_proof_intent_type)
|
||||
{
|
||||
cdisplay_proof_intent_type =
|
||||
g_type_module_register_enum (module, "CDisplayProofIntent",
|
||||
enum_values);
|
||||
|
||||
gimp_enum_set_value_descriptions (cdisplay_proof_intent_type,
|
||||
enum_descs);
|
||||
}
|
||||
|
||||
return cdisplay_proof_intent_type;
|
||||
}
|
||||
|
||||
static void
|
||||
cdisplay_proof_class_init (CdisplayProofClass *klass)
|
||||
{
|
||||
@ -209,7 +164,8 @@ cdisplay_proof_class_init (CdisplayProofClass *klass)
|
||||
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_INTENT,
|
||||
"intent", NULL,
|
||||
CDISPLAY_TYPE_PROOF_INTENT, INTENT_PERCEPTUAL,
|
||||
GIMP_TYPE_COLOR_RENDERING_INTENT,
|
||||
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_BPC,
|
||||
"black-point-compensation", NULL,
|
||||
|
Reference in New Issue
Block a user