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>
|
2006-06-27 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/core/gimpunit.c: applied patch from Zbigniew Chyla that adds
|
* 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[] =
|
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_BILINEAR, N_("Bi-linear"), NULL },
|
||||||
{ GIMP_GRADIENT_RADIAL, N_("Radial"), NULL },
|
{ GIMP_GRADIENT_RADIAL, N_("Radial"), NULL },
|
||||||
{ GIMP_GRADIENT_SQUARE, N_("Square"), NULL },
|
{ GIMP_GRADIENT_SQUARE, N_("Square"), NULL },
|
||||||
@ -560,7 +560,7 @@ gimp_interpolation_type_get_type (void)
|
|||||||
static const GimpEnumDesc descs[] =
|
static const GimpEnumDesc descs[] =
|
||||||
{
|
{
|
||||||
{ GIMP_INTERPOLATION_NONE, N_("None (Fastest)"), NULL },
|
{ 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_CUBIC, N_("Cubic"), NULL },
|
||||||
{ GIMP_INTERPOLATION_LANCZOS, N_("Lanczos (Best)"), NULL },
|
{ GIMP_INTERPOLATION_LANCZOS, N_("Lanczos (Best)"), NULL },
|
||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
|
@ -172,7 +172,7 @@ GType gimp_gradient_type_get_type (void) G_GNUC_CONST;
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GIMP_GRADIENT_LINEAR, /*< desc="Linear" >*/
|
GIMP_GRADIENT_LINEAR, /*< desc="gradient|Linear" >*/
|
||||||
GIMP_GRADIENT_BILINEAR, /*< desc="Bi-linear" >*/
|
GIMP_GRADIENT_BILINEAR, /*< desc="Bi-linear" >*/
|
||||||
GIMP_GRADIENT_RADIAL, /*< desc="Radial" >*/
|
GIMP_GRADIENT_RADIAL, /*< desc="Radial" >*/
|
||||||
GIMP_GRADIENT_SQUARE, /*< desc="Square" >*/
|
GIMP_GRADIENT_SQUARE, /*< desc="Square" >*/
|
||||||
@ -246,7 +246,7 @@ GType gimp_interpolation_type_get_type (void) G_GNUC_CONST;
|
|||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GIMP_INTERPOLATION_NONE, /*< desc="None (Fastest)" >*/
|
GIMP_INTERPOLATION_NONE, /*< desc="None (Fastest)" >*/
|
||||||
GIMP_INTERPOLATION_LINEAR, /*< desc="Linear" >*/
|
GIMP_INTERPOLATION_LINEAR, /*< desc="interpolation|Linear" >*/
|
||||||
GIMP_INTERPOLATION_CUBIC, /*< desc="Cubic" >*/
|
GIMP_INTERPOLATION_CUBIC, /*< desc="Cubic" >*/
|
||||||
GIMP_INTERPOLATION_LANCZOS /*< desc="Lanczos (Best)" >*/
|
GIMP_INTERPOLATION_LANCZOS /*< desc="Lanczos (Best)" >*/
|
||||||
} GimpInterpolationType;
|
} GimpInterpolationType;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <glib-object.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);
|
enum_desc = gimp_enum_get_desc (enum_class, value);
|
||||||
|
|
||||||
if (value_desc)
|
if (value_desc) {
|
||||||
*value_desc = ((enum_desc && enum_desc->value_desc) ?
|
*value_desc = ((enum_desc && enum_desc->value_desc) ?
|
||||||
|
g_strip_context (enum_desc->value_desc,
|
||||||
dgettext (gimp_type_get_translation_domain (enum_type),
|
dgettext (gimp_type_get_translation_domain (enum_type),
|
||||||
enum_desc->value_desc) :
|
enum_desc->value_desc)) :
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (value_help)
|
if (value_help)
|
||||||
*value_help = ((enum_desc && enum_desc->value_desc) ?
|
*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);
|
enum_desc = gimp_enum_get_desc (enum_class, enum_value->value);
|
||||||
|
|
||||||
if (enum_desc && enum_desc->value_desc)
|
if (enum_desc && enum_desc->value_desc)
|
||||||
return dgettext (gimp_type_get_translation_domain (type),
|
return g_strip_context (enum_desc->value_desc,
|
||||||
enum_desc->value_desc);
|
dgettext (gimp_type_get_translation_domain (type),
|
||||||
|
enum_desc->value_desc));
|
||||||
|
|
||||||
return enum_value->value_name;
|
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_PERCEPTUAL, N_("Perceptual"), NULL },
|
||||||
{ GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC, N_("Relative colorimetric"), 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 },
|
{ GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC, N_("Absolute colorimetric"), NULL },
|
||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
@ -45,7 +45,7 @@ typedef enum
|
|||||||
{
|
{
|
||||||
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL, /*< desc="Perceptual" >*/
|
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL, /*< desc="Perceptual" >*/
|
||||||
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC, /*< desc="Relative colorimetric" >*/
|
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" >*/
|
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC /*< desc="Absolute colorimetric" >*/
|
||||||
} GimpColorRenderingIntent;
|
} GimpColorRenderingIntent;
|
||||||
|
|
||||||
|
@ -35,33 +35,6 @@
|
|||||||
|
|
||||||
#include "libgimp/libgimp-intl.h"
|
#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_TYPE_PROOF (cdisplay_proof_type)
|
||||||
#define CDISPLAY_PROOF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CDISPLAY_TYPE_PROOF, CdisplayProof))
|
#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))
|
#define CDISPLAY_PROOF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CDISPLAY_TYPE_PROOF, CdisplayProofClass))
|
||||||
@ -134,7 +107,6 @@ static const GimpModuleInfo cdisplay_proof_info =
|
|||||||
};
|
};
|
||||||
|
|
||||||
static GType cdisplay_proof_type = 0;
|
static GType cdisplay_proof_type = 0;
|
||||||
static GType cdisplay_proof_intent_type = 0;
|
|
||||||
static GimpColorDisplayClass *parent_class = NULL;
|
static GimpColorDisplayClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
@ -148,7 +120,6 @@ G_MODULE_EXPORT gboolean
|
|||||||
gimp_module_register (GTypeModule *module)
|
gimp_module_register (GTypeModule *module)
|
||||||
{
|
{
|
||||||
cdisplay_proof_get_type (module);
|
cdisplay_proof_get_type (module);
|
||||||
cdisplay_proof_intent_get_type (module);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -179,22 +150,6 @@ cdisplay_proof_get_type (GTypeModule *module)
|
|||||||
return cdisplay_proof_type;
|
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
|
static void
|
||||||
cdisplay_proof_class_init (CdisplayProofClass *klass)
|
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,
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_INTENT,
|
||||||
"intent", NULL,
|
"intent", NULL,
|
||||||
CDISPLAY_TYPE_PROOF_INTENT, INTENT_PERCEPTUAL,
|
GIMP_TYPE_COLOR_RENDERING_INTENT,
|
||||||
|
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
|
||||||
0);
|
0);
|
||||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_BPC,
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_BPC,
|
||||||
"black-point-compensation", NULL,
|
"black-point-compensation", NULL,
|
||||||
|
Reference in New Issue
Block a user