[gimp] app: simplify the Image -> Precision menu



commit ba14054a8e42d0056a4bcf3a6bcf9ed55a6af2fe
Author: Michael Natterer <mitch gimp org>
Date:   Sun Nov 22 23:19:49 2015 +0100

    app: simplify the Image -> Precision menu
    
    Keep only one menu item per precision, and have two separate radio
    menu items for gamma/linear. Also add gamma/linear radio buttons to
    the precision conversion dialog.

 app/actions/image-actions.c            |  192 +++++++++++++------------------
 app/actions/image-commands.c           |   76 ++++++++-----
 app/actions/image-commands.h           |    3 +
 app/dialogs/convert-precision-dialog.c |   75 +++++++++----
 app/dialogs/convert-precision-dialog.h |   10 +-
 app/widgets/gimphelp-ids.h             |    1 +
 menus/image-menu.xml.in                |   21 ++--
 7 files changed, 198 insertions(+), 180 deletions(-)
---
diff --git a/app/actions/image-actions.c b/app/actions/image-actions.c
index be9ea41..9f7b574 100644
--- a/app/actions/image-actions.c
+++ b/app/actions/image-actions.c
@@ -26,6 +26,8 @@
 
 #include "config/gimpguiconfig.h"
 
+#include "gegl/gimp-babl.h"
+
 #include "core/gimp.h"
 #include "core/gimpchannel.h"
 #include "core/gimpcontext.h"
@@ -185,77 +187,56 @@ static const GimpRadioActionEntry image_convert_base_type_actions[] =
 
 static const GimpRadioActionEntry image_convert_precision_actions[] =
 {
-  { "image-convert-u8-linear", NULL,
-    NC_("image-convert-action", "8 bit integer (linear)"), NULL,
-    NC_("image-convert-action",
-        "Convert the image to 8 bit linear integer"),
-    GIMP_PRECISION_U8_LINEAR, GIMP_HELP_IMAGE_CONVERT_U8 },
-
-  { "image-convert-u8-gamma", NULL,
-    NC_("image-convert-action", "8 bit integer (gamma)"), NULL,
-    NC_("image-convert-action",
-        "Convert the image to 8 bit gamma-corrected integer"),
-    GIMP_PRECISION_U8_GAMMA, GIMP_HELP_IMAGE_CONVERT_U8 },
-
-  { "image-convert-u16-linear", NULL,
-    NC_("image-convert-action", "16 bit integer (linear)"), NULL,
+  { "image-convert-u8", NULL,
+    NC_("image-convert-action", "8 bit integer"), NULL,
     NC_("image-convert-action",
-        "Convert the image to 16 bit linear integer"),
-    GIMP_PRECISION_U16_LINEAR, GIMP_HELP_IMAGE_CONVERT_U16 },
+        "Convert the image to 8 bit integer"),
+    GIMP_COMPONENT_TYPE_U8, GIMP_HELP_IMAGE_CONVERT_U8 },
 
-  { "image-convert-u16-gamma", NULL,
-    NC_("image-convert-action", "16 bit integer (gamma)"), NULL,
+  { "image-convert-u16", NULL,
+    NC_("image-convert-action", "16 bit integer"), NULL,
     NC_("image-convert-action",
-        "Convert the image to 16 bit gamma-corrected integer"),
-    GIMP_PRECISION_U16_GAMMA, GIMP_HELP_IMAGE_CONVERT_U16 },
+        "Convert the image to 16 bit integer"),
+    GIMP_COMPONENT_TYPE_U16, GIMP_HELP_IMAGE_CONVERT_U16 },
 
-  { "image-convert-u32-linear", NULL,
-    NC_("image-convert-action", "32 bit integer (linear)"), NULL,
+  { "image-convert-u32", NULL,
+    NC_("image-convert-action", "32 bit integer"), NULL,
     NC_("image-convert-action",
-        "Convert the image to 32 bit linear integer"),
-    GIMP_PRECISION_U32_LINEAR, GIMP_HELP_IMAGE_CONVERT_U32 },
+        "Convert the image to 32 bit integer"),
+    GIMP_COMPONENT_TYPE_U32, GIMP_HELP_IMAGE_CONVERT_U32 },
 
