[gimp] app: add ellipses to the color mode conversion menu items
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add ellipses to the color mode conversion menu items
- Date: Sat, 30 Apr 2016 17:41:56 +0000 (UTC)
commit 5c57885ac3b67df2c7a5ee245266e1e3cbc203ce
Author: Michael Natterer <mitch gimp org>
Date: Sat Apr 30 19:41:09 2016 +0200
app: add ellipses to the color mode conversion menu items
if they show a dialog.
app/actions/image-actions.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/app/actions/image-actions.c b/app/actions/image-actions.c
index ebce284..7dac021 100644
--- a/app/actions/image-actions.c
+++ b/app/actions/image-actions.c
@@ -370,7 +370,7 @@ image_actions_update (GimpActionGroup *group,
{
gimp_action_group_set_action_active (group, "image-convert-linear",
TRUE);
- }
+ }
else
{
gimp_action_group_set_action_active (group, "image-convert-gamma",
@@ -390,9 +390,26 @@ image_actions_update (GimpActionGroup *group,
profile = (gimp_image_get_color_profile (image) != NULL);
}
+#define SET_LABEL(action,label) \
+ gimp_action_group_set_action_label (group, action, (label))
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
+ if (profile)
+ {
+ SET_LABEL ("image-convert-rgb",
+ C_("image-convert-action", "_RGB..."));
+ SET_LABEL ("image-convert-grayscale",
+ C_("image-convert-action", "_Grayscale..."));
+ }
+ else
+ {
+ SET_LABEL ("image-convert-rgb",
+ C_("image-convert-action", "_RGB"));
+ SET_LABEL ("image-convert-grayscale",
+ C_("image-convert-action", "_Grayscale"));
+ }
+
SET_SENSITIVE ("image-convert-rgb", image);
SET_SENSITIVE ("image-convert-grayscale", image);
SET_SENSITIVE ("image-convert-indexed", image && !groups && is_u8_gamma);
@@ -430,5 +447,6 @@ image_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("image-configure-grid", image);
SET_SENSITIVE ("image-properties", image);
+#undef SET_LABEL
#undef SET_SENSITIVE
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]