libgimpconfig/Makefile.am libgimpconfig/gimpconfig.def

2005-02-07  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/Makefile.am
	* libgimpconfig/gimpconfig.def
	* libgimpconfig/gimpconfig.h
	* libgimpconfig/gimpconfigtypes.h: install the GimpColorConfig
	header and include it.

	* libgimpconfig/gimpcolorconfig.[ch]: commented out some options
	that will only be needed later and that will most likely undergo
	some changes.

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h: added GimpColorConfig to GimpRc.
This commit is contained in:
Sven Neumann 2005-02-07 16:19:08 +00:00 committed by Sven Neumann
parent 1e5c5ab860
commit 5257aa9cbb
10 changed files with 99 additions and 33 deletions

View File

@ -1,3 +1,18 @@
2005-02-07 Sven Neumann <sven@gimp.org>
* libgimpconfig/Makefile.am
* libgimpconfig/gimpconfig.def
* libgimpconfig/gimpconfig.h
* libgimpconfig/gimpconfigtypes.h: install the GimpColorConfig
header and include it.
* libgimpconfig/gimpcolorconfig.[ch]: commented out some options
that will only be needed later and that will most likely undergo
some changes.
* app/config/gimpcoreconfig.[ch]
* app/config/gimprc-blurbs.h: added GimpColorConfig to GimpRc.
2005-02-07 Michael Natterer <mitch@gimp.org>
* plug-ins/uri/uri-backend-gnomevfs.c: fixed wrong use of

View File

