mirror of https://github.com/GNOME/gimp.git
app/widgets/Makefile.am new file defining the available help topics. Work
2003-08-21 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/gimphelp-ids.h: new file defining the available help topics. Work in progress and totally unusable for matching to the help system. Stay tuned... * app/gui/about-dialog.c * app/gui/brushes-menu.c * app/gui/buffers-menu.c * app/gui/channels-commands.[ch] * app/gui/channels-menu.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradients-commands.c * app/gui/gradients-menu.c * app/gui/image-menu.c * app/gui/layers-commands.[ch] * app/gui/layers-menu.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palettes-menu.c * app/gui/patterns-menu.c * app/gui/resize-dialog.c * app/gui/select-commands.c * app/gui/templates-menu.c * app/gui/tips-dialog.c * app/gui/toolbox-menu.c * app/gui/vectors-commands.[ch] * app/gui/vectors-menu.c: replaced literal HTML file paths by help IDs from gimphelp-ids.h. Renamed some menu callbacks to be consistent with similar ones. This is just an intermediate commit and not finished. While browsing all the menus, I noticed that our "x to selection" functions are not consistent at all. They should all offer the REPLACE,ADD,SUBTRACT,INTERSECT options: * app/core/gimpchannel.[ch]: added new function gimp_channel_new_from_alpha(). Removed gimp_channel_layer_alpha() and gimp_channel_layer_mask(). * app/core/gimpimage-mask.[ch]: added gimp_image_mask_select_alpha() and gimp_image_mask_select_component() which offer the full set of operation, feather and feather_radius parameters as the other selection functions. * app/core/gimpimage-mask-select.[ch]: removed gimp_image_mask_layer_alpha() and gimp_image_mask_layer_mask(). * app/gui/channels-commands.c (channels_channel_to_selection): use gimp_image_mask_select_component() instead of implementing it here. * app/gui/image-menu.c * app/gui/layers-commands.[ch]: offer the full choice of REPLACE,ADD,SUBTRACT,INTERSECT with "Alpha to Selection" and "Mask to Selection". * tools/pdbgen/pdb/selection.pdb: changed accordingly. * app/pdb/selection_cmds.c: regenerated.
This commit is contained in:
parent
cf845be8f5
commit
a319c455d9
67
ChangeLog
67
ChangeLog
|
@ -1,3 +1,70 @@
|
|||
2003-08-21 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/widgets/Makefile.am
|
||||
* app/widgets/gimphelp-ids.h: new file defining the available help
|
||||
topics. Work in progress and totally unusable for matching to the
|
||||
help system. Stay tuned...
|
||||
|
||||
* app/gui/about-dialog.c
|
||||
* app/gui/brushes-menu.c
|
||||
* app/gui/buffers-menu.c
|
||||
* app/gui/channels-commands.[ch]
|
||||
* app/gui/channels-menu.c
|
||||
* app/gui/edit-commands.c
|
||||
* app/gui/file-commands.c
|
||||
* app/gui/file-new-dialog.c
|
||||
* app/gui/file-open-dialog.c
|
||||
* app/gui/file-save-dialog.c
|
||||
* app/gui/gradients-commands.c
|
||||
* app/gui/gradients-menu.c
|
||||
* app/gui/image-menu.c
|
||||
* app/gui/layers-commands.[ch]
|
||||
* app/gui/layers-menu.c
|
||||
* app/gui/module-browser.c
|
||||
* app/gui/offset-dialog.c
|
||||
* app/gui/palettes-menu.c
|
||||
* app/gui/patterns-menu.c
|
||||
* app/gui/resize-dialog.c
|
||||
* app/gui/select-commands.c
|
||||
* app/gui/templates-menu.c
|
||||
* app/gui/tips-dialog.c
|
||||
* app/gui/toolbox-menu.c
|
||||
* app/gui/vectors-commands.[ch]
|
||||
* app/gui/vectors-menu.c: replaced literal HTML file paths by help
|
||||
IDs from gimphelp-ids.h. Renamed some menu callbacks to be
|
||||
consistent with similar ones. This is just an intermediate commit
|
||||
and not finished.
|
||||
|
||||
While browsing all the menus, I noticed that our "x to selection"
|
||||
functions are not consistent at all. They should all offer the
|
||||
REPLACE,ADD,SUBTRACT,INTERSECT options:
|
||||
|
||||
* app/core/gimpchannel.[ch]: added new function
|
||||
gimp_channel_new_from_alpha(). Removed gimp_channel_layer_alpha()
|
||||
and gimp_channel_layer_mask().
|
||||
|
||||
* app/core/gimpimage-mask.[ch]: added
|
||||
gimp_image_mask_select_alpha() and
|
||||
gimp_image_mask_select_component() which offer the full set of
|
||||
operation, feather and feather_radius parameters as the other
|
||||
selection functions.
|
||||
|
||||
* app/core/gimpimage-mask-select.[ch]: removed
|
||||
gimp_image_mask_layer_alpha() and gimp_image_mask_layer_mask().
|
||||
|
||||
* app/gui/channels-commands.c (channels_channel_to_selection): use
|
||||
gimp_image_mask_select_component() instead of implementing it
|
||||
here.
|
||||
|
||||
* app/gui/image-menu.c
|
||||
* app/gui/layers-commands.[ch]: offer the full choice of
|
||||
REPLACE,ADD,SUBTRACT,INTERSECT with "Alpha to Selection" and "Mask
|
||||
to Selection".
|
||||
|
||||
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
|
||||
|
||||
* app/pdb/selection_cmds.c: regenerated.
|
||||
|
||||
2003-08-21 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* themes/Default/images/Makefile.am
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include "widgets/gimpcolorpanel.h"
|
||||
#include "widgets/gimpcomponenteditor.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
|
@ -80,8 +81,8 @@ static void channels_color_changed (GimpColorButton *button,
|
|||
/* public functions */
|
||||
|
||||
void
|
||||
channels_new_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_new_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -90,8 +91,8 @@ channels_new_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
channels_raise_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_raise_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -102,8 +103,8 @@ channels_raise_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
channels_lower_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_lower_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -114,8 +115,8 @@ channels_lower_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
channels_duplicate_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_duplicate_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *new_channel;
|
||||
|
@ -143,6 +144,11 @@ channels_duplicate_channel_cmd_callback (GtkWidget *widget,
|
|||
new_channel = gimp_channel_new_from_component (gimage, component,
|
||||
name, &color);
|
||||
|
||||
/* copied components are invisible by default so subsequent copies
|
||||
* of components don't affect each other
|
||||
*/
|
||||
gimp_drawable_set_visible (GIMP_DRAWABLE (new_channel), FALSE, FALSE);
|
||||
|
||||
g_free (name);
|
||||
}
|
||||
else
|
||||
|
@ -161,8 +167,8 @@ channels_duplicate_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
channels_delete_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -173,75 +179,66 @@ channels_delete_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
channels_channel_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
channels_channel_to_selection (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *channel;
|
||||
GimpImage *gimage;
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
GimpRGB color;
|
||||
GimpChannelType component;
|
||||
return_if_no_image (gimage, data);
|
||||
|
||||
gimp_rgba_set (&color, 0, 0, 0, 1);
|
||||
|
||||
component = GIMP_COMPONENT_EDITOR (data)->clicked_component;
|
||||
|
||||
channel = gimp_channel_new_from_component (gimage, component,
|
||||
"Component Copy",
|
||||
&color);
|
||||
gimp_image_mask_select_component (gimage, component,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (gimage, channel, data);
|
||||
|
||||
gimp_image_mask_select_channel (gimage, _("Channel to Selection"),
|
||||
channel, 0, 0,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
}
|
||||
|
||||
gimp_image_mask_select_channel (gimage,
|
||||
_("Channel to Selection"),
|
||||
channel,
|
||||
0, 0,
|
||||
op,
|
||||
FALSE, 0, 0);
|
||||
gimp_image_flush (gimage);
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
g_object_unref (channel);
|
||||
}
|
||||
|
||||
void
|
||||
channels_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
channels_channel_to_selection (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
channels_add_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
channels_channel_to_selection (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
channels_channel_to_selection (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
channels_channel_to_selection (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
channels_edit_channel_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -372,7 +369,7 @@ channels_new_channel_query (GimpImage *gimage,
|
|||
GIMP_STOCK_CHANNEL,
|
||||
_("New Channel Options"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/channels/new_channel.html",
|
||||
GIMP_HELP_CHANNEL_NEW,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
@ -532,7 +529,7 @@ channels_edit_channel_query (GimpChannel *channel)
|
|||
GIMP_STOCK_EDIT,
|
||||
_("Edit Channel Attributes"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/channels/edit_channel_attributes.html",
|
||||
GIMP_HELP_CHANNEL_EDIT,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
|
|
@ -20,31 +20,31 @@
|
|||
#define __CHANNELS_COMMANDS_H__
|
||||
|
||||
|
||||
void channels_new_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_raise_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_lower_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_duplicate_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_delete_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_add_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_edit_channel_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_new_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_raise_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_lower_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_duplicate_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void channels_new_channel_query (GimpImage *gimage,
|
||||
GimpChannel *template,
|
||||
gboolean interactive);
|
||||
void channels_edit_channel_query (GimpChannel *channel);
|
||||
void channels_new_channel_query (GimpImage *gimage,
|
||||
GimpChannel *template,
|
||||
gboolean interactive);
|
||||
void channels_edit_channel_query (GimpChannel *channel);
|
||||
|
||||
|
||||
#endif /* __CHANNELS_COMMANDS_H__ */
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include "display/gimpdisplay.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
|
||||
#include "dialogs.h"
|
||||
|
@ -192,7 +193,7 @@ edit_named_cut_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Cut Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/cut_named.html",
|
||||
GIMP_HELP_BUFFER_CUT,
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
G_OBJECT (gdisp->gimage), "disconnect",
|
||||
|
@ -210,7 +211,7 @@ edit_named_copy_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Copy Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/copy_named.html",
|
||||
GIMP_HELP_BUFFER_COPY,
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
G_OBJECT (gimage), "disconnect",
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "file/file-save.h"
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
|
@ -288,7 +289,7 @@ file_save_template_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Create New Template"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/new_template.html",
|
||||
GIMP_HELP_FILE_SAVE_AS_TEMPLATE,
|
||||
_("Enter a name for this template"),
|
||||
NULL,
|
||||
G_OBJECT (gdisp->gimage), "disconnect",
|
||||
|
@ -336,7 +337,7 @@ file_revert_cmd_callback (GtkWidget *widget,
|
|||
|
||||
query_box = gimp_query_boolean_box (_("Revert Image"),
|
||||
gimp_standard_help_func,
|
||||
"file/revert.html",
|
||||
GIMP_HELP_FILE_REVERT,
|
||||
GIMP_STOCK_QUESTION,
|
||||
text,
|
||||
GTK_STOCK_YES, GTK_STOCK_NO,
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "gradients-commands.h"
|
||||
|
||||
|
@ -102,9 +103,8 @@ gradients_save_as_pov_query (GimpContainerEditor *editor)
|
|||
gradient,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect (GTK_WIDGET (filesel), gimp_standard_help_func,
|
||||
"dialogs/save_as_povray.html");
|
||||
GIMP_HELP_GRADIENT_SAVE_AS_POV);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (filesel));
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimpimage-mask-select.h"
|
||||
#include "core/gimpimage-merge.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimplayer.h"
|
||||
|
@ -42,6 +43,7 @@
|
|||
#include "pdb/procedural_db.h"
|
||||
|
||||
#include "widgets/gimpenummenu.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
|
@ -365,8 +367,8 @@ layers_crop_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
layers_add_layer_mask_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
|
@ -376,8 +378,8 @@ layers_add_layer_mask_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
layers_apply_layer_mask_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_apply_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
|
@ -391,8 +393,8 @@ layers_apply_layer_mask_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
layers_delete_layer_mask_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
|
@ -405,36 +407,64 @@ layers_delete_layer_mask_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_select_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
static void
|
||||
layers_mask_to_selection (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
GimpLayerMask *mask;
|
||||
return_if_no_layer (gimage, active_layer, data);
|
||||
|
||||
if (gimp_layer_get_mask (active_layer))
|
||||
mask = gimp_layer_get_mask (active_layer);
|
||||
|
||||
if (mask)
|
||||
{
|
||||
gimp_image_mask_layer_mask (gimage, active_layer);
|
||||
gint off_x, off_y;
|
||||
|
||||
gimp_item_offsets (GIMP_ITEM (mask), &off_x, &off_y);
|
||||
|
||||
gimp_image_mask_select_channel (gimage,
|
||||
_("Layer Mask to Selection"),
|
||||
GIMP_CHANNEL (mask),
|
||||
off_x, off_y,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_select_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
return_if_no_layer (gimage, active_layer, data);
|
||||
|
||||
gimp_image_mask_layer_alpha (gimage, active_layer);
|
||||
gimp_image_flush (gimage);
|
||||
layers_mask_to_selection (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
layers_add_alpha_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_mask_to_selection (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_mask_to_selection (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_mask_to_selection (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
|
@ -447,6 +477,51 @@ layers_add_alpha_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
layers_alpha_to_selection (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
return_if_no_layer (gimage, active_layer, data);
|
||||
|
||||
if (gimp_drawable_has_alpha (GIMP_DRAWABLE (active_layer)))
|
||||
{
|
||||
gimp_image_mask_select_alpha (gimage, active_layer,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_alpha_to_selection (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_alpha_to_selection (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_alpha_to_selection (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_alpha_to_selection (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
layers_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
|
@ -620,7 +695,7 @@ layers_new_layer_query (GimpImage *gimage,
|
|||
GIMP_STOCK_LAYER,
|
||||
_("Create a New Layer"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers/new_layer.html",
|
||||
GIMP_HELP_LAYER_NEW,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
@ -794,7 +869,7 @@ layers_edit_layer_query (GimpLayer *layer)
|
|||
GIMP_STOCK_EDIT,
|
||||
_("Edit Layer Attributes"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers/edit_layer_attributes.html",
|
||||
GIMP_HELP_LAYER_EDIT,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
@ -902,7 +977,7 @@ layers_add_mask_query (GimpLayer *layer)
|
|||
GTK_STOCK_ADD,
|
||||
_("Add a Mask to the Layer"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers/add_layer_mask.html",
|
||||
GIMP_HELP_LAYER_MASK_ADD,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
|
|
@ -20,64 +20,77 @@
|
|||
#define __LAYERS_COMMANDS_H__
|
||||
|
||||
|
||||
void layers_select_previous_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_next_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_top_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_bottom_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_previous_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_next_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_top_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_bottom_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_raise_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_lower_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_raise_to_top_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_lower_to_bottom_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_raise_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_lower_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_raise_to_top_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_lower_to_bottom_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_new_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_duplicate_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_anchor_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_merge_down_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_delete_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_new_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_duplicate_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_anchor_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_merge_down_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_delete_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_resize_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_resize_to_image_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_scale_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_crop_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_resize_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_resize_to_image_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_scale_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_crop_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_add_layer_mask_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_apply_layer_mask_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_delete_layer_mask_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_select_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_add_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_apply_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_delete_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_selection_replace_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_selection_add_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_selection_sub_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_selection_intersect_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_alpha_select_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_add_alpha_channel_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_edit_attributes_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_add_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_selection_replace_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_selection_add_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_selection_sub_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_selection_intersect_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_new_layer_query (GimpImage *gimage,
|
||||
GimpLayer *template,
|
||||
gboolean interactive);
|
||||
void layers_edit_layer_query (GimpLayer *layer);
|
||||
void layers_edit_attributes_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_new_layer_query (GimpImage *gimage,
|
||||
GimpLayer *template,
|
||||
gboolean interactive);
|
||||
void layers_edit_layer_query (GimpLayer *layer);
|
||||
|
||||
|
||||
#endif /* __LAYERS_COMMANDS_H__ */
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimpimage-qmask.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
|
@ -147,7 +148,7 @@ select_feather_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Feather Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/feather_selection.html",
|
||||
GIMP_HELP_SELECT_FEATHER,
|
||||
_("Feather Selection by:"),
|
||||
selection_feather_radius, 0, 32767, 3,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -182,7 +183,7 @@ select_shrink_cmd_callback (GtkWidget *widget,
|
|||
shrink_dialog =
|
||||
gimp_query_size_box (_("Shrink Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/shrink_selection.html",
|
||||
GIMP_HELP_SELECT_SHRINK,
|
||||
_("Shrink Selection by:"),
|
||||
selection_shrink_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -215,7 +216,7 @@ select_grow_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Grow Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/grow_selection.html",
|
||||
GIMP_HELP_SELECT_GROW,
|
||||
_("Grow Selection by:"),
|
||||
selection_grow_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -237,7 +238,7 @@ select_border_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Border Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/border_selection.html",
|
||||
GIMP_HELP_SELECT_BORDER,
|
||||
_("Border Selection by:"),
|
||||
selection_border_radius, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
|
||||
#include "vectors/gimpvectors.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
|
@ -83,8 +84,8 @@
|
|||
/* public functions */
|
||||
|
||||
void
|
||||
vectors_new_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_new_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -93,8 +94,8 @@ vectors_new_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_raise_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_raise_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -105,8 +106,8 @@ vectors_raise_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_lower_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_lower_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -117,8 +118,8 @@ vectors_lower_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_duplicate_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_duplicate_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -133,8 +134,8 @@ vectors_duplicate_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_delete_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -145,9 +146,9 @@ vectors_delete_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
vectors_vectors_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
vectors_vectors_to_selection (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -162,36 +163,36 @@ vectors_vectors_to_sel (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
vectors_vectors_to_selection (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_add_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
vectors_vectors_to_selection (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget,
|
||||
vectors_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_selection (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_selection (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_selection_to_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_intersect_vectors_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_sel_to_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -200,8 +201,8 @@ vectors_sel_to_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_stroke_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_stroke_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -211,8 +212,8 @@ vectors_stroke_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_copy_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_copy_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -224,8 +225,8 @@ vectors_copy_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_paste_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_paste_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -236,8 +237,8 @@ vectors_paste_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_import_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_import_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -248,8 +249,8 @@ vectors_import_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_export_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_export_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -272,8 +273,8 @@ vectors_vectors_tool_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_edit_vectors_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -482,7 +483,7 @@ vectors_new_vectors_query (GimpImage *gimage,
|
|||
GIMP_STOCK_TOOL_PATH,
|
||||
_("New Path Options"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/vectors/new_vectors.html",
|
||||
GIMP_HELP_PATH_NEW,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
@ -597,7 +598,7 @@ vectors_edit_vectors_query (GimpVectors *vectors)
|
|||
GIMP_STOCK_EDIT,
|
||||
_("Edit Path Attributes"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/paths/edit_path_attributes.html",
|
||||
GIMP_HELP_PATH_EDIT,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
|
|
@ -20,49 +20,49 @@
|
|||
#define __VECTORS_COMMANDS_H__
|
||||
|
||||
|
||||
void vectors_new_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_raise_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_lower_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_duplicate_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_delete_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_add_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_intersect_vectors_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_sel_to_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_stroke_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_copy_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_paste_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_import_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_export_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_vectors_tool_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_edit_vectors_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_new_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_raise_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_lower_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_duplicate_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_to_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_stroke_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_copy_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_paste_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_import_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_export_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_vectors_tool_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void vectors_stroke_vectors (GimpVectors *vectors);
|
||||
void vectors_selection_to_vectors (GimpImage *gimage,
|
||||
gboolean advanced);
|
||||
void vectors_vectors_tool (GimpVectors *vectors);
|
||||
void vectors_new_vectors_query (GimpImage *gimage,
|
||||
GimpVectors *template,
|
||||
gboolean interactive);
|
||||
void vectors_edit_vectors_query (GimpVectors *vectors);
|
||||
void vectors_stroke_vectors (GimpVectors *vectors);
|
||||
void vectors_selection_to_vectors (GimpImage *gimage,
|
||||
gboolean advanced);
|
||||
void vectors_vectors_tool (GimpVectors *vectors);
|
||||
void vectors_new_vectors_query (GimpImage *gimage,
|
||||
GimpVectors *template,
|
||||
gboolean interactive);
|
||||
void vectors_edit_vectors_query (GimpVectors *vectors);
|
||||
|
||||
|
||||
#endif /* __VECTORS_COMMANDS_H__ */
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "paint-funcs/paint-funcs.h"
|
||||
|
||||
#include "gimp-utils.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-projection.h"
|
||||
#include "gimpimage-undo.h"
|
||||
|
@ -558,6 +559,53 @@ gimp_channel_new (GimpImage *gimage,
|
|||
return channel;
|
||||
}
|
||||
|
||||
GimpChannel *
|
||||
gimp_channel_new_from_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
const gchar *name,
|
||||
const GimpRGB *color)
|
||||
{
|
||||
GimpChannel *channel;
|
||||
gint x, y;
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
|
||||
g_return_val_if_fail (gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)), NULL);
|
||||
g_return_val_if_fail (color != NULL, NULL);
|
||||
|
||||
width = gimp_image_get_width (gimage);
|
||||
height = gimp_image_get_height (gimage);
|
||||
|
||||
channel = gimp_channel_new (gimage, width, height, name, color);
|
||||
|
||||
gimp_channel_clear (channel, FALSE);
|
||||
|
||||
if (gimp_rectangle_intersect (0, 0, width, height,
|
||||
GIMP_ITEM (layer)->offset_x,
|
||||
GIMP_ITEM (layer)->offset_y,
|
||||
GIMP_ITEM (layer)->width,
|
||||
GIMP_ITEM (layer)->height,
|
||||
&x, &y, &width, &height))
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
|
||||
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer)->tiles,
|
||||
x - GIMP_ITEM (layer)->offset_x,
|
||||
y - GIMP_ITEM (layer)->offset_y,
|
||||
width, height, FALSE);
|
||||
pixel_region_init (&destPR, GIMP_DRAWABLE (channel)->tiles,
|
||||
x, y, width, height, TRUE);
|
||||
|
||||
extract_alpha_region (&srcPR, NULL, &destPR);
|
||||
|
||||
channel->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
return channel;
|
||||
}
|
||||
|
||||
GimpChannel *
|
||||
gimp_channel_new_from_component (GimpImage *gimage,
|
||||
GimpChannelType type,
|
||||
|
@ -1809,83 +1857,6 @@ gimp_channel_load (GimpChannel *mask,
|
|||
mask->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_channel_layer_alpha (GimpChannel *mask,
|
||||
GimpLayer *layer,
|
||||
gboolean push_undo)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
g_return_if_fail (GIMP_IS_CHANNEL (mask));
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
g_return_if_fail (gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)));
|
||||
|
||||
if (push_undo)
|
||||
gimp_channel_push_undo (mask, _("Channel from Alpha"));
|
||||
|
||||
/* clear the mask if it is not already known to be empty */
|
||||
if (! (mask->bounds_known && mask->empty))
|
||||
gimp_channel_clear (mask, FALSE);
|
||||
|
||||
x1 = CLAMP (GIMP_ITEM (layer)->offset_x, 0, GIMP_ITEM (mask)->width);
|
||||
y1 = CLAMP (GIMP_ITEM (layer)->offset_y, 0, GIMP_ITEM (mask)->height);
|
||||
x2 = CLAMP (GIMP_ITEM (layer)->offset_x + GIMP_ITEM (layer)->width,
|
||||
0, GIMP_ITEM (mask)->width);
|
||||
y2 = CLAMP (GIMP_ITEM (layer)->offset_y + GIMP_ITEM (layer)->height,
|
||||
0, GIMP_ITEM (mask)->height);
|
||||
|
||||
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer)->tiles,
|
||||
(x1 - GIMP_ITEM (layer)->offset_x),
|
||||
(y1 - GIMP_ITEM (layer)->offset_y),
|
||||
(x2 - x1), (y2 - y1), FALSE);
|
||||
pixel_region_init (&destPR, GIMP_DRAWABLE (mask)->tiles,
|
||||
x1, y1, (x2 - x1), (y2 - y1), TRUE);
|
||||
extract_alpha_region (&srcPR, NULL, &destPR);
|
||||
|
||||
mask->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_channel_layer_mask (GimpChannel *mask,
|
||||
GimpLayer *layer,
|
||||
gboolean push_undo)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
g_return_if_fail (GIMP_IS_CHANNEL (mask));
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
g_return_if_fail (gimp_layer_get_mask (layer));
|
||||
|
||||
if (push_undo)
|
||||
gimp_channel_push_undo (mask, _("Channel from Mask"));
|
||||
|
||||
/* clear the mask if it is not already known to be empty */
|
||||
if (! (mask->bounds_known && mask->empty))
|
||||
gimp_channel_clear (mask, FALSE);
|
||||
|
||||
x1 = CLAMP (GIMP_ITEM (layer)->offset_x, 0, GIMP_ITEM (mask)->width);
|
||||
y1 = CLAMP (GIMP_ITEM (layer)->offset_y, 0, GIMP_ITEM (mask)->height);
|
||||
x2 = CLAMP (GIMP_ITEM (layer)->offset_x + GIMP_ITEM (layer)->width,
|
||||
0, GIMP_ITEM (mask)->width);
|
||||
y2 = CLAMP (GIMP_ITEM (layer)->offset_y + GIMP_ITEM (layer)->height,
|
||||
0, GIMP_ITEM (mask)->height);
|
||||
|
||||
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer->mask)->tiles,
|
||||
(x1 - GIMP_ITEM (layer)->offset_x),
|
||||
(y1 - GIMP_ITEM (layer)->offset_y),
|
||||
(x2 - x1), (y2 - y1),
|
||||
FALSE);
|
||||
pixel_region_init (&destPR, GIMP_DRAWABLE (mask)->tiles,
|
||||
x1, y1,
|
||||
(x2 - x1), (y2 - y1),
|
||||
TRUE);
|
||||
copy_region (&srcPR, &destPR);
|
||||
|
||||
mask->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_channel_invalidate_bounds (GimpChannel *channel)
|
||||
{
|
||||
|
|
|
@ -72,6 +72,10 @@ GimpChannel * gimp_channel_new (GimpImage *gimage,
|
|||
const gchar *name,
|
||||
const GimpRGB *color);
|
||||
|
||||
GimpChannel * gimp_channel_new_from_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
const gchar *name,
|
||||
const GimpRGB *color);
|
||||
GimpChannel * gimp_channel_new_from_component (GimpImage *gimage,
|
||||
GimpChannelType type,
|
||||
const gchar *name,
|
||||
|
@ -178,12 +182,6 @@ void gimp_channel_shrink (GimpChannel *mask,
|
|||
void gimp_channel_load (GimpChannel *mask,
|
||||
GimpChannel *channel,
|
||||
gboolean push_undo);
|
||||
void gimp_channel_layer_alpha (GimpChannel *mask,
|
||||
GimpLayer *layer,
|
||||
gboolean push_undo);
|
||||
void gimp_channel_layer_mask (GimpChannel *mask,
|
||||
GimpLayer *layer,
|
||||
gboolean push_undo);
|
||||
|
||||
void gimp_channel_invalidate_bounds (GimpChannel *channel);
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimpchannel.h"
|
||||
|
@ -27,6 +29,7 @@
|
|||
#include "gimpimage-contiguous-region.h"
|
||||
#include "gimpimage-mask.h"
|
||||
#include "gimpimage-mask-select.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimpscanconvert.h"
|
||||
|
||||
#include "vectors/gimpstroke.h"
|
||||
|
@ -309,6 +312,78 @@ gimp_image_mask_select_channel (GimpImage *gimage,
|
|||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpChannel *channel;
|
||||
GimpRGB color;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
|
||||
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
channel = gimp_channel_new_from_alpha (gimage, layer, NULL, &color);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (channel,
|
||||
feather_radius_x,
|
||||
feather_radius_y,
|
||||
FALSE /* no undo */);
|
||||
|
||||
gimp_image_mask_select_channel (gimage, _("Alpha to Selection"), channel,
|
||||
0, 0, op,
|
||||
FALSE, 0.0, 0.0);
|
||||
|
||||
g_object_unref (channel);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_component (GimpImage *gimage,
|
||||
GimpChannelType component,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpChannel *channel;
|
||||
GimpRGB color;
|
||||
GEnumClass *enum_class;
|
||||
GEnumValue *enum_value;
|
||||
gchar *name;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
channel = gimp_channel_new_from_component (gimage, component, NULL, &color);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (channel,
|
||||
feather_radius_x,
|
||||
feather_radius_y,
|
||||
FALSE /* no undo */);
|
||||
|
||||
enum_class = g_type_class_ref (GIMP_TYPE_CHANNEL_TYPE);
|
||||
enum_value = g_enum_get_value (enum_class, component);
|
||||
g_type_class_unref (enum_class);
|
||||
|
||||
name = g_strdup_printf (_("%s Channel to Selection"),
|
||||
gettext (enum_value->value_name));
|
||||
|
||||
gimp_image_mask_select_channel (gimage, name, channel,
|
||||
0, 0, op,
|
||||
FALSE, 0.0, 0.0);
|
||||
|
||||
g_free (name);
|
||||
g_object_unref (channel);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
|
|
|
@ -69,6 +69,20 @@ void gimp_image_mask_select_channel (GimpImage *gimage,
|
|||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_component (GimpImage *gimage,
|
||||
GimpChannelType component,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "paint-funcs/paint-funcs.h"
|
||||
|
||||
#include "gimp-utils.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-projection.h"
|
||||
#include "gimpimage-undo.h"
|
||||
|
@ -558,6 +559,53 @@ gimp_channel_new (GimpImage *gimage,
|
|||
return channel;
|
||||
}
|
||||
|
||||
GimpChannel *
|
||||
gimp_channel_new_from_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
const gchar *name,
|
||||
const GimpRGB *color)
|
||||
{
|
||||
GimpChannel *channel;
|
||||
gint x, y;
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
|
||||
g_return_val_if_fail (gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)), NULL);
|
||||
g_return_val_if_fail (color != NULL, NULL);
|
||||
|
||||
width = gimp_image_get_width (gimage);
|
||||
height = gimp_image_get_height (gimage);
|
||||
|
||||
channel = gimp_channel_new (gimage, width, height, name, color);
|
||||
|
||||
gimp_channel_clear (channel, FALSE);
|
||||
|
||||
if (gimp_rectangle_intersect (0, 0, width, height,
|
||||
GIMP_ITEM (layer)->offset_x,
|
||||
GIMP_ITEM (layer)->offset_y,
|
||||
GIMP_ITEM (layer)->width,
|
||||
GIMP_ITEM (layer)->height,
|
||||
&x, &y, &width, &height))
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
|
||||
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer)->tiles,
|
||||
x - GIMP_ITEM (layer)->offset_x,
|
||||
y - GIMP_ITEM (layer)->offset_y,
|
||||
width, height, FALSE);
|
||||
pixel_region_init (&destPR, GIMP_DRAWABLE (channel)->tiles,
|
||||
x, y, width, height, TRUE);
|
||||
|
||||
extract_alpha_region (&srcPR, NULL, &destPR);
|
||||
|
||||
channel->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
return channel;
|
||||
}
|
||||
|
||||
GimpChannel *
|
||||
gimp_channel_new_from_component (GimpImage *gimage,
|
||||
GimpChannelType type,
|
||||
|
@ -1809,83 +1857,6 @@ gimp_channel_load (GimpChannel *mask,
|
|||
mask->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_channel_layer_alpha (GimpChannel *mask,
|
||||
GimpLayer *layer,
|
||||
gboolean push_undo)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
g_return_if_fail (GIMP_IS_CHANNEL (mask));
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
g_return_if_fail (gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)));
|
||||
|
||||
if (push_undo)
|
||||
gimp_channel_push_undo (mask, _("Channel from Alpha"));
|
||||
|
||||
/* clear the mask if it is not already known to be empty */
|
||||
if (! (mask->bounds_known && mask->empty))
|
||||
gimp_channel_clear (mask, FALSE);
|
||||
|
||||
x1 = CLAMP (GIMP_ITEM (layer)->offset_x, 0, GIMP_ITEM (mask)->width);
|
||||
y1 = CLAMP (GIMP_ITEM (layer)->offset_y, 0, GIMP_ITEM (mask)->height);
|
||||
x2 = CLAMP (GIMP_ITEM (layer)->offset_x + GIMP_ITEM (layer)->width,
|
||||
0, GIMP_ITEM (mask)->width);
|
||||
y2 = CLAMP (GIMP_ITEM (layer)->offset_y + GIMP_ITEM (layer)->height,
|
||||
0, GIMP_ITEM (mask)->height);
|
||||
|
||||
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer)->tiles,
|
||||
(x1 - GIMP_ITEM (layer)->offset_x),
|
||||
(y1 - GIMP_ITEM (layer)->offset_y),
|
||||
(x2 - x1), (y2 - y1), FALSE);
|
||||
pixel_region_init (&destPR, GIMP_DRAWABLE (mask)->tiles,
|
||||
x1, y1, (x2 - x1), (y2 - y1), TRUE);
|
||||
extract_alpha_region (&srcPR, NULL, &destPR);
|
||||
|
||||
mask->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_channel_layer_mask (GimpChannel *mask,
|
||||
GimpLayer *layer,
|
||||
gboolean push_undo)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
g_return_if_fail (GIMP_IS_CHANNEL (mask));
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
g_return_if_fail (gimp_layer_get_mask (layer));
|
||||
|
||||
if (push_undo)
|
||||
gimp_channel_push_undo (mask, _("Channel from Mask"));
|
||||
|
||||
/* clear the mask if it is not already known to be empty */
|
||||
if (! (mask->bounds_known && mask->empty))
|
||||
gimp_channel_clear (mask, FALSE);
|
||||
|
||||
x1 = CLAMP (GIMP_ITEM (layer)->offset_x, 0, GIMP_ITEM (mask)->width);
|
||||
y1 = CLAMP (GIMP_ITEM (layer)->offset_y, 0, GIMP_ITEM (mask)->height);
|
||||
x2 = CLAMP (GIMP_ITEM (layer)->offset_x + GIMP_ITEM (layer)->width,
|
||||
0, GIMP_ITEM (mask)->width);
|
||||
y2 = CLAMP (GIMP_ITEM (layer)->offset_y + GIMP_ITEM (layer)->height,
|
||||
0, GIMP_ITEM (mask)->height);
|
||||
|
||||
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer->mask)->tiles,
|
||||
(x1 - GIMP_ITEM (layer)->offset_x),
|
||||
(y1 - GIMP_ITEM (layer)->offset_y),
|
||||
(x2 - x1), (y2 - y1),
|
||||
FALSE);
|
||||
pixel_region_init (&destPR, GIMP_DRAWABLE (mask)->tiles,
|
||||
x1, y1,
|
||||
(x2 - x1), (y2 - y1),
|
||||
TRUE);
|
||||
copy_region (&srcPR, &destPR);
|
||||
|
||||
mask->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_channel_invalidate_bounds (GimpChannel *channel)
|
||||
{
|
||||
|
|
|
@ -72,6 +72,10 @@ GimpChannel * gimp_channel_new (GimpImage *gimage,
|
|||
const gchar *name,
|
||||
const GimpRGB *color);
|
||||
|
||||
GimpChannel * gimp_channel_new_from_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
const gchar *name,
|
||||
const GimpRGB *color);
|
||||
GimpChannel * gimp_channel_new_from_component (GimpImage *gimage,
|
||||
GimpChannelType type,
|
||||
const gchar *name,
|
||||
|
@ -178,12 +182,6 @@ void gimp_channel_shrink (GimpChannel *mask,
|
|||
void gimp_channel_load (GimpChannel *mask,
|
||||
GimpChannel *channel,
|
||||
gboolean push_undo);
|
||||
void gimp_channel_layer_alpha (GimpChannel *mask,
|
||||
GimpLayer *layer,
|
||||
gboolean push_undo);
|
||||
void gimp_channel_layer_mask (GimpChannel *mask,
|
||||
GimpLayer *layer,
|
||||
gboolean push_undo);
|
||||
|
||||
void gimp_channel_invalidate_bounds (GimpChannel *channel);
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimpchannel.h"
|
||||
|
@ -27,6 +29,7 @@
|
|||
#include "gimpimage-contiguous-region.h"
|
||||
#include "gimpimage-mask.h"
|
||||
#include "gimpimage-mask-select.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimpscanconvert.h"
|
||||
|
||||
#include "vectors/gimpstroke.h"
|
||||
|
@ -309,6 +312,78 @@ gimp_image_mask_select_channel (GimpImage *gimage,
|
|||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpChannel *channel;
|
||||
GimpRGB color;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
|
||||
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
channel = gimp_channel_new_from_alpha (gimage, layer, NULL, &color);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (channel,
|
||||
feather_radius_x,
|
||||
feather_radius_y,
|
||||
FALSE /* no undo */);
|
||||
|
||||
gimp_image_mask_select_channel (gimage, _("Alpha to Selection"), channel,
|
||||
0, 0, op,
|
||||
FALSE, 0.0, 0.0);
|
||||
|
||||
g_object_unref (channel);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_component (GimpImage *gimage,
|
||||
GimpChannelType component,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpChannel *channel;
|
||||
GimpRGB color;
|
||||
GEnumClass *enum_class;
|
||||
GEnumValue *enum_value;
|
||||
gchar *name;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
channel = gimp_channel_new_from_component (gimage, component, NULL, &color);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (channel,
|
||||
feather_radius_x,
|
||||
feather_radius_y,
|
||||
FALSE /* no undo */);
|
||||
|
||||
enum_class = g_type_class_ref (GIMP_TYPE_CHANNEL_TYPE);
|
||||
enum_value = g_enum_get_value (enum_class, component);
|
||||
g_type_class_unref (enum_class);
|
||||
|
||||
name = g_strdup_printf (_("%s Channel to Selection"),
|
||||
gettext (enum_value->value_name));
|
||||
|
||||
gimp_image_mask_select_channel (gimage, name, channel,
|
||||
0, 0, op,
|
||||
FALSE, 0.0, 0.0);
|
||||
|
||||
g_free (name);
|
||||
g_object_unref (channel);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
|
|
|
@ -69,6 +69,20 @@ void gimp_image_mask_select_channel (GimpImage *gimage,
|
|||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_component (GimpImage *gimage,
|
||||
GimpChannelType component,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
|
|
|
@ -558,21 +558,6 @@ gimp_image_mask_shrink (GimpImage *gimage,
|
|||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_load (GimpImage *gimage,
|
||||
GimpChannel *channel)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_CHANNEL (channel));
|
||||
|
||||
gimp_image_mask_push_undo (gimage, _("Selection from Channel"));
|
||||
|
||||
/* load the specified channel to the gimage mask */
|
||||
gimp_channel_load (gimp_image_get_mask (gimage), channel, FALSE);
|
||||
|
||||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_translate (GimpImage *gimage,
|
||||
gint off_x,
|
||||
|
@ -592,53 +577,19 @@ gimp_image_mask_translate (GimpImage *gimage,
|
|||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gimp_image_mask_layer_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer)
|
||||
gimp_image_mask_load (GimpImage *gimage,
|
||||
GimpChannel *channel)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
g_return_if_fail (GIMP_IS_CHANNEL (channel));
|
||||
|
||||
if (gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)))
|
||||
{
|
||||
gimp_image_mask_push_undo (gimage, _("Selection from Alpha"));
|
||||
gimp_image_mask_push_undo (gimage, _("Selection from Channel"));
|
||||
|
||||
/* load the mask with the given layer's alpha channel */
|
||||
gimp_channel_layer_alpha (gimp_image_get_mask (gimage), layer, FALSE);
|
||||
/* load the specified channel to the gimage mask */
|
||||
gimp_channel_load (gimp_image_get_mask (gimage), channel, FALSE);
|
||||
|
||||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("The active layer has no alpha channel\n"
|
||||
"to convert to a selection."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_layer_mask (GimpImage *gimage,
|
||||
GimpLayer *layer)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
|
||||
if (gimp_layer_get_mask (layer))
|
||||
{
|
||||
gimp_image_mask_push_undo (gimage, _("Selection from Mask"));
|
||||
|
||||
/* load the mask with the given layer's mask */
|
||||
gimp_channel_layer_mask (gimp_image_get_mask (gimage), layer, FALSE);
|
||||
|
||||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("The active layer has no mask\n"
|
||||
"to convert to a selection."));
|
||||
return;
|
||||
}
|
||||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
|
||||
GimpChannel *
|
||||
|
|
|
@ -85,11 +85,6 @@ void gimp_image_mask_translate (GimpImage *gimage,
|
|||
|
||||
void gimp_image_mask_load (GimpImage *gimage,
|
||||
GimpChannel *channel);
|
||||
void gimp_image_mask_layer_alpha (GimpImage *gimage,
|
||||
GimpLayer *layer);
|
||||
void gimp_image_mask_layer_mask (GimpImage *gimage,
|
||||
GimpLayer *layer);
|
||||
|
||||
GimpChannel * gimp_image_mask_save (GimpImage *gimage);
|
||||
|
||||
gboolean gimp_image_mask_stroke (GimpImage *gimage,
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpdnd.h"
|
||||
|
||||
#include "about-dialog.h"
|
||||
|
@ -241,7 +242,7 @@ about_dialog_create (void)
|
|||
gtk_window_set_resizable (GTK_WINDOW (about_dialog), FALSE);
|
||||
|
||||
gimp_help_connect (about_dialog, gimp_standard_help_func,
|
||||
"dialogs/about.html");
|
||||
GIMP_HELP_ABOUT_DIALOG);
|
||||
|
||||
g_signal_connect (about_dialog, "destroy",
|
||||
G_CALLBACK (about_dialog_destroy),
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "file/file-open.h"
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpmenufactory.h"
|
||||
#include "widgets/gimppreview.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
@ -181,7 +182,7 @@ file_open_dialog_create (Gimp *gimp,
|
|||
"gimp-file-open-dialog",
|
||||
menu_factory, "<Load>",
|
||||
_("Open Image"), "open_image",
|
||||
"open/dialogs/file_open.html",
|
||||
GIMP_HELP_FILE_OPEN,
|
||||
G_CALLBACK (file_open_ok_callback));
|
||||
|
||||
fs = GTK_FILE_SELECTION (open_dialog);
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "file/file-save.h"
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
#include "widgets/gimpmenufactory.h"
|
||||
|
||||
|
@ -204,7 +205,7 @@ file_save_dialog_create (Gimp *gimp,
|
|||
"gimp-file-save-dialog",
|
||||
menu_factory, "<Save>",
|
||||
_("Save Image"), "save_image",
|
||||
"save/dialogs/file_save.html",
|
||||
GIMP_HELP_FILE_SAVE,
|
||||
G_CALLBACK (file_save_ok_callback));
|
||||
}
|
||||
|
||||
|
@ -296,7 +297,7 @@ file_save_overwrite (GtkWidget *save_dialog,
|
|||
|
||||
query_box = gimp_query_boolean_box (_("File Exists!"),
|
||||
gimp_standard_help_func,
|
||||
"save/file_exists.html",
|
||||
GIMP_HELP_FILE_SAVE_OVERWRITE,
|
||||
GIMP_STOCK_QUESTION,
|
||||
message,
|
||||
GTK_STOCK_YES, GTK_STOCK_NO,
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "core/gimptemplate.h"
|
||||
|
||||
#include "widgets/gimpcontainermenuimpl.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimptemplateeditor.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
|
@ -97,7 +98,7 @@ file_new_dialog_new (Gimp *gimp)
|
|||
GIMP_STOCK_IMAGE,
|
||||
_("Create a New Image"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html",
|
||||
GIMP_HELP_FILE_NEW,
|
||||
|
||||
GIMP_STOCK_RESET, file_new_reset_callback,
|
||||
dialog, NULL, NULL, FALSE, FALSE,
|
||||
|
@ -290,7 +291,7 @@ file_new_confirm_dialog (FileNewDialog *dialog)
|
|||
dialog->confirm_dialog =
|
||||
gimp_query_boolean_box (_("Confirm Image Size"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
GIMP_HELP_FILE_NEW_CONFIRM,
|
||||
GIMP_STOCK_INFO,
|
||||
text,
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimp.h"
|
||||
#include "core/gimpmodules.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
#include "module-browser.h"
|
||||
|
@ -122,7 +123,7 @@ module_browser_new (Gimp *gimp)
|
|||
GTK_STOCK_EXECUTE,
|
||||
_("Manage Loadable Modules"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/module_manager.html",
|
||||
GIMP_HELP_MODULE_DIALOG,
|
||||
|
||||
GTK_STOCK_REFRESH, browser_refresh_callback,
|
||||
browser, NULL, NULL, FALSE, FALSE,
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimplayermask.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
#include "offset-dialog.h"
|
||||
|
@ -103,7 +104,7 @@ offset_dialog_create (GimpDrawable *drawable)
|
|||
GIMP_STOCK_TOOL_MOVE,
|
||||
title,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/offset.html",
|
||||
GIMP_HELP_LAYER_OFFSET,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, (gpointer) 1, NULL, FALSE, TRUE,
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "core/gimplayer.h"
|
||||
|
||||
#include "widgets/gimpenummenu.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
#include "resize-dialog.h"
|
||||
|
@ -192,7 +193,7 @@ resize_widget_new (GimpViewable *viewable,
|
|||
wmclass = "scale_layer";
|
||||
window_title = _("Scale Layer");
|
||||
window_desc = _("Scale Layer Options");
|
||||
help_page = "layers/dialogs/scale_layer.html";
|
||||
help_page = GIMP_HELP_LAYER_SCALE;
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
break;
|
||||
|
||||
|
@ -200,7 +201,7 @@ resize_widget_new (GimpViewable *viewable,
|
|||
wmclass = "scale_image";
|
||||
window_title = _("Scale Image");
|
||||
window_desc = _("Scale Image Options");
|
||||
help_page = "dialogs/scale_image.html";
|
||||
help_page = GIMP_HELP_IMAGE_SCALE;
|
||||
frame = gtk_frame_new (_("Pixel Dimensions"));
|
||||
break;
|
||||
}
|
||||
|
@ -215,14 +216,14 @@ resize_widget_new (GimpViewable *viewable,
|
|||
wmclass = "resize_layer";
|
||||
window_title = _("Layer Boundary Size");
|
||||
window_desc = _("Set Layer Boundary Size");
|
||||
help_page = "layers/dialogs/layer_boundary_size.html";
|
||||
help_page = GIMP_HELP_LAYER_RESIZE;
|
||||
break;
|
||||
|
||||
case ResizeImage:
|
||||
wmclass = "resize_image";
|
||||
window_title = _("Canvas Size");
|
||||
window_desc = _("Set Image Canvas Size");
|
||||
help_page = "dialogs/set_canvas_size.html";
|
||||
help_page = GIMP_HELP_IMAGE_RESIZE;
|
||||
break;
|
||||
}
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimppropwidgets.h"
|
||||
|
||||
#include "tips-dialog.h"
|
||||
|
@ -217,9 +218,8 @@ tips_dialog_create (Gimp *gimp)
|
|||
NULL);
|
||||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect (tips_dialog,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/tip_of_the_day.html");
|
||||
gimp_help_connect (tips_dialog, gimp_standard_help_func,
|
||||
GIMP_HELP_TIPS_DIALOG);
|
||||
|
||||
tips_set_labels (current_tip->data);
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpdnd.h"
|
||||
|
||||
#include "about-dialog.h"
|
||||
|
@ -241,7 +242,7 @@ about_dialog_create (void)
|
|||
gtk_window_set_resizable (GTK_WINDOW (about_dialog), FALSE);
|
||||
|
||||
gimp_help_connect (about_dialog, gimp_standard_help_func,
|
||||
"dialogs/about.html");
|
||||
GIMP_HELP_ABOUT_DIALOG);
|
||||
|
||||
g_signal_connect (about_dialog, "destroy",
|
||||
G_CALLBACK (about_dialog_destroy),
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpdatafactoryview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "brushes-menu.h"
|
||||
|
@ -45,22 +46,22 @@ GimpItemFactoryEntry brushes_menu_entries[] =
|
|||
data_new_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_BRUSH_NEW, NULL },
|
||||
{ { N_("/D_uplicate Brush"), NULL,
|
||||
data_duplicate_data_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_BRUSH_DUPLICATE, NULL },
|
||||
{ { N_("/_Edit Brush..."), NULL,
|
||||
data_edit_data_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_EDIT },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_BRUSH_EDIT, NULL },
|
||||
{ { N_("/_Delete Brush..."), NULL,
|
||||
data_delete_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_BRUSH_DELETE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
|
@ -68,7 +69,7 @@ GimpItemFactoryEntry brushes_menu_entries[] =
|
|||
data_refresh_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_REFRESH },
|
||||
NULL,
|
||||
NULL, NULL }
|
||||
GIMP_HELP_BRUSH_REFRESH, NULL }
|
||||
};
|
||||
|
||||
gint n_brushes_menu_entries = G_N_ELEMENTS (brushes_menu_entries);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "buffers-commands.h"
|
||||
|
@ -42,22 +43,22 @@ GimpItemFactoryEntry buffers_menu_entries[] =
|
|||
buffers_paste_buffer_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_PASTE },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_BUFFER_PASTE, NULL },
|
||||
{ { N_("/Paste Buffer _Into"), NULL,
|
||||
buffers_paste_buffer_into_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_PASTE_INTO },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_BUFFER_PASTE_INTO, NULL },
|
||||
{ { N_("/Paste Buffer as _New"), NULL,
|
||||
buffers_paste_buffer_as_new_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_PASTE_AS_NEW },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW, NULL },
|
||||
{ { N_("/_Delete Buffer"), NULL,
|
||||
buffers_delete_buffer_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
NULL, NULL }
|
||||
GIMP_HELP_BUFFER_DELETE, NULL }
|
||||
};
|
||||
|
||||
gint n_buffers_menu_entries = G_N_ELEMENTS (buffers_menu_entries);
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include "widgets/gimpcolorpanel.h"
|
||||
#include "widgets/gimpcomponenteditor.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
|
@ -80,8 +81,8 @@ static void channels_color_changed (GimpColorButton *button,
|
|||
/* public functions */
|
||||
|
||||
void
|
||||
channels_new_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_new_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -90,8 +91,8 @@ channels_new_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
channels_raise_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_raise_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -102,8 +103,8 @@ channels_raise_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
channels_lower_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_lower_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -114,8 +115,8 @@ channels_lower_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
channels_duplicate_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_duplicate_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *new_channel;
|
||||
|
@ -143,6 +144,11 @@ channels_duplicate_channel_cmd_callback (GtkWidget *widget,
|
|||
new_channel = gimp_channel_new_from_component (gimage, component,
|
||||
name, &color);
|
||||
|
||||
/* copied components are invisible by default so subsequent copies
|
||||
* of components don't affect each other
|
||||
*/
|
||||
gimp_drawable_set_visible (GIMP_DRAWABLE (new_channel), FALSE, FALSE);
|
||||
|
||||
g_free (name);
|
||||
}
|
||||
else
|
||||
|
@ -161,8 +167,8 @@ channels_duplicate_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
channels_delete_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -173,75 +179,66 @@ channels_delete_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
channels_channel_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
channels_channel_to_selection (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *channel;
|
||||
GimpImage *gimage;
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
GimpRGB color;
|
||||
GimpChannelType component;
|
||||
return_if_no_image (gimage, data);
|
||||
|
||||
gimp_rgba_set (&color, 0, 0, 0, 1);
|
||||
|
||||
component = GIMP_COMPONENT_EDITOR (data)->clicked_component;
|
||||
|
||||
channel = gimp_channel_new_from_component (gimage, component,
|
||||
"Component Copy",
|
||||
&color);
|
||||
gimp_image_mask_select_component (gimage, component,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (gimage, channel, data);
|
||||
|
||||
gimp_image_mask_select_channel (gimage, _("Channel to Selection"),
|
||||
channel, 0, 0,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
}
|
||||
|
||||
gimp_image_mask_select_channel (gimage,
|
||||
_("Channel to Selection"),
|
||||
channel,
|
||||
0, 0,
|
||||
op,
|
||||
FALSE, 0, 0);
|
||||
gimp_image_flush (gimage);
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
g_object_unref (channel);
|
||||
}
|
||||
|
||||
void
|
||||
channels_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
channels_channel_to_selection (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
channels_add_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
channels_channel_to_selection (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
channels_channel_to_selection (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
channels_channel_to_selection (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
channels_edit_channel_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
channels_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -372,7 +369,7 @@ channels_new_channel_query (GimpImage *gimage,
|
|||
GIMP_STOCK_CHANNEL,
|
||||
_("New Channel Options"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/channels/new_channel.html",
|
||||
GIMP_HELP_CHANNEL_NEW,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
@ -532,7 +529,7 @@ channels_edit_channel_query (GimpChannel *channel)
|
|||
GIMP_STOCK_EDIT,
|
||||
_("Edit Channel Attributes"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/channels/edit_channel_attributes.html",
|
||||
GIMP_HELP_CHANNEL_EDIT,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
|
|
@ -20,31 +20,31 @@
|
|||
#define __CHANNELS_COMMANDS_H__
|
||||
|
||||
|
||||
void channels_new_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_raise_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_lower_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_duplicate_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_delete_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_add_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_edit_channel_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_new_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_raise_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_lower_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_duplicate_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void channels_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void channels_new_channel_query (GimpImage *gimage,
|
||||
GimpChannel *template,
|
||||
gboolean interactive);
|
||||
void channels_edit_channel_query (GimpChannel *channel);
|
||||
void channels_new_channel_query (GimpImage *gimage,
|
||||
GimpChannel *template,
|
||||
gboolean interactive);
|
||||
void channels_edit_channel_query (GimpChannel *channel);
|
||||
|
||||
|
||||
#endif /* __CHANNELS_COMMANDS_H__ */
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "core/gimplist.h"
|
||||
|
||||
#include "widgets/gimpcomponenteditor.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
|
||||
|
@ -41,64 +42,61 @@
|
|||
GimpItemFactoryEntry channels_menu_entries[] =
|
||||
{
|
||||
{ { N_("/_New Channel..."), "<control>N",
|
||||
channels_new_channel_cmd_callback, 0,
|
||||
channels_new_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL,
|
||||
"dialogs/new_channel.html", NULL },
|
||||
GIMP_HELP_CHANNEL_NEW, NULL },
|
||||
{ { N_("/_Raise Channel"), "<control>F",
|
||||
channels_raise_channel_cmd_callback, 0,
|
||||
channels_raise_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_GO_UP },
|
||||
NULL,
|
||||
"raise_channel.html", NULL },
|
||||
GIMP_HELP_CHANNEL_RAISE, NULL },
|
||||
{ { N_("/_Lower Channel"), "<control>B",
|
||||
channels_lower_channel_cmd_callback, 0,
|
||||
channels_lower_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_GO_DOWN },
|
||||
NULL,
|
||||
"lower_channel.html", NULL },
|
||||
GIMP_HELP_CHANNEL_LOWER, NULL },
|
||||
{ { N_("/D_uplicate Channel"), "<control>C",
|
||||
channels_duplicate_channel_cmd_callback, 0,
|
||||
channels_duplicate_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
||||
NULL,
|
||||
"duplicate_channel.html", NULL },
|
||||
GIMP_HELP_CHANNEL_DUPLICATE, NULL },
|
||||
{ { N_("/_Delete Channel"), "<control>X",
|
||||
channels_delete_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
GIMP_HELP_CHANNEL_DELETE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
{ { N_("/Channel to Sele_ction"), "<control>S",
|
||||
channels_channel_to_sel_cmd_callback, 0,
|
||||
channels_selection_replace_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_REPLACE },
|
||||
NULL,
|
||||
"channel_to_selection.html", NULL },
|
||||
GIMP_HELP_CHANNEL_SEL_REPLACE, NULL },
|
||||
{ { N_("/_Add to Selection"), NULL,
|
||||
channels_add_channel_to_sel_cmd_callback, 0,
|
||||
channels_selection_add_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_ADD },
|
||||
NULL,
|
||||
"channel_to_selection.html#add", NULL },
|
||||
GIMP_HELP_CHANNEL_SEL_ADD, NULL },
|
||||
{ { N_("/_Subtract from Selection"), NULL,
|
||||
channels_sub_channel_from_sel_cmd_callback, 0,
|
||||
channels_selection_sub_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_SUBTRACT },
|
||||
NULL,
|
||||
"channel_to_selection.html#subtract", NULL },
|
||||
GIMP_HELP_CHANNEL_SEL_SUB, NULL },
|
||||
{ { N_("/_Intersect with Selection"), NULL,
|
||||
channels_intersect_channel_with_sel_cmd_callback, 0,
|
||||
channels_selection_intersect_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_INTERSECT },
|
||||
NULL,
|
||||
"channel_to_selection.html#intersect", NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
{ { N_("/_Delete Channel"), "<control>X",
|
||||
channels_delete_channel_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
"delete_channel.html", NULL },
|
||||
GIMP_HELP_CHANNEL_SEL_INTERSECT, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
{ { N_("/_Edit Channel Attributes..."), NULL,
|
||||
channels_edit_channel_attributes_cmd_callback, 0,
|
||||
channels_edit_attributes_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_EDIT },
|
||||
NULL,
|
||||
"dialogs/edit_channel_attributes.html", NULL }
|
||||
GIMP_HELP_CHANNEL_EDIT, NULL }
|
||||
};
|
||||
|
||||
gint n_channels_menu_entries = G_N_ELEMENTS (channels_menu_entries);
|
||||
|
@ -159,11 +157,13 @@ channels_menu_update (GtkItemFactory *factory,
|
|||
SET_SENSITIVE ("/Raise Channel", !fs && channel && prev);
|
||||
SET_SENSITIVE ("/Lower Channel", !fs && channel && next);
|
||||
SET_SENSITIVE ("/Duplicate Channel", !fs && (channel || component));
|
||||
SET_SENSITIVE ("/Delete Channel", !fs && channel);
|
||||
|
||||
SET_SENSITIVE ("/Channel to Selection", !fs && (channel || component));
|
||||
SET_SENSITIVE ("/Add to Selection", !fs && (channel || component));
|
||||
SET_SENSITIVE ("/Subtract from Selection", !fs && (channel || component));
|
||||
SET_SENSITIVE ("/Intersect with Selection", !fs && (channel || component));
|
||||
SET_SENSITIVE ("/Delete Channel", !fs && channel);
|
||||
|
||||
SET_SENSITIVE ("/Edit Channel Attributes...", !fs && channel);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include "display/gimpdisplay.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
|
||||
#include "dialogs.h"
|
||||
|
@ -192,7 +193,7 @@ edit_named_cut_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Cut Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/cut_named.html",
|
||||
GIMP_HELP_BUFFER_CUT,
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
G_OBJECT (gdisp->gimage), "disconnect",
|
||||
|
@ -210,7 +211,7 @@ edit_named_copy_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Copy Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/copy_named.html",
|
||||
GIMP_HELP_BUFFER_COPY,
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
G_OBJECT (gimage), "disconnect",
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "file/file-save.h"
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
|
@ -288,7 +289,7 @@ file_save_template_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Create New Template"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/new_template.html",
|
||||
GIMP_HELP_FILE_SAVE_AS_TEMPLATE,
|
||||
_("Enter a name for this template"),
|
||||
NULL,
|
||||
G_OBJECT (gdisp->gimage), "disconnect",
|
||||
|
@ -336,7 +337,7 @@ file_revert_cmd_callback (GtkWidget *widget,
|
|||
|
||||
query_box = gimp_query_boolean_box (_("Revert Image"),
|
||||
gimp_standard_help_func,
|
||||
"file/revert.html",
|
||||
GIMP_HELP_FILE_REVERT,
|
||||
GIMP_STOCK_QUESTION,
|
||||
text,
|
||||
GTK_STOCK_YES, GTK_STOCK_NO,
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "core/gimptemplate.h"
|
||||
|
||||
#include "widgets/gimpcontainermenuimpl.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimptemplateeditor.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
|
@ -97,7 +98,7 @@ file_new_dialog_new (Gimp *gimp)
|
|||
GIMP_STOCK_IMAGE,
|
||||
_("Create a New Image"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html",
|
||||
GIMP_HELP_FILE_NEW,
|
||||
|
||||
GIMP_STOCK_RESET, file_new_reset_callback,
|
||||
dialog, NULL, NULL, FALSE, FALSE,
|
||||
|
@ -290,7 +291,7 @@ file_new_confirm_dialog (FileNewDialog *dialog)
|
|||
dialog->confirm_dialog =
|
||||
gimp_query_boolean_box (_("Confirm Image Size"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
GIMP_HELP_FILE_NEW_CONFIRM,
|
||||
GIMP_STOCK_INFO,
|
||||
text,
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "file/file-open.h"
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpmenufactory.h"
|
||||
#include "widgets/gimppreview.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
@ -181,7 +182,7 @@ file_open_dialog_create (Gimp *gimp,
|
|||
"gimp-file-open-dialog",
|
||||
menu_factory, "<Load>",
|
||||
_("Open Image"), "open_image",
|
||||
"open/dialogs/file_open.html",
|
||||
GIMP_HELP_FILE_OPEN,
|
||||
G_CALLBACK (file_open_ok_callback));
|
||||
|
||||
fs = GTK_FILE_SELECTION (open_dialog);
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "file/file-save.h"
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
#include "widgets/gimpmenufactory.h"
|
||||
|
||||
|
@ -204,7 +205,7 @@ file_save_dialog_create (Gimp *gimp,
|
|||
"gimp-file-save-dialog",
|
||||
menu_factory, "<Save>",
|
||||
_("Save Image"), "save_image",
|
||||
"save/dialogs/file_save.html",
|
||||
GIMP_HELP_FILE_SAVE,
|
||||
G_CALLBACK (file_save_ok_callback));
|
||||
}
|
||||
|
||||
|
@ -296,7 +297,7 @@ file_save_overwrite (GtkWidget *save_dialog,
|
|||
|
||||
query_box = gimp_query_boolean_box (_("File Exists!"),
|
||||
gimp_standard_help_func,
|
||||
"save/file_exists.html",
|
||||
GIMP_HELP_FILE_SAVE_OVERWRITE,
|
||||
GIMP_STOCK_QUESTION,
|
||||
message,
|
||||
GTK_STOCK_YES, GTK_STOCK_NO,
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "gradients-commands.h"
|
||||
|
||||
|
@ -102,9 +103,8 @@ gradients_save_as_pov_query (GimpContainerEditor *editor)
|
|||
gradient,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect (GTK_WIDGET (filesel), gimp_standard_help_func,
|
||||
"dialogs/save_as_povray.html");
|
||||
GIMP_HELP_GRADIENT_SAVE_AS_POV);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (filesel));
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpdatafactoryview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "data-commands.h"
|
||||
|
@ -46,22 +47,22 @@ GimpItemFactoryEntry gradients_menu_entries[] =
|
|||
data_new_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_GRADIENT_NEW, NULL },
|
||||
{ { N_("/D_uplicate Gradient"), NULL,
|
||||
data_duplicate_data_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_GRADIENT_DUPLICATE, NULL },
|
||||
{ { N_("/_Edit Gradient..."), NULL,
|
||||
data_edit_data_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_EDIT },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_GRADIENT_EDIT, NULL },
|
||||
{ { N_("/_Delete Gradient..."), NULL,
|
||||
data_delete_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_GRADIENT_DELETE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
|
@ -69,7 +70,7 @@ GimpItemFactoryEntry gradients_menu_entries[] =
|
|||
data_refresh_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_REFRESH },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_GRADIENT_REFRESH, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
|
@ -77,7 +78,7 @@ GimpItemFactoryEntry gradients_menu_entries[] =
|
|||
gradients_save_as_pov_ray_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_SAVE_AS },
|
||||
NULL,
|
||||
NULL, NULL }
|
||||
GIMP_HELP_GRADIENT_SAVE_AS_POV, NULL }
|
||||
};
|
||||
|
||||
gint n_gradients_menu_entries = G_N_ELEMENTS (gradients_menu_entries);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimpimage-mask-select.h"
|
||||
#include "core/gimpimage-merge.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimplayer.h"
|
||||
|
@ -42,6 +43,7 @@
|
|||
#include "pdb/procedural_db.h"
|
||||
|
||||
#include "widgets/gimpenummenu.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
|
@ -365,8 +367,8 @@ layers_crop_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
layers_add_layer_mask_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
|
@ -376,8 +378,8 @@ layers_add_layer_mask_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
layers_apply_layer_mask_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_apply_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
|
@ -391,8 +393,8 @@ layers_apply_layer_mask_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
layers_delete_layer_mask_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
|
@ -405,36 +407,64 @@ layers_delete_layer_mask_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_select_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
static void
|
||||
layers_mask_to_selection (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
GimpLayerMask *mask;
|
||||
return_if_no_layer (gimage, active_layer, data);
|
||||
|
||||
if (gimp_layer_get_mask (active_layer))
|
||||
mask = gimp_layer_get_mask (active_layer);
|
||||
|
||||
if (mask)
|
||||
{
|
||||
gimp_image_mask_layer_mask (gimage, active_layer);
|
||||
gint off_x, off_y;
|
||||
|
||||
gimp_item_offsets (GIMP_ITEM (mask), &off_x, &off_y);
|
||||
|
||||
gimp_image_mask_select_channel (gimage,
|
||||
_("Layer Mask to Selection"),
|
||||
GIMP_CHANNEL (mask),
|
||||
off_x, off_y,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_select_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
return_if_no_layer (gimage, active_layer, data);
|
||||
|
||||
gimp_image_mask_layer_alpha (gimage, active_layer);
|
||||
gimp_image_flush (gimage);
|
||||
layers_mask_to_selection (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
layers_add_alpha_channel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
layers_mask_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_mask_to_selection (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_mask_to_selection (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_mask_to_selection (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
|
@ -447,6 +477,51 @@ layers_add_alpha_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
layers_alpha_to_selection (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *active_layer;
|
||||
return_if_no_layer (gimage, active_layer, data);
|
||||
|
||||
if (gimp_drawable_has_alpha (GIMP_DRAWABLE (active_layer)))
|
||||
{
|
||||
gimp_image_mask_select_alpha (gimage, active_layer,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_alpha_to_selection (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_alpha_to_selection (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_alpha_to_selection (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
layers_alpha_to_selection (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
layers_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
|
@ -620,7 +695,7 @@ layers_new_layer_query (GimpImage *gimage,
|
|||
GIMP_STOCK_LAYER,
|
||||
_("Create a New Layer"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers/new_layer.html",
|
||||
GIMP_HELP_LAYER_NEW,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
@ -794,7 +869,7 @@ layers_edit_layer_query (GimpLayer *layer)
|
|||
GIMP_STOCK_EDIT,
|
||||
_("Edit Layer Attributes"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers/edit_layer_attributes.html",
|
||||
GIMP_HELP_LAYER_EDIT,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
@ -902,7 +977,7 @@ layers_add_mask_query (GimpLayer *layer)
|
|||
GTK_STOCK_ADD,
|
||||
_("Add a Mask to the Layer"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers/add_layer_mask.html",
|
||||
GIMP_HELP_LAYER_MASK_ADD,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
|
|
@ -20,64 +20,77 @@
|
|||
#define __LAYERS_COMMANDS_H__
|
||||
|
||||
|
||||
void layers_select_previous_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_next_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_top_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_bottom_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_previous_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_next_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_top_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_select_bottom_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_raise_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_lower_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_raise_to_top_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_lower_to_bottom_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_raise_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_lower_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_raise_to_top_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_lower_to_bottom_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_new_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_duplicate_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_anchor_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_merge_down_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_delete_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_new_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_duplicate_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_anchor_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_merge_down_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_delete_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_resize_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_resize_to_image_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_scale_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_crop_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_resize_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_resize_to_image_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_scale_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_crop_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_add_layer_mask_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_apply_layer_mask_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_delete_layer_mask_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_select_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_add_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_apply_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_delete_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_selection_replace_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_selection_add_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_selection_sub_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_mask_selection_intersect_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_alpha_select_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_add_alpha_channel_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_edit_attributes_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_add_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_selection_replace_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_selection_add_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_selection_sub_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
void layers_alpha_selection_intersect_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_new_layer_query (GimpImage *gimage,
|
||||
GimpLayer *template,
|
||||
gboolean interactive);
|
||||
void layers_edit_layer_query (GimpLayer *layer);
|
||||
void layers_edit_attributes_cmd_callback (GtkWidget *widet,
|
||||
gpointer data);
|
||||
|
||||
void layers_new_layer_query (GimpImage *gimage,
|
||||
GimpLayer *template,
|
||||
gboolean interactive);
|
||||
void layers_edit_layer_query (GimpLayer *layer);
|
||||
|
||||
|
||||
#endif /* __LAYERS_COMMANDS_H__ */
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "core/gimplayer.h"
|
||||
#include "core/gimplist.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
|
||||
|
@ -44,49 +45,49 @@ GimpItemFactoryEntry layers_menu_entries[] =
|
|||
layers_new_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL,
|
||||
"dialogs/new_layer.html", NULL },
|
||||
GIMP_HELP_LAYER_NEW, NULL },
|
||||
|
||||
{ { N_("/_Raise Layer"), "<control>F",
|
||||
layers_raise_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_GO_UP },
|
||||
NULL,
|
||||
"stack/stack.html#raise_layer", NULL },
|
||||
GIMP_HELP_LAYER_RAISE, NULL },
|
||||
{ { N_("/Layer to _Top"), "<control><shift>F",
|
||||
layers_raise_to_top_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_GOTO_TOP },
|
||||
NULL,
|
||||
"stack/stack.html#later_to_top", NULL },
|
||||
GIMP_HELP_LAYER_RAISE_TO_TOP, NULL },
|
||||
{ { N_("/_Lower Layer"), "<control>B",
|
||||
layers_lower_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_GO_DOWN },
|
||||
NULL,
|
||||
"stack/stack.html#lower_layer", NULL },
|
||||
GIMP_HELP_LAYER_LOWER, NULL },
|
||||
{ { N_("/Layer to _Bottom"), "<control><shift>B",
|
||||
layers_lower_to_bottom_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_GOTO_BOTTOM },
|
||||
NULL,
|
||||
"stack/stack.html#layer_to_bottom", NULL },
|
||||
GIMP_HELP_LAYER_LOWER_TO_BOTTOM, NULL },
|
||||
|
||||
{ { N_("/D_uplicate Layer"), "<control>C",
|
||||
layers_duplicate_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
||||
NULL,
|
||||
"duplicate_layer.html", NULL },
|
||||
GIMP_HELP_LAYER_DUPLICATE, NULL },
|
||||
{ { N_("/_Anchor Layer"), "<control>H",
|
||||
layers_anchor_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_ANCHOR },
|
||||
NULL,
|
||||
"anchor_layer.html", NULL },
|
||||
GIMP_HELP_LAYER_ANCHOR, NULL },
|
||||
{ { N_("/Merge Do_wn"), "<control><shift>M",
|
||||
layers_merge_down_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_MERGE_DOWN },
|
||||
NULL,
|
||||
"merge_down.html", NULL },
|
||||
GIMP_HELP_LAYER_MERGE_DOWN, NULL },
|
||||
{ { N_("/_Delete Layer"), "<control>X",
|
||||
layers_delete_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
"delete_layer.html", NULL },
|
||||
GIMP_HELP_LAYER_DELETE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
|
@ -94,50 +95,50 @@ GimpItemFactoryEntry layers_menu_entries[] =
|
|||
layers_resize_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_RESIZE },
|
||||
NULL,
|
||||
"dialogs/layer_boundary_size.html", NULL },
|
||||
GIMP_HELP_LAYER_RESIZE, NULL },
|
||||
{ { N_("/Layer to _Imagesize"), NULL,
|
||||
layers_resize_to_image_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_LAYER_TO_IMAGESIZE },
|
||||
NULL,
|
||||
"layer_to_image_size.html", NULL },
|
||||
GIMP_HELP_LAYER_RESIZE_TO_IMAGE, NULL },
|
||||
{ { N_("/_Scale Layer..."), "<control>S",
|
||||
layers_scale_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SCALE },
|
||||
NULL,
|
||||
"dialogs/scale_layer.html", NULL },
|
||||
GIMP_HELP_LAYER_SCALE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
{ { N_("/Add La_yer Mask..."), NULL,
|
||||
layers_add_layer_mask_cmd_callback, 0 },
|
||||
layers_mask_add_cmd_callback, 0 },
|
||||
NULL,
|
||||
"dialogs/add_layer_mask.html", NULL },
|
||||
GIMP_HELP_LAYER_MASK_ADD, NULL },
|
||||
{ { N_("/Apply Layer _Mask"), NULL,
|
||||
layers_apply_layer_mask_cmd_callback, 0 },
|
||||
layers_mask_apply_cmd_callback, 0 },
|
||||
NULL,
|
||||
"apply_mask.html", NULL },
|
||||
GIMP_HELP_LAYER_MASK_APPLY, NULL },
|
||||
{ { N_("/Delete Layer Mas_k"), NULL,
|
||||
layers_delete_layer_mask_cmd_callback, 0,
|
||||
layers_mask_delete_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
"delete_mask.html", NULL },
|
||||
GIMP_HELP_LAYER_MASK_DELETE , NULL },
|
||||
{ { N_("/Mask to Sele_ction"), NULL,
|
||||
layers_mask_select_cmd_callback, 0,
|
||||
layers_mask_selection_replace_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_REPLACE },
|
||||
NULL,
|
||||
"mask_to_selection.html", NULL },
|
||||
GIMP_HELP_LAYER_MASK_SEL_REPLACE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
{ { N_("/Add Alpha C_hannel"), NULL,
|
||||
layers_add_alpha_channel_cmd_callback, 0 },
|
||||
layers_alpha_add_cmd_callback, 0 },
|
||||
NULL,
|
||||
"add_alpha_channel.html", NULL },
|
||||
GIMP_HELP_LAYER_ALPHA_ADD, NULL },
|
||||
{ { N_("/Al_pha to Selection"), NULL,
|
||||
layers_alpha_select_cmd_callback, 0,
|
||||
layers_alpha_selection_replace_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_REPLACE },
|
||||
NULL,
|
||||
"alpha_to_selection.html", NULL },
|
||||
GIMP_HELP_LAYER_ALPHA_SEL_REPLACE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
|
@ -145,7 +146,7 @@ GimpItemFactoryEntry layers_menu_entries[] =
|
|||
layers_edit_attributes_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_EDIT },
|
||||
NULL,
|
||||
"dialogs/edit_layer_attributes.html", NULL }
|
||||
GIMP_HELP_LAYER_EDIT, NULL }
|
||||
};
|
||||
|
||||
gint n_layers_menu_entries = G_N_ELEMENTS (layers_menu_entries);
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimp.h"
|
||||
#include "core/gimpmodules.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
#include "module-browser.h"
|
||||
|
@ -122,7 +123,7 @@ module_browser_new (Gimp *gimp)
|
|||
GTK_STOCK_EXECUTE,
|
||||
_("Manage Loadable Modules"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/module_manager.html",
|
||||
GIMP_HELP_MODULE_DIALOG,
|
||||
|
||||
GTK_STOCK_REFRESH, browser_refresh_callback,
|
||||
browser, NULL, NULL, FALSE, FALSE,
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimplayermask.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
#include "offset-dialog.h"
|
||||
|
@ -103,7 +104,7 @@ offset_dialog_create (GimpDrawable *drawable)
|
|||
GIMP_STOCK_TOOL_MOVE,
|
||||
title,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/offset.html",
|
||||
GIMP_HELP_LAYER_OFFSET,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, (gpointer) 1, NULL, FALSE, TRUE,
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpdatafactoryview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "data-commands.h"
|
||||
|
@ -46,22 +47,22 @@ GimpItemFactoryEntry palettes_menu_entries[] =
|
|||
data_new_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PALETTE_NEW, NULL },
|
||||
{ { N_("/D_uplicate Palette"), NULL,
|
||||
data_duplicate_data_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PALETTE_DUPLICATE, NULL },
|
||||
{ { N_("/_Edit Palette..."), NULL,
|
||||
data_edit_data_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_EDIT },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PALETTE_EDIT, NULL },
|
||||
{ { N_("/_Delete Palette..."), NULL,
|
||||
data_delete_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PALETTE_DELETE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
|
@ -69,7 +70,7 @@ GimpItemFactoryEntry palettes_menu_entries[] =
|
|||
data_refresh_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_REFRESH },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PALETTE_REFRESH, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
|
@ -77,11 +78,11 @@ GimpItemFactoryEntry palettes_menu_entries[] =
|
|||
palettes_import_palette_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_CONVERT },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PALETTE_IMPORT, NULL },
|
||||
{ { N_("/_Merge Palettes..."), NULL,
|
||||
palettes_merge_palettes_cmd_callback, 0 },
|
||||
NULL,
|
||||
NULL, NULL }
|
||||
GIMP_HELP_PALETTE_MERGE, NULL }
|
||||
};
|
||||
|
||||
gint n_palettes_menu_entries = G_N_ELEMENTS (palettes_menu_entries);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpdatafactoryview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "data-commands.h"
|
||||
|
@ -45,22 +46,22 @@ GimpItemFactoryEntry patterns_menu_entries[] =
|
|||
data_new_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PATTERN_NEW, NULL },
|
||||
{ { N_("/Duplicate Pattern"), NULL,
|
||||
data_duplicate_data_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PATTERN_DUPLICATE, NULL },
|
||||
{ { N_("/Edit Pattern..."), NULL,
|
||||
data_edit_data_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_EDIT },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PATTERN_EDIT, NULL },
|
||||
{ { N_("/Delete Pattern..."), NULL,
|
||||
data_delete_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
NULL, NULL },
|
||||
GIMP_HELP_PATTERN_DELETE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
|
@ -68,7 +69,7 @@ GimpItemFactoryEntry patterns_menu_entries[] =
|
|||
data_refresh_data_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_REFRESH },
|
||||
NULL,
|
||||
NULL, NULL }
|
||||
GIMP_HELP_PATTERN_REFRESH, NULL }
|
||||
};
|
||||
|
||||
gint n_patterns_menu_entries = G_N_ELEMENTS (patterns_menu_entries);
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "core/gimplayer.h"
|
||||
|
||||
#include "widgets/gimpenummenu.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
#include "resize-dialog.h"
|
||||
|
@ -192,7 +193,7 @@ resize_widget_new (GimpViewable *viewable,
|
|||
wmclass = "scale_layer";
|
||||
window_title = _("Scale Layer");
|
||||
window_desc = _("Scale Layer Options");
|
||||
help_page = "layers/dialogs/scale_layer.html";
|
||||
help_page = GIMP_HELP_LAYER_SCALE;
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
break;
|
||||
|
||||
|
@ -200,7 +201,7 @@ resize_widget_new (GimpViewable *viewable,
|
|||
wmclass = "scale_image";
|
||||
window_title = _("Scale Image");
|
||||
window_desc = _("Scale Image Options");
|
||||
help_page = "dialogs/scale_image.html";
|
||||
help_page = GIMP_HELP_IMAGE_SCALE;
|
||||
frame = gtk_frame_new (_("Pixel Dimensions"));
|
||||
break;
|
||||
}
|
||||
|
@ -215,14 +216,14 @@ resize_widget_new (GimpViewable *viewable,
|
|||
wmclass = "resize_layer";
|
||||
window_title = _("Layer Boundary Size");
|
||||
window_desc = _("Set Layer Boundary Size");
|
||||
help_page = "layers/dialogs/layer_boundary_size.html";
|
||||
help_page = GIMP_HELP_LAYER_RESIZE;
|
||||
break;
|
||||
|
||||
case ResizeImage:
|
||||
wmclass = "resize_image";
|
||||
window_title = _("Canvas Size");
|
||||
window_desc = _("Set Image Canvas Size");
|
||||
help_page = "dialogs/set_canvas_size.html";
|
||||
help_page = GIMP_HELP_IMAGE_RESIZE;
|
||||
break;
|
||||
}
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimpimage-qmask.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
|
@ -147,7 +148,7 @@ select_feather_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Feather Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/feather_selection.html",
|
||||
GIMP_HELP_SELECT_FEATHER,
|
||||
_("Feather Selection by:"),
|
||||
selection_feather_radius, 0, 32767, 3,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -182,7 +183,7 @@ select_shrink_cmd_callback (GtkWidget *widget,
|
|||
shrink_dialog =
|
||||
gimp_query_size_box (_("Shrink Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/shrink_selection.html",
|
||||
GIMP_HELP_SELECT_SHRINK,
|
||||
_("Shrink Selection by:"),
|
||||
selection_shrink_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -215,7 +216,7 @@ select_grow_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Grow Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/grow_selection.html",
|
||||
GIMP_HELP_SELECT_GROW,
|
||||
_("Grow Selection by:"),
|
||||
selection_grow_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -237,7 +238,7 @@ select_border_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Border Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/border_selection.html",
|
||||
GIMP_HELP_SELECT_BORDER,
|
||||
_("Border Selection by:"),
|
||||
selection_border_radius, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "templates-commands.h"
|
||||
|
@ -42,23 +43,28 @@ GimpItemFactoryEntry templates_menu_entries[] =
|
|||
{ { N_("/_New Template..."), "",
|
||||
templates_new_template_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL, NULL, NULL },
|
||||
NULL,
|
||||
GIMP_HELP_TEMPLATE_NEW, NULL },
|
||||
{ { N_("/D_uplicate Template..."), "",
|
||||
templates_duplicate_template_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
||||
NULL, NULL, NULL },
|
||||
NULL,
|
||||
GIMP_HELP_TEMPLATE_DUPLICATE, NULL },
|
||||
{ { N_("/_Edit Template..."), "",
|
||||
templates_edit_template_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_EDIT },
|
||||
NULL, NULL, NULL },
|
||||
NULL,
|
||||
GIMP_HELP_TEMPLATE_EDIT, NULL },
|
||||
{ { N_("/_Create Image from Template..."), "",
|
||||
templates_create_image_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_IMAGE },
|
||||
NULL, NULL, NULL },
|
||||
NULL,
|
||||
GIMP_HELP_TEMPLATE_IMAGE_NEW, NULL },
|
||||
{ { N_("/_Delete Template..."), "",
|
||||
templates_delete_template_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL, NULL, NULL }
|
||||
NULL,
|
||||
GIMP_HELP_TEMPLATE_DELETE, NULL }
|
||||
};
|
||||
|
||||
gint n_templates_menu_entries = G_N_ELEMENTS (templates_menu_entries);
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimppropwidgets.h"
|
||||
|
||||
#include "tips-dialog.h"
|
||||
|
@ -217,9 +218,8 @@ tips_dialog_create (Gimp *gimp)
|
|||
NULL);
|
||||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect (tips_dialog,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/tip_of_the_day.html");
|
||||
gimp_help_connect (tips_dialog, gimp_standard_help_func,
|
||||
GIMP_HELP_TIPS_DIALOG);
|
||||
|
||||
tips_set_labels (current_tip->data);
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "plug-in/plug-ins.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "debug-commands.h"
|
||||
|
@ -51,12 +52,12 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
file_new_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL,
|
||||
"file/dialogs/file_new.html", NULL },
|
||||
GIMP_HELP_FILE_NEW, NULL },
|
||||
{ { N_("/File/_Open..."), "<control>O",
|
||||
file_open_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
NULL,
|
||||
"file/dialogs/file_open.html", NULL },
|
||||
GIMP_HELP_FILE_OPEN, NULL },
|
||||
|
||||
/* <Toolbox>/File/Open Recent */
|
||||
|
||||
|
@ -71,7 +72,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
"gimp-document-list",
|
||||
"file/dialogs/document_index.html", NULL },
|
||||
GIMP_HELP_DOCUMENT_DIALOG, NULL },
|
||||
|
||||
/* <Toolbox>/File/Acquire */
|
||||
|
||||
|
@ -83,7 +84,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_toplevel_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_PREFERENCES },
|
||||
"gimp-preferences-dialog",
|
||||
"file/dialogs/preferences/preferences.html", NULL },
|
||||
GIMP_HELP_PREFERENCES_DIALOG, NULL },
|
||||
|
||||
/* <Toolbox>/File/Dialogs */
|
||||
|
||||
|
@ -94,7 +95,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
{ { N_("/File/Dialogs/Create New Dock/_Layers, Channels & Paths..."), NULL,
|
||||
dialogs_create_lc_cmd_callback, 0 },
|
||||
NULL,
|
||||
"file/dialogs/layers_and_channels.html", NULL },
|
||||
NULL, NULL },
|
||||
{ { N_("/File/Dialogs/Create New Dock/_Brushes, Patterns & Gradients..."), NULL,
|
||||
dialogs_create_data_cmd_callback, 0 },
|
||||
NULL,
|
||||
|
@ -108,12 +109,12 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_OPTIONS },
|
||||
"gimp-tool-options",
|
||||
"file/dialogs/tool_options.html", NULL },
|
||||
GIMP_HELP_TOOL_OPTIONS_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Device Status..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DEVICE_STATUS },
|
||||
"gimp-device-status",
|
||||
"file/dialogs/device_status.html", NULL },
|
||||
GIMP_HELP_DEVICE_STATUS_DIALOG, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Dialogs/---"),
|
||||
|
||||
|
@ -136,22 +137,22 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_INDEXED_PALETTE },
|
||||
"gimp-indexed-palette",
|
||||
"file/dialogs/indexed_palette.html", NULL },
|
||||
GIMP_HELP_INDEXED_PALETTE_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Selection Editor..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_RECT_SELECT },
|
||||
"gimp-selection-editor",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_SELECT_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/Na_vigation..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_NAVIGATION },
|
||||
"gimp-navigation-view",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_NAVIGATION_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Undo History..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_UNDO_HISTORY },
|
||||
"gimp-undo-history",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_UNDO_DIALOG, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Dialogs/---"),
|
||||
|
||||
|
@ -164,32 +165,32 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_PAINTBRUSH },
|
||||
"gimp-brush-grid",
|
||||
"file/dialogs/brush_selection.html", NULL },
|
||||
GIMP_HELP_BRUSH_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/P_atterns..."), "<control><shift>P",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
|
||||
"gimp-pattern-grid",
|
||||
"file/dialogs/pattern_selection.html", NULL },
|
||||
GIMP_HELP_PATTERN_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Gradients..."), "<control>G",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_BLEND },
|
||||
"gimp-gradient-list",
|
||||
"file/dialogs/gradient_selection.html", NULL },
|
||||
GIMP_HELP_GRADIENT_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/Pal_ettes..."), "<control>P",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_SELECT_COLOR },
|
||||
"gimp-palette-list",
|
||||
"file/dialogs/palette_selection.html", NULL },
|
||||
GIMP_HELP_PALETTE_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Fonts..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_SELECT_FONT },
|
||||
"gimp-font-list",
|
||||
"file/dialogs/font_selection.html", NULL },
|
||||
GIMP_HELP_FONT_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Buffers..."), "foo",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_PASTE },
|
||||
"gimp-buffer-list",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_BUFFER_DIALOG, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Dialogs/---"),
|
||||
|
||||
|
@ -197,22 +198,22 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_IMAGES },
|
||||
"gimp-image-list",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_IMAGE_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/Document Histor_y..."), "",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
"gimp-document-list",
|
||||
"file/dialogs/document_index.html", NULL },
|
||||
GIMP_HELP_DOCUMENT_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Templates..."), "",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TEMPLATE },
|
||||
"gimp-template-list",
|
||||
"file/dialogs/templates.html", NULL },
|
||||
GIMP_HELP_TEMPLATE_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/Error Co_nsole..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_WARNING },
|
||||
"gimp-error-console",
|
||||
"file/dialogs/error_console.html", NULL },
|
||||
GIMP_HELP_ERROR_DIALOG, NULL },
|
||||
|
||||
#ifdef ENABLE_DEBUG_ENTRIES
|
||||
MENU_BRANCH (N_("/File/D_ebug")),
|
||||
|
@ -231,7 +232,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
file_quit_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_QUIT },
|
||||
NULL,
|
||||
"file/quit.html", NULL },
|
||||
GIMP_HELP_FILE_QUIT, NULL },
|
||||
|
||||
/* <Toolbox>/Xtns */
|
||||
|
||||
|
@ -240,7 +241,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
{ { N_("/Xtns/_Module Manager..."), NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp-module-manager-dialog",
|
||||
"dialogs/module_manager.html", NULL },
|
||||
GIMP_HELP_MODULE_DIALOG, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/Xtns/---"),
|
||||
|
||||
|
@ -252,22 +253,22 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
help_help_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_HELP },
|
||||
NULL,
|
||||
"help/dialogs/help.html", NULL },
|
||||
GIMP_HELP_HELP, NULL },
|
||||
{ { N_("/Help/_Context Help..."), "<shift>F1",
|
||||
help_context_help_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_HELP },
|
||||
NULL,
|
||||
"help/context_help.html", NULL },
|
||||
GIMP_HELP_HELP_CONTEXT, NULL },
|
||||
{ { N_("/Help/_Tip of the Day..."), NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_INFO },
|
||||
"gimp-tips-dialog",
|
||||
"help/dialogs/tip_of_the_day.html", NULL },
|
||||
GIMP_HELP_TIPS_DIALOG, NULL },
|
||||
{ { N_("/Help/_About..."), NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_WILBER },
|
||||
"gimp-about-dialog",
|
||||
"help/dialogs/about.html", NULL }
|
||||
GIMP_HELP_ABOUT_DIALOG, NULL }
|
||||
};
|
||||
|
||||
gint n_toolbox_menu_entries = G_N_ELEMENTS (toolbox_menu_entries);
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
|
||||
#include "vectors/gimpvectors.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
|
@ -83,8 +84,8 @@
|
|||
/* public functions */
|
||||
|
||||
void
|
||||
vectors_new_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_new_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -93,8 +94,8 @@ vectors_new_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_raise_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_raise_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -105,8 +106,8 @@ vectors_raise_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_lower_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_lower_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -117,8 +118,8 @@ vectors_lower_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_duplicate_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_duplicate_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -133,8 +134,8 @@ vectors_duplicate_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_delete_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -145,9 +146,9 @@ vectors_delete_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
vectors_vectors_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
vectors_vectors_to_selection (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -162,36 +163,36 @@ vectors_vectors_to_sel (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
vectors_vectors_to_selection (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_add_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
vectors_vectors_to_selection (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget,
|
||||
vectors_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_selection (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_selection (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_selection_to_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_intersect_vectors_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_sel_to_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -200,8 +201,8 @@ vectors_sel_to_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_stroke_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_stroke_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -211,8 +212,8 @@ vectors_stroke_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_copy_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_copy_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -224,8 +225,8 @@ vectors_copy_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_paste_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_paste_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -236,8 +237,8 @@ vectors_paste_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_import_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_import_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
@ -248,8 +249,8 @@ vectors_import_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_export_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_export_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -272,8 +273,8 @@ vectors_vectors_tool_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
vectors_edit_vectors_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
vectors_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -482,7 +483,7 @@ vectors_new_vectors_query (GimpImage *gimage,
|
|||
GIMP_STOCK_TOOL_PATH,
|
||||
_("New Path Options"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/vectors/new_vectors.html",
|
||||
GIMP_HELP_PATH_NEW,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
@ -597,7 +598,7 @@ vectors_edit_vectors_query (GimpVectors *vectors)
|
|||
GIMP_STOCK_EDIT,
|
||||
_("Edit Path Attributes"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/paths/edit_path_attributes.html",
|
||||
GIMP_HELP_PATH_EDIT,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
|
|
@ -20,49 +20,49 @@
|
|||
#define __VECTORS_COMMANDS_H__
|
||||
|
||||
|
||||
void vectors_new_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_raise_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_lower_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_duplicate_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_delete_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_add_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_intersect_vectors_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_sel_to_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_stroke_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_copy_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_paste_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_import_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_export_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_vectors_tool_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_edit_vectors_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_new_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_raise_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_lower_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_duplicate_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_delete_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_replace_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_add_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_sub_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_intersect_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_selection_to_vectors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_stroke_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_copy_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_paste_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_import_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_export_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_vectors_tool_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void vectors_edit_attributes_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void vectors_stroke_vectors (GimpVectors *vectors);
|
||||
void vectors_selection_to_vectors (GimpImage *gimage,
|
||||
gboolean advanced);
|
||||
void vectors_vectors_tool (GimpVectors *vectors);
|
||||
void vectors_new_vectors_query (GimpImage *gimage,
|
||||
GimpVectors *template,
|
||||
gboolean interactive);
|
||||
void vectors_edit_vectors_query (GimpVectors *vectors);
|
||||
void vectors_stroke_vectors (GimpVectors *vectors);
|
||||
void vectors_selection_to_vectors (GimpImage *gimage,
|
||||
gboolean advanced);
|
||||
void vectors_vectors_tool (GimpVectors *vectors);
|
||||
void vectors_new_vectors_query (GimpImage *gimage,
|
||||
GimpVectors *template,
|
||||
gboolean interactive);
|
||||
void vectors_edit_vectors_query (GimpVectors *vectors);
|
||||
|
||||
|
||||
#endif /* __VECTORS_COMMANDS_H__ */
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimplist.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
|
||||
|
@ -41,91 +42,88 @@
|
|||
GimpItemFactoryEntry vectors_menu_entries[] =
|
||||
{
|
||||
{ { N_("/_New Path..."), "<control>N",
|
||||
vectors_new_vectors_cmd_callback, 0,
|
||||
vectors_new_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL,
|
||||
"new_path.html", NULL },
|
||||
GIMP_HELP_PATH_NEW, NULL },
|
||||
{ { N_("/_Raise Path"), "<control>F",
|
||||
vectors_raise_vectors_cmd_callback, 0,
|
||||
vectors_raise_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_GO_UP },
|
||||
NULL,
|
||||
"raise_path.html", NULL },
|
||||
GIMP_HELP_PATH_RAISE, NULL },
|
||||
{ { N_("/_Lower Path"), "<control>B",
|
||||
vectors_lower_vectors_cmd_callback, 0,
|
||||
vectors_lower_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_GO_DOWN },
|
||||
NULL,
|
||||
"lower_path.html", NULL },
|
||||
GIMP_HELP_PATH_LOWER, NULL },
|
||||
{ { N_("/D_uplicate Path"), "<control>U",
|
||||
vectors_duplicate_vectors_cmd_callback, 0,
|
||||
vectors_duplicate_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DUPLICATE },
|
||||
NULL,
|
||||
"duplicate_path.html", NULL },
|
||||
GIMP_HELP_PATH_DUPLICATE, NULL },
|
||||
{ { N_("/_Delete Path"), "<control>X",
|
||||
vectors_delete_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
GIMP_HELP_PATH_DELETE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
{ { N_("/Path to Sele_ction"), "<control>S",
|
||||
vectors_vectors_to_sel_cmd_callback, 0,
|
||||
vectors_selection_replace_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_REPLACE },
|
||||
NULL,
|
||||
"path_to_selection.html", NULL },
|
||||
GIMP_HELP_PATH_SEL_REPLACE, NULL },
|
||||
{ { N_("/_Add to Selection"), NULL,
|
||||
vectors_add_vectors_to_sel_cmd_callback, 0,
|
||||
vectors_selection_add_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_ADD },
|
||||
NULL,
|
||||
"path_to_selection.html#add", NULL },
|
||||
GIMP_HELP_PATH_SEL_ADD, NULL },
|
||||
{ { N_("/_Subtract from Selection"), NULL,
|
||||
vectors_sub_vectors_from_sel_cmd_callback, 0,
|
||||
vectors_selection_sub_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_SUBTRACT },
|
||||
NULL,
|
||||
"path_to_selection.html#subtract", NULL },
|
||||
GIMP_HELP_PATH_SEL_SUB, NULL },
|
||||
{ { N_("/_Intersect with Selection"), NULL,
|
||||
vectors_intersect_vectors_with_sel_cmd_callback, 0,
|
||||
vectors_selection_intersect_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_INTERSECT },
|
||||
NULL,
|
||||
"path_to_selection.html#intersect", NULL },
|
||||
GIMP_HELP_PATH_SEL_INTERSECT, NULL },
|
||||
|
||||
{ { N_("/Selecti_on to Path"), "<control>P",
|
||||
vectors_sel_to_vectors_cmd_callback, 0,
|
||||
vectors_selection_to_vectors_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_SELECTION_TO_PATH },
|
||||
NULL,
|
||||
"filters/sel2path.html", NULL },
|
||||
{ { N_("/Stro_ke Path"), "<control>T",
|
||||
vectors_stroke_vectors_cmd_callback, 0,
|
||||
vectors_stroke_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_PATH_STROKE },
|
||||
NULL,
|
||||
"stroke_path.html", NULL },
|
||||
GIMP_HELP_PATH_STROKE, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
{ { N_("/Co_py Path"), "<control>C",
|
||||
vectors_copy_vectors_cmd_callback, 0,
|
||||
vectors_copy_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_COPY },
|
||||
NULL,
|
||||
"copy_path.html", NULL },
|
||||
GIMP_HELP_PATH_COPY, NULL },
|
||||
|
||||
{ { N_("/Paste Pat_h"), "<control>V",
|
||||
vectors_paste_vectors_cmd_callback, 0,
|
||||
vectors_paste_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_PASTE },
|
||||
NULL,
|
||||
"paste_path.html", NULL },
|
||||
GIMP_HELP_PATH_PASTE, NULL },
|
||||
{ { N_("/I_mport Path..."), "<control>I",
|
||||
vectors_import_vectors_cmd_callback, 0,
|
||||
vectors_import_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
NULL,
|
||||
"dialogs/import_path.html", NULL },
|
||||
GIMP_HELP_PATH_IMPORT, NULL },
|
||||
{ { N_("/E_xport Path..."), "<control>E",
|
||||
vectors_export_vectors_cmd_callback, 0,
|
||||
vectors_export_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_SAVE },
|
||||
NULL,
|
||||
"dialogs/export_path.html", NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
{ { N_("/_Delete Path"), "<control>X",
|
||||
vectors_delete_vectors_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_DELETE },
|
||||
NULL,
|
||||
"delete_path.html", NULL },
|
||||
GIMP_HELP_PATH_EXPORT, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/---"),
|
||||
|
||||
|
@ -133,12 +131,12 @@ GimpItemFactoryEntry vectors_menu_entries[] =
|
|||
vectors_vectors_tool_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_PATH },
|
||||
NULL,
|
||||
"tools/path_tool.html", NULL },
|
||||
GIMP_HELP_TOOL_VECTORS, NULL },
|
||||
{ { N_("/_Edit Path Attributes..."), NULL,
|
||||
vectors_edit_vectors_attributes_cmd_callback, 0,
|
||||
vectors_edit_attributes_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_EDIT },
|
||||
NULL,
|
||||
"dialogs/edit_path_attributes.html", NULL }
|
||||
GIMP_HELP_PATH_EDIT, NULL }
|
||||
};
|
||||
|
||||
gint n_vectors_menu_entries = G_N_ELEMENTS (vectors_menu_entries);
|
||||
|
@ -187,18 +185,23 @@ vectors_menu_update (GtkItemFactory *factory,
|
|||
SET_SENSITIVE ("/Raise Path", vectors && prev);
|
||||
SET_SENSITIVE ("/Lower Path", vectors && next);
|
||||
SET_SENSITIVE ("/Duplicate Path", vectors);
|
||||
SET_SENSITIVE ("/Delete Path", vectors);
|
||||
|
||||
SET_SENSITIVE ("/Path to Selection", vectors);
|
||||
SET_SENSITIVE ("/Add to Selection", vectors);
|
||||
SET_SENSITIVE ("/Subtract from Selection", vectors);
|
||||
SET_SENSITIVE ("/Intersect with Selection", vectors);
|
||||
|
||||
SET_SENSITIVE ("/Selection to Path", ! mask_empty);
|
||||
SET_SENSITIVE ("/Stroke Path", vectors);
|
||||
SET_SENSITIVE ("/Delete Path", vectors);
|
||||
|
||||
SET_SENSITIVE ("/Copy Path", vectors);
|
||||
SET_SENSITIVE ("/Paste Path", global_buf);
|
||||
SET_SENSITIVE ("/Import Path...", gimage);
|
||||
SET_SENSITIVE ("/Export Path...", vectors);
|
||||
|
||||
SET_SENSITIVE ("/Path Tool", vectors);
|
||||
|
||||
SET_SENSITIVE ("/Edit Path Attributes...", vectors);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "plug-in/plug-ins.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "debug-commands.h"
|
||||
|
@ -51,12 +52,12 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
file_new_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_NEW },
|
||||
NULL,
|
||||
"file/dialogs/file_new.html", NULL },
|
||||
GIMP_HELP_FILE_NEW, NULL },
|
||||
{ { N_("/File/_Open..."), "<control>O",
|
||||
file_open_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
NULL,
|
||||
"file/dialogs/file_open.html", NULL },
|
||||
GIMP_HELP_FILE_OPEN, NULL },
|
||||
|
||||
/* <Toolbox>/File/Open Recent */
|
||||
|
||||
|
@ -71,7 +72,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
"gimp-document-list",
|
||||
"file/dialogs/document_index.html", NULL },
|
||||
GIMP_HELP_DOCUMENT_DIALOG, NULL },
|
||||
|
||||
/* <Toolbox>/File/Acquire */
|
||||
|
||||
|
@ -83,7 +84,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_toplevel_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_PREFERENCES },
|
||||
"gimp-preferences-dialog",
|
||||
"file/dialogs/preferences/preferences.html", NULL },
|
||||
GIMP_HELP_PREFERENCES_DIALOG, NULL },
|
||||
|
||||
/* <Toolbox>/File/Dialogs */
|
||||
|
||||
|
@ -94,7 +95,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
{ { N_("/File/Dialogs/Create New Dock/_Layers, Channels & Paths..."), NULL,
|
||||
dialogs_create_lc_cmd_callback, 0 },
|
||||
NULL,
|
||||
"file/dialogs/layers_and_channels.html", NULL },
|
||||
NULL, NULL },
|
||||
{ { N_("/File/Dialogs/Create New Dock/_Brushes, Patterns & Gradients..."), NULL,
|
||||
dialogs_create_data_cmd_callback, 0 },
|
||||
NULL,
|
||||
|
@ -108,12 +109,12 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_OPTIONS },
|
||||
"gimp-tool-options",
|
||||
"file/dialogs/tool_options.html", NULL },
|
||||
GIMP_HELP_TOOL_OPTIONS_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Device Status..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_DEVICE_STATUS },
|
||||
"gimp-device-status",
|
||||
"file/dialogs/device_status.html", NULL },
|
||||
GIMP_HELP_DEVICE_STATUS_DIALOG, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Dialogs/---"),
|
||||
|
||||
|
@ -136,22 +137,22 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_INDEXED_PALETTE },
|
||||
"gimp-indexed-palette",
|
||||
"file/dialogs/indexed_palette.html", NULL },
|
||||
GIMP_HELP_INDEXED_PALETTE_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Selection Editor..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_RECT_SELECT },
|
||||
"gimp-selection-editor",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_SELECT_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/Na_vigation..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_NAVIGATION },
|
||||
"gimp-navigation-view",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_NAVIGATION_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Undo History..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_UNDO_HISTORY },
|
||||
"gimp-undo-history",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_UNDO_DIALOG, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Dialogs/---"),
|
||||
|
||||
|
@ -164,32 +165,32 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_PAINTBRUSH },
|
||||
"gimp-brush-grid",
|
||||
"file/dialogs/brush_selection.html", NULL },
|
||||
GIMP_HELP_BRUSH_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/P_atterns..."), "<control><shift>P",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
|
||||
"gimp-pattern-grid",
|
||||
"file/dialogs/pattern_selection.html", NULL },
|
||||
GIMP_HELP_PATTERN_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Gradients..."), "<control>G",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_BLEND },
|
||||
"gimp-gradient-list",
|
||||
"file/dialogs/gradient_selection.html", NULL },
|
||||
GIMP_HELP_GRADIENT_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/Pal_ettes..."), "<control>P",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_SELECT_COLOR },
|
||||
"gimp-palette-list",
|
||||
"file/dialogs/palette_selection.html", NULL },
|
||||
GIMP_HELP_PALETTE_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Fonts..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_SELECT_FONT },
|
||||
"gimp-font-list",
|
||||
"file/dialogs/font_selection.html", NULL },
|
||||
GIMP_HELP_FONT_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Buffers..."), "foo",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_PASTE },
|
||||
"gimp-buffer-list",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_BUFFER_DIALOG, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Dialogs/---"),
|
||||
|
||||
|
@ -197,22 +198,22 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_IMAGES },
|
||||
"gimp-image-list",
|
||||
NULL, NULL },
|
||||
GIMP_HELP_IMAGE_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/Document Histor_y..."), "",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
"gimp-document-list",
|
||||
"file/dialogs/document_index.html", NULL },
|
||||
GIMP_HELP_DOCUMENT_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/_Templates..."), "",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TEMPLATE },
|
||||
"gimp-template-list",
|
||||
"file/dialogs/templates.html", NULL },
|
||||
GIMP_HELP_TEMPLATE_DIALOG, NULL },
|
||||
{ { N_("/File/Dialogs/Error Co_nsole..."), NULL,
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_WARNING },
|
||||
"gimp-error-console",
|
||||
"file/dialogs/error_console.html", NULL },
|
||||
GIMP_HELP_ERROR_DIALOG, NULL },
|
||||
|
||||
#ifdef ENABLE_DEBUG_ENTRIES
|
||||
MENU_BRANCH (N_("/File/D_ebug")),
|
||||
|
@ -231,7 +232,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
file_quit_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_QUIT },
|
||||
NULL,
|
||||
"file/quit.html", NULL },
|
||||
GIMP_HELP_FILE_QUIT, NULL },
|
||||
|
||||
/* <Toolbox>/Xtns */
|
||||
|
||||
|
@ -240,7 +241,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
{ { N_("/Xtns/_Module Manager..."), NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp-module-manager-dialog",
|
||||
"dialogs/module_manager.html", NULL },
|
||||
GIMP_HELP_MODULE_DIALOG, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/Xtns/---"),
|
||||
|
||||
|
@ -252,22 +253,22 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
|||
help_help_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_HELP },
|
||||
NULL,
|
||||
"help/dialogs/help.html", NULL },
|
||||
GIMP_HELP_HELP, NULL },
|
||||
{ { N_("/Help/_Context Help..."), "<shift>F1",
|
||||
help_context_help_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_HELP },
|
||||
NULL,
|
||||
"help/context_help.html", NULL },
|
||||
GIMP_HELP_HELP_CONTEXT, NULL },
|
||||
{ { N_("/Help/_Tip of the Day..."), NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_INFO },
|
||||
"gimp-tips-dialog",
|
||||
"help/dialogs/tip_of_the_day.html", NULL },
|
||||
GIMP_HELP_TIPS_DIALOG, NULL },
|
||||
{ { N_("/Help/_About..."), NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_WILBER },
|
||||
"gimp-about-dialog",
|
||||
"help/dialogs/about.html", NULL }
|
||||
GIMP_HELP_ABOUT_DIALOG, NULL }
|
||||
};
|
||||
|
||||
gint n_toolbox_menu_entries = G_N_ELEMENTS (toolbox_menu_entries);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage-mask-select.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplayer.h"
|
||||
|
@ -858,7 +859,8 @@ selection_layer_alpha_invoker (Gimp *gimp,
|
|||
if (success)
|
||||
{
|
||||
gimage = gimp_item_get_image (GIMP_ITEM (layer));
|
||||
gimp_image_mask_layer_alpha (gimage, layer);
|
||||
gimp_image_mask_select_alpha (gimage, layer,
|
||||
GIMP_CHANNEL_OP_REPLACE, FALSE, 0.0, 0.0);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&selection_layer_alpha_proc, success);
|
||||
|
|
|
@ -97,6 +97,7 @@ libappwidgets_a_sources = \
|
|||
gimpgradienteditor.h \
|
||||
gimphelp.c \
|
||||
gimphelp.h \
|
||||
gimphelp-ids.h \
|
||||
gimphistogrambox.c \
|
||||
gimphistogrambox.h \
|
||||
gimphistogramview.c \
|
||||
|
|
|
@ -0,0 +1,257 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimphelp-ids.h
|
||||
* Copyright (C) 2003 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_HELP_IDS_H__
|
||||
#define __GIMP_HELP_IDS_H__
|
||||
|
||||
|
||||
#define GIMP_HELP_FILE_NEW "file/dialogs/file_new.html"
|
||||
#define GIMP_HELP_FILE_NEW_CONFIRM "file/dialogs/file_new.html#confirm_dialog"
|
||||
#define GIMP_HELP_FILE_OPEN "file/dialogs/file_open.html"
|
||||
#define GIMP_HELP_FILE_SAVE "file/dialogs/file_save.html"
|
||||
#define GIMP_HELP_FILE_SAVE_AS "file/dialogs/file_save.html"
|
||||
#define GIMP_HELP_FILE_SAVE_A_COPY "file/dialogs/file_save.html"
|
||||
#define GIMP_HELP_FILE_SAVE_AS_TEMPLATE "file/dialogs/file_save.html"
|
||||
#define GIMP_HELP_FILE_SAVE_OVERWRITE "file/dialogs/file_exists.html"
|
||||
#define GIMP_HELP_FILE_REVERT "file/revert.html"
|
||||
#define GIMP_HELP_FILE_CLOSE "file/close.html"
|
||||
#define GIMP_HELP_FILE_QUIT "file/quit.html"
|
||||
|
||||
#define GIMP_HELP_EDIT_UNDO "edit/undo.html"
|
||||
#define GIMP_HELP_EDIT_REDO "edit/redo.html"
|
||||
#define GIMP_HELP_EDIT_CUT "edit/cut.html"
|
||||
#define GIMP_HELP_EDIT_COPY "edit/copy.html"
|
||||
#define GIMP_HELP_EDIT_PASTE "edit/paste.html"
|
||||
#define GIMP_HELP_EDIT_PASTE_INTO "edit/paste_into.html"
|
||||
#define GIMP_HELP_EDIT_PASTE_AS_NEW "edit/paste_as_new.html"
|
||||
#define GIMP_HELP_EDIT_CLEAR "edit/clear.html"
|
||||
#define GIMP_HELP_EDIT_FILL_FG "edit/fill.html"
|
||||
#define GIMP_HELP_EDIT_FILL_BG "edit/fill.html"
|
||||
#define GIMP_HELP_EDIT_FILL_PATTERN "edit/fill.html"
|
||||
#define GIMP_HELP_EDIT_STROKE_SELECTION "edit/stroke.html"
|
||||
#define GIMP_HELP_EDIT_STROKE_PATH "edit/stroke.html"
|
||||
|
||||
#define GIMP_HELP_SELECT_DIALOG "dialogs/selection_editor.html"
|
||||
#define GIMP_HELP_SELECT_ALL "select/all.html"
|
||||
#define GIMP_HELP_SELECT_NONE "select/none.html"
|
||||
#define GIMP_HELP_SELECT_INVERT "select/invert.html"
|
||||
#define GIMP_HELP_SELECT_FLOAT "select/float.html"
|
||||
#define GIMP_HELP_SELECT_FEATHER "select/dialogs/feather_selection.html"
|
||||
#define GIMP_HELP_SELECT_SHARPEN "select/sharpen.html"
|
||||
#define GIMP_HELP_SELECT_SHRINK "select/dialogs/shrink_selection.html"
|
||||
#define GIMP_HELP_SELECT_GROW "select/dialogs/grow_selection.html"
|
||||
#define GIMP_HELP_SELECT_BORDER "select/dialogs/border_selection.html"
|
||||
#define GIMP_HELP_SELECT_QUICKMASK "select/quickmask.html"
|
||||
#define GIMP_HELP_SELECT_SAVE_TO_CHANNEL "select/save_to_channel.html"
|
||||
|
||||
#define GIMP_HELP_VIEW_NEW "view/new.html"
|
||||
#define GIMP_HELP_VIEW_DOT_FOR_DOT "view/dot_for_dot.html"
|
||||
#define GIMP_HELP_VIEW_ZOOM "view/zoom.html"
|
||||
#define GIMP_HELP_VIEW_ZOOM_TO_FIT "view/zoom.html"
|
||||
#define GIMP_HELP_VIEW_SHOW_SELECTION "view/toggle_selection.html"
|
||||
#define GIMP_HELP_VIEW_SHOW_LAYER_BOUNDARY "view/toggle_selection.html"
|
||||
#define GIMP_HELP_VIEW_SHOW_GUIDES "view/toggle_guides.html"
|
||||
#define GIMP_HELP_VIEW_SNAP_TO_GUIDES "view/gnap_to_guides.html"
|
||||
#define GIMP_HELP_VIEW_SHOW_GRID "view/toggle_grid.html"
|
||||
#define GIMP_HELP_VIEW_SNAP_TO_GRID "view/snap_to_grid.html"
|
||||
#define GIMP_HELP_VIEW_SHOW_MENUBAR "view/toggle_menubar.html"
|
||||
#define GIMP_HELP_VIEW_SHOW_RULERS "view/toggle_rulers.html"
|
||||
#define GIMP_HELP_VIEW_SHOW_SCROLLBARS "view/toggle_scrollbars.html"
|
||||
#define GIMP_HELP_VIEW_SHOW_STATUSBAR "view/toggle_statusbar.html"
|
||||
#define GIMP_HELP_VIEW_SHRINK_WRAP "view/shrink_wrap.html"
|
||||
#define GIMP_HELP_VIEW_FULLSCREEN "view/fullscreen.html"
|
||||
|
||||
#define GIMP_HELP_IMAGE_DIALOG "dialogs/image_dialog.html"
|
||||
#define GIMP_HELP_IMAGE_CONVERT_RGB "image/mode/convert_to_rgb.html"
|
||||
#define GIMP_HELP_IMAGE_CONVERT_GRAYSCALE "image/mode/convert_to_grayscale.html"
|
||||
#define GIMP_HELP_IMAGE_CONVERT_INDEXED "image/mode/convert_to_indexed.html"
|
||||
#define GIMP_HELP_IMAGE_FLIP_HORIZONTAL "image/dialogs/flip_image.html"
|
||||
#define GIMP_HELP_IMAGE_FLIP_VERTICAL "image/dialogs/flip_image.html"
|
||||
#define GIMP_HELP_IMAGE_ROTATE_90 "image/dialogs/rotate_image.html"
|
||||
#define GIMP_HELP_IMAGE_ROTATE_180 "image/dialogs/rotate_image.html"
|
||||
#define GIMP_HELP_IMAGE_ROTATE_270 "image/dialogs/rotate_image.html"
|
||||
#define GIMP_HELP_IMAGE_RESIZE "image/dialogs/set_canvas_size.html"
|
||||
#define GIMP_HELP_IMAGE_SCALE "image/dialogs/scale_image.html"
|
||||
#define GIMP_HELP_IMAGE_CROP "image/dialogs/crop_image.html"
|
||||
#define GIMP_HELP_IMAGE_DUPLICATE "image/duplicate.html"
|
||||
#define GIMP_HELP_IMAGE_MERGE_LAYERS "layers/dialogs/merge_visible_layers.html"
|
||||
#define GIMP_HELP_IMAGE_FLATTEN "layers/flatten_image.html"
|
||||
#define GIMP_HELP_IMAGE_GRID "image/dialogs/configure_grid.html"
|
||||
|
||||
#define GIMP_HELP_LAYER_DIALOG "layers/dialogs/layers_dialog.html"
|
||||
#define GIMP_HELP_LAYER_NEW "layers/dialogs/new_layer.html"
|
||||
#define GIMP_HELP_LAYER_DUPLICATE "layers/duplicate_layer.html"
|
||||
#define GIMP_HELP_LAYER_ANCHOR "layers/anchor_layer.html"
|
||||
#define GIMP_HELP_LAYER_MERGE_DOWN "layers/merge_down.html"
|
||||
#define GIMP_HELP_LAYER_DELETE "layers/delete_layer.html"
|
||||
#define GIMP_HELP_LAYER_PREVIOUS "layers/stack/stack.html#previous_layer"
|
||||
#define GIMP_HELP_LAYER_NEXT "layers/stack/stack.html#next_layer"
|
||||
#define GIMP_HELP_LAYER_TOP "layers/stack/stack.html#previous_layer"
|
||||
#define GIMP_HELP_LAYER_BOTTOM "layers/stack/stack.html#next_layer"
|
||||
#define GIMP_HELP_LAYER_RAISE "layers/stack/stack.html#raise_layer"
|
||||
#define GIMP_HELP_LAYER_LOWER "layers/stack/stack.html#lower_layer"
|
||||
#define GIMP_HELP_LAYER_RAISE_TO_TOP "layers/stack/stack.html#layer_to_top"
|
||||
#define GIMP_HELP_LAYER_LOWER_TO_BOTTOM "layers/stack/stack.html#layer_to_bottom"
|
||||
#define GIMP_HELP_LAYER_DESATURATE "layers/colors/desaturate.html"
|
||||
#define GIMP_HELP_LAYER_INVERT "layers/colors/invert.html"
|
||||
#define GIMP_HELP_LAYER_EQUALIZE "layers/colors/auto/equalize.html"
|
||||
#define GIMP_HELP_LAYER_MASK_ADD "layers/dialogs/add_layer_mask.html"
|
||||
#define GIMP_HELP_LAYER_MASK_APPLY "layers/apply_mask.html"
|
||||
#define GIMP_HELP_LAYER_MASK_DELETE "layers/delete_mask.html"
|
||||
#define GIMP_HELP_LAYER_MASK_SEL_REPLACE "layers/mask_to_selection.html"
|
||||
#define GIMP_HELP_LAYER_MASK_SEL_ADD "layers/mask_to_selection.html#add"
|
||||
#define GIMP_HELP_LAYER_MASK_SEL_SUB "layers/mask_to_selection.html#subtract"
|
||||
#define GIMP_HELP_LAYER_MASK_SEL_INTERSECT "layers/mask_to_selection.html#intersect"
|
||||
#define GIMP_HELP_LAYER_ALPHA_ADD "layers/add_alpha_channel.html"
|
||||
#define GIMP_HELP_LAYER_ALPHA_SEL_REPLACE "layers/alpha_to_selection.html"
|
||||
#define GIMP_HELP_LAYER_ALPHA_SEL_ADD "layers/alpha_to_selection.html#add"
|
||||
#define GIMP_HELP_LAYER_ALPHA_SEL_SUB "layers/alpha_to_selection.html#subtract"
|
||||
#define GIMP_HELP_LAYER_ALPHA_SEL_INTERSECT "layers/alpha_to_selection.html#intersect"
|
||||
#define GIMP_HELP_LAYER_FLIP_HORIZONTAL "layers/flip_layer.html"
|
||||
#define GIMP_HELP_LAYER_FLIP_VERTICAL "layers/flip_layer.html"
|
||||
#define GIMP_HELP_LAYER_ROTATE_90 "layers/rotate_layer.html"
|
||||
#define GIMP_HELP_LAYER_ROTATE_180 "layers/rotate_layer.html"
|
||||
#define GIMP_HELP_LAYER_ROTATE_270 "layers/rotate_layer.html"
|
||||
#define GIMP_HELP_LAYER_OFFSET "layers/dialogs/offset.html"
|
||||
#define GIMP_HELP_LAYER_RESIZE "layers/dialogs/layer_boundary_size.html"
|
||||
#define GIMP_HELP_LAYER_RESIZE_TO_IMAGE "layers/layer_to_image_size.html"
|
||||
#define GIMP_HELP_LAYER_SCALE "layers/dialogs/scale_layer.html"
|
||||
#define GIMP_HELP_LAYER_CROP "layers/dialogs/crop_layer.html"
|
||||
#define GIMP_HELP_LAYER_EDIT "layers/dialogs/edit_layer_attributes.html"
|
||||
|
||||
#define GIMP_HELP_CHANNEL_DIALOG "channels/dialogs/channels_dialog.html"
|
||||
#define GIMP_HELP_CHANNEL_NEW "channels/dialogs/new_channel.html"
|
||||
#define GIMP_HELP_CHANNEL_RAISE "channels/raise_channel.html"
|
||||
#define GIMP_HELP_CHANNEL_LOWER "channels/lower_channel.html"
|
||||
#define GIMP_HELP_CHANNEL_DUPLICATE "channels/duplicate_channel.html"
|
||||
#define GIMP_HELP_CHANNEL_DELETE "channels/delete_channel.html"
|
||||
#define GIMP_HELP_CHANNEL_SEL_REPLACE "channels/channel_to_selection.html"
|
||||
#define GIMP_HELP_CHANNEL_SEL_ADD "channels/channel_to_selection.html#add"
|
||||
#define GIMP_HELP_CHANNEL_SEL_SUB "channels/channel_to_selection.html#subtract"
|
||||
#define GIMP_HELP_CHANNEL_SEL_INTERSECT "channels/channel_to_selection.html#intersect"
|
||||
#define GIMP_HELP_CHANNEL_EDIT "channels/dialogs/edit_channel_attributes.html"
|
||||
|
||||
#define GIMP_HELP_PATH_DIALOG "paths/dislogs/paths_dialog.html"
|
||||
#define GIMP_HELP_PATH_NEW "paths/new_path.html"
|
||||
#define GIMP_HELP_PATH_RAISE "paths/raise_path.html"
|
||||
#define GIMP_HELP_PATH_LOWER "paths/lower_path.html"
|
||||
#define GIMP_HELP_PATH_DUPLICATE "paths/duplicate_path.html"
|
||||
#define GIMP_HELP_PATH_DELETE "paths/delete_path.html"
|
||||
#define GIMP_HELP_PATH_SEL_REPLACE "paths/path_to_selection.html"
|
||||
#define GIMP_HELP_PATH_SEL_ADD "paths/path_to_selection.html#add"
|
||||
#define GIMP_HELP_PATH_SEL_SUB "paths/path_to_selection.html#subtract"
|
||||
#define GIMP_HELP_PATH_SEL_INTERSECT "paths/path_to_selection.html#intersect"
|
||||
#define GIMP_HELP_PATH_STROKE "paths/stroke_path.html"
|
||||
#define GIMP_HELP_PATH_COPY "paths/copy_path.html"
|
||||
#define GIMP_HELP_PATH_PASTE "paths/paste_path.html"
|
||||
#define GIMP_HELP_PATH_IMPORT "paths/dialogs/import_path.html"
|
||||
#define GIMP_HELP_PATH_EXPORT "paths/dialogs/export_path.html"
|
||||
#define GIMP_HELP_PATH_EDIT "paths/dialogs/edit_path_attributes.html"
|
||||
|
||||
#define GIMP_HELP_TOOL_BY_COLOR_SELECT "tools/by_color_select.html"
|
||||
#define GIMP_HELP_TOOL_COLOR_BALANCE "tools/color_balance.html"
|
||||
#define GIMP_HELP_TOOL_HUE_SATURATION "tools/hue_saturation.html"
|
||||
#define GIMP_HELP_TOOL_COLORIZE "tools/colorize.html"
|
||||
#define GIMP_HELP_TOOL_BRIGHTNESS_CONTRAST "tools/brightness-contrast.html"
|
||||
#define GIMP_HELP_TOOL_THRESHOLD "tools/threshold.html"
|
||||
#define GIMP_HELP_TOOL_LEVELS "tools/levels.html"
|
||||
#define GIMP_HELP_TOOL_CURVES "tools/curves.html"
|
||||
#define GIMP_HELP_TOOL_POSTERIZE "tools/posterize.html"
|
||||
#define GIMP_HELP_TOOL_HISTOGRAM "tools/histogram.html"
|
||||
#define GIMP_HELP_TOOL_ROTATE "tools/rotate.html"
|
||||
#define GIMP_HELP_TOOL_VECTORS "tools/vectors.html"
|
||||
|
||||
#define GIMP_HELP_FILTER_REPEAT "filters/repeat_last.html"
|
||||
#define GIMP_HELP_FILTER_RESHOW "filters/reshow_last.html"
|
||||
|
||||
#define GIMP_HELP_TOOLBOX "toolbox/toolbox.html"
|
||||
#define GIMP_HELP_TOOLBOX_DEFAULT_COLORS "toolbox/toolbox.html#default_colors"
|
||||
#define GIMP_HELP_TOOLBOX_SWAP_COLORS "toolbox/toolbox.html#swap_colors"
|
||||
|
||||
#define GIMP_HELP_BRUSH_DIALOG "dialogs/brush_selection.html"
|
||||
#define GIMP_HELP_BRUSH_NEW "dialogs/brush_selection.html"
|
||||
#define GIMP_HELP_BRUSH_DUPLICATE "dialogs/brush_selection.html"
|
||||
#define GIMP_HELP_BRUSH_EDIT "dialogs/brush_selection.html"
|
||||
#define GIMP_HELP_BRUSH_DELETE "dialogs/brush_selection.html"
|
||||
#define GIMP_HELP_BRUSH_REFRESH "dialogs/brush_selection.html"
|
||||
|
||||
#define GIMP_HELP_PATTERN_DIALOG "dialogs/pattern_selection.html"
|
||||
#define GIMP_HELP_PATTERN_NEW "dialogs/pattern_selection.html"
|
||||
#define GIMP_HELP_PATTERN_DUPLICATE "dialogs/pattern_selection.html"
|
||||
#define GIMP_HELP_PATTERN_EDIT "dialogs/pattern_selection.html"
|
||||
#define GIMP_HELP_PATTERN_DELETE "dialogs/pattern_selection.html"
|
||||
#define GIMP_HELP_PATTERN_REFRESH "dialogs/pattern_selection.html"
|
||||
|
||||
#define GIMP_HELP_GRADIENT_DIALOG "dialogs/gradient_selection.html"
|
||||
#define GIMP_HELP_GRADIENT_NEW "dialogs/gradient_selection.html"
|
||||
#define GIMP_HELP_GRADIENT_DUPLICATE "dialogs/gradient_selection.html"
|
||||
#define GIMP_HELP_GRADIENT_EDIT "dialogs/gradient_selection.html"
|
||||
#define GIMP_HELP_GRADIENT_DELETE "dialogs/gradient_selection.html"
|
||||
#define GIMP_HELP_GRADIENT_REFRESH "dialogs/gradient_selection.html"
|
||||
#define GIMP_HELP_GRADIENT_SAVE_AS_POV "dialogs/gradient_selection.html"
|
||||
|
||||
#define GIMP_HELP_PALETTE_DIALOG "dialogs/palette_selection.html"
|
||||
#define GIMP_HELP_PALETTE_NEW "dialogs/palette_selection.html"
|
||||
#define GIMP_HELP_PALETTE_DUPLICATE "dialogs/palette_selection.html"
|
||||
#define GIMP_HELP_PALETTE_EDIT "dialogs/palette_selection.html"
|
||||
#define GIMP_HELP_PALETTE_DELETE "dialogs/palette_selection.html"
|
||||
#define GIMP_HELP_PALETTE_REFRESH "dialogs/palette_selection.html"
|
||||
#define GIMP_HELP_PALETTE_IMPORT "dialogs/palette_selection.html"
|
||||
#define GIMP_HELP_PALETTE_MERGE "dialogs/palette_selection.html"
|
||||
|
||||
#define GIMP_HELP_FONT_DIALOG "dialogs/font_selection.html"
|
||||
|
||||
#define GIMP_HELP_BUFFER_DIALOG "dialogs/named_buffers.html"
|
||||
#define GIMP_HELP_BUFFER_CUT "dialogs/cut_named.html"
|
||||
#define GIMP_HELP_BUFFER_COPY "dialogs/copy_named.html"
|
||||
#define GIMP_HELP_BUFFER_PASTE "dialogs/paste_named.html"
|
||||
#define GIMP_HELP_BUFFER_PASTE_INTO "dialogs/paste_named.html"
|
||||
#define GIMP_HELP_BUFFER_PASTE_AS_NEW "dialogs/paste_named.html"
|
||||
#define GIMP_HELP_BUFFER_DELETE "dialogs/delete_buffer.html"
|
||||
|
||||
#define GIMP_HELP_TEMPLATE_DIALOG "dialogs/templates.html"
|
||||
#define GIMP_HELP_TEMPLATE_NEW "dialogs/templates.html"
|
||||
#define GIMP_HELP_TEMPLATE_DUPLICATE "dialogs/templates.html"
|
||||
#define GIMP_HELP_TEMPLATE_EDIT "dialogs/templates.html"
|
||||
#define GIMP_HELP_TEMPLATE_IMAGE_NEW "dialogs/templates.html"
|
||||
#define GIMP_HELP_TEMPLATE_DELETE "dialogs/templates.html"
|
||||
|
||||
#define GIMP_HELP_PREFERENCES_DIALOG "file/dialogs/preferences/preferences.html"
|
||||
|
||||
#define GIMP_HELP_COLOR_DIALOG "dialogs/color.html"
|
||||
#define GIMP_HELP_TOOL_OPTIONS_DIALOG "dialogs/tool_options.html"
|
||||
#define GIMP_HELP_DEVICE_STATUS_DIALOG "dialogs/device_status.html"
|
||||
#define GIMP_HELP_DOCUMENT_DIALOG "file/dialogs/document_index.html"
|
||||
#define GIMP_HELP_MODULE_DIALOG "dialogs/module_manager.html"
|
||||
#define GIMP_HELP_INFO_DIALOG "view/dialogs/info_window.html"
|
||||
#define GIMP_HELP_NAVIGATION_DIALOG "view/dialogs/navigation_window.html"
|
||||
#define GIMP_HELP_DISPLAY_FILTER_DIALOG "dialogs/display_filters/display_filters.html"
|
||||
#define GIMP_HELP_UNDO_DIALOG "dialogs/undo_history.html"
|
||||
#define GIMP_HELP_INDEXED_PALETTE_DIALOG "dialogs/indexed_palette.html"
|
||||
#define GIMP_HELP_ERROR_DIALOG "dialogs/error_console.html"
|
||||
#define GIMP_HELP_TIPS_DIALOG "help/dialogs/tip_of_the_day.html"
|
||||
#define GIMP_HELP_ABOUT_DIALOG "help/dialogs/about.html"
|
||||
|
||||
#define GIMP_HELP_HELP "help/dialogs/help.html"
|
||||
#define GIMP_HELP_HELP_CONTEXT "help/context_help.html"
|
||||
|
||||
|
||||
#endif /* __GIMP_HELP_IDS_H__ */
|
|
@ -319,7 +319,8 @@ HELP
|
|||
code => <<'CODE'
|
||||
{
|
||||
gimage = gimp_item_get_image (GIMP_ITEM (layer));
|
||||
gimp_image_mask_layer_alpha (gimage, layer);
|
||||
gimp_image_mask_select_alpha (gimage, layer,
|
||||
GIMP_CHANNEL_OP_REPLACE, FALSE, 0.0, 0.0);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
|
@ -418,7 +419,7 @@ HELP
|
|||
);
|
||||
}
|
||||
|
||||
@headers = qw("core/gimpimage-mask.h");
|
||||
@headers = qw("core/gimpimage-mask.h" "core/gimpimage-mask-select.h");
|
||||
|
||||
@procs = qw(selection_bounds selection_value selection_is_empty
|
||||
selection_translate selection_float selection_clear
|
||||
|
|
Loading…
Reference in New Issue