app, libgimp: rename BEHIND enum values to be consistent with others

Also update gimplayermodefunctions.c which I forgot before.
This commit is contained in:
Michael Natterer 2017-01-15 00:01:09 +01:00
parent 6bf9e47ba8
commit 50669fe6d4
8 changed files with 61 additions and 50 deletions

View File

@ -52,7 +52,7 @@ static const GimpLayerMode paint_modes[] =
{
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_DISSOLVE,
GIMP_LAYER_MODE_BEHIND,
GIMP_LAYER_MODE_BEHIND_LINEAR,
GIMP_LAYER_MODE_COLOR_ERASE,
GIMP_LAYER_MODE_MULTIPLY_LEGACY,
GIMP_LAYER_MODE_DIVIDE_LEGACY,

View File

@ -291,7 +291,7 @@ gimp_layer_mode_get_type (void)
{
{ GIMP_LAYER_MODE_NORMAL_NON_LINEAR, "GIMP_LAYER_MODE_NORMAL_NON_LINEAR", "normal-non-linear" },
{ GIMP_LAYER_MODE_DISSOLVE, "GIMP_LAYER_MODE_DISSOLVE", "dissolve" },
{ GIMP_LAYER_MODE_BEHIND_NON_LINEAR, "GIMP_LAYER_MODE_BEHIND_NON_LINEAR", "behind-non-linear" },
{ GIMP_LAYER_MODE_BEHIND, "GIMP_LAYER_MODE_BEHIND", "behind" },
{ GIMP_LAYER_MODE_MULTIPLY_LEGACY, "GIMP_LAYER_MODE_MULTIPLY_LEGACY", "multiply-legacy" },
{ GIMP_LAYER_MODE_SCREEN_LEGACY, "GIMP_LAYER_MODE_SCREEN_LEGACY", "screen-legacy" },
{ GIMP_LAYER_MODE_OVERLAY_LEGACY, "GIMP_LAYER_MODE_OVERLAY_LEGACY", "overlay-legacy" },
@ -318,7 +318,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_LCH_COLOR, "GIMP_LAYER_MODE_LCH_COLOR", "lch-color" },
{ GIMP_LAYER_MODE_LCH_LIGHTNESS, "GIMP_LAYER_MODE_LCH_LIGHTNESS", "lch-lightness" },
{ GIMP_LAYER_MODE_NORMAL, "GIMP_LAYER_MODE_NORMAL", "normal" },
{ GIMP_LAYER_MODE_BEHIND, "GIMP_LAYER_MODE_BEHIND", "behind" },
{ GIMP_LAYER_MODE_BEHIND_LINEAR, "GIMP_LAYER_MODE_BEHIND_LINEAR", "behind-linear" },
{ GIMP_LAYER_MODE_MULTIPLY, "GIMP_LAYER_MODE_MULTIPLY", "multiply" },
{ GIMP_LAYER_MODE_MULTIPLY_LINEAR, "GIMP_LAYER_MODE_MULTIPLY_LINEAR", "multiply-linear" },
{ GIMP_LAYER_MODE_SCREEN, "GIMP_LAYER_MODE_SCREEN", "screen" },
@ -358,7 +358,7 @@ gimp_layer_mode_get_type (void)
{
{ GIMP_LAYER_MODE_NORMAL_NON_LINEAR, NC_("layer-mode", "Normal (non-linear)"), NULL },
{ GIMP_LAYER_MODE_DISSOLVE, NC_("layer-mode", "Dissolve"), NULL },
{ GIMP_LAYER_MODE_BEHIND_NON_LINEAR, NC_("layer-mode", "Behind (non-linear)"), NULL },
{ GIMP_LAYER_MODE_BEHIND, NC_("layer-mode", "Behind"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY_LEGACY, NC_("layer-mode", "Multiply (legacy)"), NULL },
{ GIMP_LAYER_MODE_SCREEN_LEGACY, NC_("layer-mode", "Screen (legacy)"), NULL },
{ GIMP_LAYER_MODE_OVERLAY_LEGACY, NC_("layer-mode", "Old broken Overlay"), NULL },
@ -385,7 +385,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_LCH_COLOR, NC_("layer-mode", "Color (LCH)"), NULL },
{ GIMP_LAYER_MODE_LCH_LIGHTNESS, NC_("layer-mode", "Lightness (LCH)"), NULL },
{ GIMP_LAYER_MODE_NORMAL, NC_("layer-mode", "Normal"), NULL },
{ GIMP_LAYER_MODE_BEHIND, NC_("layer-mode", "Behind"), NULL },
{ GIMP_LAYER_MODE_BEHIND_LINEAR, NC_("layer-mode", "Behind (linear)"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY, NC_("layer-mode", "Multiply"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY_LINEAR, NC_("layer-mode", "Multiply (linear)"), NULL },
{ GIMP_LAYER_MODE_SCREEN, NC_("layer-mode", "Screen"), NULL },

View File

@ -157,7 +157,7 @@ typedef enum
/* Modes that exist since ancient times */
GIMP_LAYER_MODE_NORMAL_NON_LINEAR, /*< desc="Normal (non-linear)" >*/
GIMP_LAYER_MODE_DISSOLVE, /*< desc="Dissolve" >*/
GIMP_LAYER_MODE_BEHIND_NON_LINEAR, /*< desc="Behind (non-linear)" >*/
GIMP_LAYER_MODE_BEHIND, /*< desc="Behind" >*/
GIMP_LAYER_MODE_MULTIPLY_LEGACY, /*< desc="Multiply (legacy)" >*/
GIMP_LAYER_MODE_SCREEN_LEGACY, /*< desc="Screen (legacy)" >*/
GIMP_LAYER_MODE_OVERLAY_LEGACY, /*< desc="Old broken Overlay" >*/
@ -188,7 +188,7 @@ typedef enum
/* Since 2.10 */
GIMP_LAYER_MODE_NORMAL, /*< desc="Normal" >*/
GIMP_LAYER_MODE_BEHIND, /*< desc="Behind" >*/
GIMP_LAYER_MODE_BEHIND_LINEAR, /*< desc="Behind (linear)" >*/
GIMP_LAYER_MODE_MULTIPLY, /*< desc="Multiply" >*/
GIMP_LAYER_MODE_MULTIPLY_LINEAR, /*< desc="Multiply (linear)" >*/
GIMP_LAYER_MODE_SCREEN, /*< desc="Screen" >*/

View File

@ -182,8 +182,8 @@ gimp_gegl_mode_is_linear (GimpLayerMode mode)
case GIMP_LAYER_MODE_DISSOLVE:
return TRUE;
case GIMP_LAYER_MODE_BEHIND_NON_LINEAR:
return TRUE;
case GIMP_LAYER_MODE_BEHIND:
return FALSE;
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
case GIMP_LAYER_MODE_SCREEN_LEGACY:
@ -215,7 +215,6 @@ gimp_gegl_mode_is_linear (GimpLayerMode mode)
return FALSE;
case GIMP_LAYER_MODE_NORMAL:
case GIMP_LAYER_MODE_BEHIND:
return TRUE;
case GIMP_LAYER_MODE_MULTIPLY:
@ -238,6 +237,7 @@ gimp_gegl_mode_is_linear (GimpLayerMode mode)
case GIMP_LAYER_MODE_GRAIN_MERGE:
return FALSE;
case GIMP_LAYER_MODE_BEHIND_LINEAR:
case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
case GIMP_LAYER_MODE_ADDITION_LINEAR:
@ -285,8 +285,8 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
operation = "gimp:dissolve";
break;
case GIMP_LAYER_MODE_BEHIND_NON_LINEAR:
case GIMP_LAYER_MODE_BEHIND:
case GIMP_LAYER_MODE_BEHIND_LINEAR:
operation = "gimp:behind";
break;

View File

@ -81,7 +81,7 @@ GimpLayerModeFunction
get_layer_mode_function (GimpLayerMode paint_mode,
gboolean linear_mode)
{
GimpLayerModeFunction func = gimp_operation_normal_process_pixels;
GimpLayerModeFunction func;
switch (paint_mode)
{
@ -95,7 +95,7 @@ get_layer_mode_function (GimpLayerMode paint_mode,
break;
case GIMP_LAYER_MODE_BEHIND:
case GIMP_LAYER_MODE_BEHIND_NON_LINEAR:
case GIMP_LAYER_MODE_BEHIND_LINEAR:
func = gimp_operation_behind_process_pixels;
break;
@ -125,41 +125,46 @@ get_layer_mode_function (GimpLayerMode paint_mode,
break;
case GIMP_LAYER_MODE_DIFFERENCE:
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
func = gimp_operation_difference_process_pixels;
break;
case GIMP_LAYER_MODE_ADDITION:
func = gimp_operation_addition_process_pixels;
break;
case GIMP_LAYER_MODE_ADDITION_LEGACY:
func = gimp_operation_addition_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_SUBTRACT:
func = gimp_operation_subtract_process_pixels;
case GIMP_LAYER_MODE_ADDITION:
case GIMP_LAYER_MODE_ADDITION_LINEAR:
func = gimp_operation_addition_process_pixels;
break;
case GIMP_LAYER_MODE_SUBTRACT_LEGACY:
func = gimp_operation_subtract_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_DARKEN_ONLY:
func = gimp_operation_darken_only_process_pixels;
case GIMP_LAYER_MODE_SUBTRACT:
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
func = gimp_operation_subtract_process_pixels;
break;
case GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY:
func = gimp_operation_darken_only_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_LIGHTEN_ONLY:
func = gimp_operation_lighten_only_process_pixels;
case GIMP_LAYER_MODE_DARKEN_ONLY:
case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
func = gimp_operation_darken_only_process_pixels;
break;
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY:
func = gimp_operation_lighten_only_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_LIGHTEN_ONLY:
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
func = gimp_operation_lighten_only_process_pixels;
break;
case GIMP_LAYER_MODE_HSV_HUE:
func = gimp_operation_hsv_hue_process_pixels;
break;
@ -192,62 +197,67 @@ get_layer_mode_function (GimpLayerMode paint_mode,
func = gimp_operation_hsv_value_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_DIVIDE:
func = gimp_operation_divide_process_pixels;
break;
case GIMP_LAYER_MODE_DIVIDE_LEGACY:
func = gimp_operation_divide_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_DODGE:
func = gimp_operation_dodge_process_pixels;
case GIMP_LAYER_MODE_DIVIDE:
case GIMP_LAYER_MODE_DIVIDE_LINEAR:
func = gimp_operation_divide_process_pixels;
break;
case GIMP_LAYER_MODE_DODGE_LEGACY:
func = gimp_operation_dodge_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_DODGE:
case GIMP_LAYER_MODE_DODGE_LINEAR:
func = gimp_operation_dodge_process_pixels;
break;
case GIMP_LAYER_MODE_BURN_LEGACY:
func = gimp_operation_burn_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_BURN:
case GIMP_LAYER_MODE_BURN_LINEAR:
func = gimp_operation_burn_process_pixels;
break;
case GIMP_LAYER_MODE_HARDLIGHT:
func = gimp_operation_hardlight_process_pixels;
break;
case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
func = gimp_operation_hardlight_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_SOFTLIGHT:
func = gimp_operation_softlight_process_pixels;
case GIMP_LAYER_MODE_HARDLIGHT:
func = gimp_operation_hardlight_process_pixels;
break;
case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
func = gimp_operation_softlight_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
func = gimp_operation_grain_extract_process_pixels;
case GIMP_LAYER_MODE_SOFTLIGHT:
func = gimp_operation_softlight_process_pixels;
break;
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
func = gimp_operation_grain_extract_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_GRAIN_MERGE:
func = gimp_operation_grain_merge_process_pixels;
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
func = gimp_operation_grain_extract_process_pixels;
break;
case GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY:
func = gimp_operation_grain_merge_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_GRAIN_MERGE:
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
func = gimp_operation_grain_merge_process_pixels;
break;
case GIMP_LAYER_MODE_COLOR_ERASE:
func = gimp_operation_color_erase_process_pixels;
break;
@ -291,6 +301,7 @@ get_layer_mode_function (GimpLayerMode paint_mode,
case GIMP_LAYER_MODE_ANTI_ERASE:
func = gimp_operation_anti_erase_process_pixels;
break;
default:
g_warning ("No direct function for layer mode (%d), using gimp:normal",
paint_mode);

View File

@ -105,8 +105,8 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
store = gimp_enum_store_new_with_values (GIMP_TYPE_LAYER_MODE,
45,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_NON_LINEAR,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_DISSOLVE,
GIMP_LAYER_MODE_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY,
@ -176,16 +176,16 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
GIMP_LAYER_MODE_BEHIND);
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
GIMP_LAYER_MODE_BEHIND,
GIMP_LAYER_MODE_BEHIND_NON_LINEAR);
GIMP_LAYER_MODE_BEHIND_LINEAR);
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
GIMP_LAYER_MODE_BEHIND_NON_LINEAR,
GIMP_LAYER_MODE_BEHIND_LINEAR,
GIMP_LAYER_MODE_COLOR_ERASE);
}
if (with_replace_modes)
{
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
GIMP_LAYER_MODE_NORMAL_NON_LINEAR,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_REPLACE);
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
GIMP_LAYER_MODE_COLOR_ERASE,

View File

@ -71,7 +71,7 @@ typedef enum
{
GIMP_LAYER_MODE_NORMAL_NON_LINEAR,
GIMP_LAYER_MODE_DISSOLVE,
GIMP_LAYER_MODE_BEHIND_NON_LINEAR,
GIMP_LAYER_MODE_BEHIND,
GIMP_LAYER_MODE_MULTIPLY_LEGACY,
GIMP_LAYER_MODE_SCREEN_LEGACY,
GIMP_LAYER_MODE_OVERLAY_LEGACY,
@ -98,7 +98,7 @@ typedef enum
GIMP_LAYER_MODE_LCH_COLOR,
GIMP_LAYER_MODE_LCH_LIGHTNESS,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_BEHIND,
GIMP_LAYER_MODE_BEHIND_LINEAR,
GIMP_LAYER_MODE_MULTIPLY,
GIMP_LAYER_MODE_MULTIPLY_LINEAR,
GIMP_LAYER_MODE_SCREEN,

View File

@ -696,8 +696,7 @@ package Gimp::CodeGen::enums;
{ contig => 1,
header => 'core/core-enums.h',
symbols => [ qw(GIMP_LAYER_MODE_NORMAL_NON_LINEAR
GIMP_LAYER_MODE_DISSOLVE
GIMP_LAYER_MODE_BEHIND_NON_LINEAR
GIMP_LAYER_MODE_DISSOLVE GIMP_LAYER_MODE_BEHIND
GIMP_LAYER_MODE_MULTIPLY_LEGACY
GIMP_LAYER_MODE_SCREEN_LEGACY
GIMP_LAYER_MODE_OVERLAY_LEGACY
@ -722,7 +721,8 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_LCH_CHROMA
GIMP_LAYER_MODE_LCH_COLOR
GIMP_LAYER_MODE_LCH_LIGHTNESS
GIMP_LAYER_MODE_NORMAL GIMP_LAYER_MODE_BEHIND
GIMP_LAYER_MODE_NORMAL
GIMP_LAYER_MODE_BEHIND_LINEAR
GIMP_LAYER_MODE_MULTIPLY
GIMP_LAYER_MODE_MULTIPLY_LINEAR
GIMP_LAYER_MODE_SCREEN GIMP_LAYER_MODE_DIFFERENCE
@ -750,7 +750,7 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR) ],
mapping => { GIMP_LAYER_MODE_NORMAL_NON_LINEAR => '0',
GIMP_LAYER_MODE_DISSOLVE => '1',
GIMP_LAYER_MODE_BEHIND_NON_LINEAR => '2',
GIMP_LAYER_MODE_BEHIND => '2',
GIMP_LAYER_MODE_MULTIPLY_LEGACY => '3',
GIMP_LAYER_MODE_SCREEN_LEGACY => '4',
GIMP_LAYER_MODE_OVERLAY_LEGACY => '5',
@ -777,7 +777,7 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_LCH_COLOR => '26',
GIMP_LAYER_MODE_LCH_LIGHTNESS => '27',
GIMP_LAYER_MODE_NORMAL => '28',
GIMP_LAYER_MODE_BEHIND => '29',
GIMP_LAYER_MODE_BEHIND_LINEAR => '29',
GIMP_LAYER_MODE_MULTIPLY => '30',
GIMP_LAYER_MODE_MULTIPLY_LINEAR => '31',
GIMP_LAYER_MODE_SCREEN => '32',