-  { "image-convert-u32-gamma", NULL,
-    NC_("image-convert-action", "32 bit integer (gamma)"), NULL,
+  { "image-convert-half", NULL,
+    NC_("image-convert-action", "16 bit floating point"), NULL,
     NC_("image-convert-action",
-        "Convert the image to 32 bit gamma-corrected integer"),
-    GIMP_PRECISION_U32_GAMMA, GIMP_HELP_IMAGE_CONVERT_U32 },
+        "Convert the image to 16 bit floating point"),
+    GIMP_COMPONENT_TYPE_HALF, GIMP_HELP_IMAGE_CONVERT_HALF },
 
-  { "image-convert-half-linear", NULL,
-    NC_("image-convert-action", "16 bit floating point (linear)"), NULL,
+  { "image-convert-float", NULL,
+    NC_("image-convert-action", "32 bit floating point"), NULL,
     NC_("image-convert-action",
-        "Convert the image to 16 bit linear floating point"),
-    GIMP_PRECISION_HALF_LINEAR, GIMP_HELP_IMAGE_CONVERT_HALF },
+        "Convert the image to 32 bit floating point"),
+    GIMP_COMPONENT_TYPE_FLOAT, GIMP_HELP_IMAGE_CONVERT_FLOAT },
 
-  { "image-convert-half-gamma", NULL,
-    NC_("image-convert-action", "16 bit floating point (gamma)"), NULL,
+  { "image-convert-double", NULL,
+    NC_("image-convert-action", "64 bit floating point"), NULL,
     NC_("image-convert-action",
-        "Convert the image to 16 bit gamma-corrected floating point"),
-    GIMP_PRECISION_HALF_GAMMA, GIMP_HELP_IMAGE_CONVERT_HALF },
-
-  { "image-convert-float-linear", NULL,
-    NC_("image-convert-action", "32 bit floating point (linear)"), NULL,
-    NC_("image-convert-action",
-        "Convert the image to 32 bit linear floating point"),
-    GIMP_PRECISION_FLOAT_LINEAR, GIMP_HELP_IMAGE_CONVERT_FLOAT },
-
-  { "image-convert-float-gamma", NULL,
-    NC_("image-convert-action", "32 bit floating point (gamma)"), NULL,
-    NC_("image-convert-action",
-        "Convert the image to 32 bit gamma-corrected floating point"),
-    GIMP_PRECISION_FLOAT_GAMMA, GIMP_HELP_IMAGE_CONVERT_FLOAT },
+        "Convert the image to 64 bit floating point"),
+    GIMP_COMPONENT_TYPE_DOUBLE, GIMP_HELP_IMAGE_CONVERT_DOUBLE }
+};
 
-  { "image-convert-double-linear", NULL,
-    NC_("image-convert-action", "64 bit floating point (linear)"), NULL,
+static const GimpRadioActionEntry image_convert_gamma_actions[] =
+{
+  { "image-convert-gamma", NULL,
+    NC_("image-convert-action", "Perceptual gamma (sRGB)"), NULL,
     NC_("image-convert-action",
-        "Convert the image to 64 bit linear floating point"),
-    GIMP_PRECISION_DOUBLE_LINEAR, GIMP_HELP_IMAGE_CONVERT_DOUBLE },
+        "Convert the image to preceptual (sRGB) gamma"),
+    FALSE, GIMP_HELP_IMAGE_CONVERT_GAMMA },
 
