gimp r26421 - in trunk: . app/actions app/widgets menus
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26421 - in trunk: . app/actions app/widgets menus
- Date: Thu, 7 Aug 2008 15:53:15 +0000 (UTC)
Author: neo
Date: Thu Aug 7 15:53:15 2008
New Revision: 26421
URL: http://svn.gnome.org/viewvc/gimp?rev=26421&view=rev
Log:
2008-08-07 Sven Neumann <sven gimp org>
* app/actions/layers-actions.c
* app/actions/layers-commands.[ch]: added new action
"layers-new-from-visible".
* app/widgets/gimphelp-ids.h: added new help-id.
* menus/layers-menu.xml
* menus/image-menu.xml.in: added the new action.
* app/actions/edit-actions.c: improved the blurb for
"edit-copy-visible".
Modified:
trunk/ChangeLog
trunk/app/actions/edit-actions.c
trunk/app/actions/layers-actions.c
trunk/app/actions/layers-commands.c
trunk/app/actions/layers-commands.h
trunk/app/widgets/gimphelp-ids.h
trunk/menus/image-menu.xml.in
trunk/menus/layers-menu.xml
Modified: trunk/app/actions/edit-actions.c
==============================================================================
--- trunk/app/actions/edit-actions.c (original)
+++ trunk/app/actions/edit-actions.c Thu Aug 7 15:53:15 2008
@@ -118,7 +118,7 @@
{ "edit-copy-visible", NULL, /* GIMP_STOCK_COPY_VISIBLE, */
N_("Copy _Visible"), "<control><shift>C",
- N_("Copy the selected region to the clipboard"),
+ N_("Copy what is visible in the the selected region"),
G_CALLBACK (edit_copy_visible_cmd_callback),
GIMP_HELP_EDIT_COPY_VISIBLE },
Modified: trunk/app/actions/layers-actions.c
==============================================================================
--- trunk/app/actions/layers-actions.c (original)
+++ trunk/app/actions/layers-actions.c Thu Aug 7 15:53:15 2008
@@ -82,8 +82,14 @@
G_CALLBACK (layers_new_last_vals_cmd_callback),
GIMP_HELP_LAYER_NEW },
+ { "layers-new-from-visible", NULL,
+ N_("New from Visible"), NULL,
+ N_("Create a new layer from what is visible in this image"),
+ G_CALLBACK (layers_new_from_visible_cmd_callback),
+ GIMP_HELP_LAYER_NEW_FROM_VISIBLE },
+
{ "layers-duplicate", GIMP_STOCK_DUPLICATE,
- N_("D_uplicate Layer"), "<control><shift>D",
+ N_("Duplicate Layer"), "<control><shift>D",
N_("Create a duplicate of the layer and add it to the image"),
G_CALLBACK (layers_duplicate_cmd_callback),
GIMP_HELP_LAYER_DUPLICATE },
@@ -510,28 +516,29 @@
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
- SET_VISIBLE ("layers-text-tool", text_layer && !ac);
- SET_SENSITIVE ("layers-edit-attributes", layer && !fs && !ac);
+ SET_VISIBLE ("layers-text-tool", text_layer && !ac);
+ SET_SENSITIVE ("layers-edit-attributes", layer && !fs && !ac);
- SET_SENSITIVE ("layers-new", image);
- SET_SENSITIVE ("layers-new-last-values", image);
- SET_SENSITIVE ("layers-duplicate", layer && !fs && !ac);
- SET_SENSITIVE ("layers-delete", layer && !ac);
-
- SET_SENSITIVE ("layers-select-top", layer && !fs && !ac && prev);
- SET_SENSITIVE ("layers-select-bottom", layer && !fs && !ac && next);
- SET_SENSITIVE ("layers-select-previous", layer && !fs && !ac && prev);
- SET_SENSITIVE ("layers-select-next", layer && !fs && !ac && next);
-
- SET_SENSITIVE ("layers-raise", layer && !fs && !ac && prev);
- SET_SENSITIVE ("layers-raise-to-top", layer && !fs && !ac && prev);
- SET_SENSITIVE ("layers-lower", layer && !fs && !ac && next);
- SET_SENSITIVE ("layers-lower-to-bottom", layer && !fs && !ac && next);
-
- SET_SENSITIVE ("layers-anchor", layer && fs && !ac);
- SET_SENSITIVE ("layers-merge-down", layer && !fs && !ac && next);
- SET_SENSITIVE ("layers-merge-layers", layer && !fs && !ac);
- SET_SENSITIVE ("layers-flatten-image", layer && !fs && !ac);
+ SET_SENSITIVE ("layers-new", image);
+ SET_SENSITIVE ("layers-new-last-values", image);
+ SET_SENSITIVE ("layers-new-from-visible", image);
+ SET_SENSITIVE ("layers-duplicate", layer && !fs && !ac);
+ SET_SENSITIVE ("layers-delete", layer && !ac);
+
+ SET_SENSITIVE ("layers-select-top", layer && !fs && !ac && prev);
+ SET_SENSITIVE ("layers-select-bottom", layer && !fs && !ac && next);
+ SET_SENSITIVE ("layers-select-previous", layer && !fs && !ac && prev);
+ SET_SENSITIVE ("layers-select-next", layer && !fs && !ac && next);
+
+ SET_SENSITIVE ("layers-raise", layer && !fs && !ac && prev);
+ SET_SENSITIVE ("layers-raise-to-top", layer && !fs && !ac && prev);
+ SET_SENSITIVE ("layers-lower", layer && !fs && !ac && next);
+ SET_SENSITIVE ("layers-lower-to-bottom", layer && !fs && !ac && next);
+
+ SET_SENSITIVE ("layers-anchor", layer && fs && !ac);
+ SET_SENSITIVE ("layers-merge-down", layer && !fs && !ac && next);
+ SET_SENSITIVE ("layers-merge-layers", layer && !fs && !ac);
+ SET_SENSITIVE ("layers-flatten-image", layer && !fs && !ac);
SET_VISIBLE ("layers-text-discard", text_layer && !ac);
SET_VISIBLE ("layers-text-to-vectors", text_layer && !ac);
Modified: trunk/app/actions/layers-commands.c
==============================================================================
--- trunk/app/actions/layers-commands.c (original)
+++ trunk/app/actions/layers-commands.c Thu Aug 7 15:53:15 2008
@@ -41,6 +41,7 @@
#include "core/gimplayer.h"
#include "core/gimplayer-floating-sel.h"
#include "core/gimplayermask.h"
+#include "core/gimpprojection.h"
#include "core/gimptoolinfo.h"
#include "core/gimpundostack.h"
#include "core/gimpprogress.h"
@@ -335,6 +336,27 @@
}
void
+layers_new_from_visible_cmd_callback (GtkAction *action,
+ gpointer data)
+{
+ GimpImage *image;
+ GimpLayer *layer;
+ GimpProjection *projection;
+ return_if_no_image (image, data);
+
+ projection = gimp_image_get_projection (image);
+
+ layer = gimp_layer_new_from_tiles (gimp_projection_get_tiles (projection),
+ image,
+ gimp_projection_get_image_type (projection),
+ _("Visible"),
+ GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ gimp_image_add_layer (image, layer, -1);
+
+ gimp_image_flush (image);
+}
+
+void
layers_select_cmd_callback (GtkAction *action,
gint value,
gpointer data)
Modified: trunk/app/actions/layers-commands.h
==============================================================================
--- trunk/app/actions/layers-commands.h (original)
+++ trunk/app/actions/layers-commands.h Thu Aug 7 15:53:15 2008
@@ -24,10 +24,13 @@
gpointer data);
void layers_edit_attributes_cmd_callback (GtkAction *action,
gpointer data);
+
void layers_new_cmd_callback (GtkAction *action,
gpointer data);
void layers_new_last_vals_cmd_callback (GtkAction *action,
gpointer data);
+void layers_new_from_visible_cmd_callback (GtkAction *action,
+ gpointer data);
void layers_select_cmd_callback (GtkAction *action,
gint value,
Modified: trunk/app/widgets/gimphelp-ids.h
==============================================================================
--- trunk/app/widgets/gimphelp-ids.h (original)
+++ trunk/app/widgets/gimphelp-ids.h Thu Aug 7 15:53:15 2008
@@ -136,6 +136,7 @@
#define GIMP_HELP_LAYER_DIALOG_LOCK_ALPHA_BUTTON "gimp-layer-dialog-lock-alpha-button"
#define GIMP_HELP_LAYER_NEW "gimp-layer-new"
+#define GIMP_HELP_LAYER_NEW_FROM_VISIBLE "gimp-layer-new-from-visible"
#define GIMP_HELP_LAYER_DUPLICATE "gimp-layer-duplicate"
#define GIMP_HELP_LAYER_ANCHOR "gimp-layer-anchor"
#define GIMP_HELP_LAYER_MERGE_DOWN "gimp-layer-merge-down"
Modified: trunk/menus/image-menu.xml.in
==============================================================================
--- trunk/menus/image-menu.xml.in (original)
+++ trunk/menus/image-menu.xml.in Thu Aug 7 15:53:15 2008
@@ -345,6 +345,7 @@
<menu action="layers-menu" name="Layer">
<placeholder name="New">
<menuitem action="layers-new" />
+ <menuitem action="layers-new-from-visible" />
<menuitem action="layers-duplicate" />
</placeholder>
<placeholder name="Structure">
Modified: trunk/menus/layers-menu.xml
==============================================================================
--- trunk/menus/layers-menu.xml (original)
+++ trunk/menus/layers-menu.xml Thu Aug 7 15:53:15 2008
@@ -7,6 +7,7 @@
<menuitem action="layers-edit-attributes" />
<separator />
<menuitem action="layers-new" />
+ <menuitem action="layers-new-from-visible" />
<!--
<menuitem action="layers-raise" />
<menuitem action="layers-raise-to-top" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]