@ -40,21 +40,24 @@
static void gimp_core_config_class_init (GimpCoreConfigClass *klass);
static void gimp_core_config_init (GimpCoreConfig *config);
static void gimp_core_config_finalize (GObject *object);
static void gimp_core_config_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_core_config_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_core_config_default_image_notify (GObject *object,
GParamSpec *pspec,
gpointer data);
static void gimp_core_config_default_grid_notify (GObject *object,
GParamSpec *pspec,
gpointer data);
static void gimp_core_config_finalize (GObject *object);
static void gimp_core_config_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_core_config_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_core_config_default_image_notify (GObject *object,
GParamSpec *pspec,
gpointer data);
static void gimp_core_config_default_grid_notify (GObject *object,
GParamSpec *pspec,
gpointer data);
static void gimp_core_config_color_management_notify (GObject *object,
GParamSpec *pspec,
gpointer data);
#define DEFAULT_BRUSH "Circle (11)"
@ -102,7 +105,8 @@ enum
PROP_THUMBNAIL_SIZE,
PROP_THUMBNAIL_FILESIZE_LIMIT,
PROP_INSTALL_COLORMAP,
PROP_MIN_COLORS
PROP_MIN_COLORS,
PROP_COLOR_MANAGEMENT
};
static GObjectClass *parent_class = NULL;
@ -319,6 +323,10 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
"min-colors", MIN_COLORS_BLURB,
27, 256, 144,
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_COLOR_MANAGEMENT,
"color-management", COLOR_MANAGEMENT_BLURB,
GIMP_TYPE_COLOR_CONFIG,
GIMP_CONFIG_PARAM_AGGREGATE);
}
static void
@ -335,6 +343,11 @@ gimp_core_config_init (GimpCoreConfig *config)
g_signal_connect (config->default_grid, "notify",
G_CALLBACK (gimp_core_config_default_grid_notify),
config);
config->color_management = g_object_new (GIMP_TYPE_COLOR_CONFIG, NULL);
g_signal_connect (config->color_management, "notify",
G_CALLBACK (gimp_core_config_color_management_notify),
config);
}
static void
@ -368,6 +381,9 @@ gimp_core_config_finalize (GObject *object)
if (core_config->default_grid)
g_object_unref (core_config->default_grid);
if (core_config->color_management)
g_object_unref (core_config->color_management);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -512,6 +528,11 @@ gimp_core_config_set_property (GObject *object,
case PROP_MIN_COLORS:
core_config->min_colors = g_value_get_int (value);
break;
case PROP_COLOR_MANAGEMENT:
if (g_value_get_object (value))
gimp_config_sync (GIMP_CONFIG (g_value_get_object (value)),
GIMP_CONFIG (core_config->color_management), 0);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@ -637,6 +658,9 @@ gimp_core_config_get_property (GObject *object,
case PROP_MIN_COLORS:
g_value_set_int (value, core_config->min_colors);
break;
case PROP_COLOR_MANAGEMENT:
g_value_set_object (value, core_config->color_management);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@ -659,3 +683,11 @@ gimp_core_config_default_grid_notify (GObject *object,
{
g_object_notify (G_OBJECT (data), "default-grid");
}
static void
gimp_core_config_color_management_notify (GObject *object,
GParamSpec *pspec,
gpointer data)
{
g_object_notify (G_OBJECT (data), "color-management");
}

View File

@ -76,6 +76,7 @@ struct _GimpCoreConfig
guint64 thumbnail_filesize_limit;
gboolean install_cmap;
gint min_colors;
GimpColorConfig *color_management;
};
struct _GimpCoreConfigClass

View File

@ -26,6 +26,9 @@ N_("Specifies how the area around the image should be drawn.")
N_("Sets the canvas padding color used if the padding mode is set to " \
"custom color.")
#define COLOR_MANAGEMENT_BLURB \
"Defines the color management behaviour."
#define CONFIRM_ON_CLOSE_BLURB \
N_("Ask for confirmation before closing an image without saving.")

View File

@ -100,7 +100,9 @@ libgimpconfiginclude_HEADERS = \
gimpconfig-serialize.h \
gimpconfig-utils.h \
gimpconfigwriter.h \
gimpscanner.h
gimpscanner.h \
gimpcolorconfig.h \
gimpcolorconfig-enums.h
libgimpconfig_2_0_la_LDFLAGS = \

View File

@ -54,13 +54,13 @@
#define DISPLAY_RENDERING_INTENT_BLURB \
N_("Sets how colors are mapped for your display.")
#define SIMULATION_RENDERING_INTENT_BLURB \
N_("Sets how colors from workspace to simulation device are converted.")
N_("Sets how colors are converted from workspace to simulation device.")
#define OPEN_BEHAVIOUR_NO_PROFILE_BLURB \
N_("Defines what will be done if no color profile is available.")
"Defines what will be done if no color profile is available."
#define OPEN_BEHAVIOUR_RGB_PROFILE_BLURB \
N_("Defines what will be done if an RGB profile is available.")
"Defines what will be done if an RGB profile is available."
#define OPEN_BEHAVIOUR_CMYK_PROFILE_BLURB \
N_("Defines what will be done if a CMYK profile is available.")
"Defines what will be done if a CMYK profile is available."
enum
@ -183,6 +183,7 @@ gimp_color_config_class_init (GimpColorConfigClass *klass)
GIMP_TYPE_COLOR_RENDERING_INTENT,
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
0);
#if 0
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_OPEN_BEHAVIOUR_NO_PROFILE,
"open-behaviour-no-profile",
OPEN_BEHAVIOUR_NO_PROFILE_BLURB,
@ -201,6 +202,7 @@ gimp_color_config_class_init (GimpColorConfigClass *klass)
GIMP_TYPE_COLOR_FILE_OPEN_BEHAVIOUR,
GIMP_COLOR_FILE_OPEN_ASK,
0);
#endif
}
static void
@ -251,11 +253,12 @@ gimp_color_config_set_property (GObject *object,
color_config->printer_profile = g_value_dup_string (value);
break;
case PROP_DISPLAY_RENDERING_INTENT:
color_config->display_rendering_intent = g_value_get_enum (value);
color_config->display_intent = g_value_get_enum (value);
break;
case PROP_SIMULATION_RENDERING_INTENT:
color_config->simulation_rendering_intent = g_value_get_enum (value);
color_config->simulation_intent = g_value_get_enum (value);
break;
#if 0
case PROP_OPEN_BEHAVIOUR_NO_PROFILE:
color_config->open_behaviour_no_profile = g_value_get_enum (value);
break;
@ -265,6 +268,7 @@ gimp_color_config_set_property (GObject *object,
case PROP_OPEN_BEHAVIOUR_CMYK_PROFILE:
color_config->open_behaviour_cmyk_profile = g_value_get_enum (value);
break;
#endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@ -300,11 +304,12 @@ gimp_color_config_get_property (GObject *object,
g_value_set_string (value, color_config->printer_profile);
break;
case PROP_DISPLAY_RENDERING_INTENT:
g_value_set_enum (value, color_config->display_rendering_intent);
g_value_set_enum (value, color_config->display_intent);
break;
case PROP_SIMULATION_RENDERING_INTENT:
g_value_set_enum (value, color_config->simulation_rendering_intent);
g_value_set_enum (value, color_config->simulation_intent);
break;
#if 0
case PROP_OPEN_BEHAVIOUR_NO_PROFILE:
g_value_set_enum (value, color_config->open_behaviour_no_profile);
break;
@ -314,6 +319,7 @@ gimp_color_config_get_property (GObject *object,
case PROP_OPEN_BEHAVIOUR_CMYK_PROFILE:
g_value_set_enum (value, color_config->open_behaviour_cmyk_profile);
break;
#endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;

View File

@ -32,7 +32,6 @@
typedef struct _GimpColorConfigClass GimpColorConfigClass;
typedef struct _GimpColorConfig GimpColorConfig;
struct _GimpColorConfig
{
@ -44,11 +43,8 @@ struct _GimpColorConfig
gchar *cmyk_profile;
gchar *display_profile;
gchar *printer_profile;
GimpColorRenderingIntent display_rendering_intent;
GimpColorRenderingIntent simulation_rendering_intent;
GimpColorFileOpenBehaviour open_behaviour_no_profile;
GimpColorFileOpenBehaviour open_behaviour_rgb_profile;
GimpColorFileOpenBehaviour open_behaviour_cmyk_profile;
GimpColorRenderingIntent display_intent;
GimpColorRenderingIntent simulation_intent;
};
struct _GimpColorConfigClass

View File

@ -1,4 +1,8 @@
EXPORTS
gimp_color_config_get_type
gimp_color_file_open_behaviour_get_type
gimp_color_management_mode_get_type
gimp_color_rendering_intent_get_type
gimp_config_build_data_path
gimp_config_build_plug_in_path
gimp_config_build_writable_path

View File

@ -33,5 +33,7 @@
#include <libgimpconfig/gimpconfig-path.h>
#include <libgimpconfig/gimpscanner.h>
#include <libgimpconfig/gimpcolorconfig.h>
#endif /* __GIMP_CONFIG_H__ */

View File

@ -27,8 +27,13 @@
#include <libgimpbase/gimpbasetypes.h>
typedef struct _GimpConfig GimpConfig; /* dummy typedef */
typedef struct _GimpConfigWriter GimpConfigWriter;
typedef struct _GimpConfig GimpConfig; /* dummy typedef */
typedef struct _GimpConfigWriter GimpConfigWriter;
#include <libgimpconfig/gimpcolorconfig-enums.h>
typedef struct _GimpColorConfig GimpColorConfig;
#endif /* __GIMP_CONFIG_TYPES_H__ */