mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
0f3e8ea116
commit
dcf5c526e7
|
@ -75,6 +75,12 @@ static const GimpActionEntry view_actions[] =
|
||||||
{ "view-color-management-menu", NULL,
|
{ "view-color-management-menu", NULL,
|
||||||
NC_("view-action", "_Color Management") },
|
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,
|
{ "view-move-to-screen-menu", GIMP_STOCK_MOVE_TO_SCREEN,
|
||||||
NC_("view-action", "Move to Screen"), NULL, NULL, NULL,
|
NC_("view-action", "Move to Screen"), NULL, NULL, NULL,
|
||||||
GIMP_HELP_VIEW_CHANGE_SCREEN },
|
GIMP_HELP_VIEW_CHANGE_SCREEN },
|
||||||
|
@ -162,18 +168,39 @@ static const GimpToggleActionEntry view_toggle_actions[] =
|
||||||
TRUE,
|
TRUE,
|
||||||
GIMP_HELP_VIEW_DOT_FOR_DOT },
|
GIMP_HELP_VIEW_DOT_FOR_DOT },
|
||||||
|
|
||||||
{ "view-color-management-black-point-compensation", NULL,
|
{ "view-color-management-enable", NULL,
|
||||||
NC_("view-action", "_Black Point Compensation"), NULL,
|
NC_("view-action", "_Color Manage this View"), NULL,
|
||||||
NC_("view-action", "Use black point compensation"),
|
NC_("view-action", "Color manage this view"),
|
||||||
G_CALLBACK (view_color_management_bpc_cmd_callback),
|
G_CALLBACK (view_color_management_enable_cmd_callback),
|
||||||
TRUE,
|
TRUE,
|
||||||
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
||||||
|
|
||||||
{ "view-color-management-gamut-check", NULL,
|
{ "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 for image display"),
|
||||||
|
G_CALLBACK (view_display_bpc_cmd_callback),
|
||||||
|
TRUE,
|
||||||
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
||||||
|
|
||||||
|
{ "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", "_Mark Out Of Gamut Colors"), NULL,
|
||||||
NC_("view-action", "When softproofing, mark colors which cannot "
|
NC_("view-action", "When softproofing, mark colors which cannot "
|
||||||
"be represented in the target color space"),
|
"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,
|
FALSE,
|
||||||
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
||||||
|
|
||||||
|
@ -484,50 +511,56 @@ static const GimpEnumActionEntry view_rotate_relative_actions[] =
|
||||||
GIMP_HELP_VIEW_ROTATE_345 }
|
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,
|
{ "view-display-intent-perceptual", NULL,
|
||||||
NC_("view-action", "_No Color Management"), NULL,
|
|
||||||
NC_("view-action", "Don't color manage this view"),
|
|
||||||
GIMP_COLOR_MANAGEMENT_OFF,
|
|
||||||
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,
|
|
||||||
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,
|
|
||||||
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GimpRadioActionEntry view_color_management_intent_actions[] =
|
|
||||||
{
|
|
||||||
{ "view-color-management-intent-perceptual", NULL,
|
|
||||||
NC_("view-action", "_Perceptual"), NULL,
|
NC_("view-action", "_Perceptual"), NULL,
|
||||||
NC_("view-action", "Rendering intent is perceptual"),
|
NC_("view-action", "Display rendering intent is perceptual"),
|
||||||
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
|
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
|
||||||
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
||||||
|
|
||||||
{ "view-color-management-intent-relative-colorimetric", NULL,
|
{ "view-display-intent-relative-colorimetric", NULL,
|
||||||
NC_("view-action", "_Relative Colorimetric"), NULL,
|
NC_("view-action", "_Relative Colorimetric"), NULL,
|
||||||
NC_("view-action", "Rendering intent is relative colorimetric"),
|
NC_("view-action", "Display rendering intent is relative colorimetric"),
|
||||||
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
|
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
|
||||||
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
||||||
|
|
||||||
{ "view-color-management-intent-saturation", NULL,
|
{ "view-display-intent-saturation", NULL,
|
||||||
NC_("view-action", "_Saturation"), NULL,
|
NC_("view-action", "_Saturation"), NULL,
|
||||||
NC_("view-action", "Rendering intent is saturation"),
|
NC_("view-action", "Display rendering intent is saturation"),
|
||||||
GIMP_COLOR_RENDERING_INTENT_SATURATION,
|
GIMP_COLOR_RENDERING_INTENT_SATURATION,
|
||||||
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
||||||
|
|
||||||
{ "view-color-management-intent-absolute-colorimetric", NULL,
|
{ "view-display-intent-absolute-colorimetric", NULL,
|
||||||
NC_("view-action", "_Absolute Colorimetric"), NULL,
|
NC_("view-action", "_Absolute Colorimetric"), NULL,
|
||||||
NC_("view-action", "Rendering intent is absolute colorimetric"),
|
NC_("view-action", "Display rendering intent is absolute colorimetric"),
|
||||||
|
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC,
|
||||||
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GimpRadioActionEntry view_softproof_intent_actions[] =
|
||||||
|
{
|
||||||
|
{ "view-softproof-intent-perceptual", NULL,
|
||||||
|
NC_("view-action", "_Perceptual"), NULL,
|
||||||
|
NC_("view-action", "Softproof rendering intent is perceptual"),
|
||||||
|
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
|
||||||
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
||||||
|
|
||||||
|
{ "view-softproof-intent-relative-colorimetric", NULL,
|
||||||
|
NC_("view-action", "_Relative Colorimetric"), NULL,
|
||||||
|
NC_("view-action", "Softproof rendering intent is relative colorimetric"),
|
||||||
|
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
|
||||||
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
||||||
|
|
||||||
|
{ "view-softproof-intent-saturation", NULL,
|
||||||
|
NC_("view-action", "_Saturation"), NULL,
|
||||||
|
NC_("view-action", "Softproof rendering intent is saturation"),
|
||||||
|
GIMP_COLOR_RENDERING_INTENT_SATURATION,
|
||||||
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
|
||||||
|
|
||||||
|
{ "view-softproof-intent-absolute-colorimetric", NULL,
|
||||||
|
NC_("view-action", "_Absolute Colorimetric"), NULL,
|
||||||
|
NC_("view-action", "Softproof rendering intent is absolute colorimetric"),
|
||||||
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC,
|
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC,
|
||||||
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
|
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
|
||||||
};
|
};
|
||||||
|
@ -683,18 +716,18 @@ view_actions_setup (GimpActionGroup *group)
|
||||||
G_CALLBACK (view_rotate_relative_cmd_callback));
|
G_CALLBACK (view_rotate_relative_cmd_callback));
|
||||||
|
|
||||||
gimp_action_group_add_radio_actions (group, "view-action",
|
gimp_action_group_add_radio_actions (group, "view-action",
|
||||||
view_color_management_mode_actions,
|
view_display_intent_actions,
|
||||||
G_N_ELEMENTS (view_color_management_mode_actions),
|
G_N_ELEMENTS (view_display_intent_actions),
|
||||||
NULL,
|
NULL,
|
||||||
GIMP_COLOR_MANAGEMENT_DISPLAY,
|
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",
|
gimp_action_group_add_radio_actions (group, "view-action",
|
||||||
view_color_management_intent_actions,
|
view_softproof_intent_actions,
|
||||||
G_N_ELEMENTS (view_color_management_intent_actions),
|
G_N_ELEMENTS (view_softproof_intent_actions),
|
||||||
NULL,
|
NULL,
|
||||||
GIMP_COLOR_MANAGEMENT_DISPLAY,
|
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",
|
gimp_action_group_add_enum_actions (group, "view-padding-color",
|
||||||
view_padding_color_actions,
|
view_padding_color_actions,
|
||||||
|
@ -754,13 +787,14 @@ view_actions_update (GimpActionGroup *group,
|
||||||
gboolean flip_vertically = FALSE;
|
gboolean flip_vertically = FALSE;
|
||||||
gboolean cm = FALSE;
|
gboolean cm = FALSE;
|
||||||
gboolean sp = FALSE;
|
gboolean sp = FALSE;
|
||||||
|
gboolean d_bpc = FALSE;
|
||||||
|
gboolean s_bpc = FALSE;
|
||||||
|
gboolean gammut = FALSE;
|
||||||
|
|
||||||
if (display)
|
if (display)
|
||||||
{
|
{
|
||||||
GimpImageWindow *window;
|
GimpImageWindow *window;
|
||||||
GimpColorRenderingIntent intent = GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL;
|
const gchar *action = NULL;
|
||||||
gboolean bpc = TRUE;
|
|
||||||
const gchar *action = NULL;
|
|
||||||
|
|
||||||
image = gimp_display_get_image (display);
|
image = gimp_display_get_image (display);
|
||||||
shell = gimp_display_get_shell (display);
|
shell = gimp_display_get_shell (display);
|
||||||
|
@ -783,56 +817,63 @@ view_actions_update (GimpActionGroup *group,
|
||||||
switch (color_config->mode)
|
switch (color_config->mode)
|
||||||
{
|
{
|
||||||
case GIMP_COLOR_MANAGEMENT_OFF:
|
case GIMP_COLOR_MANAGEMENT_OFF:
|
||||||
action = "view-color-management-mode-off";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_MANAGEMENT_DISPLAY:
|
case GIMP_COLOR_MANAGEMENT_DISPLAY:
|
||||||
action = "view-color-management-mode-display";
|
cm = (image != NULL);
|
||||||
intent = color_config->display_intent;
|
|
||||||
bpc = color_config->display_use_black_point_compensation;
|
|
||||||
|
|
||||||
cm = TRUE;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_MANAGEMENT_SOFTPROOF:
|
case GIMP_COLOR_MANAGEMENT_SOFTPROOF:
|
||||||
action = "view-color-management-mode-softproof";
|
cm = (image != NULL);
|
||||||
intent = color_config->simulation_intent;
|
sp = (image != NULL);
|
||||||
bpc = color_config->simulation_use_black_point_compensation;
|
|
||||||
|
|
||||||
cm = TRUE;
|
|
||||||
sp = TRUE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_action_group_set_action_active (group, action, TRUE);
|
switch (color_config->display_intent)
|
||||||
|
|
||||||
switch (intent)
|
|
||||||
{
|
{
|
||||||
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
|
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
|
||||||
action = "view-color-management-intent-perceptual";
|
action = "view-display-intent-perceptual";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
|
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
|
||||||
action = "view-color-management-intent-relative-colorimetric";
|
action = "view-display-intent-relative-colorimetric";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
|
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
|
||||||
action = "view-color-management-intent-saturation";
|
action = "view-display-intent-saturation";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
|
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
|
||||||
action = "view-color-management-intent-absolute-colorimetric";
|
action = "view-display-intent-absolute-colorimetric";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_action_group_set_action_active (group, action, TRUE);
|
gimp_action_group_set_action_active (group, action, TRUE);
|
||||||
|
|
||||||
gimp_action_group_set_action_active (group,
|
switch (color_config->simulation_intent)
|
||||||
"view-color-management-black-point-compensation",
|
{
|
||||||
bpc);
|
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
|
||||||
gimp_action_group_set_action_active (group,
|
action = "view-softproof-intent-perceptual";
|
||||||
"view-color-management-gamut-check",
|
break;
|
||||||
color_config->simulation_gamut_check);
|
|
||||||
|
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
|
||||||
|
action = "view-softproof-intent-relative-colorimetric";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
|
||||||
|
action = "view-softproof-intent-saturation";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
|
||||||
|
action = "view-softproof-intent-absolute-colorimetric";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_action_group_set_action_active (group, action, TRUE);
|
||||||
|
|
||||||
|
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) \
|
#define SET_ACTIVE(action,condition) \
|
||||||
|
@ -916,16 +957,25 @@ view_actions_update (GimpActionGroup *group,
|
||||||
SET_SENSITIVE ("view-navigation-window", image);
|
SET_SENSITIVE ("view-navigation-window", image);
|
||||||
SET_SENSITIVE ("view-display-filters", image);
|
SET_SENSITIVE ("view-display-filters", image);
|
||||||
|
|
||||||
SET_SENSITIVE ("view-color-management-mode-off", image);
|
SET_SENSITIVE ("view-color-management-enable", image);
|
||||||
SET_SENSITIVE ("view-color-management-mode-display", image);
|
SET_ACTIVE ("view-color-management-enable", cm);
|
||||||
SET_SENSITIVE ("view-color-management-mode-softproof", image);
|
SET_SENSITIVE ("view-color-management-softproof", image);
|
||||||
SET_SENSITIVE ("view-color-management-intent-perceptual", cm);
|
SET_ACTIVE ("view-color-management-softproof", sp);
|
||||||
SET_SENSITIVE ("view-color-management-intent-relative-colorimetric", cm);
|
SET_SENSITIVE ("view-display-intent-perceptual", cm);
|
||||||
SET_SENSITIVE ("view-color-management-intent-saturation", cm);
|
SET_SENSITIVE ("view-display-intent-relative-colorimetric", cm);
|
||||||
SET_SENSITIVE ("view-color-management-intent-absolute-colorimetric", cm);
|
SET_SENSITIVE ("view-display-intent-saturation", cm);
|
||||||
SET_SENSITIVE ("view-color-management-black-point-compensation", cm);
|
SET_SENSITIVE ("view-display-intent-absolute-colorimetric", cm);
|
||||||
SET_SENSITIVE ("view-color-management-gamut-check", sp);
|
SET_SENSITIVE ("view-display-black-point-compensation", cm);
|
||||||
SET_SENSITIVE ("view-color-management-reset", image);
|
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_SENSITIVE ("view-show-selection", image);
|
||||||
SET_ACTIVE ("view-show-selection", display && options->show_selection);
|
SET_ACTIVE ("view-show-selection", display && options->show_selection);
|
||||||
|
|
|
@ -505,32 +505,79 @@ view_color_management_reset_cmd_callback (GtkAction *action,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
view_color_management_mode_cmd_callback (GtkAction *action,
|
view_color_management_enable_cmd_callback (GtkAction *action,
|
||||||
GtkAction *current,
|
gpointer data)
|
||||||
gpointer data)
|
|
||||||
{
|
{
|
||||||
GimpDisplayShell *shell;
|
GimpDisplayShell *shell;
|
||||||
GimpColorConfig *color_config;
|
GimpColorConfig *color_config;
|
||||||
GimpColorManagementMode value;
|
GimpColorManagementMode mode;
|
||||||
|
gboolean active;
|
||||||
return_if_no_shell (shell, data);
|
return_if_no_shell (shell, data);
|
||||||
|
|
||||||
color_config = gimp_display_shell_get_color_config (shell);
|
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));
|
||||||
|
|
||||||
if (value != color_config->mode)
|
mode = color_config->mode;
|
||||||
|
|
||||||
|
if (active)
|
||||||
|
{
|
||||||
|
if (mode != GIMP_COLOR_MANAGEMENT_SOFTPROOF)
|
||||||
|
mode = GIMP_COLOR_MANAGEMENT_DISPLAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mode = GIMP_COLOR_MANAGEMENT_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mode != color_config->mode)
|
||||||
{
|
{
|
||||||
g_object_set (color_config,
|
g_object_set (color_config,
|
||||||
"mode", value,
|
"mode", mode,
|
||||||
NULL);
|
NULL);
|
||||||
shell->color_config_set = TRUE;
|
shell->color_config_set = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
view_color_management_intent_cmd_callback (GtkAction *action,
|
view_color_management_softproof_cmd_callback (GtkAction *action,
|
||||||
GtkAction *current,
|
gpointer data)
|
||||||
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;
|
GimpDisplayShell *shell;
|
||||||
GimpColorConfig *color_config;
|
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));
|
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:
|
g_object_set (color_config,
|
||||||
if (value != color_config->display_intent)
|
"display-rendering-intent", value,
|
||||||
{
|
NULL);
|
||||||
g_object_set (color_config,
|
shell->color_config_set = TRUE;
|
||||||
"display-rendering-intent", value,
|
|
||||||
NULL);
|
|
||||||
shell->color_config_set = TRUE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
view_color_management_bpc_cmd_callback (GtkAction *action,
|
view_softproof_intent_cmd_callback (GtkAction *action,
|
||||||
gpointer data)
|
GtkAction *current,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
GimpDisplayShell *shell;
|
||||||
|
GimpColorConfig *color_config;
|
||||||
|
GimpColorRenderingIntent value;
|
||||||
|
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));
|
||||||
|
|
||||||
|
if (value != color_config->simulation_intent)
|
||||||
|
{
|
||||||
|
g_object_set (color_config,
|
||||||
|
"simulation-rendering-intent", value,
|
||||||
|
NULL);
|
||||||
|
shell->color_config_set = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
view_display_bpc_cmd_callback (GtkAction *action,
|
||||||
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpDisplayShell *shell;
|
GimpDisplayShell *shell;
|
||||||
GimpColorConfig *color_config;
|
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));
|
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:
|
g_object_set (color_config,
|
||||||
if (active != color_config->display_use_black_point_compensation)
|
"display-use-black-point-compensation", active,
|
||||||
{
|
|
||||||
g_object_set (color_config,
|
|
||||||
"display-use-black-point-compensation", active,
|
|
||||||
NULL);
|
NULL);
|
||||||
shell->color_config_set = TRUE;
|
shell->color_config_set = TRUE;
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
view_color_management_gamut_check_cmd_callback (GtkAction *action,
|
view_softproof_bpc_cmd_callback (GtkAction *action,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
{
|
||||||
|
GimpDisplayShell *shell;
|
||||||
|
GimpColorConfig *color_config;
|
||||||
|
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));
|
||||||
|
|
||||||
|
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_softproof_gamut_check_cmd_callback (GtkAction *action,
|
||||||
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpDisplayShell *shell;
|
GimpDisplayShell *shell;
|
||||||
GimpColorConfig *color_config;
|
GimpColorConfig *color_config;
|
||||||
|
|
|
@ -71,17 +71,23 @@ void view_display_filters_cmd_callback (GtkAction *action,
|
||||||
|
|
||||||
void view_color_management_reset_cmd_callback (GtkAction *action,
|
void view_color_management_reset_cmd_callback (GtkAction *action,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
void view_color_management_mode_cmd_callback (GtkAction *action,
|
void view_color_management_enable_cmd_callback(GtkAction *action,
|
||||||
GtkAction *current,
|
|
||||||
gpointer data);
|
gpointer data);
|
||||||
void view_color_management_intent_cmd_callback(GtkAction *action,
|
void view_color_management_softproof_cmd_callback
|
||||||
GtkAction *current,
|
|
||||||
gpointer data);
|
|
||||||
void view_color_management_bpc_cmd_callback (GtkAction *action,
|
|
||||||
gpointer data);
|
|
||||||
void view_color_management_gamut_check_cmd_callback
|
|
||||||
(GtkAction *action,
|
(GtkAction *action,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
void view_display_intent_cmd_callback (GtkAction *action,
|
||||||
|
GtkAction *current,
|
||||||
|
gpointer data);
|
||||||
|
void view_display_bpc_cmd_callback (GtkAction *action,
|
||||||
|
gpointer data);
|
||||||
|
void view_softproof_intent_cmd_callback (GtkAction *action,
|
||||||
|
GtkAction *current,
|
||||||
|
gpointer data);
|
||||||
|
void view_softproof_bpc_cmd_callback (GtkAction *action,
|
||||||
|
gpointer data);
|
||||||
|
void view_softproof_gamut_check_cmd_callback (GtkAction *action,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
void view_toggle_selection_cmd_callback (GtkAction *action,
|
void view_toggle_selection_cmd_callback (GtkAction *action,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
|
@ -257,10 +257,9 @@ gimp_display_shell_color_config_notify (GimpColorConfig *config,
|
||||||
! strcmp (pspec->name, "simulation-use-black-point-compensation") ||
|
! strcmp (pspec->name, "simulation-use-black-point-compensation") ||
|
||||||
! strcmp (pspec->name, "simulation-gamut-check"))
|
! strcmp (pspec->name, "simulation-gamut-check"))
|
||||||
{
|
{
|
||||||
GimpColorRenderingIntent intent = GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL;
|
gboolean managed = FALSE;
|
||||||
gboolean managed = TRUE;
|
gboolean softproof = FALSE;
|
||||||
gboolean bpc = TRUE;
|
const gchar *action = NULL;
|
||||||
const gchar *action = NULL;
|
|
||||||
|
|
||||||
#define SET_SENSITIVE(action, sensitive) \
|
#define SET_SENSITIVE(action, sensitive) \
|
||||||
gimp_display_shell_set_action_sensitive (shell, 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)
|
switch (config->mode)
|
||||||
{
|
{
|
||||||
case GIMP_COLOR_MANAGEMENT_OFF:
|
case GIMP_COLOR_MANAGEMENT_OFF:
|
||||||
action = "view-color-management-mode-off";
|
|
||||||
managed = FALSE;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_MANAGEMENT_DISPLAY:
|
case GIMP_COLOR_MANAGEMENT_DISPLAY:
|
||||||
action = "view-color-management-mode-display";
|
managed = TRUE;
|
||||||
intent = config->display_intent;
|
|
||||||
bpc = config->display_use_black_point_compensation;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_MANAGEMENT_SOFTPROOF:
|
case GIMP_COLOR_MANAGEMENT_SOFTPROOF:
|
||||||
action = "view-color-management-mode-softproof";
|
managed = TRUE;
|
||||||
intent = config->simulation_intent;
|
softproof = TRUE;
|
||||||
bpc = config->simulation_use_black_point_compensation;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SET_ACTIVE (action, TRUE);
|
SET_ACTIVE ("view-color-management-enable", managed);
|
||||||
|
SET_ACTIVE ("view-color-management-softproof", softproof);
|
||||||
|
|
||||||
switch (intent)
|
switch (config->display_intent)
|
||||||
{
|
{
|
||||||
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
|
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
|
||||||
action = "view-color-management-intent-perceptual";
|
action = "view-display-intent-perceptual";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
|
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
|
||||||
action = "view-color-management-intent-relative-colorimetric";
|
action = "view-display-intent-relative-colorimetric";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
|
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
|
||||||
action = "view-color-management-intent-saturation";
|
action = "view-display-intent-saturation";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
|
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
|
||||||
action = "view-color-management-intent-absolute-colorimetric";
|
action = "view-display-intent-absolute-colorimetric";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SET_SENSITIVE ("view-color-management-intent-perceptual",
|
SET_SENSITIVE ("view-display-intent-perceptual", managed);
|
||||||
managed);
|
SET_SENSITIVE ("view-display-intent-relative-colorimetric", managed);
|
||||||
SET_SENSITIVE ("view-color-management-intent-relative-colorimetric",
|
SET_SENSITIVE ("view-display-intent-saturation", managed);
|
||||||
managed);
|
SET_SENSITIVE ("view-display-intent-absolute-colorimetric", managed);
|
||||||
SET_SENSITIVE ("view-color-management-intent-saturation",
|
|
||||||
managed);
|
|
||||||
SET_SENSITIVE ("view-color-management-intent-absolute-colorimetric",
|
|
||||||
managed);
|
|
||||||
|
|
||||||
SET_ACTIVE (action, TRUE);
|
SET_ACTIVE (action, TRUE);
|
||||||
|
|
||||||
SET_SENSITIVE ("view-color-management-black-point-compensation", managed);
|
SET_SENSITIVE ("view-display-black-point-compensation", managed);
|
||||||
SET_ACTIVE ("view-color-management-black-point-compensation", bpc);
|
SET_ACTIVE ("view-display-black-point-compensation",
|
||||||
|
config->display_use_black_point_compensation);
|
||||||
|
|
||||||
SET_SENSITIVE ("view-color-management-gamut-check",
|
switch (config->simulation_intent)
|
||||||
config->mode == GIMP_COLOR_MANAGEMENT_SOFTPROOF);
|
{
|
||||||
SET_ACTIVE ("view-color-management-gamut-check",
|
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
|
||||||
|
action = "view-softproof-intent-perceptual";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
|
||||||
|
action = "view-softproof-intent-relative-colorimetric";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
|
||||||
|
action = "view-softproof-intent-saturation";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
|
||||||
|
action = "view-softproof-intent-absolute-colorimetric";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
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-softproof-black-point-compensation", softproof);
|
||||||
|
SET_ACTIVE ("view-softproof-black-point-compensation",
|
||||||
|
config->simulation_use_black_point_compensation);
|
||||||
|
|
||||||
|
SET_SENSITIVE ("view-softproof-gamut-check", softproof);
|
||||||
|
SET_ACTIVE ("view-softproof-gamut-check",
|
||||||
config->simulation_gamut_check);
|
config->simulation_gamut_check);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -302,17 +302,25 @@
|
||||||
<menuitem action="view-navigation-window" />
|
<menuitem action="view-navigation-window" />
|
||||||
<menuitem action="view-display-filters" />
|
<menuitem action="view-display-filters" />
|
||||||
<menu action="view-color-management-menu" name="Color Management">
|
<menu action="view-color-management-menu" name="Color Management">
|
||||||
<menuitem action="view-color-management-mode-off" />
|
<menuitem action="view-color-management-enable" />
|
||||||
<menuitem action="view-color-management-mode-display" />
|
<menuitem action="view-color-management-softproof" />
|
||||||
<menuitem action="view-color-management-mode-softproof" />
|
|
||||||
<separator />
|
<separator />
|
||||||
<menuitem action="view-color-management-intent-perceptual" />
|
<menu action="view-display-intent-menu" name="Display Rendering Intent">
|
||||||
<menuitem action="view-color-management-intent-relative-colorimetric" />
|
<menuitem action="view-display-intent-perceptual" />
|
||||||
<menuitem action="view-color-management-intent-saturation" />
|
<menuitem action="view-display-intent-relative-colorimetric" />
|
||||||
<menuitem action="view-color-management-intent-absolute-colorimetric" />
|
<menuitem action="view-display-intent-saturation" />
|
||||||
|
<menuitem action="view-display-intent-absolute-colorimetric" />
|
||||||
|
</menu>
|
||||||
|
<menuitem action="view-display-black-point-compensation" />
|
||||||
<separator />
|
<separator />
|
||||||
<menuitem action="view-color-management-black-point-compensation" />
|
<menu action="view-softproof-intent-menu" name="Softproof Rendering Intent">
|
||||||
<menuitem action="view-color-management-gamut-check" />
|
<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 />
|
<separator />
|
||||||
<menuitem action="view-color-management-reset" />
|
<menuitem action="view-color-management-reset" />
|
||||||
</menu>
|
</menu>
|
||||||
|
|
Loading…
Reference in New Issue