[gimp] Bug 320447 - fast switching between "color managed display" and "softproof"
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 320447 - fast switching between "color managed display" and "softproof"
- Date: Sat, 21 May 2016 19:40:30 +0000 (UTC)
commit dcf5c526e7f6825beb690419d18b1cdf09e31cd9
Author: Michael Natterer <mitch gimp org>
Date: Sat May 21 21:38:47 2016 +0200
Bug 320447 - fast switching between "color managed display" and "softproof"
Replace the 3-state "off", "display" and "softproof" radio items by
two toggles "enable" and "softproof". Also add separate controls for
display and softproof options.
app/actions/view-actions.c | 188 ++++++++++++++++++++------------
app/actions/view-commands.c | 166 +++++++++++++++++++---------
app/actions/view-commands.h | 16 ++-
app/display/gimpdisplayshell-profile.c | 81 +++++++++-----
menus/image-menu.xml.in | 26 +++--
5 files changed, 309 insertions(+), 168 deletions(-)
---
diff --git a/app/actions/view-actions.c b/app/actions/view-actions.c
index 25909da..e240ecf 100644
--- a/app/actions/view-actions.c
+++ b/app/actions/view-actions.c
@@ -75,6 +75,12 @@ static const GimpActionEntry view_actions[] =
{ "view-color-management-menu", NULL,
NC_("view-action", "_Color Management") },
+ { "view-display-intent-menu", NULL,
+ NC_("view-action", "Display _Rendering Intent") },
+
+ { "view-softproof-intent-menu", NULL,
+ NC_("view-action", "Simulation Re_ndering Intent") },
+
{ "view-move-to-screen-menu", GIMP_STOCK_MOVE_TO_SCREEN,
NC_("view-action", "Move to Screen"), NULL, NULL, NULL,
GIMP_HELP_VIEW_CHANGE_SCREEN },
@@ -162,18 +168,39 @@ static const GimpToggleActionEntry view_toggle_actions[] =
TRUE,
GIMP_HELP_VIEW_DOT_FOR_DOT },
- { "view-color-management-black-point-compensation", NULL,
+ { "view-color-management-enable", NULL,
+ NC_("view-action", "_Color Manage this View"), NULL,
+ NC_("view-action", "Color manage this view"),
+ G_CALLBACK (view_color_management_enable_cmd_callback),
+ TRUE,
+ GIMP_HELP_VIEW_COLOR_MANAGEMENT },
+
+ { "view-color-management-softproof", NULL,
+ NC_("view-action", "_Print Simulation"), NULL,
+ NC_("view-action", "Use this view for softproofing"),
+ G_CALLBACK (view_color_management_softproof_cmd_callback),
+ FALSE,
+ GIMP_HELP_VIEW_COLOR_MANAGEMENT },
+
+ { "view-display-black-point-compensation", NULL,
NC_("view-action", "_Black Point Compensation"), NULL,
- NC_("view-action", "Use black point compensation"),
- G_CALLBACK (view_color_management_bpc_cmd_callback),
+ NC_("view-action", "Use black point compensation for image display"),
+ G_CALLBACK (view_display_bpc_cmd_callback),
TRUE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
- { "view-color-management-gamut-check", NULL,
+ { "view-softproof-black-point-compensation", NULL,
+ NC_("view-action", "_Black Point Compensation"), NULL,
+ NC_("view-action", "Use black point compensation for softproofing"),
+ G_CALLBACK (view_softproof_bpc_cmd_callback),
+ TRUE,
+ GIMP_HELP_VIEW_COLOR_MANAGEMENT },
+
+ { "view-softproof-gamut-check", NULL,
NC_("view-action", "_Mark Out Of Gamut Colors"), NULL,
NC_("view-action", "When softproofing, mark colors which cannot "
"be represented in the target color space"),
- G_CALLBACK (view_color_management_gamut_check_cmd_callback),
+ G_CALLBACK (view_softproof_gamut_check_cmd_callback),
FALSE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
@@ -484,50 +511,56 @@ static const GimpEnumActionEntry view_rotate_relative_actions[] =
GIMP_HELP_VIEW_ROTATE_345 }
};
-static const GimpRadioActionEntry view_color_management_mode_actions[] =
+static const GimpRadioActionEntry view_display_intent_actions[] =
{
- { "view-color-management-mode-off", NULL,
- NC_("view-action", "_No Color Management"), NULL,
- NC_("view-action", "Don't color manage this view"),
- GIMP_COLOR_MANAGEMENT_OFF,
+ { "view-display-intent-perceptual", NULL,
+ NC_("view-action", "_Perceptual"), NULL,
+ NC_("view-action", "Display rendering intent is perceptual"),
+ GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
- { "view-color-management-mode-display", NULL,
- NC_("view-action", "_Color Managed Display"), NULL,
- NC_("view-action", "Color manage this view"),
- GIMP_COLOR_MANAGEMENT_DISPLAY,
+ { "view-display-intent-relative-colorimetric", NULL,
+ NC_("view-action", "_Relative Colorimetric"), NULL,
+ NC_("view-action", "Display rendering intent is relative colorimetric"),
+ GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
- { "view-color-management-mode-softproof", NULL,
- NC_("view-action", "_Print Simulation"), NULL,
- NC_("view-action", "Use this view for softproofing"),
- GIMP_COLOR_MANAGEMENT_SOFTPROOF,
+ { "view-display-intent-saturation", NULL,
+ NC_("view-action", "_Saturation"), NULL,
+ NC_("view-action", "Display rendering intent is saturation"),
+ GIMP_COLOR_RENDERING_INTENT_SATURATION,
+ GIMP_HELP_VIEW_COLOR_MANAGEMENT },
+
+ { "view-display-intent-absolute-colorimetric", NULL,
+ NC_("view-action", "_Absolute Colorimetric"), NULL,
+ NC_("view-action", "Display rendering intent is absolute colorimetric"),
+ GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
};
-static const GimpRadioActionEntry view_color_management_intent_actions[] =
+static const GimpRadioActionEntry view_softproof_intent_actions[] =
{
- { "view-color-management-intent-perceptual", NULL,
+ { "view-softproof-intent-perceptual", NULL,
NC_("view-action", "_Perceptual"), NULL,
- NC_("view-action", "Rendering intent is perceptual"),
+ NC_("view-action", "Softproof rendering intent is perceptual"),
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
- { "view-color-management-intent-relative-colorimetric", NULL,
+ { "view-softproof-intent-relative-colorimetric", NULL,
NC_("view-action", "_Relative Colorimetric"), NULL,
- NC_("view-action", "Rendering intent is relative colorimetric"),
+ NC_("view-action", "Softproof rendering intent is relative colorimetric"),
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
- { "view-color-management-intent-saturation", NULL,
+ { "view-softproof-intent-saturation", NULL,
NC_("view-action", "_Saturation"), NULL,
- NC_("view-action", "Rendering intent is saturation"),
+ NC_("view-action", "Softproof rendering intent is saturation"),
GIMP_COLOR_RENDERING_INTENT_SATURATION,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
- { "view-color-management-intent-absolute-colorimetric", NULL,
+ { "view-softproof-intent-absolute-colorimetric", NULL,
NC_("view-action", "_Absolute Colorimetric"), NULL,
- NC_("view-action", "Rendering intent is absolute colorimetric"),
+ NC_("view-action", "Softproof rendering intent is absolute colorimetric"),
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
};
@@ -683,18 +716,18 @@ view_actions_setup (GimpActionGroup *group)
G_CALLBACK (view_rotate_relative_cmd_callback));
gimp_action_group_add_radio_actions (group, "view-action",
- view_color_management_mode_actions,
- G_N_ELEMENTS (view_color_management_mode_actions),
+ view_display_intent_actions,
+ G_N_ELEMENTS (view_display_intent_actions),
NULL,
GIMP_COLOR_MANAGEMENT_DISPLAY,
- G_CALLBACK (view_color_management_mode_cmd_callback));
+ G_CALLBACK (view_display_intent_cmd_callback));
gimp_action_group_add_radio_actions (group, "view-action",
- view_color_management_intent_actions,
- G_N_ELEMENTS (view_color_management_intent_actions),
+ view_softproof_intent_actions,
+ G_N_ELEMENTS (view_softproof_intent_actions),
NULL,
GIMP_COLOR_MANAGEMENT_DISPLAY,
- G_CALLBACK (view_color_management_intent_cmd_callback));
+ G_CALLBACK (view_softproof_intent_cmd_callback));
gimp_action_group_add_enum_actions (group, "view-padding-color",
view_padding_color_actions,
@@ -754,13 +787,14 @@ view_actions_update (GimpActionGroup *group,
gboolean flip_vertically = FALSE;
gboolean cm = FALSE;
gboolean sp = FALSE;
+ gboolean d_bpc = FALSE;
+ gboolean s_bpc = FALSE;
+ gboolean gammut = FALSE;
if (display)
{
- GimpImageWindow *window;
- GimpColorRenderingIntent intent = GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL;
- gboolean bpc = TRUE;
- const gchar *action = NULL;
+ GimpImageWindow *window;
+ const gchar *action = NULL;
image = gimp_display_get_image (display);
shell = gimp_display_get_shell (display);
@@ -783,56 +817,63 @@ view_actions_update (GimpActionGroup *group,
switch (color_config->mode)
{
case GIMP_COLOR_MANAGEMENT_OFF:
- action = "view-color-management-mode-off";
break;
case GIMP_COLOR_MANAGEMENT_DISPLAY:
- action = "view-color-management-mode-display";
- intent = color_config->display_intent;
- bpc = color_config->display_use_black_point_compensation;
-
- cm = TRUE;
+ cm = (image != NULL);
break;
case GIMP_COLOR_MANAGEMENT_SOFTPROOF:
- action = "view-color-management-mode-softproof";
- intent = color_config->simulation_intent;
- bpc = color_config->simulation_use_black_point_compensation;
+ cm = (image != NULL);
+ sp = (image != NULL);
+ break;
+ }
- cm = TRUE;
- sp = TRUE;
+ switch (color_config->display_intent)
+ {
+ case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
+ action = "view-display-intent-perceptual";
+ break;
+
+ case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
+ action = "view-display-intent-relative-colorimetric";
+ break;
+
+ case GIMP_COLOR_RENDERING_INTENT_SATURATION:
+ action = "view-display-intent-saturation";
+ break;
+
+ case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
+ action = "view-display-intent-absolute-colorimetric";
break;
}
gimp_action_group_set_action_active (group, action, TRUE);
- switch (intent)
+ switch (color_config->simulation_intent)
{
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
- action = "view-color-management-intent-perceptual";
+ action = "view-softproof-intent-perceptual";
break;
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
- action = "view-color-management-intent-relative-colorimetric";
+ action = "view-softproof-intent-relative-colorimetric";
break;
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
- action = "view-color-management-intent-saturation";
+ action = "view-softproof-intent-saturation";
break;
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
- action = "view-color-management-intent-absolute-colorimetric";
+ action = "view-softproof-intent-absolute-colorimetric";
break;
}
gimp_action_group_set_action_active (group, action, TRUE);
- gimp_action_group_set_action_active (group,
- "view-color-management-black-point-compensation",
- bpc);
- gimp_action_group_set_action_active (group,
- "view-color-management-gamut-check",
- color_config->simulation_gamut_check);
+ d_bpc = color_config->display_use_black_point_compensation;
+ s_bpc = color_config->simulation_use_black_point_compensation;
+ gammut = color_config->simulation_gamut_check;
}
#define SET_ACTIVE(action,condition) \
@@ -916,16 +957,25 @@ view_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("view-navigation-window", image);
SET_SENSITIVE ("view-display-filters", image);
- SET_SENSITIVE ("view-color-management-mode-off", image);
- SET_SENSITIVE ("view-color-management-mode-display", image);
- SET_SENSITIVE ("view-color-management-mode-softproof", image);
- SET_SENSITIVE ("view-color-management-intent-perceptual", cm);
- SET_SENSITIVE ("view-color-management-intent-relative-colorimetric", cm);
- SET_SENSITIVE ("view-color-management-intent-saturation", cm);
- SET_SENSITIVE ("view-color-management-intent-absolute-colorimetric", cm);
- SET_SENSITIVE ("view-color-management-black-point-compensation", cm);
- SET_SENSITIVE ("view-color-management-gamut-check", sp);
- SET_SENSITIVE ("view-color-management-reset", image);
+ SET_SENSITIVE ("view-color-management-enable", image);
+ SET_ACTIVE ("view-color-management-enable", cm);
+ SET_SENSITIVE ("view-color-management-softproof", image);
+ SET_ACTIVE ("view-color-management-softproof", sp);
+ SET_SENSITIVE ("view-display-intent-perceptual", cm);
+ SET_SENSITIVE ("view-display-intent-relative-colorimetric", cm);
+ SET_SENSITIVE ("view-display-intent-saturation", cm);
+ SET_SENSITIVE ("view-display-intent-absolute-colorimetric", cm);
+ SET_SENSITIVE ("view-display-black-point-compensation", cm);
+ SET_ACTIVE ("view-display-black-point-compensation", d_bpc);
+ SET_SENSITIVE ("view-softproof-intent-perceptual", sp);
+ SET_SENSITIVE ("view-softproof-intent-relative-colorimetric", sp);
+ SET_SENSITIVE ("view-softproof-intent-saturation", sp);
+ SET_SENSITIVE ("view-softproof-intent-absolute-colorimetric", sp);
+ SET_SENSITIVE ("view-softproof-black-point-compensation", sp);
+ SET_ACTIVE ("view-softproof-black-point-compensation", s_bpc);
+ SET_SENSITIVE ("view-softproof-gamut-check", sp);
+ SET_ACTIVE ("view-softproof-gamut-check", gammut);
+ SET_SENSITIVE ("view-color-management-reset", image);
SET_SENSITIVE ("view-show-selection", image);
SET_ACTIVE ("view-show-selection", display && options->show_selection);
diff --git a/app/actions/view-commands.c b/app/actions/view-commands.c
index efdd2b0..9cf8c91 100644
--- a/app/actions/view-commands.c
+++ b/app/actions/view-commands.c
@@ -505,32 +505,79 @@ view_color_management_reset_cmd_callback (GtkAction *action,
}
void
-view_color_management_mode_cmd_callback (GtkAction *action,
- GtkAction *current,
- gpointer data)
+view_color_management_enable_cmd_callback (GtkAction *action,
+ gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
- GimpColorManagementMode value;
+ GimpColorManagementMode mode;
+ gboolean active;
return_if_no_shell (shell, data);
color_config = gimp_display_shell_get_color_config (shell);
- value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
+ active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+
+ mode = color_config->mode;
+
+ if (active)
+ {
+ if (mode != GIMP_COLOR_MANAGEMENT_SOFTPROOF)
+ mode = GIMP_COLOR_MANAGEMENT_DISPLAY;
+ }
+ else
+ {
+ mode = GIMP_COLOR_MANAGEMENT_OFF;
+ }
- if (value != color_config->mode)
+ if (mode != color_config->mode)
{
g_object_set (color_config,
- "mode", value,
+ "mode", mode,
NULL);
shell->color_config_set = TRUE;
}
}
void
-view_color_management_intent_cmd_callback (GtkAction *action,
- GtkAction *current,
- gpointer data)
+view_color_management_softproof_cmd_callback (GtkAction *action,
+ gpointer data)
+{
+ GimpDisplayShell *shell;
+ GimpColorConfig *color_config;
+ GimpColorManagementMode mode;
+ gboolean active;
+ return_if_no_shell (shell, data);
+
+ color_config = gimp_display_shell_get_color_config (shell);
+
+ active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+
+ mode = color_config->mode;
+
+ if (active)
+ {
+ mode = GIMP_COLOR_MANAGEMENT_SOFTPROOF;
+ }
+ else
+ {
+ if (mode != GIMP_COLOR_MANAGEMENT_OFF)
+ mode = GIMP_COLOR_MANAGEMENT_DISPLAY;
+ }
+
+ if (mode != color_config->mode)
+ {
+ g_object_set (color_config,
+ "mode", mode,
+ NULL);
+ shell->color_config_set = TRUE;
+ }
+}
+
+void
+view_display_intent_cmd_callback (GtkAction *action,
+ GtkAction *current,
+ gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
@@ -541,36 +588,41 @@ view_color_management_intent_cmd_callback (GtkAction *action,
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
- switch (color_config->mode)
+ if (value != color_config->display_intent)
{
- case GIMP_COLOR_MANAGEMENT_DISPLAY:
- if (value != color_config->display_intent)
- {
- g_object_set (color_config,
- "display-rendering-intent", value,
- NULL);
- shell->color_config_set = TRUE;
- }
- break;
+ g_object_set (color_config,
+ "display-rendering-intent", value,
+ NULL);
+ shell->color_config_set = TRUE;
+ }
+}
- case GIMP_COLOR_MANAGEMENT_SOFTPROOF:
- if (value != color_config->simulation_intent)
- {
- g_object_set (color_config,
- "simulation-rendering-intent", value,
- NULL);
- shell->color_config_set = TRUE;
- }
- break;
+void
+view_softproof_intent_cmd_callback (GtkAction *action,
+ GtkAction *current,
+ gpointer data)
+{
+ GimpDisplayShell *shell;
+ GimpColorConfig *color_config;
+ GimpColorRenderingIntent value;
+ return_if_no_shell (shell, data);
- default:
- break;
+ color_config = gimp_display_shell_get_color_config (shell);
+
+ value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
+
+ if (value != color_config->simulation_intent)
+ {
+ g_object_set (color_config,
+ "simulation-rendering-intent", value,
+ NULL);
+ shell->color_config_set = TRUE;
}
}
void
-view_color_management_bpc_cmd_callback (GtkAction *action,
- gpointer data)
+view_display_bpc_cmd_callback (GtkAction *action,
+ gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
@@ -581,36 +633,40 @@ view_color_management_bpc_cmd_callback (GtkAction *action,
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
- switch (color_config->mode)
+ if (active != color_config->display_use_black_point_compensation)
{
- case GIMP_COLOR_MANAGEMENT_DISPLAY:
- if (active != color_config->display_use_black_point_compensation)
- {
- g_object_set (color_config,
- "display-use-black-point-compensation", active,
+ g_object_set (color_config,
+ "display-use-black-point-compensation", active,
NULL);
- shell->color_config_set = TRUE;
- }
- break;
+ shell->color_config_set = TRUE;
+ }
+}
- case GIMP_COLOR_MANAGEMENT_SOFTPROOF:
- if (active != color_config->simulation_use_black_point_compensation)
- {
- g_object_set (color_config,
- "simulation-use-black-point-compensation", active,
- NULL);
- shell->color_config_set = TRUE;
- }
- break;
+void
+view_softproof_bpc_cmd_callback (GtkAction *action,
+ gpointer data)
+{
+ GimpDisplayShell *shell;
+ GimpColorConfig *color_config;
+ gboolean active;
+ return_if_no_shell (shell, data);
- default:
- break;
+ color_config = gimp_display_shell_get_color_config (shell);
+
+ active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+
+ if (active != color_config->simulation_use_black_point_compensation)
+ {
+ g_object_set (color_config,
+ "simulation-use-black-point-compensation", active,
+ NULL);
+ shell->color_config_set = TRUE;
}
}
void
-view_color_management_gamut_check_cmd_callback (GtkAction *action,
- gpointer data)
+view_softproof_gamut_check_cmd_callback (GtkAction *action,
+ gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
diff --git a/app/actions/view-commands.h b/app/actions/view-commands.h
index a8c0f02..34c7955 100644
--- a/app/actions/view-commands.h
+++ b/app/actions/view-commands.h
@@ -71,16 +71,22 @@ void view_display_filters_cmd_callback (GtkAction *action,
void view_color_management_reset_cmd_callback (GtkAction *action,
gpointer data);
-void view_color_management_mode_cmd_callback (GtkAction *action,
+void view_color_management_enable_cmd_callback(GtkAction *action,
+ gpointer data);
+void view_color_management_softproof_cmd_callback
+ (GtkAction *action,
+ gpointer data);
+void view_display_intent_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
-void view_color_management_intent_cmd_callback(GtkAction *action,
+void view_display_bpc_cmd_callback (GtkAction *action,
+ gpointer data);
+void view_softproof_intent_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
-void view_color_management_bpc_cmd_callback (GtkAction *action,
+void view_softproof_bpc_cmd_callback (GtkAction *action,
gpointer data);
-void view_color_management_gamut_check_cmd_callback
- (GtkAction *action,
+void view_softproof_gamut_check_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_selection_cmd_callback (GtkAction *action,
diff --git a/app/display/gimpdisplayshell-profile.c b/app/display/gimpdisplayshell-profile.c
index 139b2d7..a2c9599 100644
--- a/app/display/gimpdisplayshell-profile.c
+++ b/app/display/gimpdisplayshell-profile.c
@@ -257,10 +257,9 @@ gimp_display_shell_color_config_notify (GimpColorConfig *config,
! strcmp (pspec->name, "simulation-use-black-point-compensation") ||
! strcmp (pspec->name, "simulation-gamut-check"))
{
- GimpColorRenderingIntent intent = GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL;
- gboolean managed = TRUE;
- gboolean bpc = TRUE;
- const gchar *action = NULL;
+ gboolean managed = FALSE;
+ gboolean softproof = FALSE;
+ const gchar *action = NULL;
#define SET_SENSITIVE(action, sensitive) \
gimp_display_shell_set_action_sensitive (shell, action, sensitive);
@@ -271,61 +270,83 @@ gimp_display_shell_color_config_notify (GimpColorConfig *config,
switch (config->mode)
{
case GIMP_COLOR_MANAGEMENT_OFF:
- action = "view-color-management-mode-off";
- managed = FALSE;
break;
case GIMP_COLOR_MANAGEMENT_DISPLAY:
- action = "view-color-management-mode-display";
- intent = config->display_intent;
- bpc = config->display_use_black_point_compensation;
+ managed = TRUE;
break;
case GIMP_COLOR_MANAGEMENT_SOFTPROOF:
- action = "view-color-management-mode-softproof";
- intent = config->simulation_intent;
- bpc = config->simulation_use_black_point_compensation;
+ managed = TRUE;
+ softproof = TRUE;
break;
}
+ SET_ACTIVE ("view-color-management-enable", managed);
+ SET_ACTIVE ("view-color-management-softproof", softproof);
+
+ switch (config->display_intent)
+ {
+ case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
+ action = "view-display-intent-perceptual";
+ break;
+
+ case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
+ action = "view-display-intent-relative-colorimetric";
+ break;
+
+ case GIMP_COLOR_RENDERING_INTENT_SATURATION:
+ action = "view-display-intent-saturation";
+ break;
+
+ case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
+ action = "view-display-intent-absolute-colorimetric";
+ break;
+ }
+
+ SET_SENSITIVE ("view-display-intent-perceptual", managed);
+ SET_SENSITIVE ("view-display-intent-relative-colorimetric", managed);
+ SET_SENSITIVE ("view-display-intent-saturation", managed);
+ SET_SENSITIVE ("view-display-intent-absolute-colorimetric", managed);
+
SET_ACTIVE (action, TRUE);
- switch (intent)
+ SET_SENSITIVE ("view-display-black-point-compensation", managed);
+ SET_ACTIVE ("view-display-black-point-compensation",
+ config->display_use_black_point_compensation);
+
+ switch (config->simulation_intent)
{
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
- action = "view-color-management-intent-perceptual";
+ action = "view-softproof-intent-perceptual";
break;
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
- action = "view-color-management-intent-relative-colorimetric";
+ action = "view-softproof-intent-relative-colorimetric";
break;
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
- action = "view-color-management-intent-saturation";
+ action = "view-softproof-intent-saturation";
break;
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
- action = "view-color-management-intent-absolute-colorimetric";
+ action = "view-softproof-intent-absolute-colorimetric";
break;
}
- SET_SENSITIVE ("view-color-management-intent-perceptual",
- managed);
- SET_SENSITIVE ("view-color-management-intent-relative-colorimetric",
- managed);
- SET_SENSITIVE ("view-color-management-intent-saturation",
- managed);
- SET_SENSITIVE ("view-color-management-intent-absolute-colorimetric",
- managed);
+ SET_SENSITIVE ("view-softproof-intent-perceptual", softproof);
+ SET_SENSITIVE ("view-softproof-intent-relative-colorimetric", softproof);
+ SET_SENSITIVE ("view-softproof-intent-saturation", softproof);
+ SET_SENSITIVE ("view-softproof-intent-absolute-colorimetric", softproof);
SET_ACTIVE (action, TRUE);
- SET_SENSITIVE ("view-color-management-black-point-compensation", managed);
- SET_ACTIVE ("view-color-management-black-point-compensation", bpc);
+ SET_SENSITIVE ("view-softproof-black-point-compensation", softproof);
+ SET_ACTIVE ("view-softproof-black-point-compensation",
+ config->simulation_use_black_point_compensation);
- SET_SENSITIVE ("view-color-management-gamut-check",
- config->mode == GIMP_COLOR_MANAGEMENT_SOFTPROOF);
- SET_ACTIVE ("view-color-management-gamut-check",
+ SET_SENSITIVE ("view-softproof-gamut-check", softproof);
+ SET_ACTIVE ("view-softproof-gamut-check",
config->simulation_gamut_check);
}
diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in
index f9f5a3b..8107eb4 100644
--- a/menus/image-menu.xml.in
+++ b/menus/image-menu.xml.in
@@ -302,17 +302,25 @@
<menuitem action="view-navigation-window" />
<menuitem action="view-display-filters" />
<menu action="view-color-management-menu" name="Color Management">
- <menuitem action="view-color-management-mode-off" />
- <menuitem action="view-color-management-mode-display" />
- <menuitem action="view-color-management-mode-softproof" />
- <separator />
- <menuitem action="view-color-management-intent-perceptual" />
- <menuitem action="view-color-management-intent-relative-colorimetric" />
- <menuitem action="view-color-management-intent-saturation" />
- <menuitem action="view-color-management-intent-absolute-colorimetric" />
+ <menuitem action="view-color-management-enable" />
+ <menuitem action="view-color-management-softproof" />
+ <separator />
+ <menu action="view-display-intent-menu" name="Display Rendering Intent">
+ <menuitem action="view-display-intent-perceptual" />
+ <menuitem action="view-display-intent-relative-colorimetric" />
+ <menuitem action="view-display-intent-saturation" />
+ <menuitem action="view-display-intent-absolute-colorimetric" />
+ </menu>
+ <menuitem action="view-display-black-point-compensation" />
<separator />
- <menuitem action="view-color-management-black-point-compensation" />
- <menuitem action="view-color-management-gamut-check" />
+ <menu action="view-softproof-intent-menu" name="Softproof Rendering Intent">
+ <menuitem action="view-softproof-intent-perceptual" />
+ <menuitem action="view-softproof-intent-relative-colorimetric" />
+ <menuitem action="view-softproof-intent-saturation" />
+ <menuitem action="view-softproof-intent-absolute-colorimetric" />
+ </menu>
+ <menuitem action="view-softproof-black-point-compensation" />
+ <menuitem action="view-softproof-gamut-check" />
<separator />
<menuitem action="view-color-management-reset" />
</menu>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]