[gimp] app: move the image-duplicate action next to image-new
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: move the image-duplicate action next to image-new
- Date: Sun, 8 May 2016 17:53:55 +0000 (UTC)
commit cc83d9461c91432a28b88b7423dea8ddb33e88a6
Author: Michael Natterer <mitch gimp org>
Date: Sun May 8 19:32:57 2016 +0200
app: move the image-duplicate action next to image-new
Just code rordering.
app/actions/image-actions.c | 15 +++++++------
app/actions/image-commands.c | 46 +++++++++++++++++++++---------------------
app/actions/image-commands.h | 5 +--
app/widgets/gimphelp-ids.h | 2 +-
4 files changed, 34 insertions(+), 34 deletions(-)
---
diff --git a/app/actions/image-actions.c b/app/actions/image-actions.c
index d0be003..b5daf66 100644
--- a/app/actions/image-actions.c
+++ b/app/actions/image-actions.c
@@ -76,6 +76,12 @@ static const GimpActionEntry image_actions[] =
G_CALLBACK (image_new_cmd_callback),
GIMP_HELP_FILE_NEW },
+ { "image-duplicate", GIMP_STOCK_DUPLICATE,
+ NC_("image-action", "_Duplicate"), "<primary>D",
+ NC_("image-action", "Create a duplicate of this image"),
+ G_CALLBACK (image_duplicate_cmd_callback),
+ GIMP_HELP_IMAGE_DUPLICATE },
+
{ "image-color-profile-assign", NULL,
NC_("image-action", "_Assign Color Profile..."), NULL,
NC_("image-action", "Set a color profile on the image"),
@@ -142,12 +148,6 @@ static const GimpActionEntry image_actions[] =
G_CALLBACK (image_crop_to_content_cmd_callback),
GIMP_HELP_IMAGE_CROP },
- { "image-duplicate", GIMP_STOCK_DUPLICATE,
- NC_("image-action", "_Duplicate"), "<primary>D",
- NC_("image-action", "Create a duplicate of this image"),
- G_CALLBACK (image_duplicate_cmd_callback),
- GIMP_HELP_IMAGE_DUPLICATE },
-
{ "image-merge-layers", NULL,
NC_("image-action", "Merge Visible _Layers..."), "<primary>M",
NC_("image-action", "Merge all visible layers into one layer"),
@@ -419,6 +419,8 @@ image_actions_update (GimpActionGroup *group,
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
+ SET_SENSITIVE ("image-duplicate", image);
+
if (profile)
{
SET_LABEL ("image-convert-rgb",
@@ -469,7 +471,6 @@ image_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("image-scale", image);
SET_SENSITIVE ("image-crop-to-selection", image && sel);
SET_SENSITIVE ("image-crop-to-content", image);
- SET_SENSITIVE ("image-duplicate", image);
SET_SENSITIVE ("image-merge-layers", image && !aux && lp);
SET_SENSITIVE ("image-flatten", image && !aux && lp);
SET_SENSITIVE ("image-configure-grid", image);
diff --git a/app/actions/image-commands.c b/app/actions/image-commands.c
index f97e909..666d528 100644
--- a/app/actions/image-commands.c
+++ b/app/actions/image-commands.c
@@ -161,6 +161,29 @@ image_new_cmd_callback (GtkAction *action,
}
}
+void
+image_duplicate_cmd_callback (GtkAction *action,
+ gpointer data)
+{
+ GimpDisplay *display;
+ GimpImage *image;
+ GimpDisplayShell *shell;
+ GimpImage *new_image;
+ return_if_no_display (display, data);
+
+ image = gimp_display_get_image (display);
+ shell = gimp_display_get_shell (display);
+
+ new_image = gimp_image_duplicate (image);
+
+ gimp_create_display (new_image->gimp, new_image, shell->unit,
+ gimp_zoom_model_get_factor (shell->zoom),
+ G_OBJECT (gtk_widget_get_screen (GTK_WIDGET (shell))),
+ gimp_widget_get_monitor (GTK_WIDGET (shell)));
+
+ g_object_unref (new_image);
+}
+
static void
image_convert_type_dialog_unset (GimpImage *image)
{
@@ -784,29 +807,6 @@ image_crop_to_content_cmd_callback (GtkAction *action,
}
void
-image_duplicate_cmd_callback (GtkAction *action,
- gpointer data)
-{
- GimpDisplay *display;
- GimpImage *image;
- GimpDisplayShell *shell;
- GimpImage *new_image;
- return_if_no_display (display, data);
-
- image = gimp_display_get_image (display);
- shell = gimp_display_get_shell (display);
-
- new_image = gimp_image_duplicate (image);
-
- gimp_create_display (new_image->gimp, new_image, shell->unit,
- gimp_zoom_model_get_factor (shell->zoom),
- G_OBJECT (gtk_widget_get_screen (GTK_WIDGET (shell))),
- gimp_widget_get_monitor (GTK_WIDGET (shell)));
-
- g_object_unref (new_image);
-}
-
-void
image_merge_layers_cmd_callback (GtkAction *action,
gpointer data)
{
diff --git a/app/actions/image-commands.h b/app/actions/image-commands.h
index b57d41a..076f7d4 100644
--- a/app/actions/image-commands.h
+++ b/app/actions/image-commands.h
@@ -21,6 +21,8 @@
void image_new_cmd_callback (GtkAction *action,
gpointer data);
+void image_duplicate_cmd_callback (GtkAction *action,
+ gpointer data);
void image_convert_base_type_cmd_callback (GtkAction *action,
GtkAction *current,
@@ -64,9 +66,6 @@ void image_crop_to_selection_cmd_callback (GtkAction *action,
void image_crop_to_content_cmd_callback (GtkAction *action,
gpointer data);
-void image_duplicate_cmd_callback (GtkAction *action,
- gpointer data);
-
void image_merge_layers_cmd_callback (GtkAction *action,
gpointer data);
void image_flatten_image_cmd_callback (GtkAction *action,
diff --git a/app/widgets/gimphelp-ids.h b/app/widgets/gimphelp-ids.h
index 6b05fe4..e82a003 100644
--- a/app/widgets/gimphelp-ids.h
+++ b/app/widgets/gimphelp-ids.h
@@ -126,6 +126,7 @@
#define GIMP_HELP_IMAGE_DIALOG "gimp-image-dialog"
+#define GIMP_HELP_IMAGE_DUPLICATE "gimp-image-duplicate"
#define GIMP_HELP_IMAGE_CONVERT_RGB "gimp-image-convert-rgb"
#define GIMP_HELP_IMAGE_CONVERT_GRAYSCALE "gimp-image-convert-grayscale"
#define GIMP_HELP_IMAGE_CONVERT_INDEXED "gimp-image-convert-indexed"
@@ -149,7 +150,6 @@
#define GIMP_HELP_IMAGE_SCALE "gimp-image-scale"
#define GIMP_HELP_IMAGE_SCALE_WARNING "gimp-image-scale-warning"
#define GIMP_HELP_IMAGE_CROP "gimp-image-crop"
-#define GIMP_HELP_IMAGE_DUPLICATE "gimp-image-duplicate"
#define GIMP_HELP_IMAGE_MERGE_LAYERS "gimp-image-merge-layers"
#define GIMP_HELP_IMAGE_FLATTEN "gimp-image-flatten"
#define GIMP_HELP_IMAGE_COLOR_MANAGEMENT_ENABLED "gimp-image-color-management-enabled"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]