-  { "image-convert-double-gamma", NULL,
-    NC_("image-convert-action", "64 bit floating point (gamma)"), NULL,
+  { "image-convert-linear", NULL,
+    NC_("image-convert-action", "Linear light"), NULL,
     NC_("image-convert-action",
-        "Convert the image to 64 bit gamma-corrected floating point"),
-    GIMP_PRECISION_DOUBLE_GAMMA, GIMP_HELP_IMAGE_CONVERT_DOUBLE }
+        "Convert the image to linear light"),
+    TRUE, GIMP_HELP_IMAGE_CONVERT_GAMMA }
 };
 
 static const GimpEnumActionEntry image_flip_actions[] =
@@ -314,6 +295,12 @@ image_actions_setup (GimpActionGroup *group)
                                        NULL, 0,
                                        G_CALLBACK (image_convert_precision_cmd_callback));
 
+  gimp_action_group_add_radio_actions (group, "image-convert-action",
+                                       image_convert_gamma_actions,
+                                       G_N_ELEMENTS (image_convert_gamma_actions),
+                                       NULL, 0,
+                                       G_CALLBACK (image_convert_gamma_cmd_callback));
+
   gimp_action_group_add_enum_actions (group, "image-action",
                                       image_flip_actions,
                                       G_N_ELEMENTS (image_flip_actions),
@@ -349,10 +336,15 @@ image_actions_update (GimpActionGroup *group,
 
   if (image)
     {
-      GimpContainer *layers;
-      const gchar   *action = NULL;
+      GimpContainer     *layers;
+      const gchar       *action = NULL;
+      GimpImageBaseType  base_type;
+      GimpPrecision      precision;
+
+      base_type = gimp_image_get_base_type (image);
+      precision = gimp_image_get_precision (image);
 
-      switch (gimp_image_get_base_type (image))
+      switch (base_type)
         {
         case GIMP_RGB:     action = "image-convert-rgb";       break;
         case GIMP_GRAY:    action = "image-convert-grayscale"; break;
@@ -361,51 +353,32 @@ image_actions_update (GimpActionGroup *group,
 
       gimp_action_group_set_action_active (group, action, TRUE);
 
-      switch (gimp_image_get_precision (image))
+      switch (gimp_image_get_component_type (image))
         {
-        case GIMP_PRECISION_U8_LINEAR:
-          action = "image-convert-u8-linear";
-          break;
-        case GIMP_PRECISION_U8_GAMMA:
-          action = "image-convert-u8-gamma";
-          break;
-        case GIMP_PRECISION_U16_LINEAR:
-          action = "image-convert-u16-linear";
-          break;
-        case GIMP_PRECISION_U16_GAMMA:
-          action = "image-convert-u16-gamma";
-          break;
-        case GIMP_PRECISION_U32_LINEAR:
-          action = "image-convert-u32-linear";
-          break;
-        case GIMP_PRECISION_U32_GAMMA:
-          action = "image-convert-u32-gamma";
-          break;
-        case GIMP_PRECISION_HALF_LINEAR:
-          action = "image-convert-half-linear";
-          break;
-        case GIMP_PRECISION_HALF_GAMMA:
-          action = "image-convert-half-gamma";
-          break;
-        case GIMP_PRECISION_FLOAT_LINEAR:
-          action = "image-convert-float-linear";
-          break;
-        case GIMP_PRECISION_FLOAT_GAMMA:
-          action = "image-convert-float-gamma";
-          break;
-        case GIMP_PRECISION_DOUBLE_LINEAR:
-          action = "image-convert-double-linear";
-          break;
-        case GIMP_PRECISION_DOUBLE_GAMMA:
-          action = "image-convert-double-gamma";
-          break;
+        case GIMP_COMPONENT_TYPE_U8:     action = "image-convert-u8";     break;
+        case GIMP_COMPONENT_TYPE_U16:    action = "image-convert-u16";    break;
+        case GIMP_COMPONENT_TYPE_U32:    action = "image-convert-u32";    break;
+        case GIMP_COMPONENT_TYPE_HALF:   action = "image-convert-half";   break;
+        case GIMP_COMPONENT_TYPE_FLOAT:  action = "image-convert-float";  break;
+        case GIMP_COMPONENT_TYPE_DOUBLE: action = "image-convert-double"; break;
         }
 
       gimp_action_group_set_action_active (group, action, TRUE);
 
-      is_indexed  = (gimp_image_get_base_type (image) == GIMP_INDEXED);
-      is_u8_gamma = (gimp_image_get_precision (image) ==
-                     GIMP_PRECISION_U8_GAMMA);
+      if (gimp_babl_format_get_linear (gimp_image_get_layer_format (image,
+                                                                    FALSE)))
+        {
+          gimp_action_group_set_action_active (group, "image-convert-linear",
+                                               TRUE);
+       }
+      else
+        {
+          gimp_action_group_set_action_active (group, "image-convert-gamma",
+                                               TRUE);
+        }
+
+      is_indexed  = (base_type == GIMP_INDEXED);
+      is_u8_gamma = (precision == GIMP_PRECISION_U8_GAMMA);
       aux         = (gimp_image_get_active_channel (image) != NULL);
       lp          = ! gimp_image_is_empty (image);
       sel         = ! gimp_channel_is_empty (gimp_image_get_mask (image));
@@ -424,18 +397,15 @@ image_actions_update (GimpActionGroup *group,
   SET_SENSITIVE ("image-convert-grayscale", image);
   SET_SENSITIVE ("image-convert-indexed",   image && !groups && is_u8_gamma);
 
-  SET_SENSITIVE ("image-convert-u8-gamma",      image);
-  SET_SENSITIVE ("image-convert-u8-linear",     image && !is_indexed);
-  SET_SENSITIVE ("image-convert-u16-gamma",     image && !is_indexed);
-  SET_SENSITIVE ("image-convert-u16-linear",    image && !is_indexed);
-  SET_SENSITIVE ("image-convert-u32-gamma",     image && !is_indexed);
-  SET_SENSITIVE ("image-convert-u32-linear",    image && !is_indexed);
-  SET_SENSITIVE ("image-convert-half-gamma",    image && !is_indexed);
-  SET_SENSITIVE ("image-convert-half-linear",   image && !is_indexed);
-  SET_SENSITIVE ("image-convert-float-gamma",   image && !is_indexed);
-  SET_SENSITIVE ("image-convert-float-linear",  image && !is_indexed);
-  SET_SENSITIVE ("image-convert-double-gamma",  image && !is_indexed);
-  SET_SENSITIVE ("image-convert-double-linear", image && !is_indexed);
+  SET_SENSITIVE ("image-convert-u8",     image);
+  SET_SENSITIVE ("image-convert-u16",    image && !is_indexed);
+  SET_SENSITIVE ("image-convert-u32",    image && !is_indexed);
+  SET_SENSITIVE ("image-convert-half",   image && !is_indexed);
+  SET_SENSITIVE ("image-convert-float",  image && !is_indexed);
+  SET_SENSITIVE ("image-convert-double", image && !is_indexed);
+
+  SET_SENSITIVE ("image-convert-gamma",  image);
+  SET_SENSITIVE ("image-convert-linear", image && !is_indexed);
 
   SET_SENSITIVE ("image-color-profile-assign",  image);
   SET_SENSITIVE ("image-color-profile-convert", image);
diff --git a/app/actions/image-commands.c b/app/actions/image-commands.c
index 13303fb..feb57e1 100644
--- a/app/actions/image-commands.c
+++ b/app/actions/image-commands.c
@@ -244,57 +244,71 @@ image_convert_precision_cmd_callback (GtkAction *action,
                                       GtkAction *current,
                                       gpointer   data)
 {
-  GimpImage     *image;
-  GimpDisplay   *display;
-  GtkWidget     *widget;
-  GtkWidget     *dialog;
-  GimpPrecision  value;
+  GimpImage         *image;
+  GimpDisplay       *display;
+  GtkWidget         *widget;
+  GtkWidget         *dialog;
+  GimpComponentType  value;
   return_if_no_image (image, data);
   return_if_no_display (display, data);
   return_if_no_widget (widget, data);
 
   value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
 
-  if (value == gimp_image_get_precision (image))
+  if (value == gimp_image_get_component_type (image))
     return;
 
   dialog = g_object_get_data (G_OBJECT (image),
                               IMAGE_CONVERT_PRECISION_DIALOG_KEY);
 
-  if ((value < gimp_image_get_precision (image)) ||
-      (gimp_babl_component_type (value) == gimp_image_get_component_type (image)))
+  if (! dialog)
     {
-      if (! dialog)
-        {
-          dialog = convert_precision_dialog_new (image,
-                                                 action_data_get_context (data),
-                                                 widget,
-                                                 value,
-                                                 GIMP_PROGRESS (display));
-
-          g_object_set_data (G_OBJECT (image),
-                             IMAGE_CONVERT_PRECISION_DIALOG_KEY, dialog);
+      dialog = convert_precision_dialog_new (image,
+                                             action_data_get_context (data),
+                                             widget,
+                                             value,
+                                             GIMP_PROGRESS (display));
 
-          g_signal_connect_object (dialog, "destroy",
-                                   G_CALLBACK (image_convert_precision_dialog_unset),
-                                   image, G_CONNECT_SWAPPED);
-        }
+      g_object_set_data (G_OBJECT (image),
+                         IMAGE_CONVERT_PRECISION_DIALOG_KEY, dialog);
 
-      gtk_window_present (GTK_WINDOW (dialog));
+      g_signal_connect_object (dialog, "destroy",
+                               G_CALLBACK (image_convert_precision_dialog_unset),
+                               image, G_CONNECT_SWAPPED);
     }
-  else
-    {
-      if (dialog)
-        gtk_widget_destroy (dialog);
 
-      gimp_image_convert_precision (image, value, 0, 0, 0,
-                                    GIMP_PROGRESS (display));
-    }
+  gtk_window_present (GTK_WINDOW (dialog));
 
   /*  see comment above  */
   gimp_image_flush (image);
 }
 
+void
+image_convert_gamma_cmd_callback (GtkAction *action,
+                                  GtkAction *current,
+                                  gpointer   data)
+{
+  GimpImage     *image;
+  GimpDisplay   *display;
+  gboolean       value;
+  GimpPrecision  precision;
+  return_if_no_image (image, data);
+  return_if_no_display (display, data);
+
+  value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
+
+  if (value == gimp_babl_format_get_linear (gimp_image_get_layer_format (image,
+                                                                         FALSE)))
+    return;
+
+  precision = gimp_babl_precision (gimp_image_get_component_type (image),
+                                   value);
+
+  gimp_image_convert_precision (image, precision, 0, 0, 0,
+                                GIMP_PROGRESS (display));
+  gimp_image_flush (image);
+}
+
 static void
 image_profile_assign_dialog_unset (GimpImage *image)
 {
diff --git a/app/actions/image-commands.h b/app/actions/image-commands.h
index b98bfc1..6d66aef 100644
--- a/app/actions/image-commands.h
+++ b/app/actions/image-commands.h
@@ -28,6 +28,9 @@ void   image_convert_base_type_cmd_callback     (GtkAction *action,
 void   image_convert_precision_cmd_callback     (GtkAction *action,
                                                  GtkAction *current,
                                                  gpointer   data);
+void   image_convert_gamma_cmd_callback         (GtkAction *action,
+                                                 GtkAction *current,
+                                                 gpointer   data);
 
 void   image_color_profile_assign_cmd_callback  (GtkAction *action,
                                                  gpointer   data);
diff --git a/app/dialogs/convert-precision-dialog.c b/app/dialogs/convert-precision-dialog.c
index 30b7bec..c2a160a 100644
--- a/app/dialogs/convert-precision-dialog.c
+++ b/app/dialogs/convert-precision-dialog.c
@@ -47,16 +47,17 @@
 
 typedef struct
 {
-  GtkWidget     *dialog;
+  GtkWidget         *dialog;
 
-  GimpImage     *image;
-  GimpProgress  *progress;
+  GimpImage         *image;
+  GimpProgress      *progress;
 
-  GimpPrecision  precision;
-  gint           bits;
-  gint           layer_dither_type;
-  gint           text_layer_dither_type;
-  gint           mask_dither_type;
+  GimpComponentType  component_type;
+  gboolean           linear;
+  gint               bits;
+  gint               layer_dither_type;
+  gint               text_layer_dither_type;
+  gint               mask_dither_type;
 } ConvertDialog;
 
 
@@ -76,11 +77,11 @@ static gint   saved_mask_dither_type       = 0;
 /*  public functions  */
 
 GtkWidget *
-convert_precision_dialog_new (GimpImage     *image,
-                              GimpContext   *context,
-                              GtkWidget     *parent,
-                              GimpPrecision  precision,
-                              GimpProgress  *progress)
+convert_precision_dialog_new (GimpImage         *image,
+                              GimpContext       *context,
+                              GtkWidget         *parent,
+                              GimpComponentType  component_type,
+                              GimpProgress      *progress)
 {
   ConvertDialog *dialog;
   GtkWidget     *button;
@@ -96,6 +97,7 @@ convert_precision_dialog_new (GimpImage     *image,
   GType          dither_type;
   const Babl    *format;
   gint           bits;
+  gboolean       linear;
 
   g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
@@ -105,14 +107,19 @@ convert_precision_dialog_new (GimpImage     *image,
   dialog = g_slice_new0 (ConvertDialog);
 
   /* a random format with precision */
-  format = gimp_babl_format (GIMP_RGB, precision, FALSE);
+  format = gimp_babl_format (GIMP_RGB, gimp_babl_precision (component_type,
+                                                            FALSE), FALSE);
   bits   = (babl_format_get_bytes_per_pixel (format) * 8 /
             babl_format_get_n_components (format));
 
-  dialog->image     = image;
-  dialog->progress  = progress;
-  dialog->precision = precision;
-  dialog->bits      = bits;
+  linear = gimp_babl_format_get_linear (gimp_image_get_layer_format (image,
+                                                                     FALSE));
+
+  dialog->image          = image;
+  dialog->progress       = progress;
+  dialog->component_type = component_type;
+  dialog->linear         = linear;
+  dialog->bits           = bits;
 
   /* gegl:color-reduction only does 16 bits */
   if (bits <= 16)
@@ -122,7 +129,7 @@ convert_precision_dialog_new (GimpImage     *image,
       dialog->mask_dither_type       = saved_mask_dither_type;
     }
 
-  gimp_enum_get_value (GIMP_TYPE_PRECISION, precision,
+  gimp_enum_get_value (GIMP_TYPE_COMPONENT_TYPE, component_type,
                        NULL, NULL, &enum_desc, NULL);
 
   blurb = g_strdup_printf (_("Convert Image to %s"), enum_desc);
@@ -260,6 +267,28 @@ convert_precision_dialog_new (GimpImage     *image,
 
   g_object_unref (size_group);
 
+  /*  gamma  */
+
+  frame = gimp_frame_new (_("Gamma"));
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
+  gtk_widget_show (frame);
+
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+  gtk_container_add (GTK_CONTAINER (frame), vbox);
+  gtk_widget_show (vbox);
+
+  hbox = gimp_int_radio_group_new (FALSE, NULL,
+                                   G_CALLBACK (gimp_radio_button_update),
+                                   &dialog->linear,
+                                   linear,
+
+                                   _("Perceptual gamma (sRGB)"), FALSE, NULL,
+                                   _("Linear light"),            TRUE,  NULL,
+
+                                   NULL);
+  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  gtk_widget_show (hbox);
+
   return dialog->dialog;
 }
 
@@ -273,13 +302,17 @@ convert_precision_dialog_response (GtkWidget     *widget,
 {
   if (response_id == GTK_RESPONSE_OK)
     {
-      GimpProgress *progress;
+      GimpProgress  *progress;
+      GimpPrecision  precision;
 
       progress = gimp_progress_start (dialog->progress, FALSE,
                                       _("Converting to lower bit depth"));
 
+      precision = gimp_babl_precision (dialog->component_type,
+                                       dialog->linear);
+
       gimp_image_convert_precision (dialog->image,
-                                    dialog->precision,
+                                    precision,
                                     dialog->layer_dither_type,
                                     dialog->text_layer_dither_type,
                                     dialog->mask_dither_type,
diff --git a/app/dialogs/convert-precision-dialog.h b/app/dialogs/convert-precision-dialog.h
index 0a25a43..0eedd32 100644
--- a/app/dialogs/convert-precision-dialog.h
+++ b/app/dialogs/convert-precision-dialog.h
@@ -19,11 +19,11 @@
 #define __CONVERT_PRECISION_DIALOG_H__
 
 
-GtkWidget * convert_precision_dialog_new (GimpImage     *image,
-                                          GimpContext   *context,
-                                          GtkWidget     *parent,
-                                          GimpPrecision  precision,
-                                          GimpProgress  *progress);
+GtkWidget * convert_precision_dialog_new (GimpImage         *image,
+                                          GimpContext       *context,
+                                          GtkWidget         *parent,
+                                          GimpComponentType  component_type,
+                                          GimpProgress      *progress);
 
 
 #endif  /*  __CONVERT_PRECISION_DIALOG_H__  */
diff --git a/app/widgets/gimphelp-ids.h b/app/widgets/gimphelp-ids.h
index 6187064..9c55061 100644
--- a/app/widgets/gimphelp-ids.h
+++ b/app/widgets/gimphelp-ids.h
@@ -133,6 +133,7 @@
 #define GIMP_HELP_IMAGE_CONVERT_HALF              "gimp-image-convert-half"
 #define GIMP_HELP_IMAGE_CONVERT_FLOAT             "gimp-image-convert-float"
 #define GIMP_HELP_IMAGE_CONVERT_DOUBLE            "gimp-image-convert-double"
+#define GIMP_HELP_IMAGE_CONVERT_GAMMA             "gimp-image-convert-gamma"
 #define GIMP_HELP_IMAGE_CONVERT_PRECISION         "gimp-image-convert-precision"
 #define GIMP_HELP_IMAGE_FLIP_HORIZONTAL           "gimp-image-flip-horizontal"
 #define GIMP_HELP_IMAGE_FLIP_VERTICAL             "gimp-image-flip-vertical"
diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in
index f97fc40..2bf84ae 100644
--- a/menus/image-menu.xml.in
+++ b/menus/image-menu.xml.in
@@ -337,18 +337,15 @@
        <separator />
       </menu>
       <menu action="image-precision-menu" name="Precision">
-        <menuitem action="image-convert-u8-linear" />
-        <menuitem action="image-convert-u8-gamma" />
-        <menuitem action="image-convert-u16-linear" />
-        <menuitem action="image-convert-u16-gamma" />
-        <menuitem action="image-convert-u32-linear" />
-        <menuitem action="image-convert-u32-gamma" />
-        <menuitem action="image-convert-half-linear" />
-        <menuitem action="image-convert-half-gamma" />
-        <menuitem action="image-convert-float-linear" />
-        <menuitem action="image-convert-float-gamma" />
-        <menuitem action="image-convert-double-linear" />
-        <menuitem action="image-convert-double-gamma" />
+        <menuitem action="image-convert-u8" />
+        <menuitem action="image-convert-u16" />
+        <menuitem action="image-convert-u32" />
+        <menuitem action="image-convert-half" />
+        <menuitem action="image-convert-float" />
+        <menuitem action="image-convert-double" />
+        <separator />
+        <menuitem action="image-convert-gamma" />
+        <menuitem action="image-convert-linear" />
         <separator />
       </menu>
       <menu action="image-color-management-menu" name="Color Management">


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]