New upstream version 2.10.14
This commit is contained in:
2
AUTHORS
2
AUTHORS
@ -74,6 +74,7 @@ The following people have contributed code to GIMP:
|
||||
Daniel Egger
|
||||
Ulf-D. Ehlert
|
||||
Gil Eliyahu
|
||||
Tobias Ellinghaus
|
||||
Ell
|
||||
Morton Eriksen
|
||||
Larry Ewing
|
||||
@ -316,6 +317,7 @@ The following people have contributed code to GIMP:
|
||||
Alexis Wilhelm
|
||||
Calvin Williamson
|
||||
Matthew Wilson
|
||||
woob
|
||||
Karl Günter Wünsch
|
||||
Andrew Wyatt
|
||||
Yoshinori Yamakawa
|
||||
|
14
INSTALL
14
INSTALL
@ -38,8 +38,8 @@ header files installed.
|
||||
You also need gettext version 0.19 or over. Earlier gettext had
|
||||
issues with script-fu localization, ending up in incomplete GIMP localization.
|
||||
|
||||
3. You need to have GEGL version 0.4.16 or newer and babl version
|
||||
0.1.66 or newer. You can get them from https://gegl.org/ or clone
|
||||
3. You need to have GEGL version 0.4.18 or newer and babl version
|
||||
0.1.72 or newer. You can get them from https://gegl.org/ or clone
|
||||
them from the GNOME git repository:
|
||||
|
||||
https://gitlab.gnome.org/GNOME/babl.git
|
||||
@ -144,12 +144,12 @@ header files installed.
|
||||
Package Name Version
|
||||
|
||||
ATK 2.2.0
|
||||
babl 0.1.66
|
||||
babl 0.1.72
|
||||
cairo 1.12.2
|
||||
Fontconfig 2.12.4
|
||||
freetype2 2.1.7
|
||||
GDK-PixBuf 2.30.8
|
||||
GEGL 0.4.16
|
||||
GEGL 0.4.18
|
||||
GIO
|
||||
GLib 2.54.2
|
||||
glib-networking
|
||||
@ -177,7 +177,7 @@ header files installed.
|
||||
ExcHndl - Crash logs on Windows with Dr. MinGW
|
||||
gs - ghostscript
|
||||
libaa - ASCII art
|
||||
libheif 1.1.0 HEIF
|
||||
libheif 1.3.2 HEIF
|
||||
libmng - MNG
|
||||
libwebp 0.6.0 WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
|
||||
libwmf 0.2.8 WMF
|
||||
@ -207,8 +207,8 @@ packages are included below. Here is an illustration of commands that
|
||||
might be used to build and install GIMP. The actual configuration,
|
||||
compilation and installation output is not shown.
|
||||
|
||||
% tar xvfz gimp-2.10.12.tar.gz # unpack the sources
|
||||
% cd gimp-2.10.12 # change to the toplevel directory
|
||||
% tar xvfz gimp-2.10.14.tar.gz # unpack the sources
|
||||
% cd gimp-2.10.14 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GIMP
|
||||
% make install # install GIMP
|
||||
|
188
NEWS
188
NEWS
@ -8,6 +8,193 @@ we do allow some new features here, if they are not too invasive.
|
||||
Otherwise, this branch is only for bug-fixes.
|
||||
|
||||
|
||||
Overview of Changes from GIMP 2.10.12 to GIMP 2.10.14
|
||||
=====================================================
|
||||
|
||||
Core:
|
||||
|
||||
- New "Selected areas continue outside the image" toggle option to
|
||||
the "Feather Selection" dialog.
|
||||
- New "Allow editing on non-visible layers" setting in Preferences
|
||||
to allow painting, transforming, and selecting on layers with
|
||||
toggled off visibility.
|
||||
- XCF loading a bit more resilient to corruption: it doesn't stop
|
||||
any more at the first layer or channel error; instead it tries to
|
||||
load more layers/channels to salvage as much data as possible from
|
||||
a corrupted XCF file.
|
||||
- In gimp:gradient, fix dithering to correspond to how we actually
|
||||
round float values to 8-bit. In particular, this avoids
|
||||
introducing noise when a component is fixed at 0 or 1 along a
|
||||
segment.
|
||||
- New "Show All" view mode allowing to show pixels outside the
|
||||
canvas boundary.
|
||||
- New "Show Canvas Boundary" option to render a dotted line around
|
||||
the canvas boundary.
|
||||
- New "Keep Padding in "Show All" Mode" option, also available as a
|
||||
default option via Preferences, to preserve the padding color
|
||||
instead of displaying the checkerboard.
|
||||
- Several features updated to react as expected when run
|
||||
out-of-canvas: color-picking, canvas grid, transform tools, bucket
|
||||
fill, and more.
|
||||
- Loaded images' pixel density will now default to 72 PPI when no
|
||||
explicit resolution information was stored in the imported file.
|
||||
Newly created images' default pixel density will continue to be
|
||||
based on the default image template (with value 300 PPI if it has
|
||||
not be changed), yet not loaded images anymore. 72 PPI is the
|
||||
common default in most software (and in standards such as Exif) so
|
||||
it makes sense we stick to it, only for loaded images.
|
||||
|
||||
Tools:
|
||||
|
||||
- Free Select tool: fast copy|cut-paste modifiers (Alt + Ctrl|Shift)
|
||||
are now working even when the selection is not committed. Starting
|
||||
a fast copy|cut-paste will automatically close the polygon and
|
||||
commit the selection, accelerating fast usage of free selections.
|
||||
- Foreground Select tool: new "Grayscale" Preview Mode. Also, a
|
||||
color selector for "Color" preview (original preview mode) now
|
||||
available, to select any color and opacity for the preview.
|
||||
- Add a new "Image" transform type to the transform tools, in
|
||||
addition to the existing "Layer", "Selection", and "Path"
|
||||
transform types. The "Image" mode transforms the entire image,
|
||||
rather than a single item. In tools with a preview, the preview
|
||||
shows the transformed image projection. The clipping mode
|
||||
controls how the canvas is clipped during the transform; in
|
||||
particular, the ADJUST clipping mode resizes the canvas to fit its
|
||||
transformed size.
|
||||
- In GimpFilterTool, add a new "clipping" option, which can be
|
||||
either Adjust or Clip. This option is controllable for layers,
|
||||
when there's no selection mask.
|
||||
When set to Adjust, which is used by default, the filter's output
|
||||
may extent past the drawable's boundary, and the drawable will be
|
||||
resized to match the output when committed.
|
||||
- Gradient tool: offest support in shaped gradients
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Simple 8-bit port of filters to GEGL: nl-filter, film,
|
||||
fractal-explorer, flame, blinds, jigsaw, gradient-flare,
|
||||
checkerboard, tile-small, curve-bend, sample-colorize, map-object,
|
||||
lighting, grid, despeckle, sphere-designer, contrast-retinex, hot,
|
||||
sparkle, cml-explorer, destripe, twain, animation-optimize,
|
||||
depth-merge, warp, imagemap, gimpressionist
|
||||
- Port of filters to GEGL with float support: van-gogh-lic.
|
||||
- Add color profile support for HEIF (only when libheif 1.4.0 is
|
||||
available).
|
||||
- TIFF import will now ask (in interactive mode) how to process
|
||||
unspecified TIFF channels: non-premultiplied (used to be the
|
||||
default) alpha, premultiplied alpha, or just import as generic
|
||||
channel.
|
||||
- HEIF export now improved with same profile logics as JPEG or WebP
|
||||
(it can actually export higher bit-depth data, so profile logics
|
||||
should be the one as in PNG, but we only support 8 bpc HEIF for
|
||||
the time being).
|
||||
- HEIF export dialog now has a "Save color profile" checkbox
|
||||
allowing to not export with a profile when needed (needs libheif
|
||||
1.4.0 or higher).
|
||||
- PDF exporting: text layers in layer groups are now exported as
|
||||
proper text.
|
||||
- Cleaned up the file-dds GUI, removed the "Advanced" expander.
|
||||
- gimptool external tool now install plug-ins into subfolders (this
|
||||
is not mandatory in GIMP 2.10 yet, unlike future GIMP 3, but is
|
||||
already the recommended folder structure for plug-ins).
|
||||
- 3 procedures ("color-decode-ycocg", "color-decode-ycocg-scaled"
|
||||
and "color-decode-alpha-exp") removed from file-dds plug-in
|
||||
because they are hacks which should stay internal to the plug-in
|
||||
and are semantically wrong because colors in drawables are never
|
||||
in such formats.
|
||||
|
||||
Filters:
|
||||
|
||||
- New "Normal Map" filter to generate normal maps from height maps
|
||||
in the Generic section.
|
||||
- Replace old filters with GEGL operation counterparts: edge-neon
|
||||
(gegl:edge-neon), contrast-normalize (gegl:stretch-contrast),
|
||||
oilify (gegl:oilify)
|
||||
- Add gegl:bayer-matrix and gegl:linear-sinusoid to Filters ->
|
||||
Render -> Pattern.
|
||||
- Add gegl:newsprint to Filters -> Distorts.
|
||||
- Add gegl:mean-curvature-blur to Filters -> Blur.
|
||||
|
||||
Performance:
|
||||
|
||||
- Add an active-thread variable to the dashboard's misc group,
|
||||
showing the number of active worker threads.
|
||||
- Reduce time complexity of layer-group translation. When
|
||||
translating a layer group, avoid separately updating the original
|
||||
area of the child layers before translating them (as per the fix
|
||||
to issue #3484), as this results in quadratic time complexity
|
||||
w.r.t. to the maximal subgroup nesting level. Instead, simply
|
||||
defer the updating of the group's offset until *after* translating
|
||||
the child layers, so that their original area isn't clipped by the
|
||||
parent, while their new area is still properly updated even if the
|
||||
parent's size changes.
|
||||
|
||||
User interface:
|
||||
|
||||
- Many mnemonics added in various dialogs.
|
||||
- Add a gimp-rotate-image-arbitrary action, and a corresponding
|
||||
"Image -> Transform -> Arbitrary Rotation..." menu entry, which
|
||||
activates the rotate tool in image mode (similarly to the
|
||||
corresponding action for layers).
|
||||
- On Windows, minimized GIMP window is now deiconified when GIMP is
|
||||
run again (clicking its shortcut or otherwise).
|
||||
|
||||
Preferences:
|
||||
|
||||
- New "Swap compression" option: explicit control over the tile-swap
|
||||
compression algorithm in GEGL. "Best performance" is used by
|
||||
default, "Balanced", "Best compression", and "None" (disables
|
||||
compression) are available.
|
||||
|
||||
Devel docs:
|
||||
|
||||
- Update the libgimpconfig and libgimpbase docs.
|
||||
- Update docs with missing symbols and types.
|
||||
- New docs for structs and enums.
|
||||
|
||||
Installers:
|
||||
|
||||
- Install 64-bit Python on 64-bit Windows (until now, the installer
|
||||
used to install 32-bit Python for all architectures).
|
||||
- Windows installer now supports per-user install.
|
||||
|
||||
Debugging:
|
||||
|
||||
- New mnemonic-clashes tool to help looking for mnemonic clashes.
|
||||
|
||||
Translations:
|
||||
|
||||
- Basque, Brazilian Portuguese, British English, Catalan, Chinese
|
||||
(Taiwan), Croatian, Danish, Dutch, French, German, Greek,
|
||||
Hungarian, Icelandic, Indonesian, Italian, Latvian, Polish,
|
||||
Russian, Slovenian, Spanish, Swedish, Turkish.
|
||||
|
||||
Bugfixes:
|
||||
|
||||
- #3630, #3226, #3610, #1725, #3093, #3599, #3597, #3082, #3553, #3435,
|
||||
#3503, #3532, #3164, #3560, #3500, #3493, #3514, #3512, #2685, #3641,
|
||||
#1002, #360, #3263, #2221, #3893, #2708, #3100, #2873, #3655, #2206,
|
||||
#3341, #3718, #3763, #3112, #3723, #4049, #4068, #3663, #4119, #4008,
|
||||
#2837, #3994, #3990, #1283, #2561
|
||||
|
||||
Code contributors:
|
||||
|
||||
Alexandre Prokoudine, Ell, Federico Mena Quintero, Jehan, Jernej
|
||||
Simončič, Lionel, Massimo Valentini, Michael Natterer, Michael
|
||||
Schumacher, Oleksii Samorukov, Sabri Ünal, Sergio Jiménez Herena,
|
||||
Thomas Manni, lillolollo, sarah, woob, Øyvind Kolås.
|
||||
|
||||
Translators:
|
||||
|
||||
Alan Mortensen, Alexandre Prokoudine, Anders Jonsson, Andika
|
||||
Triwidada, Asier Sarasua Garmendia, Balázs Meskó, Balázs Úr, Bruce
|
||||
Cowan, Claude Paroz, Daniel Mustieles García, Dimitris Spingos,
|
||||
Emin Tufan Çetin, Hannie Dumoleyn, Jordi Mas, Julia Dronova, Julien
|
||||
Hardelin, Marco Ciampa, Martin Srebotnjak, Milo Ivir, pesder, Piotr
|
||||
Drąg, Rafael Fontenelle, Rodrigo Lledó Milanca, Rūdolfs Mazurs,
|
||||
Sabri Ünal, Sveinn í Felli, Tim Sabsch, Zander Brown.
|
||||
|
||||
|
||||
Overview of Changes from GIMP 2.10.10 to GIMP 2.10.12
|
||||
=====================================================
|
||||
|
||||
@ -466,6 +653,7 @@ Build:
|
||||
plug-ins against any DLL installed directly under plug-ins/ by
|
||||
third-party plug-ins (cf. Windows DLL hell).
|
||||
|
||||
|
||||
Overview of Changes from GIMP 2.10.2 to GIMP 2.10.4
|
||||
===================================================
|
||||
|
||||
|
@ -48,7 +48,7 @@ static const GimpToggleActionEntry brush_editor_toggle_actions[] =
|
||||
{
|
||||
{ "brush-editor-edit-active", GIMP_ICON_LINKED,
|
||||
NC_("brush-editor-action", "Edit Active Brush"), NULL, NULL,
|
||||
G_CALLBACK (data_editor_edit_active_cmd_callback),
|
||||
data_editor_edit_active_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
|
||||
};
|
||||
|
@ -46,43 +46,43 @@ static const GimpActionEntry brushes_actions[] =
|
||||
{ "brushes-open-as-image", GIMP_ICON_DOCUMENT_OPEN,
|
||||
NC_("brushes-action", "_Open Brush as Image"), NULL,
|
||||
NC_("brushes-action", "Open brush as image"),
|
||||
G_CALLBACK (data_open_as_image_cmd_callback),
|
||||
data_open_as_image_cmd_callback,
|
||||
GIMP_HELP_BRUSH_OPEN_AS_IMAGE },
|
||||
|
||||
{ "brushes-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("brushes-action", "_New Brush"), NULL,
|
||||
NC_("brushes-action", "Create a new brush"),
|
||||
G_CALLBACK (data_new_cmd_callback),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_BRUSH_NEW },
|
||||
|
||||
{ "brushes-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("brushes-action", "D_uplicate Brush"), NULL,
|
||||
NC_("brushes-action", "Duplicate this brush"),
|
||||
G_CALLBACK (data_duplicate_cmd_callback),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_BRUSH_DUPLICATE },
|
||||
|
||||
{ "brushes-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("brushes-action", "Copy Brush _Location"), NULL,
|
||||
NC_("brushes-action", "Copy brush file location to clipboard"),
|
||||
G_CALLBACK (data_copy_location_cmd_callback),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_BRUSH_COPY_LOCATION },
|
||||
|
||||
{ "brushes-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("brushes-action", "Show in _File Manager"), NULL,
|
||||
NC_("brushes-action", "Show brush file location in the file manager"),
|
||||
G_CALLBACK (data_show_in_file_manager_cmd_callback),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_BRUSH_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "brushes-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("brushes-action", "_Delete Brush"), NULL,
|
||||
NC_("brushes-action", "Delete this brush"),
|
||||
G_CALLBACK (data_delete_cmd_callback),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_BRUSH_DELETE },
|
||||
|
||||
{ "brushes-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("brushes-action", "_Refresh Brushes"), NULL,
|
||||
NC_("brushes-action", "Refresh brushes"),
|
||||
G_CALLBACK (data_refresh_cmd_callback),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_BRUSH_REFRESH }
|
||||
};
|
||||
|
||||
@ -106,7 +106,7 @@ brushes_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_string_actions (group, "brushes-action",
|
||||
brushes_edit_actions,
|
||||
G_N_ELEMENTS (brushes_edit_actions),
|
||||
G_CALLBACK (data_edit_cmd_callback));
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -45,13 +45,13 @@ static const GimpActionEntry buffers_actions[] =
|
||||
{ "buffers-paste-as-new-image", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("buffers-action", "Paste Buffer as _New Image"), NULL,
|
||||
NC_("buffers-action", "Paste the selected buffer as a new image"),
|
||||
G_CALLBACK (buffers_paste_as_new_image_cmd_callback),
|
||||
buffers_paste_as_new_image_cmd_callback,
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "buffers-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("buffers-action", "_Delete Buffer"), NULL,
|
||||
NC_("buffers-action", "Delete the selected buffer"),
|
||||
G_CALLBACK (buffers_delete_cmd_callback),
|
||||
buffers_delete_cmd_callback,
|
||||
GIMP_HELP_BUFFER_DELETE }
|
||||
};
|
||||
|
||||
@ -107,7 +107,7 @@ buffers_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "buffers-action",
|
||||
buffers_paste_actions,
|
||||
G_N_ELEMENTS (buffers_paste_actions),
|
||||
G_CALLBACK (buffers_paste_cmd_callback));
|
||||
buffers_paste_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -46,15 +46,15 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
buffers_paste_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
buffers_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
GimpContext *context;
|
||||
GimpBuffer *buffer;
|
||||
GimpPasteType paste_type = (GimpPasteType) value;
|
||||
GimpPasteType paste_type = (GimpPasteType) g_variant_get_int32 (value);
|
||||
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
@ -74,8 +74,10 @@ buffers_paste_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_display_shell_untransform_viewport (shell,
|
||||
&x, &y, &width, &height);
|
||||
gimp_display_shell_untransform_viewport (
|
||||
shell,
|
||||
! gimp_display_shell_get_infinite_canvas (shell),
|
||||
&x, &y, &width, &height);
|
||||
|
||||
image = gimp_display_get_image (display);
|
||||
}
|
||||
@ -96,8 +98,9 @@ buffers_paste_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
buffers_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
buffers_paste_as_new_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
@ -125,8 +128,9 @@ buffers_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
buffers_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
buffers_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
|
||||
|
@ -19,13 +19,15 @@
|
||||
#define __BUFFERS_COMMANDS_H__
|
||||
|
||||
|
||||
void buffers_paste_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void buffers_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void buffers_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void buffers_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void buffers_paste_as_new_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void buffers_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BUFFERS_COMMANDS_H__ */
|
||||
|
@ -52,58 +52,58 @@ static const GimpActionEntry channels_actions[] =
|
||||
{ "channels-edit-attributes", GIMP_ICON_EDIT,
|
||||
NC_("channels-action", "_Edit Channel Attributes..."), NULL,
|
||||
NC_("channels-action", "Edit the channel's name, color and opacity"),
|
||||
G_CALLBACK (channels_edit_attributes_cmd_callback),
|
||||
channels_edit_attributes_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_EDIT },
|
||||
|
||||
{ "channels-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("channels-action", "_New Channel..."), NULL,
|
||||
NC_("channels-action", "Create a new channel"),
|
||||
G_CALLBACK (channels_new_cmd_callback),
|
||||
channels_new_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_NEW },
|
||||
|
||||
{ "channels-new-last-values", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("channels-action", "_New Channel"), NULL,
|
||||
NC_("channels-action", "Create a new channel with last used values"),
|
||||
G_CALLBACK (channels_new_last_vals_cmd_callback),
|
||||
channels_new_last_vals_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_NEW },
|
||||
|
||||
{ "channels-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("channels-action", "D_uplicate Channel"), NULL,
|
||||
NC_("channels-action",
|
||||
"Create a duplicate of this channel and add it to the image"),
|
||||
G_CALLBACK (channels_duplicate_cmd_callback),
|
||||
channels_duplicate_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_DUPLICATE },
|
||||
|
||||
{ "channels-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("channels-action", "_Delete Channel"), NULL,
|
||||
NC_("channels-action", "Delete this channel"),
|
||||
G_CALLBACK (channels_delete_cmd_callback),
|
||||
channels_delete_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_DELETE },
|
||||
|
||||
{ "channels-raise", GIMP_ICON_GO_UP,
|
||||
NC_("channels-action", "_Raise Channel"), NULL,
|
||||
NC_("channels-action", "Raise this channel one step in the channel stack"),
|
||||
G_CALLBACK (channels_raise_cmd_callback),
|
||||
channels_raise_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_RAISE },
|
||||
|
||||
{ "channels-raise-to-top", GIMP_ICON_GO_TOP,
|
||||
NC_("channels-action", "Raise Channel to _Top"), NULL,
|
||||
NC_("channels-action",
|
||||
"Raise this channel to the top of the channel stack"),
|
||||
G_CALLBACK (channels_raise_to_top_cmd_callback),
|
||||
channels_raise_to_top_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_RAISE_TO_TOP },
|
||||
|
||||
{ "channels-lower", GIMP_ICON_GO_DOWN,
|
||||
NC_("channels-action", "_Lower Channel"), NULL,
|
||||
NC_("channels-action", "Lower this channel one step in the channel stack"),
|
||||
G_CALLBACK (channels_lower_cmd_callback),
|
||||
channels_lower_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_LOWER },
|
||||
|
||||
{ "channels-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
|
||||
NC_("channels-action", "Lower Channel to _Bottom"), NULL,
|
||||
NC_("channels-action",
|
||||
"Lower this channel to the bottom of the channel stack"),
|
||||
G_CALLBACK (channels_lower_to_bottom_cmd_callback),
|
||||
channels_lower_to_bottom_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_LOWER_TO_BOTTOM }
|
||||
};
|
||||
|
||||
@ -111,25 +111,25 @@ static const GimpToggleActionEntry channels_toggle_actions[] =
|
||||
{
|
||||
{ "channels-visible", GIMP_ICON_VISIBLE,
|
||||
NC_("channels-action", "Toggle Channel _Visibility"), NULL, NULL,
|
||||
G_CALLBACK (channels_visible_cmd_callback),
|
||||
channels_visible_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_VISIBLE },
|
||||
|
||||
{ "channels-linked", GIMP_ICON_LINKED,
|
||||
NC_("channels-action", "Toggle Channel _Linked State"), NULL, NULL,
|
||||
G_CALLBACK (channels_linked_cmd_callback),
|
||||
channels_linked_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_LINKED },
|
||||
|
||||
{ "channels-lock-content", NULL /* GIMP_ICON_LOCK */,
|
||||
NC_("channels-action", "L_ock Pixels of Channel"), NULL, NULL,
|
||||
G_CALLBACK (channels_lock_content_cmd_callback),
|
||||
channels_lock_content_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_LOCK_PIXELS },
|
||||
|
||||
{ "channels-lock-position", GIMP_ICON_TOOL_MOVE,
|
||||
NC_("channels-action", "L_ock Position of Channel"), NULL, NULL,
|
||||
G_CALLBACK (channels_lock_position_cmd_callback),
|
||||
channels_lock_position_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_LOCK_POSITION }
|
||||
};
|
||||
@ -260,17 +260,17 @@ channels_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_color_tag_actions,
|
||||
G_N_ELEMENTS (channels_color_tag_actions),
|
||||
G_CALLBACK (channels_color_tag_cmd_callback));
|
||||
channels_color_tag_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_to_selection_actions,
|
||||
G_N_ELEMENTS (channels_to_selection_actions),
|
||||
G_CALLBACK (channels_to_selection_cmd_callback));
|
||||
channels_to_selection_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_select_actions,
|
||||
G_N_ELEMENTS (channels_select_actions),
|
||||
G_CALLBACK (channels_select_cmd_callback));
|
||||
channels_select_cmd_callback);
|
||||
|
||||
items_actions_setup (group, "channels");
|
||||
}
|
||||
|
@ -90,8 +90,9 @@ static void channels_edit_attributes_callback (GtkWidget *dialog,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
channels_edit_attributes_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_edit_attributes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
@ -136,8 +137,9 @@ channels_edit_attributes_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_new_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -181,8 +183,9 @@ channels_new_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_new_last_vals_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_new_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
@ -207,8 +210,9 @@ channels_new_last_vals_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_raise_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_raise_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
@ -219,8 +223,9 @@ channels_raise_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_raise_to_top_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_raise_to_top_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
@ -231,8 +236,9 @@ channels_raise_to_top_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_lower_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_lower_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
@ -243,8 +249,9 @@ channels_lower_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_lower_to_bottom_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_lower_to_bottom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
@ -255,8 +262,9 @@ channels_lower_to_bottom_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_duplicate_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *new_channel;
|
||||
@ -307,8 +315,9 @@ channels_duplicate_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
@ -319,14 +328,14 @@ channels_delete_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_to_selection_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
channels_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpChannelOps op;
|
||||
GimpImage *image;
|
||||
|
||||
op = (GimpChannelOps) value;
|
||||
op = (GimpChannelOps) g_variant_get_int32 (value);
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
@ -351,76 +360,85 @@ channels_to_selection_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
channels_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
items_visible_cmd_callback (action, image, GIMP_ITEM (channel));
|
||||
items_visible_cmd_callback (action, value, image, GIMP_ITEM (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channels_linked_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
items_linked_cmd_callback (action, image, GIMP_ITEM (channel));
|
||||
items_linked_cmd_callback (action, value, image, GIMP_ITEM (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channels_lock_content_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
items_lock_content_cmd_callback (action, image, GIMP_ITEM (channel));
|
||||
items_lock_content_cmd_callback (action, value, image, GIMP_ITEM (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channels_lock_position_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
channels_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
items_lock_position_cmd_callback (action, image, GIMP_ITEM (channel));
|
||||
items_lock_position_cmd_callback (action, value, image, GIMP_ITEM (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channels_color_tag_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
channels_color_tag_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GimpColorTag color_tag;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
color_tag = (GimpColorTag) g_variant_get_int32 (value);
|
||||
|
||||
items_color_tag_cmd_callback (action, image, GIMP_ITEM (channel),
|
||||
(GimpColorTag) value);
|
||||
color_tag);
|
||||
}
|
||||
|
||||
void
|
||||
channels_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
channels_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GimpChannel *channel2;
|
||||
GimpContainer *container;
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GimpChannel *channel2;
|
||||
GimpContainer *container;
|
||||
GimpActionSelectType type;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
container = gimp_image_get_channels (image);
|
||||
channel2 = (GimpChannel *) action_select_object ((GimpActionSelectType) value,
|
||||
container,
|
||||
channel2 = (GimpChannel *) action_select_object (type, container,
|
||||
(GimpObject *) channel);
|
||||
|
||||
if (channel2 && channel2 != channel)
|
||||
|
@ -19,46 +19,59 @@
|
||||
#define __CHANNELS_COMMANDS_H__
|
||||
|
||||
|
||||
void channels_edit_attributes_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_new_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_new_last_vals_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_edit_attributes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_new_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_raise_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_raise_to_top_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_lower_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_lower_to_bottom_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_raise_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_raise_to_top_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lower_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lower_to_bottom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_duplicate_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_to_selection_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void channels_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_linked_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_lock_content_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_lock_position_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void channels_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_color_tag_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void channels_color_tag_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void channels_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CHANNELS_COMMANDS_H__ */
|
||||
|
@ -48,7 +48,7 @@ static const GimpActionEntry colormap_actions[] =
|
||||
{ "colormap-edit-color", GIMP_ICON_EDIT,
|
||||
NC_("colormap-action", "_Edit Color..."), NULL,
|
||||
NC_("colormap-action", "Edit this color"),
|
||||
G_CALLBACK (colormap_edit_color_cmd_callback),
|
||||
colormap_edit_color_cmd_callback,
|
||||
GIMP_HELP_INDEXED_PALETTE_EDIT }
|
||||
};
|
||||
|
||||
@ -104,12 +104,12 @@ colormap_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "colormap-action",
|
||||
colormap_add_color_actions,
|
||||
G_N_ELEMENTS (colormap_add_color_actions),
|
||||
G_CALLBACK (colormap_add_color_cmd_callback));
|
||||
colormap_add_color_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "colormap-action",
|
||||
colormap_to_selection_actions,
|
||||
G_N_ELEMENTS (colormap_to_selection_actions),
|
||||
G_CALLBACK (colormap_to_selection_cmd_callback));
|
||||
colormap_to_selection_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -36,8 +36,9 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
colormap_edit_color_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
colormap_edit_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
|
||||
|
||||
@ -45,20 +46,23 @@ colormap_edit_color_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
colormap_add_color_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
colormap_add_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpImage *image;
|
||||
gboolean background;
|
||||
return_if_no_context (context, data);
|
||||
return_if_no_image (image, data);
|
||||
|
||||
background = (gboolean) g_variant_get_int32 (value);
|
||||
|
||||
if (gimp_image_get_colormap_size (image) < 256)
|
||||
{
|
||||
GimpRGB color;
|
||||
|
||||
if (value)
|
||||
if (background)
|
||||
gimp_context_get_background (context, &color);
|
||||
else
|
||||
gimp_context_get_foreground (context, &color);
|
||||
@ -69,9 +73,9 @@ colormap_add_color_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
colormap_to_selection_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
colormap_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpColormapEditor *editor;
|
||||
GimpImage *image;
|
||||
@ -80,7 +84,7 @@ colormap_to_selection_cmd_callback (GtkAction *action,
|
||||
|
||||
editor = GIMP_COLORMAP_EDITOR (data);
|
||||
|
||||
op = (GimpChannelOps) value;
|
||||
op = (GimpChannelOps) g_variant_get_int32 (value);
|
||||
|
||||
gimp_channel_select_by_index (gimp_image_get_mask (image),
|
||||
gimp_image_get_active_drawable (image),
|
||||
|
@ -19,14 +19,15 @@
|
||||
#define __COLORMAP_COMMANDS_H__
|
||||
|
||||
|
||||
void colormap_edit_color_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void colormap_add_color_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void colormap_to_selection_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void colormap_edit_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void colormap_add_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void colormap_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __COLORMAP_COMMANDS_H__ */
|
||||
|
@ -81,13 +81,13 @@ static const GimpActionEntry context_actions[] =
|
||||
NC_("context-action", "_Default Colors"), "D",
|
||||
NC_("context-action",
|
||||
"Set foreground color to black, background color to white"),
|
||||
G_CALLBACK (context_colors_default_cmd_callback),
|
||||
context_colors_default_cmd_callback,
|
||||
GIMP_HELP_TOOLBOX_DEFAULT_COLORS },
|
||||
|
||||
{ "context-colors-swap", GIMP_ICON_COLORS_SWAP,
|
||||
NC_("context-action", "S_wap Colors"), "X",
|
||||
NC_("context-action", "Exchange foreground and background colors"),
|
||||
G_CALLBACK (context_colors_swap_cmd_callback),
|
||||
context_colors_swap_cmd_callback,
|
||||
GIMP_HELP_TOOLBOX_SWAP_COLORS }
|
||||
};
|
||||
|
||||
@ -1098,145 +1098,145 @@ context_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_palette_foreground_actions,
|
||||
G_N_ELEMENTS (context_palette_foreground_actions),
|
||||
G_CALLBACK (context_palette_foreground_cmd_callback));
|
||||
context_palette_foreground_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_palette_background_actions,
|
||||
G_N_ELEMENTS (context_palette_background_actions),
|
||||
G_CALLBACK (context_palette_background_cmd_callback));
|
||||
context_palette_background_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_colormap_foreground_actions,
|
||||
G_N_ELEMENTS (context_colormap_foreground_actions),
|
||||
G_CALLBACK (context_colormap_foreground_cmd_callback));
|
||||
context_colormap_foreground_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_colormap_background_actions,
|
||||
G_N_ELEMENTS (context_colormap_background_actions),
|
||||
G_CALLBACK (context_colormap_background_cmd_callback));
|
||||
context_colormap_background_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_swatch_foreground_actions,
|
||||
G_N_ELEMENTS (context_swatch_foreground_actions),
|
||||
G_CALLBACK (context_swatch_foreground_cmd_callback));
|
||||
context_swatch_foreground_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_swatch_background_actions,
|
||||
G_N_ELEMENTS (context_swatch_background_actions),
|
||||
G_CALLBACK (context_swatch_background_cmd_callback));
|
||||
context_swatch_background_cmd_callback);
|
||||
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_foreground_red_actions,
|
||||
G_N_ELEMENTS (context_foreground_red_actions),
|
||||
G_CALLBACK (context_foreground_red_cmd_callback));
|
||||
context_foreground_red_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_foreground_green_actions,
|
||||
G_N_ELEMENTS (context_foreground_green_actions),
|
||||
G_CALLBACK (context_foreground_green_cmd_callback));
|
||||
context_foreground_green_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_foreground_blue_actions,
|
||||
G_N_ELEMENTS (context_foreground_blue_actions),
|
||||
G_CALLBACK (context_foreground_blue_cmd_callback));
|
||||
context_foreground_blue_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_foreground_hue_actions,
|
||||
G_N_ELEMENTS (context_foreground_hue_actions),
|
||||
G_CALLBACK (context_foreground_hue_cmd_callback));
|
||||
context_foreground_hue_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_foreground_saturation_actions,
|
||||
G_N_ELEMENTS (context_foreground_saturation_actions),
|
||||
G_CALLBACK (context_foreground_saturation_cmd_callback));
|
||||
context_foreground_saturation_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_foreground_value_actions,
|
||||
G_N_ELEMENTS (context_foreground_value_actions),
|
||||
G_CALLBACK (context_foreground_value_cmd_callback));
|
||||
context_foreground_value_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_background_red_actions,
|
||||
G_N_ELEMENTS (context_background_red_actions),
|
||||
G_CALLBACK (context_background_red_cmd_callback));
|
||||
context_background_red_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_background_green_actions,
|
||||
G_N_ELEMENTS (context_background_green_actions),
|
||||
G_CALLBACK (context_background_green_cmd_callback));
|
||||
context_background_green_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_background_blue_actions,
|
||||
G_N_ELEMENTS (context_background_blue_actions),
|
||||
G_CALLBACK (context_background_blue_cmd_callback));
|
||||
context_background_blue_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_background_hue_actions,
|
||||
G_N_ELEMENTS (context_background_hue_actions),
|
||||
G_CALLBACK (context_background_hue_cmd_callback));
|
||||
context_background_hue_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_background_saturation_actions,
|
||||
G_N_ELEMENTS (context_background_saturation_actions),
|
||||
G_CALLBACK (context_background_saturation_cmd_callback));
|
||||
context_background_saturation_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_background_value_actions,
|
||||
G_N_ELEMENTS (context_background_value_actions),
|
||||
G_CALLBACK (context_background_value_cmd_callback));
|
||||
context_background_value_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_opacity_actions,
|
||||
G_N_ELEMENTS (context_opacity_actions),
|
||||
G_CALLBACK (context_opacity_cmd_callback));
|
||||
context_opacity_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_paint_mode_actions,
|
||||
G_N_ELEMENTS (context_paint_mode_actions),
|
||||
G_CALLBACK (context_paint_mode_cmd_callback));
|
||||
context_paint_mode_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_tool_select_actions,
|
||||
G_N_ELEMENTS (context_tool_select_actions),
|
||||
G_CALLBACK (context_tool_select_cmd_callback));
|
||||
context_tool_select_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_brush_select_actions,
|
||||
G_N_ELEMENTS (context_brush_select_actions),
|
||||
G_CALLBACK (context_brush_select_cmd_callback));
|
||||
context_brush_select_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_pattern_select_actions,
|
||||
G_N_ELEMENTS (context_pattern_select_actions),
|
||||
G_CALLBACK (context_pattern_select_cmd_callback));
|
||||
context_pattern_select_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_palette_select_actions,
|
||||
G_N_ELEMENTS (context_palette_select_actions),
|
||||
G_CALLBACK (context_palette_select_cmd_callback));
|
||||
context_palette_select_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_gradient_select_actions,
|
||||
G_N_ELEMENTS (context_gradient_select_actions),
|
||||
G_CALLBACK (context_gradient_select_cmd_callback));
|
||||
context_gradient_select_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_font_select_actions,
|
||||
G_N_ELEMENTS (context_font_select_actions),
|
||||
G_CALLBACK (context_font_select_cmd_callback));
|
||||
context_font_select_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_brush_spacing_actions,
|
||||
G_N_ELEMENTS (context_brush_spacing_actions),
|
||||
G_CALLBACK (context_brush_spacing_cmd_callback));
|
||||
context_brush_spacing_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_brush_shape_actions,
|
||||
G_N_ELEMENTS (context_brush_shape_actions),
|
||||
G_CALLBACK (context_brush_shape_cmd_callback));
|
||||
context_brush_shape_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_brush_radius_actions,
|
||||
G_N_ELEMENTS (context_brush_radius_actions),
|
||||
G_CALLBACK (context_brush_radius_cmd_callback));
|
||||
context_brush_radius_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_brush_spikes_actions,
|
||||
G_N_ELEMENTS (context_brush_spikes_actions),
|
||||
G_CALLBACK (context_brush_spikes_cmd_callback));
|
||||
context_brush_spikes_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_brush_hardness_actions,
|
||||
G_N_ELEMENTS (context_brush_hardness_actions),
|
||||
G_CALLBACK (context_brush_hardness_cmd_callback));
|
||||
context_brush_hardness_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_brush_aspect_actions,
|
||||
G_N_ELEMENTS (context_brush_aspect_actions),
|
||||
G_CALLBACK (context_brush_aspect_cmd_callback));
|
||||
context_brush_aspect_cmd_callback);
|
||||
gimp_action_group_add_enum_actions (group, "context-action",
|
||||
context_brush_angle_actions,
|
||||
G_N_ELEMENTS (context_brush_angle_actions),
|
||||
G_CALLBACK (context_brush_angle_cmd_callback));
|
||||
context_brush_angle_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -81,8 +81,9 @@ static GimpColormapEditor * context_get_colormap_editor (void);
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
context_colors_default_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
context_colors_default_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
return_if_no_context (context, data);
|
||||
@ -91,8 +92,9 @@ context_colors_default_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_colors_swap_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
context_colors_swap_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
return_if_no_context (context, data);
|
||||
@ -102,16 +104,19 @@ context_colors_swap_cmd_callback (GtkAction *action,
|
||||
|
||||
#define SELECT_COLOR_CMD_CALLBACK(name, fgbg, use_colormap, use_palette) \
|
||||
void \
|
||||
context_##name##_##fgbg##ground_cmd_callback (GtkAction *action, \
|
||||
gint value, \
|
||||
gpointer data) \
|
||||
context_##name##_##fgbg##ground_cmd_callback (GimpAction *action, \
|
||||
GVariant *value, \
|
||||
gpointer data) \
|
||||
{ \
|
||||
GimpContext *context; \
|
||||
GimpRGB color; \
|
||||
GimpContext *context; \
|
||||
GimpRGB color; \
|
||||
GimpActionSelectType select_type; \
|
||||
return_if_no_context (context, data); \
|
||||
\
|
||||
\
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value); \
|
||||
\
|
||||
gimp_context_get_##fgbg##ground (context, &color); \
|
||||
context_select_color ((GimpActionSelectType) value, &color, \
|
||||
context_select_color (select_type, &color, \
|
||||
use_colormap, use_palette); \
|
||||
gimp_context_set_##fgbg##ground (context, &color); \
|
||||
}
|
||||
@ -124,16 +129,19 @@ SELECT_COLOR_CMD_CALLBACK (swatch, fore, TRUE, TRUE)
|
||||
SELECT_COLOR_CMD_CALLBACK (swatch, back, TRUE, TRUE)
|
||||
|
||||
void
|
||||
context_foreground_red_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_foreground_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
color.r = action_select_value ((GimpActionSelectType) value,
|
||||
color.r = action_select_value (select_type,
|
||||
color.r,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -141,16 +149,19 @@ context_foreground_red_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_green_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_foreground_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
color.g = action_select_value ((GimpActionSelectType) value,
|
||||
color.g = action_select_value (select_type,
|
||||
color.g,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -158,16 +169,19 @@ context_foreground_green_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_blue_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_foreground_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
color.b = action_select_value ((GimpActionSelectType) value,
|
||||
color.b = action_select_value (select_type,
|
||||
color.b,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -175,16 +189,19 @@ context_foreground_blue_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_background_red_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_background_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
color.r = action_select_value ((GimpActionSelectType) value,
|
||||
color.r = action_select_value (select_type,
|
||||
color.r,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -192,16 +209,19 @@ context_background_red_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_background_green_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_background_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
color.g = action_select_value ((GimpActionSelectType) value,
|
||||
color.g = action_select_value (select_type,
|
||||
color.g,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -209,16 +229,19 @@ context_background_green_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_background_blue_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_background_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
color.b = action_select_value ((GimpActionSelectType) value,
|
||||
color.b = action_select_value (select_type,
|
||||
color.b,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -226,18 +249,21 @@ context_background_blue_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_hue_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_foreground_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.h = action_select_value ((GimpActionSelectType) value,
|
||||
hsv.h = action_select_value (select_type,
|
||||
hsv.h,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -246,18 +272,21 @@ context_foreground_hue_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_saturation_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_foreground_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.s = action_select_value ((GimpActionSelectType) value,
|
||||
hsv.s = action_select_value (select_type,
|
||||
hsv.s,
|
||||
0.0, 1.0, 1.0,
|
||||
0.01, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -266,18 +295,21 @@ context_foreground_saturation_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_value_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_foreground_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.v = action_select_value ((GimpActionSelectType) value,
|
||||
hsv.v = action_select_value (select_type,
|
||||
hsv.v,
|
||||
0.0, 1.0, 1.0,
|
||||
0.01, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -286,18 +318,21 @@ context_foreground_value_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_background_hue_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_background_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.h = action_select_value ((GimpActionSelectType) value,
|
||||
hsv.h = action_select_value (select_type,
|
||||
hsv.h,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -306,18 +341,21 @@ context_background_hue_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_background_saturation_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_background_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.s = action_select_value ((GimpActionSelectType) value,
|
||||
hsv.s = action_select_value (select_type,
|
||||
hsv.s,
|
||||
0.0, 1.0, 1.0,
|
||||
0.01, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -326,18 +364,21 @@ context_background_saturation_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_background_value_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_background_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.v = action_select_value ((GimpActionSelectType) value,
|
||||
hsv.v = action_select_value (select_type,
|
||||
hsv.v,
|
||||
0.0, 1.0, 1.0,
|
||||
0.01, 0.01, 0.1, 0.0, FALSE);
|
||||
@ -346,19 +387,22 @@ context_background_value_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_opacity_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_opacity_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpToolInfo *tool_info;
|
||||
GimpContext *context;
|
||||
GimpToolInfo *tool_info;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
tool_info = gimp_context_get_tool (context);
|
||||
|
||||
if (tool_info && GIMP_IS_TOOL_OPTIONS (tool_info->tool_options))
|
||||
{
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (tool_info->tool_options),
|
||||
"opacity",
|
||||
@ -367,25 +411,28 @@ context_opacity_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_paint_mode_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_paint_mode_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpToolInfo *tool_info;
|
||||
GimpLayerMode *modes;
|
||||
gint n_modes;
|
||||
GimpLayerMode paint_mode;
|
||||
gint index;
|
||||
GimpContext *context;
|
||||
GimpToolInfo *tool_info;
|
||||
GimpLayerMode *modes;
|
||||
gint n_modes;
|
||||
GimpLayerMode paint_mode;
|
||||
gint index;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
paint_mode = gimp_context_get_paint_mode (context);
|
||||
|
||||
modes = gimp_layer_mode_get_context_array (paint_mode,
|
||||
GIMP_LAYER_MODE_CONTEXT_PAINT,
|
||||
&n_modes);
|
||||
index = context_paint_mode_index (paint_mode, modes, n_modes);
|
||||
index = action_select_value ((GimpActionSelectType) value,
|
||||
index = action_select_value (select_type,
|
||||
index, 0, n_modes - 1, 0,
|
||||
0.0, 1.0, 1.0, 0.0, FALSE);
|
||||
paint_mode = modes[index];
|
||||
@ -414,91 +461,117 @@ context_paint_mode_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_tool_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_tool_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context, context->gimp->tool_info_list);
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_brush_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
context, gimp_data_factory_get_container (context->gimp->brush_factory));
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->brush_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_pattern_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_pattern_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
context, gimp_data_factory_get_container (context->gimp->pattern_factory));
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->pattern_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_palette_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_palette_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
context, gimp_data_factory_get_container (context->gimp->palette_factory));
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->palette_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_gradient_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_gradient_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
context, gimp_data_factory_get_container (context->gimp->gradient_factory));
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->gradient_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_font_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_font_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
context, gimp_data_factory_get_container (context->gimp->font_factory));
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->font_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_spacing_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_brush_spacing_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH (brush) && gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"spacing",
|
||||
@ -507,14 +580,17 @@ context_brush_spacing_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_shape_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_brush_shape_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpBrushGeneratedShape shape;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
shape = (GimpBrushGeneratedShape) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
@ -524,10 +600,9 @@ context_brush_shape_cmd_callback (GtkAction *action,
|
||||
GimpDisplay *display;
|
||||
const char *value_desc;
|
||||
|
||||
gimp_brush_generated_set_shape (generated,
|
||||
(GimpBrushGeneratedShape) value);
|
||||
gimp_brush_generated_set_shape (generated, shape);
|
||||
|
||||
gimp_enum_get_value (GIMP_TYPE_BRUSH_GENERATED_SHAPE, value,
|
||||
gimp_enum_get_value (GIMP_TYPE_BRUSH_GENERATED_SHAPE, shape,
|
||||
NULL, NULL, &value_desc, NULL);
|
||||
display = action_data_get_display (data);
|
||||
|
||||
@ -540,14 +615,17 @@ context_brush_shape_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_radius_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_brush_radius_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
@ -566,7 +644,7 @@ context_brush_radius_cmd_callback (GtkAction *action,
|
||||
* is less than 1.0 px. This prevents irritating 0.1, 1.1, 2.1 etc
|
||||
* radius sequences when 1.0 px steps are used.
|
||||
*/
|
||||
switch ((GimpActionSelectType) value)
|
||||
switch (select_type)
|
||||
{
|
||||
case GIMP_ACTION_SELECT_SMALL_PREVIOUS:
|
||||
case GIMP_ACTION_SELECT_SMALL_NEXT:
|
||||
@ -583,7 +661,7 @@ context_brush_radius_cmd_callback (GtkAction *action,
|
||||
break;
|
||||
}
|
||||
|
||||
radius = action_select_value ((GimpActionSelectType) value,
|
||||
radius = action_select_value (select_type,
|
||||
radius,
|
||||
min_radius, 4000.0, min_radius,
|
||||
0.1, 1.0, 10.0, 0.05, FALSE);
|
||||
@ -600,20 +678,23 @@ context_brush_radius_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_spikes_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_brush_spikes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"spikes",
|
||||
@ -622,20 +703,23 @@ context_brush_spikes_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_hardness_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_brush_hardness_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"hardness",
|
||||
@ -644,20 +728,23 @@ context_brush_hardness_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_aspect_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_brush_aspect_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"aspect-ratio",
|
||||
@ -666,14 +753,17 @@ context_brush_aspect_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_angle_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
context_brush_angle_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
@ -685,12 +775,12 @@ context_brush_angle_cmd_callback (GtkAction *action,
|
||||
|
||||
angle = gimp_brush_generated_get_angle (generated);
|
||||
|
||||
if (value == GIMP_ACTION_SELECT_FIRST)
|
||||
if (select_type == GIMP_ACTION_SELECT_FIRST)
|
||||
angle = 0.0;
|
||||
else if (value == GIMP_ACTION_SELECT_LAST)
|
||||
else if (select_type == GIMP_ACTION_SELECT_LAST)
|
||||
angle = 90.0;
|
||||
else
|
||||
angle = action_select_value ((GimpActionSelectType) value,
|
||||
angle = action_select_value (select_type,
|
||||
angle,
|
||||
0.0, 180.0, 0.0,
|
||||
0.1, 1.0, 15.0, 0.1, TRUE);
|
||||
@ -717,14 +807,16 @@ context_select_object (GimpActionSelectType select_type,
|
||||
{
|
||||
GimpObject *current;
|
||||
|
||||
current = gimp_context_get_by_type (context,
|
||||
gimp_container_get_children_type (container));
|
||||
current =
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_container_get_children_type (container));
|
||||
|
||||
current = action_select_object (select_type, container, current);
|
||||
|
||||
if (current)
|
||||
gimp_context_set_by_type (context,
|
||||
gimp_container_get_children_type (container), current);
|
||||
gimp_container_get_children_type (container),
|
||||
current);
|
||||
}
|
||||
|
||||
static gint
|
||||
|
@ -20,119 +20,121 @@
|
||||
|
||||
|
||||
|
||||
void context_colors_default_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void context_colors_swap_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void context_colors_default_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_colors_swap_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_palette_foreground_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_palette_background_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_palette_foreground_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_palette_background_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_colormap_foreground_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_colormap_background_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_colormap_foreground_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_colormap_background_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_swatch_foreground_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_swatch_background_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_swatch_foreground_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_swatch_background_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_foreground_red_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_foreground_green_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_foreground_blue_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_foreground_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_background_red_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_background_green_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_background_blue_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_background_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_foreground_hue_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_foreground_saturation_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_foreground_value_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_foreground_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_background_hue_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_background_saturation_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_background_value_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_background_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_opacity_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_paint_mode_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_opacity_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_paint_mode_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_tool_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_brush_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_pattern_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_palette_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_gradient_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_font_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_tool_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_pattern_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_palette_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_gradient_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_font_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_brush_spacing_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_brush_shape_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_brush_radius_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_brush_spikes_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_brush_hardness_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_brush_aspect_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_brush_angle_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void context_brush_spacing_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_shape_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_radius_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_spikes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_hardness_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_aspect_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_angle_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CONTEXT_COMMANDS_H__ */
|
||||
|
@ -47,7 +47,7 @@ static const GimpToggleActionEntry cursor_info_toggle_actions[] =
|
||||
{ "cursor-info-sample-merged", NULL,
|
||||
NC_("cursor-info-action", "_Sample Merged"), "",
|
||||
NC_("cursor-info-action", "Use the composite color of all visible layers"),
|
||||
G_CALLBACK (cursor_info_sample_merged_cmd_callback),
|
||||
cursor_info_sample_merged_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_POINTER_INFO_SAMPLE_MERGED }
|
||||
};
|
||||
|
@ -30,13 +30,12 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
cursor_info_sample_merged_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
cursor_info_sample_merged_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpCursorView *view = GIMP_CURSOR_VIEW (data);
|
||||
gboolean active;
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
GimpCursorView *view = GIMP_CURSOR_VIEW (data);
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_cursor_view_set_sample_merged (view, active);
|
||||
}
|
||||
|
@ -19,8 +19,9 @@
|
||||
#define __CURSOR_INFO_COMMANDS_H__
|
||||
|
||||
|
||||
void cursor_info_sample_merged_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void cursor_info_sample_merged_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CURSOR_INFO_COMMANDS_H__ */
|
||||
|
@ -50,25 +50,25 @@ static const GimpActionEntry dashboard_actions[] =
|
||||
{ "dashboard-log-record", GIMP_ICON_RECORD,
|
||||
NC_("dashboard-action", "_Start/Stop Recording..."), NULL,
|
||||
NC_("dashboard-action", "Start/stop recording performance log"),
|
||||
G_CALLBACK (dashboard_log_record_cmd_callback),
|
||||
dashboard_log_record_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_LOG_RECORD },
|
||||
{ "dashboard-log-add-marker", GIMP_ICON_MARKER,
|
||||
NC_("dashboard-action", "_Add Marker..."), NULL,
|
||||
NC_("dashboard-action", "Add an event marker "
|
||||
"to the performance log"),
|
||||
G_CALLBACK (dashboard_log_add_marker_cmd_callback),
|
||||
dashboard_log_add_marker_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_LOG_ADD_MARKER },
|
||||
{ "dashboard-log-add-empty-marker", GIMP_ICON_MARKER,
|
||||
NC_("dashboard-action", "Add _Empty Marker"), NULL,
|
||||
NC_("dashboard-action", "Add an empty event marker "
|
||||
"to the performance log"),
|
||||
G_CALLBACK (dashboard_log_add_empty_marker_cmd_callback),
|
||||
dashboard_log_add_empty_marker_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_LOG_ADD_EMPTY_MARKER },
|
||||
|
||||
{ "dashboard-reset", GIMP_ICON_RESET,
|
||||
NC_("dashboard-action", "_Reset"), NULL,
|
||||
NC_("dashboard-action", "Reset cumulative data"),
|
||||
G_CALLBACK (dashboard_reset_cmd_callback),
|
||||
dashboard_reset_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_RESET },
|
||||
};
|
||||
|
||||
@ -78,7 +78,7 @@ static const GimpToggleActionEntry dashboard_toggle_actions[] =
|
||||
NC_("dashboard-action", "_Low Swap Space Warning"), NULL,
|
||||
NC_("dashboard-action", "Raise the dashboard when "
|
||||
"the swap size approaches its limit"),
|
||||
G_CALLBACK (dashboard_low_swap_space_warning_cmd_callback),
|
||||
dashboard_low_swap_space_warning_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_DASHBOARD_LOW_SWAP_SPACE_WARNING }
|
||||
};
|
||||
@ -156,14 +156,14 @@ dashboard_actions_setup (GimpActionGroup *group)
|
||||
G_N_ELEMENTS (dashboard_update_interval_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (dashboard_update_interval_cmd_callback));
|
||||
dashboard_update_interval_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "dashboard-history-duration",
|
||||
dashboard_history_duration_actions,
|
||||
G_N_ELEMENTS (dashboard_history_duration_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (dashboard_history_duration_cmd_callback));
|
||||
dashboard_history_duration_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -52,34 +52,35 @@ static void dashboard_log_add_marker_response (GtkWidget *dialog,
|
||||
|
||||
|
||||
void
|
||||
dashboard_update_interval_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
dashboard_update_interval_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
GimpDashboardUpdateInteval update_interval;
|
||||
|
||||
update_interval = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
update_interval = g_variant_get_int32 (value);
|
||||
|
||||
gimp_dashboard_set_update_interval (dashboard, update_interval);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_history_duration_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
dashboard_history_duration_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
GimpDashboardHistoryDuration history_duration;
|
||||
|
||||
history_duration = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
history_duration = g_variant_get_int32 (value);
|
||||
|
||||
gimp_dashboard_set_history_duration (dashboard, history_duration);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_log_record_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dashboard_log_record_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
|
||||
@ -181,8 +182,9 @@ dashboard_log_record_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_log_add_marker_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dashboard_log_add_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
GtkWidget *dialog;
|
||||
@ -211,8 +213,9 @@ dashboard_log_add_marker_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_log_add_empty_marker_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dashboard_log_add_empty_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
|
||||
@ -220,8 +223,9 @@ dashboard_log_add_empty_marker_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_reset_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dashboard_reset_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
|
||||
@ -229,13 +233,12 @@ dashboard_reset_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dashboard_low_swap_space_warning_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
gboolean low_swap_space_warning;
|
||||
|
||||
low_swap_space_warning = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
gboolean low_swap_space_warning = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dashboard_set_low_swap_space_warning (dashboard, low_swap_space_warning);
|
||||
}
|
||||
@ -243,7 +246,6 @@ dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
|
||||
|
||||
/* private functions */
|
||||
|
||||
|
||||
static void
|
||||
dashboard_log_record_response (GtkWidget *dialog,
|
||||
int response_id,
|
||||
|
@ -19,25 +19,30 @@
|
||||
#define __DASHBOARD_COMMANDS_H__
|
||||
|
||||
|
||||
void dashboard_update_interval_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void dashboard_history_duration_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void dashboard_update_interval_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dashboard_history_duration_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dashboard_log_record_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dashboard_log_add_marker_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dashboard_log_add_empty_marker_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dashboard_log_record_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dashboard_log_add_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dashboard_log_add_empty_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dashboard_reset_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dashboard_reset_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dashboard_low_swap_space_warning_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DASHBOARD_COMMANDS_H__ */
|
||||
|
@ -55,8 +55,9 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
data_open_as_image_cmd_callback (GtkAction *action,
|
||||
gpointer user_data)
|
||||
data_open_as_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
@ -95,8 +96,9 @@ data_open_as_image_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
data_new_cmd_callback (GtkAction *action,
|
||||
gpointer user_data)
|
||||
data_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
|
||||
@ -125,8 +127,9 @@ data_new_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
data_duplicate_cmd_callback (GtkAction *action,
|
||||
gpointer user_data)
|
||||
data_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
@ -156,8 +159,9 @@ data_duplicate_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
data_copy_location_cmd_callback (GtkAction *action,
|
||||
gpointer user_data)
|
||||
data_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
@ -184,8 +188,9 @@ data_copy_location_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
data_show_in_file_manager_cmd_callback (GtkAction *action,
|
||||
gpointer user_data)
|
||||
data_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
@ -218,8 +223,9 @@ data_show_in_file_manager_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
data_delete_cmd_callback (GtkAction *action,
|
||||
gpointer user_data)
|
||||
data_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
@ -248,8 +254,9 @@ data_delete_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
data_refresh_cmd_callback (GtkAction *action,
|
||||
gpointer user_data)
|
||||
data_refresh_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
Gimp *gimp;
|
||||
@ -262,9 +269,9 @@ data_refresh_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
data_edit_cmd_callback (GtkAction *action,
|
||||
const gchar *value,
|
||||
gpointer user_data)
|
||||
data_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
@ -288,7 +295,8 @@ data_edit_cmd_callback (GtkAction *action,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
screen,
|
||||
monitor,
|
||||
value);
|
||||
g_variant_get_string (value,
|
||||
NULL));
|
||||
|
||||
gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),
|
||||
data);
|
||||
|
@ -19,23 +19,30 @@
|
||||
#define __DATA_COMMANDS_H__
|
||||
|
||||
|
||||
void data_open_as_image_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void data_new_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void data_duplicate_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void data_copy_location_cmd_callback (GtkAction *action,
|
||||
gpointer user_data);
|
||||
void data_show_in_file_manager_cmd_callback (GtkAction *action,
|
||||
gpointer user_data);
|
||||
void data_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void data_refresh_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void data_edit_cmd_callback (GtkAction *action,
|
||||
const gchar *value,
|
||||
gpointer data);
|
||||
void data_open_as_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_refresh_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DATA_COMMANDS_H__ */
|
||||
|
@ -30,13 +30,14 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
data_editor_edit_active_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
data_editor_edit_active_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDataEditor *editor = GIMP_DATA_EDITOR (data);
|
||||
gboolean edit_active;
|
||||
|
||||
edit_active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
edit_active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_data_editor_set_edit_active (editor, edit_active);
|
||||
}
|
||||
|
@ -19,8 +19,9 @@
|
||||
#define __DATA_EDITOR_COMMANDS_H__
|
||||
|
||||
|
||||
void data_editor_edit_active_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void data_editor_edit_active_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DATA_EDITOR_COMMANDS_H__ */
|
||||
|
@ -38,7 +38,7 @@ static const GimpActionEntry debug_actions[] =
|
||||
|
||||
{ "debug-mem-profile", NULL,
|
||||
"_Memory Profile", NULL, NULL,
|
||||
G_CALLBACK (debug_mem_profile_cmd_callback),
|
||||
debug_mem_profile_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-benchmark-projection", NULL,
|
||||
@ -46,33 +46,33 @@ static const GimpActionEntry debug_actions[] =
|
||||
"Invalidates the entire projection, measures the time it takes to "
|
||||
"validate (render) the part that is visible in the active display, "
|
||||
"and print the result to stdout.",
|
||||
G_CALLBACK (debug_benchmark_projection_cmd_callback),
|
||||
debug_benchmark_projection_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-show-image-graph", NULL,
|
||||
"Show Image _Graph", NULL,
|
||||
"Creates a new image showing the GEGL graph of this image",
|
||||
G_CALLBACK (debug_show_image_graph_cmd_callback),
|
||||
debug_show_image_graph_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-items", NULL,
|
||||
"_Dump Items", NULL, NULL,
|
||||
G_CALLBACK (debug_dump_menus_cmd_callback),
|
||||
debug_dump_menus_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-managers", NULL,
|
||||
"Dump _UI Managers", NULL, NULL,
|
||||
G_CALLBACK (debug_dump_managers_cmd_callback),
|
||||
debug_dump_managers_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-keyboard-shortcuts", NULL,
|
||||
"Dump _Keyboard Shortcuts", NULL, NULL,
|
||||
G_CALLBACK (debug_dump_keyboard_shortcuts_cmd_callback),
|
||||
debug_dump_keyboard_shortcuts_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-attached-data", NULL,
|
||||
"Dump Attached Data", NULL, NULL,
|
||||
G_CALLBACK (debug_dump_attached_data_cmd_callback),
|
||||
debug_dump_attached_data_cmd_callback,
|
||||
NULL }
|
||||
};
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpmenufactory.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
|
||||
@ -71,8 +72,9 @@ static gboolean debug_accel_find_func (GtkAccelKey *key,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
debug_mem_profile_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
debug_mem_profile_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
extern gboolean gimp_debug_memsize;
|
||||
Gimp *gimp;
|
||||
@ -86,8 +88,9 @@ debug_mem_profile_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
debug_benchmark_projection_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
debug_benchmark_projection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
return_if_no_display (display, data);
|
||||
@ -96,8 +99,9 @@ debug_benchmark_projection_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
debug_show_image_graph_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
debug_show_image_graph_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *source_image = NULL;
|
||||
return_if_no_image (source_image, data);
|
||||
@ -106,8 +110,9 @@ debug_show_image_graph_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_menus_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
debug_dump_menus_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
@ -147,8 +152,9 @@ debug_dump_menus_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_managers_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
debug_dump_managers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
@ -169,30 +175,31 @@ debug_dump_managers_cmd_callback (GtkAction *action,
|
||||
"========================================\n\n",
|
||||
entry->identifier);
|
||||
|
||||
g_print ("%s\n", gtk_ui_manager_get_ui (managers->data));
|
||||
g_print ("%s\n", gimp_ui_manager_get_ui (managers->data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImageWindow *window;
|
||||
GtkUIManager *manager;
|
||||
GimpUIManager *manager;
|
||||
GtkAccelGroup *accel_group;
|
||||
GList *group_it;
|
||||
GList *strings = NULL;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
window = gimp_display_shell_get_window (gimp_display_get_shell (display));
|
||||
manager = GTK_UI_MANAGER (gimp_image_window_get_ui_manager (window));
|
||||
manager = gimp_image_window_get_ui_manager (window);
|
||||
|
||||
accel_group = gtk_ui_manager_get_accel_group (manager);
|
||||
accel_group = gimp_ui_manager_get_accel_group (manager);
|
||||
|
||||
/* Gather formatted strings of keyboard shortcuts */
|
||||
for (group_it = gtk_ui_manager_get_action_groups (manager);
|
||||
for (group_it = gimp_ui_manager_get_action_groups (manager);
|
||||
group_it;
|
||||
group_it = g_list_next (group_it))
|
||||
{
|
||||
@ -200,13 +207,13 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
||||
GList *actions = NULL;
|
||||
GList *action_it = NULL;
|
||||
|
||||
actions = gtk_action_group_list_actions (GTK_ACTION_GROUP (group));
|
||||
actions = gimp_action_group_list_actions (group);
|
||||
actions = g_list_sort (actions, (GCompareFunc) gimp_action_name_compare);
|
||||
|
||||
for (action_it = actions; action_it; action_it = g_list_next (action_it))
|
||||
{
|
||||
GtkAction *action = action_it->data;
|
||||
const gchar *name = gtk_action_get_name (action);
|
||||
GimpAction *action = action_it->data;
|
||||
const gchar *name = gimp_action_get_name (action);
|
||||
GClosure *accel_closure = NULL;
|
||||
|
||||
if (strstr (name, "-menu") ||
|
||||
@ -214,7 +221,7 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
||||
name[0] == '<')
|
||||
continue;
|
||||
|
||||
accel_closure = gtk_action_get_accel_closure (action);
|
||||
accel_closure = gimp_action_get_accel_closure (action);
|
||||
|
||||
if (accel_closure)
|
||||
{
|
||||
@ -229,7 +236,7 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
||||
gchar *label;
|
||||
gchar *key_string;
|
||||
|
||||
label_tmp = gtk_action_get_label (action);
|
||||
label_tmp = gimp_action_get_label (action);
|
||||
label = gimp_strip_uline (label_tmp);
|
||||
key_string = gtk_accelerator_get_label (key->accel_key,
|
||||
key->accel_mods);
|
||||
@ -264,8 +271,9 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_attached_data_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
debug_dump_attached_data_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
GimpContext *user_context = gimp_get_user_context (gimp);
|
||||
@ -290,10 +298,7 @@ debug_benchmark_projection (GimpDisplay *display)
|
||||
|
||||
GIMP_TIMER_START ();
|
||||
|
||||
gimp_image_invalidate (image,
|
||||
0, 0,
|
||||
gimp_image_get_width (image),
|
||||
gimp_image_get_height (image));
|
||||
gimp_image_invalidate_all (image);
|
||||
gimp_projection_flush_now (projection, TRUE);
|
||||
|
||||
GIMP_TIMER_END ("Validation of the entire projection");
|
||||
|
@ -19,21 +19,28 @@
|
||||
#define __DEBUG_COMMANDS_H__
|
||||
|
||||
|
||||
void debug_mem_profile_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_benchmark_projection_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_show_image_graph_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_menus_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_managers_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_attached_data_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_benchmark_projection_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_mem_profile_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_benchmark_projection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_show_image_graph_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_menus_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_managers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_attached_data_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
|
||||
#endif /* __DEBUG_COMMANDS_H__ */
|
||||
|
@ -116,7 +116,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
|
||||
GIMP_HELP_UNDO_DIALOG },
|
||||
|
||||
{ "dialogs-cursor", GIMP_ICON_CURSOR,
|
||||
NC_("dialogs-action", "Pointer"), NULL,
|
||||
NC_("dialogs-action", "_Pointer"), NULL,
|
||||
NC_("dialogs-action", "Open the pointer information dialog"),
|
||||
"gimp-cursor-view",
|
||||
GIMP_HELP_POINTER_INFO_DIALOG },
|
||||
@ -146,7 +146,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
|
||||
GIMP_HELP_BRUSH_EDIT },
|
||||
|
||||
{ "dialogs-dynamics", GIMP_ICON_DYNAMICS,
|
||||
NC_("dialogs-action", "Paint Dynamics"), NULL,
|
||||
NC_("dialogs-action", "Paint D_ynamics"), NULL,
|
||||
NC_("dialogs-action", "Open paint dynamics dialog"),
|
||||
"gimp-dynamics-list|gimp-dynamics-grid",
|
||||
GIMP_HELP_DYNAMICS_DIALOG },
|
||||
@ -336,12 +336,12 @@ dialogs_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_dockable_actions,
|
||||
G_N_ELEMENTS (dialogs_dockable_actions),
|
||||
G_CALLBACK (dialogs_create_dockable_cmd_callback));
|
||||
dialogs_create_dockable_cmd_callback);
|
||||
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_toplevel_actions,
|
||||
G_N_ELEMENTS (dialogs_toplevel_actions),
|
||||
G_CALLBACK (dialogs_create_toplevel_cmd_callback));
|
||||
dialogs_create_toplevel_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
@ -354,12 +354,12 @@ dialogs_actions_update (GimpActionGroup *group,
|
||||
|
||||
if (dialogs_actions_toolbox_exists (gimp))
|
||||
{
|
||||
toolbox_label = _("Toolbox");
|
||||
toolbox_label = _("Tool_box");
|
||||
toolbox_tooltip = _("Raise the toolbox");
|
||||
}
|
||||
else
|
||||
{
|
||||
toolbox_label = _("New Toolbox");
|
||||
toolbox_label = _("New Tool_box");
|
||||
toolbox_tooltip = _("Create a new toolbox");
|
||||
}
|
||||
|
||||
|
@ -37,36 +37,42 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
dialogs_create_toplevel_cmd_callback (GtkAction *action,
|
||||
const gchar *value,
|
||||
gpointer data)
|
||||
dialogs_create_toplevel_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *widget;
|
||||
const gchar *identifier;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
if (value)
|
||||
identifier = g_variant_get_string (value, NULL);
|
||||
|
||||
if (identifier)
|
||||
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
NULL /*ui_manager*/,
|
||||
value, -1, TRUE);
|
||||
identifier, -1, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_create_dockable_cmd_callback (GtkAction *action,
|
||||
const gchar *value,
|
||||
gpointer data)
|
||||
dialogs_create_dockable_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
const gchar *identifier;
|
||||
return_if_no_gimp (gimp, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
if (value)
|
||||
identifier = g_variant_get_string (value, NULL);
|
||||
|
||||
if (identifier)
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
|
||||
gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
value);
|
||||
identifier);
|
||||
}
|
||||
|
@ -19,12 +19,12 @@
|
||||
#define __DIALOGS_COMMANDS_H__
|
||||
|
||||
|
||||
void dialogs_create_toplevel_cmd_callback (GtkAction *action,
|
||||
const gchar *value,
|
||||
gpointer data);
|
||||
void dialogs_create_dockable_cmd_callback (GtkAction *action,
|
||||
const gchar *value,
|
||||
gpointer data);
|
||||
void dialogs_create_toplevel_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dialogs_create_dockable_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DIALOGS_COMMANDS_H__ */
|
||||
|
@ -48,13 +48,13 @@ static const GimpActionEntry dock_actions[] =
|
||||
|
||||
{ "dock-close", GIMP_ICON_WINDOW_CLOSE,
|
||||
NC_("dock-action", "Close Dock"), "", NULL,
|
||||
G_CALLBACK (window_close_cmd_callback),
|
||||
window_close_cmd_callback,
|
||||
GIMP_HELP_DOCK_CLOSE },
|
||||
|
||||
{ "dock-open-display", NULL,
|
||||
NC_("dock-action", "_Open Display..."), NULL,
|
||||
NC_("dock-action", "Connect to another display"),
|
||||
G_CALLBACK (window_open_display_cmd_callback),
|
||||
window_open_display_cmd_callback,
|
||||
NULL }
|
||||
};
|
||||
|
||||
@ -62,13 +62,13 @@ static const GimpToggleActionEntry dock_toggle_actions[] =
|
||||
{
|
||||
{ "dock-show-image-menu", NULL,
|
||||
NC_("dock-action", "_Show Image Selection"), NULL, NULL,
|
||||
G_CALLBACK (dock_toggle_image_menu_cmd_callback),
|
||||
dock_toggle_image_menu_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_IMAGE_MENU },
|
||||
|
||||
{ "dock-auto-follow-active", NULL,
|
||||
NC_("dock-action", "Auto _Follow Active Image"), NULL, NULL,
|
||||
G_CALLBACK (dock_toggle_auto_cmd_callback),
|
||||
dock_toggle_auto_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_AUTO_BUTTON }
|
||||
};
|
||||
|
@ -47,8 +47,9 @@ dock_commands_get_dock_window_from_widget (GtkWidget *widget)
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
dock_toggle_image_menu_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dock_toggle_image_menu_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
@ -58,15 +59,16 @@ dock_toggle_image_menu_cmd_callback (GtkAction *action,
|
||||
|
||||
if (dock_window)
|
||||
{
|
||||
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dock_window_set_show_image_menu (dock_window, active);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dock_toggle_auto_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dock_toggle_auto_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
@ -76,7 +78,7 @@ dock_toggle_auto_cmd_callback (GtkAction *action,
|
||||
|
||||
if (dock_window)
|
||||
{
|
||||
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dock_window_set_auto_follow_active (dock_window, active);
|
||||
}
|
||||
|
@ -19,10 +19,12 @@
|
||||
#define __DOCK_COMMANDS_H__
|
||||
|
||||
|
||||
void dock_toggle_image_menu_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dock_toggle_auto_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dock_toggle_image_menu_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dock_toggle_auto_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCK_COMMANDS_H__ */
|
||||
|
@ -59,12 +59,12 @@ static const GimpActionEntry dockable_actions[] =
|
||||
|
||||
{ "dockable-close-tab", "window-close",
|
||||
NC_("dockable-action", "_Close Tab"), "", NULL,
|
||||
G_CALLBACK (dockable_close_tab_cmd_callback),
|
||||
dockable_close_tab_cmd_callback,
|
||||
GIMP_HELP_DOCK_TAB_CLOSE },
|
||||
|
||||
{ "dockable-detach-tab", GIMP_ICON_DETACH,
|
||||
NC_("dockable-action", "_Detach Tab"), "", NULL,
|
||||
G_CALLBACK (dockable_detach_tab_cmd_callback),
|
||||
dockable_detach_tab_cmd_callback,
|
||||
GIMP_HELP_DOCK_TAB_DETACH }
|
||||
};
|
||||
|
||||
@ -127,13 +127,13 @@ static const GimpToggleActionEntry dockable_toggle_actions[] =
|
||||
NC_("dockable-action", "Loc_k Tab to Dock"), NULL,
|
||||
NC_("dockable-action",
|
||||
"Protect this tab from being dragged with the mouse pointer"),
|
||||
G_CALLBACK (dockable_lock_tab_cmd_callback),
|
||||
dockable_lock_tab_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_DOCK_TAB_LOCK },
|
||||
|
||||
{ "dockable-show-button-bar", NULL,
|
||||
NC_("dockable-action", "Show _Button Bar"), NULL, NULL,
|
||||
G_CALLBACK (dockable_show_button_bar_cmd_callback),
|
||||
dockable_show_button_bar_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_SHOW_BUTTON_BAR }
|
||||
};
|
||||
@ -166,28 +166,28 @@ dockable_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_dockable_actions,
|
||||
n_dialogs_dockable_actions,
|
||||
G_CALLBACK (dockable_add_tab_cmd_callback));
|
||||
dockable_add_tab_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "preview-size",
|
||||
dockable_view_size_actions,
|
||||
G_N_ELEMENTS (dockable_view_size_actions),
|
||||
NULL,
|
||||
GIMP_VIEW_SIZE_MEDIUM,
|
||||
G_CALLBACK (dockable_view_size_cmd_callback));
|
||||
dockable_view_size_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "tab-style",
|
||||
dockable_tab_style_actions,
|
||||
G_N_ELEMENTS (dockable_tab_style_actions),
|
||||
NULL,
|
||||
GIMP_TAB_STYLE_AUTOMATIC,
|
||||
G_CALLBACK (dockable_tab_style_cmd_callback));
|
||||
dockable_tab_style_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "dockable-action",
|
||||
dockable_view_type_actions,
|
||||
G_N_ELEMENTS (dockable_view_type_actions),
|
||||
NULL,
|
||||
GIMP_VIEW_TYPE_LIST,
|
||||
G_CALLBACK (dockable_toggle_view_cmd_callback));
|
||||
dockable_toggle_view_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -44,20 +44,21 @@ static GimpDockable * dockable_get_current (GimpDockbook *dockbook);
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
dockable_add_tab_cmd_callback (GtkAction *action,
|
||||
const gchar *value,
|
||||
gpointer data)
|
||||
dockable_add_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
|
||||
gimp_dockbook_add_from_dialog_factory (dockbook,
|
||||
value /*identifiers*/,
|
||||
g_variant_get_string (value, NULL),
|
||||
-1);
|
||||
}
|
||||
|
||||
void
|
||||
dockable_close_tab_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dockable_close_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
@ -72,8 +73,9 @@ dockable_close_tab_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
dockable_detach_tab_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dockable_detach_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
@ -83,32 +85,32 @@ dockable_detach_tab_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
dockable_lock_tab_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dockable_lock_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
gboolean lock = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean lock = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dockable_set_locked (dockable, lock);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_toggle_view_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
dockable_toggle_view_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable;
|
||||
GimpViewType view_type;
|
||||
gint page_num;
|
||||
|
||||
view_type = (GimpViewType)
|
||||
gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
view_type = (GimpViewType) g_variant_get_int32 (value);
|
||||
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||
|
||||
@ -211,15 +213,15 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
dockable_view_size_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
dockable_view_size_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
gint view_size;
|
||||
|
||||
view_size = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
view_size = g_variant_get_int32 (value);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
@ -239,16 +241,15 @@ dockable_view_size_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
dockable_tab_style_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
dockable_tab_style_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
GimpTabStyle tab_style;
|
||||
|
||||
tab_style = (GimpTabStyle)
|
||||
gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
tab_style = (GimpTabStyle) g_variant_get_int32 (value);
|
||||
|
||||
if (dockable && gimp_dockable_get_tab_style (dockable) != tab_style)
|
||||
{
|
||||
@ -265,8 +266,9 @@ dockable_tab_style_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
dockable_show_button_bar_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
dockable_show_button_bar_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
@ -277,7 +279,7 @@ dockable_show_button_bar_cmd_callback (GtkAction *action,
|
||||
gboolean show;
|
||||
|
||||
docked = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||
show = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
show = g_variant_get_boolean (value);
|
||||
|
||||
gimp_docked_set_show_button_bar (docked, show);
|
||||
}
|
||||
|
@ -19,27 +19,31 @@
|
||||
#define __DOCKABLE_COMMANDS_H__
|
||||
|
||||
|
||||
void dockable_add_tab_cmd_callback (GtkAction *action,
|
||||
const gchar *value,
|
||||
gpointer data);
|
||||
void dockable_close_tab_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dockable_detach_tab_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dockable_lock_tab_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dockable_add_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_close_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_detach_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_lock_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dockable_toggle_view_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void dockable_view_size_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void dockable_tab_style_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void dockable_show_button_bar_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void dockable_toggle_view_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_view_size_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_tab_style_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_show_button_bar_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCKABLE_COMMANDS_H__ */
|
||||
|
@ -45,62 +45,62 @@ static const GimpActionEntry documents_actions[] =
|
||||
{ "documents-open", GIMP_ICON_DOCUMENT_OPEN,
|
||||
NC_("documents-action", "_Open Image"), NULL,
|
||||
NC_("documents-action", "Open the selected entry"),
|
||||
G_CALLBACK (documents_open_cmd_callback),
|
||||
documents_open_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-raise-or-open", NULL,
|
||||
NC_("documents-action", "_Raise or Open Image"), NULL,
|
||||
NC_("documents-action", "Raise window if already open"),
|
||||
G_CALLBACK (documents_raise_or_open_cmd_callback),
|
||||
documents_raise_or_open_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-file-open-dialog", NULL,
|
||||
NC_("documents-action", "File Open _Dialog"), NULL,
|
||||
NC_("documents-action", "Open image dialog"),
|
||||
G_CALLBACK (documents_file_open_dialog_cmd_callback),
|
||||
documents_file_open_dialog_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("documents-action", "Copy Image _Location"), NULL,
|
||||
NC_("documents-action", "Copy image location to clipboard"),
|
||||
G_CALLBACK (documents_copy_location_cmd_callback),
|
||||
documents_copy_location_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_COPY_LOCATION },
|
||||
|
||||
{ "documents-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("documents-action", "Show in _File Manager"), NULL,
|
||||
NC_("documents-action", "Show image location in the file manager"),
|
||||
G_CALLBACK (documents_show_in_file_manager_cmd_callback),
|
||||
documents_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "documents-remove", GIMP_ICON_LIST_REMOVE,
|
||||
NC_("documents-action", "Remove _Entry"), NULL,
|
||||
NC_("documents-action", "Remove the selected entry"),
|
||||
G_CALLBACK (documents_remove_cmd_callback),
|
||||
documents_remove_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REMOVE },
|
||||
|
||||
{ "documents-clear", GIMP_ICON_SHRED,
|
||||
NC_("documents-action", "_Clear History"), NULL,
|
||||
NC_("documents-action", "Clear the entire document history"),
|
||||
G_CALLBACK (documents_clear_cmd_callback),
|
||||
documents_clear_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_CLEAR },
|
||||
|
||||
{ "documents-recreate-preview", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("documents-action", "Recreate _Preview"), NULL,
|
||||
NC_("documents-action", "Recreate preview"),
|
||||
G_CALLBACK (documents_recreate_preview_cmd_callback),
|
||||
documents_recreate_preview_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-reload-previews", NULL,
|
||||
NC_("documents-action", "Reload _all Previews"), NULL,
|
||||
NC_("documents-action", "Reload all previews"),
|
||||
G_CALLBACK (documents_reload_previews_cmd_callback),
|
||||
documents_reload_previews_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-remove-dangling", NULL,
|
||||
NC_("documents-action", "Remove Dangling E_ntries"), NULL,
|
||||
NC_("documents-action",
|
||||
"Remove entries for which the corresponding file is not available"),
|
||||
G_CALLBACK (documents_remove_dangling_cmd_callback),
|
||||
documents_remove_dangling_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REFRESH }
|
||||
};
|
||||
|
||||
|
@ -75,8 +75,9 @@ static void documents_raise_display (GimpDisplay *display,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
documents_open_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
@ -99,8 +100,9 @@ documents_open_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
documents_raise_or_open_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_raise_or_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
@ -129,8 +131,9 @@ documents_raise_or_open_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
documents_file_open_dialog_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_file_open_dialog_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
@ -151,8 +154,9 @@ documents_file_open_dialog_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
documents_copy_location_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
@ -167,8 +171,9 @@ documents_copy_location_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
documents_show_in_file_manager_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
@ -196,8 +201,9 @@ documents_show_in_file_manager_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
documents_remove_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_remove_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context = gimp_container_view_get_context (editor->view);
|
||||
@ -212,8 +218,9 @@ documents_remove_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
documents_clear_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context = gimp_container_view_get_context (editor->view);
|
||||
@ -282,8 +289,9 @@ documents_clear_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
documents_recreate_preview_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_recreate_preview_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
@ -313,8 +321,9 @@ documents_recreate_preview_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
documents_reload_previews_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_reload_previews_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
@ -344,8 +353,9 @@ documents_remove_dangling_foreach (GimpImagefile *imagefile,
|
||||
}
|
||||
|
||||
void
|
||||
documents_remove_dangling_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
documents_remove_dangling_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
|
@ -19,26 +19,36 @@
|
||||
#define __DOCUMENTS_COMMANDS_H__
|
||||
|
||||
|
||||
void documents_open_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_raise_or_open_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_file_open_dialog_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_copy_location_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_show_in_file_manager_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_remove_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_clear_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_recreate_preview_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_reload_previews_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_remove_dangling_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void documents_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_raise_or_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_file_open_dialog_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_remove_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_recreate_preview_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_reload_previews_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_remove_dangling_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCUMENTS_COMMANDS_H__ */
|
||||
|
@ -44,13 +44,13 @@ static const GimpActionEntry drawable_actions[] =
|
||||
{ "drawable-equalize", NULL,
|
||||
NC_("drawable-action", "_Equalize"), NULL,
|
||||
NC_("drawable-action", "Automatic contrast enhancement"),
|
||||
G_CALLBACK (drawable_equalize_cmd_callback),
|
||||
drawable_equalize_cmd_callback,
|
||||
GIMP_HELP_LAYER_EQUALIZE },
|
||||
|
||||
{ "drawable-levels-stretch", NULL,
|
||||
NC_("drawable-action", "_White Balance"), NULL,
|
||||
NC_("drawable-action", "Automatic white balance correction"),
|
||||
G_CALLBACK (drawable_levels_stretch_cmd_callback),
|
||||
drawable_levels_stretch_cmd_callback,
|
||||
GIMP_HELP_LAYER_WHITE_BALANCE }
|
||||
};
|
||||
|
||||
@ -58,13 +58,13 @@ static const GimpToggleActionEntry drawable_toggle_actions[] =
|
||||
{
|
||||
{ "drawable-visible", GIMP_ICON_VISIBLE,
|
||||
NC_("drawable-action", "Toggle Drawable _Visibility"), NULL, NULL,
|
||||
G_CALLBACK (drawable_visible_cmd_callback),
|
||||
drawable_visible_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_VISIBLE },
|
||||
|
||||
{ "drawable-linked", GIMP_ICON_LINKED,
|
||||
NC_("drawable-action", "Toggle Drawable _Linked State"), NULL, NULL,
|
||||
G_CALLBACK (drawable_linked_cmd_callback),
|
||||
drawable_linked_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LINKED },
|
||||
|
||||
@ -72,7 +72,7 @@ static const GimpToggleActionEntry drawable_toggle_actions[] =
|
||||
NC_("drawable-action", "L_ock Pixels of Drawable"), NULL,
|
||||
NC_("drawable-action",
|
||||
"Keep the pixels on this drawable from being modified"),
|
||||
G_CALLBACK (drawable_lock_content_cmd_callback),
|
||||
drawable_lock_content_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LOCK_PIXELS },
|
||||
|
||||
@ -80,7 +80,7 @@ static const GimpToggleActionEntry drawable_toggle_actions[] =
|
||||
NC_("drawable-action", "L_ock Position of Drawable"), NULL,
|
||||
NC_("drawable-action",
|
||||
"Keep the position on this drawable from being modified"),
|
||||
G_CALLBACK (drawable_lock_position_cmd_callback),
|
||||
drawable_lock_position_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LOCK_POSITION },
|
||||
};
|
||||
@ -136,12 +136,12 @@ drawable_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "drawable-action",
|
||||
drawable_flip_actions,
|
||||
G_N_ELEMENTS (drawable_flip_actions),
|
||||
G_CALLBACK (drawable_flip_cmd_callback));
|
||||
drawable_flip_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "drawable-action",
|
||||
drawable_rotate_actions,
|
||||
G_N_ELEMENTS (drawable_rotate_actions),
|
||||
G_CALLBACK (drawable_rotate_cmd_callback));
|
||||
drawable_rotate_cmd_callback);
|
||||
|
||||
#define SET_ALWAYS_SHOW_IMAGE(action,show) \
|
||||
gimp_action_group_set_action_always_show_image (group, action, show)
|
||||
|
@ -46,8 +46,9 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
drawable_equalize_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
drawable_equalize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
@ -58,8 +59,9 @@ drawable_equalize_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
drawable_levels_stretch_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
drawable_levels_stretch_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
@ -83,15 +85,16 @@ drawable_levels_stretch_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
drawable_linked_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
drawable_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gboolean linked;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
linked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
linked = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
drawable =
|
||||
@ -114,15 +117,16 @@ drawable_linked_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
drawable_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
drawable_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gboolean visible;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
visible = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
drawable =
|
||||
@ -145,15 +149,16 @@ drawable_visible_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
drawable_lock_content_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
drawable_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gboolean locked;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
locked = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
drawable =
|
||||
@ -180,15 +185,16 @@ drawable_lock_content_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
drawable_lock_position_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
drawable_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gboolean locked;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
locked = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
drawable =
|
||||
@ -211,24 +217,27 @@ drawable_lock_position_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
drawable_flip_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
drawable_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
GimpItem *item;
|
||||
GimpContext *context;
|
||||
gint off_x, off_y;
|
||||
gdouble axis = 0.0;
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
GimpItem *item;
|
||||
GimpContext *context;
|
||||
gint off_x, off_y;
|
||||
gdouble axis = 0.0;
|
||||
GimpOrientationType orientation;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
return_if_no_context (context, data);
|
||||
|
||||
orientation = (GimpOrientationType) g_variant_get_int32 (value);
|
||||
|
||||
item = GIMP_ITEM (drawable);
|
||||
|
||||
gimp_item_get_offset (item, &off_x, &off_y);
|
||||
|
||||
switch ((GimpOrientationType) value)
|
||||
switch (orientation)
|
||||
{
|
||||
case GIMP_ORIENTATION_HORIZONTAL:
|
||||
axis = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
|
||||
@ -244,33 +253,34 @@ drawable_flip_cmd_callback (GtkAction *action,
|
||||
|
||||
if (gimp_item_get_linked (item))
|
||||
{
|
||||
gimp_item_linked_flip (item, context,
|
||||
(GimpOrientationType) value, axis, FALSE);
|
||||
gimp_item_linked_flip (item, context, orientation, axis, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_item_flip (item, context,
|
||||
(GimpOrientationType) value, axis, FALSE);
|
||||
gimp_item_flip (item, context, orientation, axis,
|
||||
gimp_item_get_clip (item, FALSE));
|
||||
}
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_rotate_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
drawable_rotate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
GimpContext *context;
|
||||
GimpItem *item;
|
||||
gint off_x, off_y;
|
||||
gdouble center_x, center_y;
|
||||
gboolean clip_result = FALSE;
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
GimpContext *context;
|
||||
GimpItem *item;
|
||||
gint off_x, off_y;
|
||||
gdouble center_x, center_y;
|
||||
GimpRotationType rotation_type;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
return_if_no_context (context, data);
|
||||
|
||||
rotation_type = (GimpRotationType) g_variant_get_int32 (value);
|
||||
|
||||
item = GIMP_ITEM (drawable);
|
||||
|
||||
gimp_item_get_offset (item, &off_x, &off_y);
|
||||
@ -278,18 +288,16 @@ drawable_rotate_cmd_callback (GtkAction *action,
|
||||
center_x = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
|
||||
center_y = ((gdouble) off_y + (gdouble) gimp_item_get_height (item) / 2.0);
|
||||
|
||||
if (GIMP_IS_CHANNEL (item))
|
||||
clip_result = TRUE;
|
||||
|
||||
if (gimp_item_get_linked (item))
|
||||
{
|
||||
gimp_item_linked_rotate (item, context, (GimpRotationType) value,
|
||||
gimp_item_linked_rotate (item, context, rotation_type,
|
||||
center_x, center_y, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_item_rotate (item, context, (GimpRotationType) value,
|
||||
center_x, center_y, clip_result);
|
||||
gimp_item_rotate (item, context,
|
||||
rotation_type, center_x, center_y,
|
||||
gimp_item_get_clip (item, FALSE));
|
||||
}
|
||||
|
||||
gimp_image_flush (image);
|
||||
|
@ -19,26 +19,32 @@
|
||||
#define __DRAWABLE_COMMANDS_H__
|
||||
|
||||
|
||||
void drawable_equalize_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void drawable_levels_stretch_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void drawable_equalize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_levels_stretch_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void drawable_linked_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void drawable_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void drawable_lock_content_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void drawable_lock_position_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void drawable_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void drawable_flip_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void drawable_rotate_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void drawable_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_rotate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DRAWABLE_COMMANDS_H__ */
|
||||
|
@ -46,37 +46,37 @@ static const GimpActionEntry dynamics_actions[] =
|
||||
{ "dynamics-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("dynamics-action", "_New Dynamics"), NULL,
|
||||
NC_("dynamics-action", "Create a new dynamics"),
|
||||
G_CALLBACK (data_new_cmd_callback),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_NEW },
|
||||
|
||||
{ "dynamics-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("dynamics-action", "D_uplicate Dynamics"), NULL,
|
||||
NC_("dynamics-action", "Duplicate this dynamics"),
|
||||
G_CALLBACK (data_duplicate_cmd_callback),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_DUPLICATE },
|
||||
|
||||
{ "dynamics-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("dynamics-action", "Copy Dynamics _Location"), NULL,
|
||||
NC_("dynamics-action", "Copy dynamics file location to clipboard"),
|
||||
G_CALLBACK (data_copy_location_cmd_callback),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_COPY_LOCATION },
|
||||
|
||||
{ "dynamics-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("dynamics-action", "Show in _File Manager"), NULL,
|
||||
NC_("dynamics-action", "Show dynamics file location in the file manager"),
|
||||
G_CALLBACK (data_show_in_file_manager_cmd_callback),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "dynamics-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("dynamics-action", "_Delete Dynamics"), NULL,
|
||||
NC_("dynamics-action", "Delete this dynamics"),
|
||||
G_CALLBACK (data_delete_cmd_callback),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_DELETE },
|
||||
|
||||
{ "dynamics-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("dynamics-action", "_Refresh Dynamics"), NULL,
|
||||
NC_("dynamics-action", "Refresh dynamics"),
|
||||
G_CALLBACK (data_refresh_cmd_callback),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_REFRESH }
|
||||
};
|
||||
|
||||
@ -100,7 +100,7 @@ dynamics_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_string_actions (group, "dynamics-action",
|
||||
dynamics_edit_actions,
|
||||
G_N_ELEMENTS (dynamics_edit_actions),
|
||||
G_CALLBACK (data_edit_cmd_callback));
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -49,7 +49,7 @@ static const GimpToggleActionEntry dynamics_editor_toggle_actions[] =
|
||||
{
|
||||
{ "dynamics-editor-edit-active", GIMP_ICON_LINKED,
|
||||
NC_("dynamics-editor-action", "Edit Active Dynamics"), NULL, NULL,
|
||||
G_CALLBACK (data_editor_edit_active_cmd_callback),
|
||||
data_editor_edit_active_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
|
||||
};
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "core/gimptoolinfo.h"
|
||||
#include "core/gimpundostack.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
@ -72,93 +73,93 @@ static const GimpActionEntry edit_actions[] =
|
||||
{ "edit-undo", GIMP_ICON_EDIT_UNDO,
|
||||
NC_("edit-action", "_Undo"), "<primary>Z",
|
||||
NC_("edit-action", "Undo the last operation"),
|
||||
G_CALLBACK (edit_undo_cmd_callback),
|
||||
edit_undo_cmd_callback,
|
||||
GIMP_HELP_EDIT_UNDO },
|
||||
|
||||
{ "edit-redo", GIMP_ICON_EDIT_REDO,
|
||||
NC_("edit-action", "_Redo"), "<primary>Y",
|
||||
NC_("edit-action", "Redo the last operation that was undone"),
|
||||
G_CALLBACK (edit_redo_cmd_callback),
|
||||
edit_redo_cmd_callback,
|
||||
GIMP_HELP_EDIT_REDO },
|
||||
|
||||
{ "edit-strong-undo", GIMP_ICON_EDIT_UNDO,
|
||||
NC_("edit-action", "Strong Undo"), "<primary><shift>Z",
|
||||
NC_("edit-action", "Undo the last operation, skipping visibility changes"),
|
||||
G_CALLBACK (edit_strong_undo_cmd_callback),
|
||||
edit_strong_undo_cmd_callback,
|
||||
GIMP_HELP_EDIT_STRONG_UNDO },
|
||||
|
||||
{ "edit-strong-redo", GIMP_ICON_EDIT_REDO,
|
||||
NC_("edit-action", "Strong Redo"), "<primary><shift>Y",
|
||||
NC_("edit-action",
|
||||
"Redo the last operation that was undone, skipping visibility changes"),
|
||||
G_CALLBACK (edit_strong_redo_cmd_callback),
|
||||
edit_strong_redo_cmd_callback,
|
||||
GIMP_HELP_EDIT_STRONG_REDO },
|
||||
|
||||
{ "edit-undo-clear", GIMP_ICON_SHRED,
|
||||
NC_("edit-action", "_Clear Undo History"), NULL,
|
||||
NC_("edit-action", "Remove all operations from the undo history"),
|
||||
G_CALLBACK (edit_undo_clear_cmd_callback),
|
||||
edit_undo_clear_cmd_callback,
|
||||
GIMP_HELP_EDIT_UNDO_CLEAR },
|
||||
|
||||
{ "edit-cut", GIMP_ICON_EDIT_CUT,
|
||||
NC_("edit-action", "Cu_t"), "<primary>X",
|
||||
NC_("edit-action", "Move the selected pixels to the clipboard"),
|
||||
G_CALLBACK (edit_cut_cmd_callback),
|
||||
edit_cut_cmd_callback,
|
||||
GIMP_HELP_EDIT_CUT },
|
||||
|
||||
{ "edit-copy", GIMP_ICON_EDIT_COPY,
|
||||
NC_("edit-action", "_Copy"), "<primary>C",
|
||||
NC_("edit-action", "Copy the selected pixels to the clipboard"),
|
||||
G_CALLBACK (edit_copy_cmd_callback),
|
||||
edit_copy_cmd_callback,
|
||||
GIMP_HELP_EDIT_COPY },
|
||||
|
||||
{ "edit-copy-visible", NULL, /* GIMP_ICON_COPY_VISIBLE, */
|
||||
NC_("edit-action", "Copy _Visible"), "<primary><shift>C",
|
||||
NC_("edit-action", "Copy what is visible in the selected region"),
|
||||
G_CALLBACK (edit_copy_visible_cmd_callback),
|
||||
edit_copy_visible_cmd_callback,
|
||||
GIMP_HELP_EDIT_COPY_VISIBLE },
|
||||
|
||||
{ "edit-paste-as-new-image", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("edit-action", "From _Clipboard"), "<primary><shift>V",
|
||||
NC_("edit-action", "Create a new image from the content of the clipboard"),
|
||||
G_CALLBACK (edit_paste_as_new_image_cmd_callback),
|
||||
edit_paste_as_new_image_cmd_callback,
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "edit-paste-as-new-image-short", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("edit-action", "_New Image"), NULL,
|
||||
NC_("edit-action", "Create a new image from the content of the clipboard"),
|
||||
G_CALLBACK (edit_paste_as_new_image_cmd_callback),
|
||||
edit_paste_as_new_image_cmd_callback,
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "edit-named-cut", GIMP_ICON_EDIT_CUT,
|
||||
NC_("edit-action", "Cu_t Named..."), NULL,
|
||||
NC_("edit-action", "Move the selected pixels to a named buffer"),
|
||||
G_CALLBACK (edit_named_cut_cmd_callback),
|
||||
edit_named_cut_cmd_callback,
|
||||
GIMP_HELP_BUFFER_CUT },
|
||||
|
||||
{ "edit-named-copy", GIMP_ICON_EDIT_COPY,
|
||||
NC_("edit-action", "_Copy Named..."), NULL,
|
||||
NC_("edit-action", "Copy the selected pixels to a named buffer"),
|
||||
G_CALLBACK (edit_named_copy_cmd_callback),
|
||||
edit_named_copy_cmd_callback,
|
||||
GIMP_HELP_BUFFER_COPY },
|
||||
|
||||
{ "edit-named-copy-visible", NULL, /* GIMP_ICON_COPY_VISIBLE, */
|
||||
NC_("edit-action", "Copy _Visible Named..."), "",
|
||||
NC_("edit-action",
|
||||
"Copy what is visible in the selected region to a named buffer"),
|
||||
G_CALLBACK (edit_named_copy_visible_cmd_callback),
|
||||
edit_named_copy_visible_cmd_callback,
|
||||
GIMP_HELP_BUFFER_COPY },
|
||||
|
||||
{ "edit-named-paste", GIMP_ICON_EDIT_PASTE,
|
||||
NC_("edit-action", "_Paste Named..."), NULL,
|
||||
NC_("edit-action", "Paste the content of a named buffer"),
|
||||
G_CALLBACK (edit_named_paste_cmd_callback),
|
||||
edit_named_paste_cmd_callback,
|
||||
GIMP_HELP_BUFFER_PASTE },
|
||||
|
||||
{ "edit-clear", GIMP_ICON_EDIT_CLEAR,
|
||||
NC_("edit-action", "Cl_ear"), "Delete",
|
||||
NC_("edit-action", "Clear the selected pixels"),
|
||||
G_CALLBACK (edit_clear_cmd_callback),
|
||||
edit_clear_cmd_callback,
|
||||
GIMP_HELP_EDIT_CLEAR }
|
||||
};
|
||||
|
||||
@ -171,7 +172,7 @@ static const GimpEnumActionEntry edit_paste_actions[] =
|
||||
GIMP_HELP_EDIT_PASTE },
|
||||
|
||||
{ "edit-paste-in-place", GIMP_ICON_EDIT_PASTE,
|
||||
NC_("edit-action", "Paste In Place"), "<primary><alt>V",
|
||||
NC_("edit-action", "Paste In P_lace"), "<primary><alt>V",
|
||||
NC_("edit-action",
|
||||
"Paste the content of the clipboard at its original position"),
|
||||
GIMP_PASTE_TYPE_FLOATING_IN_PLACE, FALSE,
|
||||
@ -185,7 +186,7 @@ static const GimpEnumActionEntry edit_paste_actions[] =
|
||||
GIMP_HELP_EDIT_PASTE_INTO },
|
||||
|
||||
{ "edit-paste-into-in-place", GIMP_ICON_EDIT_PASTE_INTO,
|
||||
NC_("edit-action", "Paste Into Selection In Place"), NULL,
|
||||
NC_("edit-action", "Paste Int_o Selection In Place"), NULL,
|
||||
NC_("edit-action",
|
||||
"Paste the content of the clipboard into the current selection "
|
||||
"at its original position"),
|
||||
@ -235,7 +236,7 @@ edit_actions_setup (GimpActionGroup *group)
|
||||
GimpContext *context = gimp_get_user_context (group->gimp);
|
||||
GimpRGB color;
|
||||
GimpPattern *pattern;
|
||||
GtkAction *action;
|
||||
GimpAction *action;
|
||||
|
||||
gimp_action_group_add_actions (group, "edit-action",
|
||||
edit_actions,
|
||||
@ -244,16 +245,17 @@ edit_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "edit-action",
|
||||
edit_paste_actions,
|
||||
G_N_ELEMENTS (edit_paste_actions),
|
||||
G_CALLBACK (edit_paste_cmd_callback));
|
||||
edit_paste_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "edit-action",
|
||||
edit_fill_actions,
|
||||
G_N_ELEMENTS (edit_fill_actions),
|
||||
G_CALLBACK (edit_fill_cmd_callback));
|
||||
edit_fill_cmd_callback);
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
"edit-paste-as-new-image-short");
|
||||
gtk_action_set_accel_path (action, "<Actions>/edit/edit-paste-as-new-image");
|
||||
action = gimp_action_group_get_action (group,
|
||||
"edit-paste-as-new-image-short");
|
||||
gimp_action_set_accel_path (action,
|
||||
"<Actions>/edit/edit-paste-as-new-image");
|
||||
|
||||
gimp_action_group_set_action_context (group, "edit-fill-fg", context);
|
||||
gimp_action_group_set_action_context (group, "edit-fill-bg", context);
|
||||
|
@ -83,8 +83,9 @@ static void copy_named_visible_buffer_callback (GtkWidget *widget,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
edit_undo_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_undo_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
@ -99,8 +100,9 @@ edit_undo_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_redo_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_redo_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
@ -115,8 +117,9 @@ edit_redo_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_strong_undo_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_strong_undo_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -126,8 +129,9 @@ edit_strong_undo_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_strong_redo_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_strong_redo_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -137,8 +141,9 @@ edit_strong_redo_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_undo_clear_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_undo_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpUndoStack *undo_stack;
|
||||
@ -206,8 +211,9 @@ edit_undo_clear_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_cut_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_cut_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
@ -245,8 +251,9 @@ edit_cut_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_copy_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_copy_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
@ -281,8 +288,9 @@ edit_copy_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_copy_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_copy_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GError *error = NULL;
|
||||
@ -310,18 +318,18 @@ edit_copy_visible_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_paste_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
edit_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
GimpPasteType paste_type = (GimpPasteType) value;
|
||||
GimpPasteType paste_type = (GimpPasteType) g_variant_get_int32 (value);
|
||||
|
||||
if (paste_type == GIMP_PASTE_TYPE_FLOATING)
|
||||
{
|
||||
if (! display || ! gimp_display_get_image (display))
|
||||
{
|
||||
edit_paste_as_new_image_cmd_callback (action, data);
|
||||
edit_paste_as_new_image_cmd_callback (action, value, data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -346,8 +354,9 @@ edit_paste_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_paste_as_new_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
@ -380,8 +389,9 @@ edit_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_named_cut_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_named_cut_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -400,8 +410,9 @@ edit_named_cut_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_named_copy_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_named_copy_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -420,8 +431,9 @@ edit_named_copy_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_named_copy_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_named_copy_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -440,8 +452,9 @@ edit_named_copy_visible_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_named_paste_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_named_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
@ -457,8 +470,9 @@ edit_named_paste_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_clear_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
@ -472,9 +486,9 @@ edit_clear_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_fill_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
edit_fill_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
@ -483,7 +497,7 @@ edit_fill_cmd_callback (GtkAction *action,
|
||||
GError *error = NULL;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
fill_type = (GimpFillType) value;
|
||||
fill_type = (GimpFillType) g_variant_get_int32 (value);
|
||||
|
||||
options = gimp_fill_options_new (action_data_get_gimp (data), NULL, FALSE);
|
||||
|
||||
@ -595,7 +609,10 @@ edit_paste (GimpDisplay *display,
|
||||
/* the actual paste-type conversion happens in gimp_edit_paste() */
|
||||
}
|
||||
|
||||
gimp_display_shell_untransform_viewport (shell, &x, &y, &width, &height);
|
||||
gimp_display_shell_untransform_viewport (
|
||||
shell,
|
||||
! gimp_display_shell_get_infinite_canvas (shell),
|
||||
&x, &y, &width, &height);
|
||||
|
||||
if (gimp_edit_paste (image, drawable, paste,
|
||||
paste_type, x, y, width, height))
|
||||
|
@ -19,44 +19,58 @@
|
||||
#define __EDIT_COMMANDS_H__
|
||||
|
||||
|
||||
void edit_undo_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_redo_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_strong_undo_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_strong_redo_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_undo_clear_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_undo_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_redo_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_strong_undo_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_strong_redo_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_undo_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void edit_cut_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_copy_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_copy_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_cut_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_copy_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_copy_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void edit_paste_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void edit_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_paste_as_new_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void edit_named_cut_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_named_copy_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_named_copy_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_named_paste_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_named_cut_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_named_copy_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_named_copy_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_named_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void edit_clear_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_fill_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void edit_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void edit_fill_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __EDIT_COMMANDS_H__ */
|
||||
|
@ -43,13 +43,13 @@ static const GimpActionEntry error_console_actions[] =
|
||||
{ "error-console-clear", GIMP_ICON_EDIT_CLEAR,
|
||||
NC_("error-console-action", "_Clear"), NULL,
|
||||
NC_("error-console-action", "Clear error console"),
|
||||
G_CALLBACK (error_console_clear_cmd_callback),
|
||||
error_console_clear_cmd_callback,
|
||||
GIMP_HELP_ERRORS_CLEAR },
|
||||
|
||||
{ "error-console-select-all", NULL,
|
||||
NC_("error-console-action", "Select _All"), "",
|
||||
NC_("error-console-action", "Select all error messages"),
|
||||
G_CALLBACK (error_console_select_all_cmd_callback),
|
||||
error_console_select_all_cmd_callback,
|
||||
GIMP_HELP_ERRORS_SELECT_ALL },
|
||||
|
||||
{ "error-console-highlight", NULL,
|
||||
@ -77,21 +77,21 @@ static const GimpToggleActionEntry error_console_highlight_actions[] =
|
||||
{ "error-console-highlight-error", NULL,
|
||||
NC_("error-console-action", "_Errors"), NULL,
|
||||
NC_("error-console-action", "Highlight error console on errors"),
|
||||
G_CALLBACK (error_console_highlight_error_cmd_callback),
|
||||
error_console_highlight_error_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_ERRORS_HIGHLIGHT },
|
||||
|
||||
{ "error-console-highlight-warning", NULL,
|
||||
NC_("error-console-action", "_Warnings"), NULL,
|
||||
NC_("error-console-action", "Highlight error console on warnings"),
|
||||
G_CALLBACK (error_console_highlight_warning_cmd_callback),
|
||||
error_console_highlight_warning_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_ERRORS_HIGHLIGHT },
|
||||
|
||||
{ "error-console-highlight-info", NULL,
|
||||
NC_("error-console-action", "_Messages"), NULL,
|
||||
NC_("error-console-action", "Highlight error console on messages"),
|
||||
G_CALLBACK (error_console_highlight_info_cmd_callback),
|
||||
error_console_highlight_info_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_ERRORS_HIGHLIGHT }
|
||||
};
|
||||
@ -107,7 +107,7 @@ error_console_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "error-console-action",
|
||||
error_console_save_actions,
|
||||
G_N_ELEMENTS (error_console_save_actions),
|
||||
G_CALLBACK (error_console_save_cmd_callback));
|
||||
error_console_save_cmd_callback);
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "error-console-action",
|
||||
error_console_highlight_actions,
|
||||
|
@ -46,8 +46,9 @@ static void error_console_save_response (GtkWidget *dialog,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
error_console_clear_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
error_console_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
|
||||
GtkTextIter start_iter;
|
||||
@ -58,8 +59,9 @@ error_console_clear_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
error_console_select_all_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
error_console_select_all_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
|
||||
GtkTextIter start_iter;
|
||||
@ -70,14 +72,16 @@ error_console_select_all_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
error_console_save_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
error_console_save_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
|
||||
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
|
||||
gboolean selection = (gboolean) g_variant_get_int32 (value);
|
||||
|
||||
if (value && ! gtk_text_buffer_get_selection_bounds (console->text_buffer,
|
||||
NULL, NULL))
|
||||
if (selection &&
|
||||
! gtk_text_buffer_get_selection_bounds (console->text_buffer,
|
||||
NULL, NULL))
|
||||
{
|
||||
gimp_message_literal (console->gimp,
|
||||
G_OBJECT (console), GIMP_MESSAGE_WARNING,
|
||||
@ -104,7 +108,7 @@ error_console_save_cmd_callback (GtkAction *action,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
console->save_selection = value;
|
||||
console->save_selection = selection;
|
||||
|
||||
g_object_add_weak_pointer (G_OBJECT (dialog),
|
||||
(gpointer) &console->file_dialog);
|
||||
@ -132,37 +136,34 @@ error_console_save_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
error_console_highlight_error_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
error_console_highlight_error_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
|
||||
gboolean active;
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
console->highlight[GIMP_MESSAGE_ERROR] = active;
|
||||
}
|
||||
|
||||
void
|
||||
error_console_highlight_warning_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
error_console_highlight_warning_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
|
||||
gboolean active;
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
console->highlight[GIMP_MESSAGE_WARNING] = active;
|
||||
}
|
||||
|
||||
void
|
||||
error_console_highlight_info_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
error_console_highlight_info_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
|
||||
gboolean active;
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
console->highlight[GIMP_MESSAGE_INFO] = active;
|
||||
}
|
||||
|
@ -19,20 +19,25 @@
|
||||
#define __ERROR_CONSOLE_COMMANDS_H__
|
||||
|
||||
|
||||
void error_console_clear_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void error_console_select_all_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void error_console_save_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void error_console_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void error_console_select_all_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void error_console_save_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void error_console_highlight_error_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void error_console_highlight_warning_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void error_console_highlight_info_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void error_console_highlight_error_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void error_console_highlight_warning_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void error_console_highlight_info_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __ERROR_CONSOLE_COMMANDS_H__ */
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpactionimpl.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
@ -75,55 +76,55 @@ static const GimpActionEntry file_actions[] =
|
||||
{ "file-open", GIMP_ICON_IMAGE_OPEN,
|
||||
NC_("file-action", "_Open..."), "<primary>O",
|
||||
NC_("file-action", "Open an image file"),
|
||||
G_CALLBACK (file_open_cmd_callback),
|
||||
file_open_cmd_callback,
|
||||
GIMP_HELP_FILE_OPEN },
|
||||
|
||||
{ "file-open-as-layers", GIMP_ICON_LAYER,
|
||||
NC_("file-action", "Op_en as Layers..."), "<primary><alt>O",
|
||||
NC_("file-action", "Open an image file as layers"),
|
||||
G_CALLBACK (file_open_as_layers_cmd_callback),
|
||||
file_open_as_layers_cmd_callback,
|
||||
GIMP_HELP_FILE_OPEN_AS_LAYER },
|
||||
|
||||
{ "file-open-location", GIMP_ICON_WEB,
|
||||
NC_("file-action", "Open _Location..."), NULL,
|
||||
NC_("file-action", "Open an image file from a specified location"),
|
||||
G_CALLBACK (file_open_location_cmd_callback),
|
||||
file_open_location_cmd_callback,
|
||||
GIMP_HELP_FILE_OPEN_LOCATION },
|
||||
|
||||
{ "file-create-template", NULL,
|
||||
NC_("file-action", "Create Template..."), NULL,
|
||||
NC_("file-action", "Create _Template..."), NULL,
|
||||
NC_("file-action", "Create a new template from this image"),
|
||||
G_CALLBACK (file_create_template_cmd_callback),
|
||||
file_create_template_cmd_callback,
|
||||
GIMP_HELP_FILE_CREATE_TEMPLATE },
|
||||
|
||||
{ "file-revert", GIMP_ICON_IMAGE_RELOAD,
|
||||
NC_("file-action", "Re_vert"), NULL,
|
||||
NC_("file-action", "Reload the image file from disk"),
|
||||
G_CALLBACK (file_revert_cmd_callback),
|
||||
file_revert_cmd_callback,
|
||||
GIMP_HELP_FILE_REVERT },
|
||||
|
||||
{ "file-close-all", GIMP_ICON_CLOSE_ALL,
|
||||
NC_("file-action", "Close all"), "<primary><shift>W",
|
||||
NC_("file-action", "C_lose All"), "<primary><shift>W",
|
||||
NC_("file-action", "Close all opened images"),
|
||||
G_CALLBACK (file_close_all_cmd_callback),
|
||||
file_close_all_cmd_callback,
|
||||
GIMP_HELP_FILE_CLOSE_ALL },
|
||||
|
||||
{ "file-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("file-action", "Copy _Image Location"), NULL,
|
||||
NC_("file-action", "Copy image file location to clipboard"),
|
||||
G_CALLBACK (file_copy_location_cmd_callback),
|
||||
file_copy_location_cmd_callback,
|
||||
GIMP_HELP_FILE_COPY_LOCATION },
|
||||
|
||||
{ "file-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("file-action", "Show in _File Manager"), "<primary><alt>F",
|
||||
NC_("file-action", "Show image file location in the file manager"),
|
||||
G_CALLBACK (file_show_in_file_manager_cmd_callback),
|
||||
file_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_FILE_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "file-quit", GIMP_ICON_APPLICATION_EXIT,
|
||||
NC_("file-action", "_Quit"), "<primary>Q",
|
||||
NC_("file-action", "Quit the GNU Image Manipulation Program"),
|
||||
G_CALLBACK (file_quit_cmd_callback),
|
||||
file_quit_cmd_callback,
|
||||
GIMP_HELP_FILE_QUIT }
|
||||
};
|
||||
|
||||
@ -156,7 +157,7 @@ static const GimpEnumActionEntry file_save_actions[] =
|
||||
GIMP_HELP_FILE_SAVE },
|
||||
|
||||
{ "file-export", NULL,
|
||||
NC_("file-action", "Export..."), "<primary>E",
|
||||
NC_("file-action", "E_xport..."), "<primary>E",
|
||||
NC_("file-action", "Export the image"),
|
||||
GIMP_SAVE_MODE_EXPORT, FALSE,
|
||||
GIMP_HELP_FILE_EXPORT },
|
||||
@ -168,7 +169,7 @@ static const GimpEnumActionEntry file_save_actions[] =
|
||||
GIMP_HELP_FILE_OVERWRITE },
|
||||
|
||||
{ "file-export-as", NULL,
|
||||
NC_("file-action", "Export As..."), "<primary><shift>E",
|
||||
NC_("file-action", "E_xport As..."), "<primary><shift>E",
|
||||
NC_("file-action", "Export the image to various file formats such as PNG or JPEG"),
|
||||
GIMP_SAVE_MODE_EXPORT_AS, FALSE,
|
||||
GIMP_HELP_FILE_EXPORT_AS }
|
||||
@ -188,7 +189,7 @@ file_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "file-action",
|
||||
file_save_actions,
|
||||
G_N_ELEMENTS (file_save_actions),
|
||||
G_CALLBACK (file_save_cmd_callback));
|
||||
file_save_cmd_callback);
|
||||
|
||||
n_entries = GIMP_GUI_CONFIG (group->gimp->config)->last_opened_size;
|
||||
|
||||
@ -213,7 +214,7 @@ file_actions_setup (GimpActionGroup *group)
|
||||
}
|
||||
|
||||
gimp_action_group_add_enum_actions (group, NULL, entries, n_entries,
|
||||
G_CALLBACK (file_open_recent_cmd_callback));
|
||||
file_open_recent_cmd_callback);
|
||||
|
||||
for (i = 0; i < n_entries; i++)
|
||||
{
|
||||
@ -330,7 +331,7 @@ file_actions_update (GimpActionGroup *group,
|
||||
{
|
||||
gimp_action_group_set_action_label (group,
|
||||
"file-export",
|
||||
C_("file-action", "Export..."));
|
||||
C_("file-action", "E_xport..."));
|
||||
}
|
||||
|
||||
/* needed for the empty display */
|
||||
@ -355,17 +356,17 @@ file_actions_last_opened_update (GimpContainer *container,
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
GtkAction *action;
|
||||
gchar *name = g_strdup_printf ("file-open-recent-%02d", i + 1);
|
||||
GimpAction *action;
|
||||
gchar *name = g_strdup_printf ("file-open-recent-%02d", i + 1);
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
|
||||
action = gimp_action_group_get_action (group, name);
|
||||
|
||||
if (i < num_documents)
|
||||
{
|
||||
GimpImagefile *imagefile = (GimpImagefile *)
|
||||
gimp_container_get_child_by_index (container, i);
|
||||
|
||||
if (GIMP_ACTION (action)->viewable != (GimpViewable *) imagefile)
|
||||
if (GIMP_ACTION_IMPL (action)->viewable != (GimpViewable *) imagefile)
|
||||
{
|
||||
GFile *file;
|
||||
const gchar *name;
|
||||
|
@ -103,8 +103,9 @@ static void file_revert_confirm_response (GtkWidget *dialog,
|
||||
|
||||
|
||||
void
|
||||
file_open_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
@ -120,8 +121,9 @@ file_open_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_open_as_layers_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_open_as_layers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
@ -141,8 +143,9 @@ file_open_as_layers_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_open_location_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_open_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
return_if_no_widget (widget, data);
|
||||
@ -155,22 +158,25 @@ file_open_location_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_open_recent_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
file_open_recent_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpImagefile *imagefile;
|
||||
gint index;
|
||||
gint num_entries;
|
||||
return_if_no_gimp (gimp, data);
|
||||
|
||||
index = g_variant_get_int32 (value);
|
||||
|
||||
num_entries = gimp_container_get_n_children (gimp->documents);
|
||||
|
||||
if (value >= num_entries)
|
||||
if (index >= num_entries)
|
||||
return;
|
||||
|
||||
imagefile = (GimpImagefile *)
|
||||
gimp_container_get_child_by_index (gimp->documents, value);
|
||||
gimp_container_get_child_by_index (gimp->documents, index);
|
||||
|
||||
if (imagefile)
|
||||
{
|
||||
@ -213,9 +219,9 @@ file_open_recent_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_save_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
file_save_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpDisplay *display;
|
||||
@ -230,7 +236,7 @@ file_save_cmd_callback (GtkAction *action,
|
||||
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
save_mode = (GimpSaveMode) value;
|
||||
save_mode = (GimpSaveMode) g_variant_get_int32 (value);
|
||||
|
||||
if (! gimp_image_get_active_drawable (image))
|
||||
return;
|
||||
@ -354,8 +360,9 @@ file_save_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_create_template_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_create_template_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -376,8 +383,9 @@ file_create_template_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_revert_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_revert_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -448,8 +456,9 @@ file_revert_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_close_all_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_close_all_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
return_if_no_gimp (gimp, data);
|
||||
@ -471,8 +480,9 @@ file_close_all_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_copy_location_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpDisplay *display;
|
||||
@ -495,8 +505,9 @@ file_copy_location_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_show_in_file_manager_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpDisplay *display;
|
||||
@ -524,8 +535,9 @@ file_show_in_file_manager_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
file_quit_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_quit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
return_if_no_gimp (gimp, data);
|
||||
|
@ -19,36 +19,45 @@
|
||||
#define __FILE_COMMANDS_H__
|
||||
|
||||
|
||||
void file_open_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void file_open_as_layers_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void file_open_location_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void file_open_recent_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void file_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void file_open_as_layers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void file_open_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void file_open_recent_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void file_save_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void file_create_template_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void file_save_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void file_create_template_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void file_revert_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void file_close_all_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void file_copy_location_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void file_show_in_file_manager_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void file_quit_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void file_revert_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void file_close_all_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void file_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void file_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void file_quit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void file_file_open_dialog (Gimp *gimp,
|
||||
GFile *file,
|
||||
GtkWidget *parent);
|
||||
void file_file_open_dialog (Gimp *gimp,
|
||||
GFile *file,
|
||||
GtkWidget *parent);
|
||||
|
||||
|
||||
#endif /* __FILE_COMMANDS_H__ */
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include "pdb/gimpprocedure.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
@ -57,7 +58,7 @@ static const GimpActionEntry filters_menu_actions[] =
|
||||
{ "filters-menu", NULL, NC_("filters-action",
|
||||
"Filte_rs") },
|
||||
{ "filters-recent-menu", NULL, NC_("filters-action",
|
||||
"Recently Used") },
|
||||
"Recently _Used") },
|
||||
{ "filters-blur-menu", NULL, NC_("filters-action",
|
||||
"_Blur") },
|
||||
{ "filters-noise-menu", NULL, NC_("filters-action",
|
||||
@ -183,6 +184,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
|
||||
"gegl:apply-lens",
|
||||
GIMP_HELP_FILTER_APPLY_LENS },
|
||||
|
||||
{ "filters-bayer-matrix", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "_Bayer Matrix..."), NULL, NULL,
|
||||
"gegl:bayer-matrix",
|
||||
GIMP_HELP_FILTER_BAYER_MATRIX },
|
||||
|
||||
{ "filters-brightness-contrast", GIMP_ICON_TOOL_BRIGHTNESS_CONTRAST,
|
||||
NC_("filters-action", "B_rightness-Contrast..."), NULL, NULL,
|
||||
"gimp:brightness-contrast",
|
||||
@ -279,22 +285,22 @@ static const GimpStringActionEntry filters_interactive_actions[] =
|
||||
GIMP_HELP_FILTER_DESATURATE },
|
||||
|
||||
{ "filters-difference-of-gaussians", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "Difference of Gaussians..."), NULL, NULL,
|
||||
NC_("filters-action", "Difference of _Gaussians..."), NULL, NULL,
|
||||
"gegl:difference-of-gaussians",
|
||||
GIMP_HELP_FILTER_DIFFERENCE_OF_GAUSSIANS },
|
||||
|
||||
{ "filters-diffraction-patterns", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "Diffraction Patterns..."), NULL, NULL,
|
||||
NC_("filters-action", "D_iffraction Patterns..."), NULL, NULL,
|
||||
"gegl:diffraction-patterns",
|
||||
GIMP_HELP_FILTER_DIFFRACTION_PATTERNS },
|
||||
|
||||
{ "filters-displace", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "Displace..."), NULL, NULL,
|
||||
NC_("filters-action", "_Displace..."), NULL, NULL,
|
||||
"gegl:displace",
|
||||
GIMP_HELP_FILTER_DISPLACE },
|
||||
|
||||
{ "filters-distance-map", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "Distance Map..."), NULL, NULL,
|
||||
NC_("filters-action", "Distance _Map..."), NULL, NULL,
|
||||
"gegl:distance-transform",
|
||||
GIMP_HELP_FILTER_DISTANCE_MAP },
|
||||
|
||||
@ -399,12 +405,12 @@ static const GimpStringActionEntry filters_interactive_actions[] =
|
||||
GIMP_HELP_FILTER_KALEIDOSCOPE },
|
||||
|
||||
{ "filters-lens-distortion", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "Lens Distortion..."), NULL, NULL,
|
||||
NC_("filters-action", "Le_ns Distortion..."), NULL, NULL,
|
||||
"gegl:lens-distortion",
|
||||
GIMP_HELP_FILTER_LENS_DISTORTION },
|
||||
|
||||
{ "filters-lens-flare", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "Lens Flare..."), NULL, NULL,
|
||||
NC_("filters-action", "Lens _Flare..."), NULL, NULL,
|
||||
"gegl:lens-flare",
|
||||
GIMP_HELP_FILTER_LENS_FLARE },
|
||||
|
||||
@ -413,6 +419,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
|
||||
"gimp:levels",
|
||||
GIMP_HELP_TOOL_LEVELS },
|
||||
|
||||
{ "filters-linear-sinusoid", GIMP_ICON_TOOL_LEVELS,
|
||||
NC_("filters-action", "_Linear Sinusoid..."), NULL, NULL,
|
||||
"gegl:linear-sinusoid",
|
||||
GIMP_HELP_FILTER_LINEAR_SINUSOID },
|
||||
|
||||
{ "filters-little-planet", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "_Little Planet..."), NULL, NULL,
|
||||
"gegl:stereographic-projection",
|
||||
@ -433,6 +444,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
|
||||
"gegl:maze",
|
||||
GIMP_HELP_FILTER_MAZE },
|
||||
|
||||
{ "filters-mean-curvature-blur", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "Mean C_urvature Blur..."), NULL, NULL,
|
||||
"gegl:mean-curvature-blur",
|
||||
GIMP_HELP_FILTER_MEAN_CURVATURE_BLUR },
|
||||
|
||||
{ "filters-median-blur", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "_Median Blur..."), NULL, NULL,
|
||||
"gegl:median-blur",
|
||||
@ -468,13 +484,18 @@ static const GimpStringActionEntry filters_interactive_actions[] =
|
||||
"gegl:cell-noise",
|
||||
GIMP_HELP_FILTER_NOISE_CELL },
|
||||
|
||||
{ "filters-newsprint", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "_Newsprint..."), NULL, NULL,
|
||||
"gegl:newsprint",
|
||||
GIMP_HELP_FILTER_NEWSPRINT },
|
||||
|
||||
{ "filters-noise-cie-lch", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "CIE lch Noise..."), NULL, NULL,
|
||||
NC_("filters-action", "_CIE lch Noise..."), NULL, NULL,
|
||||
"gegl:noise-cie-lch",
|
||||
GIMP_HELP_FILTER_NOISE_CIE_LCH },
|
||||
|
||||
{ "filters-noise-hsv", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "HSV Noise..."), NULL, NULL,
|
||||
NC_("filters-action", "HS_V Noise..."), NULL, NULL,
|
||||
"gegl:noise-hsv",
|
||||
GIMP_HELP_FILTER_NOISE_HSV },
|
||||
|
||||
@ -484,7 +505,7 @@ static const GimpStringActionEntry filters_interactive_actions[] =
|
||||
GIMP_HELP_FILTER_NOISE_HURL },
|
||||
|
||||
{ "filters-noise-perlin", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "_Perlin Noise..."), NULL, NULL,
|
||||
NC_("filters-action", "Perlin _Noise..."), NULL, NULL,
|
||||
"gegl:perlin-noise",
|
||||
GIMP_HELP_FILTER_NOISE_PERLIN },
|
||||
|
||||
@ -523,6 +544,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
|
||||
"gegl:noise-spread",
|
||||
GIMP_HELP_FILTER_NOISE_SPREAD },
|
||||
|
||||
{ "filters-normal-map", GIMP_ICON_GEGL,
|
||||
NC_("filters-action", "_Normal Map..."), NULL, NULL,
|
||||
"gegl:normal-map",
|
||||
GIMP_HELP_FILTER_NORMAL_MAP },
|
||||
|
||||
{ "filters-offset", GIMP_ICON_TOOL_OFFSET,
|
||||
NC_("filters-action", "_Offset..."), "<primary><shift>O", NULL,
|
||||
"gimp:offset",
|
||||
@ -755,28 +781,28 @@ filters_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_string_actions (group, "filters-action",
|
||||
filters_actions,
|
||||
G_N_ELEMENTS (filters_actions),
|
||||
G_CALLBACK (filters_apply_cmd_callback));
|
||||
filters_apply_cmd_callback);
|
||||
filters_actions_set_tooltips (group, filters_actions,
|
||||
G_N_ELEMENTS (filters_actions));
|
||||
|
||||
gimp_action_group_add_string_actions (group, "filters-action",
|
||||
filters_settings_actions,
|
||||
G_N_ELEMENTS (filters_settings_actions),
|
||||
G_CALLBACK (filters_apply_cmd_callback));
|
||||
filters_apply_cmd_callback);
|
||||
filters_actions_set_tooltips (group, filters_settings_actions,
|
||||
G_N_ELEMENTS (filters_settings_actions));
|
||||
|
||||
gimp_action_group_add_string_actions (group, "filters-action",
|
||||
filters_interactive_actions,
|
||||
G_N_ELEMENTS (filters_interactive_actions),
|
||||
G_CALLBACK (filters_apply_interactive_cmd_callback));
|
||||
filters_apply_interactive_cmd_callback);
|
||||
filters_actions_set_tooltips (group, filters_interactive_actions,
|
||||
G_N_ELEMENTS (filters_interactive_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "filters-action",
|
||||
filters_repeat_actions,
|
||||
G_N_ELEMENTS (filters_repeat_actions),
|
||||
G_CALLBACK (filters_repeat_cmd_callback));
|
||||
filters_repeat_cmd_callback);
|
||||
|
||||
n_entries = gimp_filter_history_size (group->gimp);
|
||||
|
||||
@ -794,7 +820,7 @@ filters_actions_setup (GimpActionGroup *group)
|
||||
}
|
||||
|
||||
gimp_action_group_add_procedure_actions (group, entries, n_entries,
|
||||
G_CALLBACK (filters_history_cmd_callback));
|
||||
filters_history_cmd_callback);
|
||||
|
||||
for (i = 0; i < n_entries; i++)
|
||||
{
|
||||
@ -853,6 +879,7 @@ filters_actions_update (GimpActionGroup *group,
|
||||
SET_SENSITIVE ("filters-antialias", writable);
|
||||
SET_SENSITIVE ("filters-apply-canvas", writable);
|
||||
SET_SENSITIVE ("filters-apply-lens", writable);
|
||||
SET_SENSITIVE ("filters-bayer-matrix", writable);
|
||||
SET_SENSITIVE ("filters-brightness-contrast", writable);
|
||||
SET_SENSITIVE ("filters-bump-map", writable);
|
||||
SET_SENSITIVE ("filters-c2g", writable && !gray);
|
||||
@ -905,16 +932,19 @@ filters_actions_update (GimpActionGroup *group,
|
||||
SET_SENSITIVE ("filters-lens-distortion", writable);
|
||||
SET_SENSITIVE ("filters-lens-flare", writable);
|
||||
SET_SENSITIVE ("filters-levels", writable);
|
||||
SET_SENSITIVE ("filters-linear-sinusoid", writable);
|
||||
SET_SENSITIVE ("filters-little-planet", writable);
|
||||
SET_SENSITIVE ("filters-long-shadow", writable && alpha);
|
||||
SET_SENSITIVE ("filters-mantiuk-2006", writable);
|
||||
SET_SENSITIVE ("filters-maze", writable);
|
||||
SET_SENSITIVE ("filters-mean-curvature-blur", writable);
|
||||
SET_SENSITIVE ("filters-median-blur", writable);
|
||||
SET_SENSITIVE ("filters-mono-mixer", writable && !gray);
|
||||
SET_SENSITIVE ("filters-mosaic", writable);
|
||||
SET_SENSITIVE ("filters-motion-blur-circular", writable);
|
||||
SET_SENSITIVE ("filters-motion-blur-linear", writable);
|
||||
SET_SENSITIVE ("filters-motion-blur-zoom", writable);
|
||||
SET_SENSITIVE ("filters-newsprint", writable);
|
||||
SET_SENSITIVE ("filters-noise-cell", writable);
|
||||
SET_SENSITIVE ("filters-noise-cie-lch", writable);
|
||||
SET_SENSITIVE ("filters-noise-hsv", writable && !gray);
|
||||
@ -927,6 +957,7 @@ filters_actions_update (GimpActionGroup *group,
|
||||
SET_SENSITIVE ("filters-noise-slur", writable);
|
||||
SET_SENSITIVE ("filters-noise-solid", writable);
|
||||
SET_SENSITIVE ("filters-noise-spread", writable);
|
||||
SET_SENSITIVE ("filters-normal-map", writable);
|
||||
SET_SENSITIVE ("filters-offset", writable);
|
||||
SET_SENSITIVE ("filters-oilify", writable);
|
||||
SET_SENSITIVE ("filters-panorama-projection", writable);
|
||||
@ -1058,7 +1089,7 @@ filters_actions_history_changed (Gimp *gimp,
|
||||
|
||||
if (proc)
|
||||
{
|
||||
GtkAction *actual_action = NULL;
|
||||
GimpAction *actual_action = NULL;
|
||||
const gchar *label;
|
||||
gchar *repeat;
|
||||
gchar *reshow;
|
||||
@ -1078,8 +1109,8 @@ filters_actions_history_changed (Gimp *gimp,
|
||||
if (g_str_has_prefix (gimp_object_get_name (proc), "filters-"))
|
||||
{
|
||||
actual_action =
|
||||
gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
gimp_object_get_name (proc));
|
||||
gimp_action_group_get_action (group,
|
||||
gimp_object_get_name (proc));
|
||||
}
|
||||
else if (plug_in_group)
|
||||
{
|
||||
@ -1090,12 +1121,12 @@ filters_actions_history_changed (Gimp *gimp,
|
||||
* #517683.
|
||||
*/
|
||||
actual_action =
|
||||
gtk_action_group_get_action (GTK_ACTION_GROUP (plug_in_group),
|
||||
gimp_object_get_name (proc));
|
||||
gimp_action_group_get_action (plug_in_group,
|
||||
gimp_object_get_name (proc));
|
||||
}
|
||||
|
||||
if (actual_action)
|
||||
sensitive = gtk_action_get_sensitive (actual_action);
|
||||
sensitive = gimp_action_get_sensitive (actual_action);
|
||||
|
||||
gimp_action_group_set_action_sensitive (group, "filters-repeat",
|
||||
sensitive);
|
||||
@ -1115,14 +1146,14 @@ filters_actions_history_changed (Gimp *gimp,
|
||||
|
||||
for (i = 0; i < gimp_filter_history_length (gimp); i++)
|
||||
{
|
||||
GtkAction *action;
|
||||
GtkAction *actual_action = NULL;
|
||||
GimpAction *action;
|
||||
GimpAction *actual_action = NULL;
|
||||
const gchar *label;
|
||||
gchar *name;
|
||||
gboolean sensitive = FALSE;
|
||||
|
||||
name = g_strdup_printf ("filters-recent-%02d", i + 1);
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
|
||||
action = gimp_action_group_get_action (group, name);
|
||||
g_free (name);
|
||||
|
||||
proc = gimp_filter_history_nth (gimp, i);
|
||||
@ -1132,19 +1163,19 @@ filters_actions_history_changed (Gimp *gimp,
|
||||
if (g_str_has_prefix (gimp_object_get_name (proc), "filters-"))
|
||||
{
|
||||
actual_action =
|
||||
gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
gimp_object_get_name (proc));
|
||||
gimp_action_group_get_action (group,
|
||||
gimp_object_get_name (proc));
|
||||
}
|
||||
else if (plug_in_group)
|
||||
{
|
||||
/* see comment above */
|
||||
actual_action =
|
||||
gtk_action_group_get_action (GTK_ACTION_GROUP (plug_in_group),
|
||||
gimp_object_get_name (proc));
|
||||
gimp_action_group_get_action (plug_in_group,
|
||||
gimp_object_get_name (proc));
|
||||
}
|
||||
|
||||
if (actual_action)
|
||||
sensitive = gtk_action_get_sensitive (actual_action);
|
||||
sensitive = gimp_action_get_sensitive (actual_action);
|
||||
|
||||
g_object_set (action,
|
||||
"visible", TRUE,
|
||||
@ -1158,10 +1189,10 @@ filters_actions_history_changed (Gimp *gimp,
|
||||
|
||||
for (; i < gimp_filter_history_size (gimp); i++)
|
||||
{
|
||||
GtkAction *action;
|
||||
gchar *name = g_strdup_printf ("filters-recent-%02d", i + 1);
|
||||
GimpAction *action;
|
||||
gchar *name = g_strdup_printf ("filters-recent-%02d", i + 1);
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
|
||||
action = gimp_action_group_get_action (group, name);
|
||||
g_free (name);
|
||||
|
||||
g_object_set (action,
|
||||
|
@ -36,6 +36,8 @@
|
||||
#include "core/gimpprogress.h"
|
||||
#include "core/gimpsettings.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "filters-commands.h"
|
||||
#include "gimpgeglprocedure.h"
|
||||
@ -58,9 +60,9 @@ static void filters_run_procedure (Gimp *gimp,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
filters_apply_cmd_callback (GtkAction *action,
|
||||
const gchar *operation_str,
|
||||
gpointer data)
|
||||
filters_apply_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
@ -70,19 +72,18 @@ filters_apply_cmd_callback (GtkAction *action,
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
operation = filters_parse_operation (image->gimp,
|
||||
operation_str,
|
||||
gtk_action_get_icon_name (action),
|
||||
g_variant_get_string (value, NULL),
|
||||
gimp_action_get_icon_name (action),
|
||||
&settings);
|
||||
|
||||
procedure = gimp_gegl_procedure_new (image->gimp,
|
||||
GIMP_RUN_NONINTERACTIVE, settings,
|
||||
operation,
|
||||
gtk_action_get_name (action),
|
||||
gtk_action_get_label (action),
|
||||
gtk_action_get_tooltip (action),
|
||||
gtk_action_get_icon_name (action),
|
||||
g_object_get_qdata (G_OBJECT (action),
|
||||
GIMP_HELP_ID));
|
||||
gimp_action_get_name (action),
|
||||
gimp_action_get_label (action),
|
||||
gimp_action_get_tooltip (action),
|
||||
gimp_action_get_icon_name (action),
|
||||
gimp_action_get_help_id (action));
|
||||
|
||||
g_free (operation);
|
||||
|
||||
@ -90,15 +91,17 @@ filters_apply_cmd_callback (GtkAction *action,
|
||||
g_object_unref (settings);
|
||||
|
||||
gimp_filter_history_add (image->gimp, procedure);
|
||||
filters_history_cmd_callback (NULL, procedure, data);
|
||||
filters_history_cmd_callback (NULL,
|
||||
g_variant_new_uint64 (GPOINTER_TO_SIZE (procedure)),
|
||||
data);
|
||||
|
||||
g_object_unref (procedure);
|
||||
}
|
||||
|
||||
void
|
||||
filters_apply_interactive_cmd_callback (GtkAction *action,
|
||||
const gchar *operation,
|
||||
gpointer data)
|
||||
filters_apply_interactive_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
@ -107,49 +110,58 @@ filters_apply_interactive_cmd_callback (GtkAction *action,
|
||||
|
||||
procedure = gimp_gegl_procedure_new (image->gimp,
|
||||
GIMP_RUN_INTERACTIVE, NULL,
|
||||
operation,
|
||||
gtk_action_get_name (action),
|
||||
gtk_action_get_label (action),
|
||||
gtk_action_get_tooltip (action),
|
||||
gtk_action_get_icon_name (action),
|
||||
g_object_get_qdata (G_OBJECT (action),
|
||||
GIMP_HELP_ID));
|
||||
g_variant_get_string (value, NULL),
|
||||
gimp_action_get_name (action),
|
||||
gimp_action_get_label (action),
|
||||
gimp_action_get_tooltip (action),
|
||||
gimp_action_get_icon_name (action),
|
||||
gimp_action_get_help_id (action));
|
||||
|
||||
gimp_filter_history_add (image->gimp, procedure);
|
||||
filters_history_cmd_callback (NULL, procedure, data);
|
||||
filters_history_cmd_callback (NULL,
|
||||
g_variant_new_uint64 (GPOINTER_TO_SIZE (procedure)),
|
||||
data);
|
||||
|
||||
g_object_unref (procedure);
|
||||
}
|
||||
|
||||
void
|
||||
filters_repeat_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
filters_repeat_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
GimpDisplay *display;
|
||||
GimpProcedure *procedure;
|
||||
GimpRunMode run_mode;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
return_if_no_display (display, data);
|
||||
|
||||
run_mode = (GimpRunMode) g_variant_get_int32 (value);
|
||||
|
||||
procedure = gimp_filter_history_nth (image->gimp, 0);
|
||||
|
||||
if (procedure)
|
||||
filters_run_procedure (image->gimp, display, procedure,
|
||||
(GimpRunMode) value);
|
||||
filters_run_procedure (image->gimp, display, procedure, run_mode);
|
||||
}
|
||||
|
||||
void
|
||||
filters_history_cmd_callback (GtkAction *action,
|
||||
GimpProcedure *procedure,
|
||||
gpointer data)
|
||||
filters_history_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpDisplay *display;
|
||||
Gimp *gimp;
|
||||
GimpDisplay *display;
|
||||
GimpProcedure *procedure;
|
||||
gsize hack;
|
||||
return_if_no_gimp (gimp, data);
|
||||
return_if_no_display (display, data);
|
||||
|
||||
hack = g_variant_get_uint64 (value);
|
||||
|
||||
procedure = GSIZE_TO_POINTER (hack);
|
||||
|
||||
filters_run_procedure (gimp, display, procedure, GIMP_RUN_INTERACTIVE);
|
||||
}
|
||||
|
||||
|
@ -19,19 +19,19 @@
|
||||
#define __FILTERS_COMMANDS_H__
|
||||
|
||||
|
||||
void filters_apply_cmd_callback (GtkAction *action,
|
||||
const gchar *operation,
|
||||
gpointer data);
|
||||
void filters_apply_interactive_cmd_callback (GtkAction *action,
|
||||
const gchar *operation,
|
||||
gpointer data);
|
||||
void filters_apply_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void filters_apply_interactive_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void filters_repeat_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void filters_history_cmd_callback (GtkAction *action,
|
||||
GimpProcedure *procedure,
|
||||
gpointer data);
|
||||
void filters_repeat_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void filters_history_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __FILTERS_COMMANDS_H__ */
|
||||
|
@ -47,7 +47,7 @@ static const GimpActionEntry fonts_actions[] =
|
||||
{ "fonts-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("fonts-action", "_Rescan Font List"), NULL,
|
||||
NC_("fonts-action", "Rescan the installed fonts"),
|
||||
G_CALLBACK (data_refresh_cmd_callback),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_FONT_REFRESH }
|
||||
};
|
||||
|
||||
|
@ -65,57 +65,57 @@ static const GimpActionEntry gradient_editor_actions[] =
|
||||
|
||||
{ "gradient-editor-left-color", NULL,
|
||||
NC_("gradient-editor-action", "L_eft Endpoint's Color..."), NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_left_color_cmd_callback),
|
||||
gradient_editor_left_color_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_COLOR },
|
||||
|
||||
{ "gradient-editor-right-color", NULL,
|
||||
NC_("gradient-editor-action", "R_ight Endpoint's Color..."), NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_right_color_cmd_callback),
|
||||
gradient_editor_right_color_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_COLOR },
|
||||
|
||||
{ "gradient-editor-flip", GIMP_ICON_OBJECT_FLIP_HORIZONTAL,
|
||||
"flip", NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_flip_cmd_callback),
|
||||
gradient_editor_flip_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_FLIP },
|
||||
|
||||
{ "gradient-editor-replicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
"replicate", NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_replicate_cmd_callback),
|
||||
gradient_editor_replicate_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_FLIP },
|
||||
|
||||
{ "gradient-editor-split-midpoint", NULL,
|
||||
"splitmidpoint", NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_split_midpoint_cmd_callback),
|
||||
gradient_editor_split_midpoint_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_SPLIT_MIDPOINT },
|
||||
|
||||
{ "gradient-editor-split-uniform", NULL,
|
||||
"splituniform", NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_split_uniformly_cmd_callback),
|
||||
gradient_editor_split_uniformly_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_SPLIT_UNIFORM },
|
||||
|
||||
{ "gradient-editor-delete", GIMP_ICON_EDIT_DELETE,
|
||||
"delete", "", NULL,
|
||||
G_CALLBACK (gradient_editor_delete_cmd_callback),
|
||||
gradient_editor_delete_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_DELETE },
|
||||
|
||||
{ "gradient-editor-recenter", NULL,
|
||||
"recenter", NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_recenter_cmd_callback),
|
||||
gradient_editor_recenter_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RECENTER },
|
||||
|
||||
{ "gradient-editor-redistribute", NULL,
|
||||
"redistribute", NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_redistribute_cmd_callback),
|
||||
gradient_editor_redistribute_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_REDISTRIBUTE },
|
||||
|
||||
{ "gradient-editor-blend-color", NULL,
|
||||
NC_("gradient-editor-action", "Ble_nd Endpoints' Colors"), NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_blend_color_cmd_callback),
|
||||
gradient_editor_blend_color_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLEND_COLOR },
|
||||
|
||||
{ "gradient-editor-blend-opacity", NULL,
|
||||
NC_("gradient-editor-action", "Blend Endpoints' Opacit_y"), NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_blend_opacity_cmd_callback),
|
||||
gradient_editor_blend_opacity_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLEND_OPACITY }
|
||||
};
|
||||
|
||||
@ -123,7 +123,7 @@ static const GimpToggleActionEntry gradient_editor_toggle_actions[] =
|
||||
{
|
||||
{ "gradient-editor-edit-active", GIMP_ICON_LINKED,
|
||||
NC_("gradient-editor-action", "Edit Active Gradient"), NULL, NULL,
|
||||
G_CALLBACK (data_editor_edit_active_cmd_callback),
|
||||
data_editor_edit_active_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_EDIT_ACTIVE }
|
||||
};
|
||||
@ -409,56 +409,56 @@ gradient_editor_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "gradient-editor-action",
|
||||
gradient_editor_load_left_actions,
|
||||
G_N_ELEMENTS (gradient_editor_load_left_actions),
|
||||
G_CALLBACK (gradient_editor_load_left_cmd_callback));
|
||||
gradient_editor_load_left_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "gradient-editor-action",
|
||||
gradient_editor_save_left_actions,
|
||||
G_N_ELEMENTS (gradient_editor_save_left_actions),
|
||||
G_CALLBACK (gradient_editor_save_left_cmd_callback));
|
||||
gradient_editor_save_left_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "gradient-editor-action",
|
||||
gradient_editor_load_right_actions,
|
||||
G_N_ELEMENTS (gradient_editor_load_right_actions),
|
||||
G_CALLBACK (gradient_editor_load_right_cmd_callback));
|
||||
gradient_editor_load_right_cmd_callback);
|
||||
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "gradient-editor-action",
|
||||
gradient_editor_save_right_actions,
|
||||
G_N_ELEMENTS (gradient_editor_save_right_actions),
|
||||
G_CALLBACK (gradient_editor_save_right_cmd_callback));
|
||||
gradient_editor_save_right_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "gradient-editor-color-type",
|
||||
gradient_editor_left_color_type_actions,
|
||||
G_N_ELEMENTS (gradient_editor_left_color_type_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (gradient_editor_left_color_type_cmd_callback));
|
||||
gradient_editor_left_color_type_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "gradient-editor-color-type",
|
||||
gradient_editor_right_color_type_actions,
|
||||
G_N_ELEMENTS (gradient_editor_right_color_type_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (gradient_editor_right_color_type_cmd_callback));
|
||||
gradient_editor_right_color_type_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "gradient-editor-blending",
|
||||
gradient_editor_blending_actions,
|
||||
G_N_ELEMENTS (gradient_editor_blending_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (gradient_editor_blending_func_cmd_callback));
|
||||
gradient_editor_blending_func_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "gradient-editor-coloring",
|
||||
gradient_editor_coloring_actions,
|
||||
G_N_ELEMENTS (gradient_editor_coloring_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (gradient_editor_coloring_type_cmd_callback));
|
||||
gradient_editor_coloring_type_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
gradient_editor_zoom_actions,
|
||||
G_N_ELEMENTS (gradient_editor_zoom_actions),
|
||||
G_CALLBACK (gradient_editor_zoom_cmd_callback));
|
||||
gradient_editor_zoom_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -52,8 +52,9 @@ static void gradient_editor_replicate_response (GtkWidget *widge
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
gradient_editor_left_color_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_left_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
|
||||
@ -61,18 +62,18 @@ gradient_editor_left_color_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_left_color_type_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
gradient_editor_left_color_type_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
GimpGradientSegment *left;
|
||||
GimpGradientColor color_type;
|
||||
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
|
||||
color_type = (GimpGradientColor) g_variant_get_int32 (value);
|
||||
|
||||
color_type = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
|
||||
|
||||
if (gradient &&
|
||||
color_type >= 0 &&
|
||||
@ -97,9 +98,9 @@ gradient_editor_left_color_type_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_load_left_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
gradient_editor_load_left_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
|
||||
@ -109,10 +110,11 @@ gradient_editor_load_left_cmd_callback (GtkAction *action,
|
||||
GimpGradientSegment *seg;
|
||||
GimpRGB color;
|
||||
GimpGradientColor color_type = GIMP_GRADIENT_COLOR_FIXED;
|
||||
gint index = g_variant_get_int32 (value);
|
||||
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
|
||||
|
||||
switch (value)
|
||||
switch (index)
|
||||
{
|
||||
case GRADIENT_EDITOR_COLOR_NEIGHBOR_ENDPOINT:
|
||||
if (left->prev != NULL)
|
||||
@ -138,7 +140,7 @@ gradient_editor_load_left_cmd_callback (GtkAction *action,
|
||||
break;
|
||||
|
||||
default: /* Load a color */
|
||||
color = editor->saved_colors[value - GRADIENT_EDITOR_COLOR_FIRST_CUSTOM];
|
||||
color = editor->saved_colors[index - GRADIENT_EDITOR_COLOR_FIRST_CUSTOM];
|
||||
break;
|
||||
}
|
||||
|
||||
@ -154,23 +156,25 @@ gradient_editor_load_left_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_save_left_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
gradient_editor_save_left_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
GimpGradientSegment *left;
|
||||
gint index = g_variant_get_int32 (value);
|
||||
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
|
||||
|
||||
gimp_gradient_segment_get_left_color (gradient, left,
|
||||
&editor->saved_colors[value]);
|
||||
&editor->saved_colors[index]);
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_right_color_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_right_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
|
||||
@ -178,18 +182,18 @@ gradient_editor_right_color_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_right_color_type_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
gradient_editor_right_color_type_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
GimpGradientSegment *right;
|
||||
GimpGradientColor color_type;
|
||||
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
|
||||
color_type = (GimpGradientColor) g_variant_get_int32 (value);
|
||||
|
||||
color_type = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
|
||||
|
||||
if (gradient &&
|
||||
color_type >= 0 &&
|
||||
@ -214,9 +218,9 @@ gradient_editor_right_color_type_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_load_right_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
gradient_editor_load_right_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
|
||||
@ -226,10 +230,11 @@ gradient_editor_load_right_cmd_callback (GtkAction *action,
|
||||
GimpGradientSegment *seg;
|
||||
GimpRGB color;
|
||||
GimpGradientColor color_type = GIMP_GRADIENT_COLOR_FIXED;
|
||||
gint index = g_variant_get_int32 (value);
|
||||
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
|
||||
|
||||
switch (value)
|
||||
switch (index)
|
||||
{
|
||||
case GRADIENT_EDITOR_COLOR_NEIGHBOR_ENDPOINT:
|
||||
if (right->next != NULL)
|
||||
@ -255,7 +260,7 @@ gradient_editor_load_right_cmd_callback (GtkAction *action,
|
||||
break;
|
||||
|
||||
default: /* Load a color */
|
||||
color = editor->saved_colors[value - GRADIENT_EDITOR_COLOR_FIRST_CUSTOM];
|
||||
color = editor->saved_colors[index - GRADIENT_EDITOR_COLOR_FIRST_CUSTOM];
|
||||
break;
|
||||
}
|
||||
|
||||
@ -271,24 +276,25 @@ gradient_editor_load_right_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_save_right_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
gradient_editor_save_right_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
GimpGradientSegment *right;
|
||||
gint index = g_variant_get_int32 (value);
|
||||
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
|
||||
|
||||
gimp_gradient_segment_get_right_color (gradient, right,
|
||||
&editor->saved_colors[value]);
|
||||
&editor->saved_colors[index]);
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_blending_func_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
gradient_editor_blending_func_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
@ -297,9 +303,9 @@ gradient_editor_blending_func_cmd_callback (GtkAction *action,
|
||||
GEnumClass *enum_class = NULL;
|
||||
GimpGradientSegmentType type;
|
||||
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
|
||||
type = (GimpGradientSegmentType) g_variant_get_int32 (value);
|
||||
|
||||
type = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
|
||||
|
||||
enum_class = g_type_class_ref (GIMP_TYPE_GRADIENT_SEGMENT_TYPE);
|
||||
|
||||
@ -314,9 +320,9 @@ gradient_editor_blending_func_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_coloring_type_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
gradient_editor_coloring_type_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
@ -325,9 +331,9 @@ gradient_editor_coloring_type_cmd_callback (GtkAction *action,
|
||||
GEnumClass *enum_class = NULL;
|
||||
GimpGradientSegmentColor color;
|
||||
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
|
||||
color = (GimpGradientSegmentColor) g_variant_get_int32 (value);
|
||||
|
||||
color = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
|
||||
|
||||
enum_class = g_type_class_ref (GIMP_TYPE_GRADIENT_SEGMENT_COLOR);
|
||||
|
||||
@ -342,8 +348,9 @@ gradient_editor_coloring_type_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_flip_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
@ -360,8 +367,9 @@ gradient_editor_flip_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_replicate_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_replicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
|
||||
@ -448,8 +456,9 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_split_midpoint_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_split_midpoint_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
|
||||
@ -469,8 +478,9 @@ gradient_editor_split_midpoint_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_split_uniformly_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
|
||||
@ -558,8 +568,9 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
@ -576,8 +587,9 @@ gradient_editor_delete_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_recenter_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_recenter_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
@ -590,8 +602,9 @@ gradient_editor_recenter_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_redistribute_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_redistribute_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
@ -604,8 +617,9 @@ gradient_editor_redistribute_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_blend_color_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_blend_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
@ -621,8 +635,9 @@ gradient_editor_blend_color_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_blend_opacity_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradient_editor_blend_opacity_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradient *gradient;
|
||||
@ -638,13 +653,14 @@ gradient_editor_blend_opacity_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
gradient_editor_zoom_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
gradient_editor_zoom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
|
||||
GimpZoomType zoom_type = (GimpZoomType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_gradient_editor_zoom (editor, (GimpZoomType) value);
|
||||
gimp_gradient_editor_zoom (editor, zoom_type);
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,60 +29,71 @@ enum
|
||||
};
|
||||
|
||||
|
||||
void gradient_editor_left_color_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_left_color_type_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void gradient_editor_load_left_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void gradient_editor_save_left_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void gradient_editor_left_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_left_color_type_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_load_left_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_save_left_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void gradient_editor_right_color_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_right_color_type_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void gradient_editor_load_right_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void gradient_editor_save_right_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void gradient_editor_right_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_right_color_type_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_load_right_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_save_right_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void gradient_editor_blending_func_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void gradient_editor_coloring_type_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void gradient_editor_blending_func_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_coloring_type_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void gradient_editor_flip_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_replicate_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_split_midpoint_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_recenter_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_redistribute_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_replicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_split_midpoint_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_split_uniformly_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_recenter_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_redistribute_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void gradient_editor_blend_color_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_blend_opacity_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradient_editor_blend_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void gradient_editor_blend_opacity_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void gradient_editor_zoom_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void gradient_editor_zoom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __GRADIENT_EDITOR_COMMANDS_H__ */
|
||||
|
@ -47,43 +47,43 @@ static const GimpActionEntry gradients_actions[] =
|
||||
{ "gradients-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("gradients-action", "_New Gradient"), NULL,
|
||||
NC_("gradients-action", "Create a new gradient"),
|
||||
G_CALLBACK (data_new_cmd_callback),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_NEW },
|
||||
|
||||
{ "gradients-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("gradients-action", "D_uplicate Gradient"), NULL,
|
||||
NC_("gradients-action", "Duplicate this gradient"),
|
||||
G_CALLBACK (data_duplicate_cmd_callback),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_DUPLICATE },
|
||||
|
||||
{ "gradients-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("gradients-action", "Copy Gradient _Location"), NULL,
|
||||
NC_("gradients-action", "Copy gradient file location to clipboard"),
|
||||
G_CALLBACK (data_copy_location_cmd_callback),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_COPY_LOCATION },
|
||||
|
||||
{ "gradients-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("gradients-action", "Show in _File Manager"), NULL,
|
||||
NC_("gradients-action", "Show gradient file location in the file manager"),
|
||||
G_CALLBACK (data_show_in_file_manager_cmd_callback),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "gradients-save-as-pov", GIMP_ICON_DOCUMENT_SAVE_AS,
|
||||
NC_("gradients-action", "Save as _POV-Ray..."), NULL,
|
||||
NC_("gradients-action", "Save gradient as POV-Ray"),
|
||||
G_CALLBACK (gradients_save_as_pov_ray_cmd_callback),
|
||||
gradients_save_as_pov_ray_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_SAVE_AS_POV },
|
||||
|
||||
{ "gradients-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("gradients-action", "_Delete Gradient"), NULL,
|
||||
NC_("gradients-action", "Delete this gradient"),
|
||||
G_CALLBACK (data_delete_cmd_callback),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_DELETE },
|
||||
|
||||
{ "gradients-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("gradients-action", "_Refresh Gradients"), NULL,
|
||||
NC_("gradients-action", "Refresh gradients"),
|
||||
G_CALLBACK (data_refresh_cmd_callback),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_GRADIENT_REFRESH }
|
||||
};
|
||||
|
||||
@ -107,7 +107,7 @@ gradients_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_string_actions (group, "gradients-action",
|
||||
gradients_edit_actions,
|
||||
G_N_ELEMENTS (gradients_edit_actions),
|
||||
G_CALLBACK (data_edit_cmd_callback));
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -49,8 +49,9 @@ static void gradients_save_as_pov_ray_response (GtkWidget *dialog,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
gradients_save_as_pov_ray_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
gradients_save_as_pov_ray_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
|
@ -19,8 +19,9 @@
|
||||
#define __GRADIENTS_COMMANDS_H__
|
||||
|
||||
|
||||
void gradients_save_as_pov_ray_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void gradients_save_as_pov_ray_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __GRADIENTS_COMMANDS_H__ */
|
||||
|
@ -40,13 +40,13 @@ static const GimpActionEntry help_actions[] =
|
||||
{ "help-help", "gimp-prefs-help-system",
|
||||
NC_("help-action", "_Help"), "F1",
|
||||
NC_("help-action", "Open the GIMP user manual"),
|
||||
G_CALLBACK (help_help_cmd_callback),
|
||||
help_help_cmd_callback,
|
||||
GIMP_HELP_HELP },
|
||||
|
||||
{ "help-context-help", "gimp-prefs-help-system",
|
||||
NC_("help-action", "_Context Help"), "<shift>F1",
|
||||
NC_("help-action", "Show the help for a specific user interface item"),
|
||||
G_CALLBACK (help_context_help_cmd_callback),
|
||||
help_context_help_cmd_callback,
|
||||
GIMP_HELP_HELP_CONTEXT }
|
||||
};
|
||||
|
||||
|
@ -33,8 +33,9 @@
|
||||
|
||||
|
||||
void
|
||||
help_help_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
help_help_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpDisplay *display;
|
||||
@ -45,8 +46,9 @@ help_help_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
help_context_help_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
help_context_help_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
return_if_no_widget (widget, data);
|
||||
|
@ -19,10 +19,12 @@
|
||||
#define __HELP_COMMANDS_H__
|
||||
|
||||
|
||||
void help_help_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void help_context_help_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void help_help_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void help_context_help_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __HELP_COMMANDS_H__ */
|
||||
|
@ -75,103 +75,103 @@ static const GimpActionEntry image_actions[] =
|
||||
{ "image-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("image-action", "_New..."), "<primary>N",
|
||||
NC_("image-action", "Create a new image"),
|
||||
G_CALLBACK (image_new_cmd_callback),
|
||||
image_new_cmd_callback,
|
||||
GIMP_HELP_FILE_NEW },
|
||||
|
||||
{ "image-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("image-action", "_Duplicate"), "<primary>D",
|
||||
NC_("image-action", "Create a duplicate of this image"),
|
||||
G_CALLBACK (image_duplicate_cmd_callback),
|
||||
image_duplicate_cmd_callback,
|
||||
GIMP_HELP_IMAGE_DUPLICATE },
|
||||
|
||||
{ "image-color-profile-assign", NULL,
|
||||
NC_("image-action", "_Assign Color Profile..."), NULL,
|
||||
NC_("image-action", "Set a color profile on the image"),
|
||||
G_CALLBACK (image_color_profile_assign_cmd_callback),
|
||||
image_color_profile_assign_cmd_callback,
|
||||
GIMP_HELP_IMAGE_COLOR_PROFILE_ASSIGN },
|
||||
|
||||
{ "image-color-profile-convert", NULL,
|
||||
NC_("image-action", "_Convert to Color Profile..."), NULL,
|
||||
NC_("image-action", "Apply a color profile to the image"),
|
||||
G_CALLBACK (image_color_profile_convert_cmd_callback),
|
||||
image_color_profile_convert_cmd_callback,
|
||||
GIMP_HELP_IMAGE_COLOR_PROFILE_CONVERT },
|
||||
|
||||
{ "image-color-profile-discard", NULL,
|
||||
NC_("image-action", "_Discard Color Profile"), NULL,
|
||||
NC_("image-action", "Remove the image's color profile"),
|
||||
G_CALLBACK (image_color_profile_discard_cmd_callback),
|
||||
image_color_profile_discard_cmd_callback,
|
||||
GIMP_HELP_IMAGE_COLOR_PROFILE_DISCARD },
|
||||
|
||||
{ "image-color-profile-save", NULL,
|
||||
NC_("image-action", "_Save Color Profile to File..."), NULL,
|
||||
NC_("image-action", "Save the image's color profile to an ICC file"),
|
||||
G_CALLBACK (image_color_profile_save_cmd_callback),
|
||||
image_color_profile_save_cmd_callback,
|
||||
GIMP_HELP_IMAGE_COLOR_PROFILE_SAVE },
|
||||
|
||||
{ "image-resize", GIMP_ICON_OBJECT_RESIZE,
|
||||
NC_("image-action", "Can_vas Size..."), NULL,
|
||||
NC_("image-action", "Adjust the image dimensions"),
|
||||
G_CALLBACK (image_resize_cmd_callback),
|
||||
image_resize_cmd_callback,
|
||||
GIMP_HELP_IMAGE_RESIZE },
|
||||
|
||||
{ "image-resize-to-layers", NULL,
|
||||
NC_("image-action", "Fit Canvas to L_ayers"), NULL,
|
||||
NC_("image-action", "Resize the image to enclose all layers"),
|
||||
G_CALLBACK (image_resize_to_layers_cmd_callback),
|
||||
image_resize_to_layers_cmd_callback,
|
||||
GIMP_HELP_IMAGE_RESIZE_TO_LAYERS },
|
||||
|
||||
{ "image-resize-to-selection", NULL,
|
||||
NC_("image-action", "F_it Canvas to Selection"), NULL,
|
||||
NC_("image-action", "Resize the image to the extents of the selection"),
|
||||
G_CALLBACK (image_resize_to_selection_cmd_callback),
|
||||
image_resize_to_selection_cmd_callback,
|
||||
GIMP_HELP_IMAGE_RESIZE_TO_SELECTION },
|
||||
|
||||
{ "image-print-size", GIMP_ICON_DOCUMENT_PRINT_RESOLUTION,
|
||||
NC_("image-action", "_Print Size..."), NULL,
|
||||
NC_("image-action", "Adjust the print resolution"),
|
||||
G_CALLBACK (image_print_size_cmd_callback),
|
||||
image_print_size_cmd_callback,
|
||||
GIMP_HELP_IMAGE_PRINT_SIZE },
|
||||
|
||||
{ "image-scale", GIMP_ICON_OBJECT_SCALE,
|
||||
NC_("image-action", "_Scale Image..."), NULL,
|
||||
NC_("image-action", "Change the size of the image content"),
|
||||
G_CALLBACK (image_scale_cmd_callback),
|
||||
image_scale_cmd_callback,
|
||||
GIMP_HELP_IMAGE_SCALE },
|
||||
|
||||
{ "image-crop-to-selection", GIMP_ICON_TOOL_CROP,
|
||||
NC_("image-action", "_Crop to Selection"), NULL,
|
||||
NC_("image-action", "Crop the image to the extents of the selection"),
|
||||
G_CALLBACK (image_crop_to_selection_cmd_callback),
|
||||
image_crop_to_selection_cmd_callback,
|
||||
GIMP_HELP_IMAGE_CROP },
|
||||
|
||||
{ "image-crop-to-content", GIMP_ICON_TOOL_CROP,
|
||||
NC_("image-action", "Crop to C_ontent"), NULL,
|
||||
NC_("image-action", "Crop the image to the extents of its content (remove empty borders from the image)"),
|
||||
G_CALLBACK (image_crop_to_content_cmd_callback),
|
||||
image_crop_to_content_cmd_callback,
|
||||
GIMP_HELP_IMAGE_CROP },
|
||||
|
||||
{ "image-merge-layers", NULL,
|
||||
NC_("image-action", "Merge Visible _Layers..."), "<primary>M",
|
||||
NC_("image-action", "Merge all visible layers into one layer"),
|
||||
G_CALLBACK (image_merge_layers_cmd_callback),
|
||||
image_merge_layers_cmd_callback,
|
||||
GIMP_HELP_IMAGE_MERGE_LAYERS },
|
||||
|
||||
{ "image-flatten", NULL,
|
||||
NC_("image-action", "_Flatten Image"), NULL,
|
||||
NC_("image-action", "Merge all layers into one and remove transparency"),
|
||||
G_CALLBACK (image_flatten_image_cmd_callback),
|
||||
image_flatten_image_cmd_callback,
|
||||
GIMP_HELP_IMAGE_FLATTEN },
|
||||
|
||||
{ "image-configure-grid", GIMP_ICON_GRID,
|
||||
NC_("image-action", "Configure G_rid..."), NULL,
|
||||
NC_("image-action", "Configure the grid for this image"),
|
||||
G_CALLBACK (image_configure_grid_cmd_callback),
|
||||
image_configure_grid_cmd_callback,
|
||||
GIMP_HELP_IMAGE_GRID },
|
||||
|
||||
{ "image-properties", "dialog-information",
|
||||
NC_("image-action", "Image Pr_operties"), "<alt>Return",
|
||||
NC_("image-action", "Display information about this image"),
|
||||
G_CALLBACK (image_properties_cmd_callback),
|
||||
image_properties_cmd_callback,
|
||||
GIMP_HELP_IMAGE_PROPERTIES }
|
||||
};
|
||||
|
||||
@ -182,7 +182,7 @@ static const GimpToggleActionEntry image_toggle_actions[] =
|
||||
NC_("image-action", "Whether the image is color managed. Disabling "
|
||||
"color management is equivalent to assigning a built-in sRGB "
|
||||
"color profile. Better leave color management enabled."),
|
||||
G_CALLBACK (image_color_management_enabled_cmd_callback),
|
||||
image_color_management_enabled_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_IMAGE_COLOR_MANAGEMENT_ENABLED }
|
||||
};
|
||||
@ -311,29 +311,29 @@ image_actions_setup (GimpActionGroup *group)
|
||||
image_convert_base_type_actions,
|
||||
G_N_ELEMENTS (image_convert_base_type_actions),
|
||||
NULL, 0,
|
||||
G_CALLBACK (image_convert_base_type_cmd_callback));
|
||||
image_convert_base_type_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "image-convert-action",
|
||||
image_convert_precision_actions,
|
||||
G_N_ELEMENTS (image_convert_precision_actions),
|
||||
NULL, 0,
|
||||
G_CALLBACK (image_convert_precision_cmd_callback));
|
||||
image_convert_precision_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "image-convert-action",
|
||||
image_convert_gamma_actions,
|
||||
G_N_ELEMENTS (image_convert_gamma_actions),
|
||||
NULL, 0,
|
||||
G_CALLBACK (image_convert_gamma_cmd_callback));
|
||||
image_convert_gamma_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "image-action",
|
||||
image_flip_actions,
|
||||
G_N_ELEMENTS (image_flip_actions),
|
||||
G_CALLBACK (image_flip_cmd_callback));
|
||||
image_flip_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "image-action",
|
||||
image_rotate_actions,
|
||||
G_N_ELEMENTS (image_rotate_actions),
|
||||
G_CALLBACK (image_rotate_cmd_callback));
|
||||
image_rotate_cmd_callback);
|
||||
|
||||
#define SET_ALWAYS_SHOW_IMAGE(action,show) \
|
||||
gimp_action_group_set_action_always_show_image (group, action, show)
|
||||
|
@ -181,8 +181,9 @@ static GimpPalette *image_convert_indexed_custom_palette = NULL;
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
image_new_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *dialog;
|
||||
@ -205,8 +206,9 @@ image_new_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_duplicate_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -228,24 +230,24 @@ image_duplicate_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_convert_base_type_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
image_convert_base_type_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
GtkWidget *widget;
|
||||
GimpDialogConfig *config;
|
||||
GtkWidget *dialog;
|
||||
GimpImageBaseType value;
|
||||
GimpImageBaseType base_type;
|
||||
GError *error = NULL;
|
||||
return_if_no_image (image, data);
|
||||
return_if_no_display (display, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
base_type = (GimpImageBaseType) g_variant_get_int32 (value);
|
||||
|
||||
if (value == gimp_image_get_base_type (image))
|
||||
if (base_type == gimp_image_get_base_type (image))
|
||||
return;
|
||||
|
||||
#define CONVERT_TYPE_DIALOG_KEY "gimp-convert-type-dialog"
|
||||
@ -260,7 +262,7 @@ image_convert_base_type_cmd_callback (GtkAction *action,
|
||||
|
||||
config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
|
||||
switch (value)
|
||||
switch (base_type)
|
||||
{
|
||||
case GIMP_RGB:
|
||||
case GIMP_GRAY:
|
||||
@ -275,7 +277,7 @@ image_convert_base_type_cmd_callback (GtkAction *action,
|
||||
current_profile =
|
||||
gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (image));
|
||||
|
||||
if (value == GIMP_RGB)
|
||||
if (base_type == GIMP_RGB)
|
||||
{
|
||||
dialog_type = COLOR_PROFILE_DIALOG_CONVERT_TO_RGB;
|
||||
callback = image_convert_rgb_callback;
|
||||
@ -306,7 +308,7 @@ image_convert_base_type_cmd_callback (GtkAction *action,
|
||||
callback,
|
||||
display);
|
||||
}
|
||||
else if (! gimp_image_convert_type (image, value, NULL, NULL, &error))
|
||||
else if (! gimp_image_convert_type (image, base_type, NULL, NULL, &error))
|
||||
{
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
|
||||
@ -345,23 +347,23 @@ image_convert_base_type_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_convert_precision_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
image_convert_precision_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
GtkWidget *widget;
|
||||
GimpDialogConfig *config;
|
||||
GtkWidget *dialog;
|
||||
GimpComponentType value;
|
||||
GimpComponentType component_type;
|
||||
return_if_no_image (image, data);
|
||||
return_if_no_display (display, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
component_type = (GimpComponentType) g_variant_get_int32 (value);
|
||||
|
||||
if (value == gimp_image_get_component_type (image))
|
||||
if (component_type == gimp_image_get_component_type (image))
|
||||
return;
|
||||
|
||||
#define CONVERT_PRECISION_DIALOG_KEY "gimp-convert-precision-dialog"
|
||||
@ -379,7 +381,7 @@ image_convert_precision_cmd_callback (GtkAction *action,
|
||||
dialog = convert_precision_dialog_new (image,
|
||||
action_data_get_context (data),
|
||||
widget,
|
||||
value,
|
||||
component_type,
|
||||
config->image_convert_precision_layer_dither_method,
|
||||
config->image_convert_precision_text_layer_dither_method,
|
||||
config->image_convert_precision_channel_dither_method,
|
||||
@ -396,25 +398,25 @@ image_convert_precision_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_convert_gamma_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
image_convert_gamma_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
gboolean value;
|
||||
gboolean linear;
|
||||
GimpPrecision precision;
|
||||
return_if_no_image (image, data);
|
||||
return_if_no_display (display, data);
|
||||
|
||||
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
linear = (gboolean) g_variant_get_int32 (value);
|
||||
|
||||
if (value == gimp_babl_format_get_linear (gimp_image_get_layer_format (image,
|
||||
if (linear == gimp_babl_format_get_linear (gimp_image_get_layer_format (image,
|
||||
FALSE)))
|
||||
return;
|
||||
|
||||
precision = gimp_babl_precision (gimp_image_get_component_type (image),
|
||||
value);
|
||||
linear);
|
||||
|
||||
gimp_image_convert_precision (image, precision,
|
||||
GEGL_DITHER_NONE,
|
||||
@ -425,14 +427,15 @@ image_convert_gamma_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_color_management_enabled_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_color_management_enabled_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
gboolean enabled;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
enabled = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
enabled = g_variant_get_boolean (value);
|
||||
|
||||
if (enabled != gimp_image_get_is_color_managed (image))
|
||||
{
|
||||
@ -442,8 +445,9 @@ image_color_management_enabled_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_color_profile_assign_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_color_profile_assign_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
@ -483,8 +487,9 @@ image_color_profile_assign_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_color_profile_convert_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_color_profile_convert_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
@ -526,8 +531,9 @@ image_color_profile_convert_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_color_profile_discard_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_color_profile_discard_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -571,8 +577,9 @@ image_profile_save_dialog_response (GtkWidget *dialog,
|
||||
}
|
||||
|
||||
void
|
||||
image_color_profile_save_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_color_profile_save_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
@ -620,8 +627,9 @@ image_color_profile_save_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_resize_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_resize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -663,8 +671,9 @@ image_resize_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_resize_to_layers_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_resize_to_layers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -687,8 +696,9 @@ image_resize_to_layers_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_resize_to_selection_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_resize_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -711,8 +721,9 @@ image_resize_to_selection_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_print_size_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_print_size_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -746,8 +757,9 @@ image_print_size_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_scale_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_scale_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -785,22 +797,25 @@ image_scale_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_flip_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
image_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
GimpProgress *progress;
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
GimpProgress *progress;
|
||||
GimpOrientationType orientation;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
orientation = (GimpOrientationType) g_variant_get_int32 (value);
|
||||
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
progress = gimp_progress_start (GIMP_PROGRESS (display), FALSE,
|
||||
_("Flipping"));
|
||||
|
||||
gimp_image_flip (image, action_data_get_context (data),
|
||||
(GimpOrientationType) value, progress);
|
||||
orientation, progress);
|
||||
|
||||
if (progress)
|
||||
gimp_progress_end (progress);
|
||||
@ -809,22 +824,25 @@ image_flip_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_rotate_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
image_rotate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
GimpProgress *progress;
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
GimpProgress *progress;
|
||||
GimpRotationType rotation;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
rotation = (GimpRotationType) g_variant_get_int32 (value);
|
||||
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
progress = gimp_progress_start (GIMP_PROGRESS (display), FALSE,
|
||||
_("Rotating"));
|
||||
|
||||
gimp_image_rotate (image, action_data_get_context (data),
|
||||
(GimpRotationType) value, progress);
|
||||
rotation, progress);
|
||||
|
||||
if (progress)
|
||||
gimp_progress_end (progress);
|
||||
@ -833,8 +851,9 @@ image_rotate_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_crop_to_selection_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_crop_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -860,8 +879,9 @@ image_crop_to_selection_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_crop_to_content_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_crop_to_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -899,8 +919,9 @@ image_crop_to_content_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_merge_layers_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_merge_layers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GimpImage *image;
|
||||
@ -934,8 +955,9 @@ image_merge_layers_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_flatten_image_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_flatten_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
@ -959,8 +981,9 @@ image_flatten_image_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_configure_grid_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_configure_grid_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -988,8 +1011,9 @@ image_configure_grid_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
image_properties_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
image_properties_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
|
@ -19,62 +19,80 @@
|
||||
#define __IMAGE_COMMANDS_H__
|
||||
|
||||
|
||||
void image_new_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_duplicate_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void image_convert_base_type_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void image_convert_precision_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void image_convert_gamma_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void image_convert_base_type_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_convert_precision_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_convert_gamma_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void image_color_management_enabled_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_color_profile_assign_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_color_profile_convert_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_color_profile_discard_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_color_profile_save_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_color_management_enabled_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_color_profile_assign_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_color_profile_convert_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_color_profile_discard_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_color_profile_save_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void image_resize_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_resize_to_layers_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_resize_to_selection_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_print_size_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_scale_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_flip_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void image_rotate_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void image_crop_to_selection_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_crop_to_content_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_resize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_resize_to_layers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_resize_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_print_size_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_scale_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_rotate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_crop_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_crop_to_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void image_merge_layers_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_flatten_image_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_merge_layers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_flatten_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void image_configure_grid_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_properties_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void image_configure_grid_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void image_properties_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __IMAGE_COMMANDS_H__ */
|
||||
|
@ -46,19 +46,19 @@ static const GimpActionEntry images_actions[] =
|
||||
{ "images-raise-views", GIMP_ICON_GO_TOP,
|
||||
NC_("images-action", "_Raise Views"), NULL,
|
||||
NC_("images-action", "Raise this image's displays"),
|
||||
G_CALLBACK (images_raise_views_cmd_callback),
|
||||
images_raise_views_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "images-new-view", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("images-action", "_New View"), NULL,
|
||||
NC_("images-action", "Create a new display for this image"),
|
||||
G_CALLBACK (images_new_view_cmd_callback),
|
||||
images_new_view_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "images-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("images-action", "_Delete Image"), NULL,
|
||||
NC_("images-action", "Delete this image"),
|
||||
G_CALLBACK (images_delete_image_cmd_callback),
|
||||
images_delete_image_cmd_callback,
|
||||
NULL }
|
||||
};
|
||||
|
||||
|
@ -41,8 +41,9 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
images_raise_views_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
images_raise_views_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
@ -71,8 +72,9 @@ images_raise_views_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
images_new_view_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
images_new_view_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
@ -93,8 +95,9 @@ images_new_view_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
images_delete_image_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
images_delete_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
|
@ -19,12 +19,15 @@
|
||||
#define __IMAGES_COMMANDS_H__
|
||||
|
||||
|
||||
void images_raise_views_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void images_new_view_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void images_delete_image_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void images_raise_views_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void images_new_view_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void images_delete_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __IMAGES_COMMANDS_H__ */
|
||||
|
@ -62,13 +62,12 @@ static void items_stroke_callback (GtkWidget *dialog,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
items_visible_cmd_callback (GtkAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item)
|
||||
items_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
GimpImage *image,
|
||||
GimpItem *item)
|
||||
{
|
||||
gboolean visible;
|
||||
|
||||
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean visible = g_variant_get_boolean (value);
|
||||
|
||||
if (visible != gimp_item_get_visible (item))
|
||||
{
|
||||
@ -87,13 +86,12 @@ items_visible_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
items_linked_cmd_callback (GtkAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item)
|
||||
items_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
GimpImage *image,
|
||||
GimpItem *item)
|
||||
{
|
||||
gboolean linked;
|
||||
|
||||
linked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean linked = g_variant_get_boolean (value);
|
||||
|
||||
if (linked != gimp_item_get_linked (item))
|
||||
{
|
||||
@ -112,13 +110,12 @@ items_linked_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
items_lock_content_cmd_callback (GtkAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item)
|
||||
items_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
GimpImage *image,
|
||||
GimpItem *item)
|
||||
{
|
||||
gboolean locked;
|
||||
|
||||
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean locked = g_variant_get_boolean (value);
|
||||
|
||||
if (locked != gimp_item_get_lock_content (item))
|
||||
{
|
||||
@ -137,13 +134,12 @@ items_lock_content_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
items_lock_position_cmd_callback (GtkAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item)
|
||||
items_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
GimpImage *image,
|
||||
GimpItem *item)
|
||||
{
|
||||
gboolean locked;
|
||||
|
||||
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean locked = g_variant_get_boolean (value);
|
||||
|
||||
if (locked != gimp_item_get_lock_position (item))
|
||||
{
|
||||
@ -163,7 +159,7 @@ items_lock_position_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
items_color_tag_cmd_callback (GtkAction *action,
|
||||
items_color_tag_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
GimpColorTag color_tag)
|
||||
@ -185,7 +181,7 @@ items_color_tag_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
items_fill_cmd_callback (GtkAction *action,
|
||||
items_fill_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
const gchar *dialog_key,
|
||||
@ -233,10 +229,10 @@ items_fill_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
items_fill_last_vals_cmd_callback (GtkAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
gpointer data)
|
||||
items_fill_last_vals_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
GimpDialogConfig *config;
|
||||
@ -270,7 +266,7 @@ items_fill_last_vals_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
items_stroke_cmd_callback (GtkAction *action,
|
||||
items_stroke_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
const gchar *dialog_key,
|
||||
@ -318,10 +314,10 @@ items_stroke_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
items_stroke_last_vals_cmd_callback (GtkAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
gpointer data)
|
||||
items_stroke_last_vals_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
GimpDialogConfig *config;
|
||||
|
@ -19,25 +19,29 @@
|
||||
#define __ITEMS_COMMANDS_H__
|
||||
|
||||
|
||||
void items_visible_cmd_callback (GtkAction *action,
|
||||
void items_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
GimpImage *image,
|
||||
GimpItem *item);
|
||||
void items_linked_cmd_callback (GtkAction *action,
|
||||
void items_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
GimpImage *image,
|
||||
GimpItem *item);
|
||||
void items_lock_content_cmd_callback (GtkAction *action,
|
||||
void items_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
GimpImage *image,
|
||||
GimpItem *item);
|
||||
void items_lock_position_cmd_callback (GtkAction *action,
|
||||
void items_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
GimpImage *image,
|
||||
GimpItem *item);
|
||||
|
||||
void items_color_tag_cmd_callback (GtkAction *action,
|
||||
void items_color_tag_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
GimpColorTag color_tag);
|
||||
|
||||
void items_fill_cmd_callback (GtkAction *action,
|
||||
void items_fill_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
const gchar *dialog_key,
|
||||
@ -45,12 +49,12 @@ void items_fill_cmd_callback (GtkAction *action,
|
||||
const gchar *dialog_icon_name,
|
||||
const gchar *dialog_help_id,
|
||||
gpointer data);
|
||||
void items_fill_last_vals_cmd_callback (GtkAction *action,
|
||||
void items_fill_last_vals_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
gpointer data);
|
||||
|
||||
void items_stroke_cmd_callback (GtkAction *action,
|
||||
void items_stroke_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
const gchar *dialog_key,
|
||||
@ -58,7 +62,7 @@ void items_stroke_cmd_callback (GtkAction *action,
|
||||
const gchar *dialog_icon_name,
|
||||
const gchar *dialog_help_id,
|
||||
gpointer data);
|
||||
void items_stroke_last_vals_cmd_callback (GtkAction *action,
|
||||
void items_stroke_last_vals_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
gpointer data);
|
||||
|
@ -88,166 +88,166 @@ static const GimpActionEntry layers_actions[] =
|
||||
{ "layers-edit", GIMP_ICON_EDIT,
|
||||
NC_("layers-action", "Default Edit Action"), NULL,
|
||||
NC_("layers-action", "Activate the default edit action for this type of layer"),
|
||||
G_CALLBACK (layers_edit_cmd_callback),
|
||||
layers_edit_cmd_callback,
|
||||
GIMP_HELP_LAYER_EDIT },
|
||||
|
||||
{ "layers-edit-text", GIMP_ICON_EDIT,
|
||||
NC_("layers-action", "Edit Te_xt on canvas"), NULL,
|
||||
NC_("layers-action", "Edit this text layer content on canvas"),
|
||||
G_CALLBACK (layers_edit_text_cmd_callback),
|
||||
layers_edit_text_cmd_callback,
|
||||
GIMP_HELP_LAYER_EDIT },
|
||||
|
||||
{ "layers-edit-attributes", GIMP_ICON_EDIT,
|
||||
NC_("layers-action", "_Edit Layer Attributes..."), NULL,
|
||||
NC_("layers-action", "Edit the layer's name"),
|
||||
G_CALLBACK (layers_edit_attributes_cmd_callback),
|
||||
layers_edit_attributes_cmd_callback,
|
||||
GIMP_HELP_LAYER_EDIT },
|
||||
|
||||
{ "layers-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("layers-action", "_New Layer..."), "<primary><shift>N",
|
||||
NC_("layers-action", "Create a new layer and add it to the image"),
|
||||
G_CALLBACK (layers_new_cmd_callback),
|
||||
layers_new_cmd_callback,
|
||||
GIMP_HELP_LAYER_NEW },
|
||||
|
||||
{ "layers-new-last-values", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("layers-action", "_New Layer"), NULL,
|
||||
NC_("layers-action", "Create a new layer with last used values"),
|
||||
G_CALLBACK (layers_new_last_vals_cmd_callback),
|
||||
layers_new_last_vals_cmd_callback,
|
||||
GIMP_HELP_LAYER_NEW },
|
||||
|
||||
{ "layers-new-from-visible", NULL,
|
||||
NC_("layers-action", "New from _Visible"), NULL,
|
||||
NC_("layers-action",
|
||||
"Create a new layer from what is visible in this image"),
|
||||
G_CALLBACK (layers_new_from_visible_cmd_callback),
|
||||
layers_new_from_visible_cmd_callback,
|
||||
GIMP_HELP_LAYER_NEW_FROM_VISIBLE },
|
||||
|
||||
{ "layers-new-group", GIMP_ICON_FOLDER_NEW,
|
||||
NC_("layers-action", "New Layer _Group"), NULL,
|
||||
NC_("layers-action", "Create a new layer group and add it to the image"),
|
||||
G_CALLBACK (layers_new_group_cmd_callback),
|
||||
layers_new_group_cmd_callback,
|
||||
GIMP_HELP_LAYER_NEW },
|
||||
|
||||
{ "layers-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("layers-action", "D_uplicate Layer"), "<primary><shift>D",
|
||||
NC_("layers-action",
|
||||
"Create a duplicate of the layer and add it to the image"),
|
||||
G_CALLBACK (layers_duplicate_cmd_callback),
|
||||
layers_duplicate_cmd_callback,
|
||||
GIMP_HELP_LAYER_DUPLICATE },
|
||||
|
||||
{ "layers-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("layers-action", "_Delete Layer"), NULL,
|
||||
NC_("layers-action", "Delete this layer"),
|
||||
G_CALLBACK (layers_delete_cmd_callback),
|
||||
layers_delete_cmd_callback,
|
||||
GIMP_HELP_LAYER_DELETE },
|
||||
|
||||
{ "layers-raise", GIMP_ICON_GO_UP,
|
||||
NC_("layers-action", "_Raise Layer"), NULL,
|
||||
NC_("layers-action", "Raise this layer one step in the layer stack"),
|
||||
G_CALLBACK (layers_raise_cmd_callback),
|
||||
layers_raise_cmd_callback,
|
||||
GIMP_HELP_LAYER_RAISE },
|
||||
|
||||
{ "layers-raise-to-top", GIMP_ICON_GO_TOP,
|
||||
NC_("layers-action", "Layer to _Top"), NULL,
|
||||
NC_("layers-action", "Move this layer to the top of the layer stack"),
|
||||
G_CALLBACK (layers_raise_to_top_cmd_callback),
|
||||
layers_raise_to_top_cmd_callback,
|
||||
GIMP_HELP_LAYER_RAISE_TO_TOP },
|
||||
|
||||
{ "layers-lower", GIMP_ICON_GO_DOWN,
|
||||
NC_("layers-action", "_Lower Layer"), NULL,
|
||||
NC_("layers-action", "Lower this layer one step in the layer stack"),
|
||||
G_CALLBACK (layers_lower_cmd_callback),
|
||||
layers_lower_cmd_callback,
|
||||
GIMP_HELP_LAYER_LOWER },
|
||||
|
||||
{ "layers-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
|
||||
NC_("layers-action", "Layer to _Bottom"), NULL,
|
||||
NC_("layers-action", "Move this layer to the bottom of the layer stack"),
|
||||
G_CALLBACK (layers_lower_to_bottom_cmd_callback),
|
||||
layers_lower_to_bottom_cmd_callback,
|
||||
GIMP_HELP_LAYER_LOWER_TO_BOTTOM },
|
||||
|
||||
{ "layers-anchor", GIMP_ICON_LAYER_ANCHOR,
|
||||
NC_("layers-action", "_Anchor Layer"), "<primary>H",
|
||||
NC_("layers-action", "Anchor the floating layer"),
|
||||
G_CALLBACK (layers_anchor_cmd_callback),
|
||||
layers_anchor_cmd_callback,
|
||||
GIMP_HELP_LAYER_ANCHOR },
|
||||
|
||||
{ "layers-merge-down", GIMP_ICON_LAYER_MERGE_DOWN,
|
||||
NC_("layers-action", "Merge Do_wn"), NULL,
|
||||
NC_("layers-action", "Merge this layer with the first visible layer below it"),
|
||||
G_CALLBACK (layers_merge_down_cmd_callback),
|
||||
layers_merge_down_cmd_callback,
|
||||
GIMP_HELP_LAYER_MERGE_DOWN },
|
||||
|
||||
{ "layers-merge-group", NULL,
|
||||
NC_("layers-action", "Merge Layer Group"), NULL,
|
||||
NC_("layers-action", "Merge the layer group's layers into one normal layer"),
|
||||
G_CALLBACK (layers_merge_group_cmd_callback),
|
||||
layers_merge_group_cmd_callback,
|
||||
GIMP_HELP_LAYER_MERGE_GROUP },
|
||||
|
||||
{ "layers-merge-layers", NULL,
|
||||
NC_("layers-action", "Merge _Visible Layers..."), NULL,
|
||||
NC_("layers-action", "Merge all visible layers into one layer"),
|
||||
G_CALLBACK (image_merge_layers_cmd_callback),
|
||||
image_merge_layers_cmd_callback,
|
||||
GIMP_HELP_IMAGE_MERGE_LAYERS },
|
||||
|
||||
{ "layers-flatten-image", NULL,
|
||||
NC_("layers-action", "_Flatten Image"), NULL,
|
||||
NC_("layers-action", "Merge all layers into one and remove transparency"),
|
||||
G_CALLBACK (image_flatten_image_cmd_callback),
|
||||
image_flatten_image_cmd_callback,
|
||||
GIMP_HELP_IMAGE_FLATTEN },
|
||||
|
||||
{ "layers-text-discard", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "_Discard Text Information"), NULL,
|
||||
NC_("layers-action", "Turn this text layer into a normal layer"),
|
||||
G_CALLBACK (layers_text_discard_cmd_callback),
|
||||
layers_text_discard_cmd_callback,
|
||||
GIMP_HELP_LAYER_TEXT_DISCARD },
|
||||
|
||||
{ "layers-text-to-vectors", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "Text to _Path"), NULL,
|
||||
NC_("layers-action", "Create a path from this text layer"),
|
||||
G_CALLBACK (layers_text_to_vectors_cmd_callback),
|
||||
layers_text_to_vectors_cmd_callback,
|
||||
GIMP_HELP_LAYER_TEXT_TO_PATH },
|
||||
|
||||
{ "layers-text-along-vectors", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "Text alon_g Path"), NULL,
|
||||
NC_("layers-action", "Warp this layer's text along the current path"),
|
||||
G_CALLBACK (layers_text_along_vectors_cmd_callback),
|
||||
layers_text_along_vectors_cmd_callback,
|
||||
GIMP_HELP_LAYER_TEXT_ALONG_PATH },
|
||||
|
||||
{ "layers-resize", GIMP_ICON_OBJECT_RESIZE,
|
||||
NC_("layers-action", "Layer B_oundary Size..."), NULL,
|
||||
NC_("layers-action", "Adjust the layer dimensions"),
|
||||
G_CALLBACK (layers_resize_cmd_callback),
|
||||
layers_resize_cmd_callback,
|
||||
GIMP_HELP_LAYER_RESIZE },
|
||||
|
||||
{ "layers-resize-to-image", GIMP_ICON_LAYER_TO_IMAGESIZE,
|
||||
NC_("layers-action", "Layer to _Image Size"), NULL,
|
||||
NC_("layers-action", "Resize the layer to the size of the image"),
|
||||
G_CALLBACK (layers_resize_to_image_cmd_callback),
|
||||
layers_resize_to_image_cmd_callback,
|
||||
GIMP_HELP_LAYER_RESIZE_TO_IMAGE },
|
||||
|
||||
{ "layers-scale", GIMP_ICON_OBJECT_SCALE,
|
||||
NC_("layers-action", "_Scale Layer..."), NULL,
|
||||
NC_("layers-action", "Change the size of the layer content"),
|
||||
G_CALLBACK (layers_scale_cmd_callback),
|
||||
layers_scale_cmd_callback,
|
||||
GIMP_HELP_LAYER_SCALE },
|
||||
|
||||
{ "layers-crop-to-selection", GIMP_ICON_TOOL_CROP,
|
||||
NC_("layers-action", "_Crop to Selection"), NULL,
|
||||
NC_("layers-action", "Crop the layer to the extents of the selection"),
|
||||
G_CALLBACK (layers_crop_to_selection_cmd_callback),
|
||||
layers_crop_to_selection_cmd_callback,
|
||||
GIMP_HELP_LAYER_CROP },
|
||||
|
||||
{ "layers-crop-to-content", GIMP_ICON_TOOL_CROP,
|
||||
NC_("layers-action", "Crop to C_ontent"), NULL,
|
||||
NC_("layers-action", "Crop the layer to the extents of its content (remove empty borders from the layer)"),
|
||||
G_CALLBACK (layers_crop_to_content_cmd_callback),
|
||||
layers_crop_to_content_cmd_callback,
|
||||
GIMP_HELP_LAYER_CROP },
|
||||
|
||||
{ "layers-mask-add", GIMP_ICON_LAYER_MASK,
|
||||
NC_("layers-action", "Add La_yer Mask..."), NULL,
|
||||
NC_("layers-action",
|
||||
"Add a mask that allows non-destructive editing of transparency"),
|
||||
G_CALLBACK (layers_mask_add_cmd_callback),
|
||||
layers_mask_add_cmd_callback,
|
||||
GIMP_HELP_LAYER_MASK_ADD },
|
||||
|
||||
/* this is the same as layers-mask-add, except it's sensitive even if
|
||||
@ -257,26 +257,26 @@ static const GimpActionEntry layers_actions[] =
|
||||
NC_("layers-action", "Add La_yer Mask..."), NULL,
|
||||
NC_("layers-action",
|
||||
"Add a mask that allows non-destructive editing of transparency"),
|
||||
G_CALLBACK (layers_mask_add_cmd_callback),
|
||||
layers_mask_add_cmd_callback,
|
||||
GIMP_HELP_LAYER_MASK_ADD },
|
||||
|
||||
{ "layers-mask-add-last-values", GIMP_ICON_LAYER_MASK,
|
||||
NC_("layers-action", "Add La_yer Mask"), NULL,
|
||||
NC_("layers-action",
|
||||
"Add a mask with last used values"),
|
||||
G_CALLBACK (layers_mask_add_last_vals_cmd_callback),
|
||||
layers_mask_add_last_vals_cmd_callback,
|
||||
GIMP_HELP_LAYER_MASK_ADD },
|
||||
|
||||
{ "layers-alpha-add", GIMP_ICON_TRANSPARENCY,
|
||||
NC_("layers-action", "Add Alpha C_hannel"), NULL,
|
||||
NC_("layers-action", "Add transparency information to the layer"),
|
||||
G_CALLBACK (layers_alpha_add_cmd_callback),
|
||||
layers_alpha_add_cmd_callback,
|
||||
GIMP_HELP_LAYER_ALPHA_ADD },
|
||||
|
||||
{ "layers-alpha-remove", NULL,
|
||||
NC_("layers-action", "_Remove Alpha Channel"), NULL,
|
||||
NC_("layers-action", "Remove transparency information from the layer"),
|
||||
G_CALLBACK (layers_alpha_remove_cmd_callback),
|
||||
layers_alpha_remove_cmd_callback,
|
||||
GIMP_HELP_LAYER_ALPHA_REMOVE }
|
||||
};
|
||||
|
||||
@ -285,44 +285,44 @@ static const GimpToggleActionEntry layers_toggle_actions[] =
|
||||
{ "layers-mask-edit", GIMP_ICON_EDIT,
|
||||
NC_("layers-action", "_Edit Layer Mask"), NULL,
|
||||
NC_("layers-action", "Work on the layer mask"),
|
||||
G_CALLBACK (layers_mask_edit_cmd_callback),
|
||||
layers_mask_edit_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_MASK_EDIT },
|
||||
|
||||
{ "layers-mask-show", GIMP_ICON_VISIBLE,
|
||||
NC_("layers-action", "S_how Layer Mask"), NULL, NULL,
|
||||
G_CALLBACK (layers_mask_show_cmd_callback),
|
||||
layers_mask_show_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_MASK_SHOW },
|
||||
|
||||
{ "layers-mask-disable", NULL,
|
||||
NC_("layers-action", "_Disable Layer Mask"), NULL,
|
||||
NC_("layers-action", "Dismiss the effect of the layer mask"),
|
||||
G_CALLBACK (layers_mask_disable_cmd_callback),
|
||||
layers_mask_disable_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_MASK_DISABLE },
|
||||
|
||||
{ "layers-visible", GIMP_ICON_VISIBLE,
|
||||
NC_("layers-action", "Toggle Layer _Visibility"), NULL, NULL,
|
||||
G_CALLBACK (layers_visible_cmd_callback),
|
||||
layers_visible_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_VISIBLE },
|
||||
|
||||
{ "layers-linked", GIMP_ICON_LINKED,
|
||||
NC_("layers-action", "Toggle Layer _Linked State"), NULL, NULL,
|
||||
G_CALLBACK (layers_linked_cmd_callback),
|
||||
layers_linked_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LINKED },
|
||||
|
||||
{ "layers-lock-content", NULL /* GIMP_ICON_LOCK */,
|
||||
NC_("layers-action", "L_ock Pixels of Layer"), NULL, NULL,
|
||||
G_CALLBACK (layers_lock_content_cmd_callback),
|
||||
layers_lock_content_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LOCK_PIXELS },
|
||||
|
||||
{ "layers-lock-position", GIMP_ICON_TOOL_MOVE,
|
||||
NC_("layers-action", "L_ock Position of Layer"), NULL, NULL,
|
||||
G_CALLBACK (layers_lock_position_cmd_callback),
|
||||
layers_lock_position_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LOCK_POSITION },
|
||||
|
||||
@ -330,7 +330,7 @@ static const GimpToggleActionEntry layers_toggle_actions[] =
|
||||
NC_("layers-action", "Lock Alph_a Channel"), NULL,
|
||||
NC_("layers-action",
|
||||
"Keep transparency information on this layer from being modified"),
|
||||
G_CALLBACK (layers_lock_alpha_cmd_callback),
|
||||
layers_lock_alpha_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LOCK_ALPHA },
|
||||
};
|
||||
@ -681,39 +681,39 @@ layers_actions_setup (GimpActionGroup *group)
|
||||
layers_blend_space_actions,
|
||||
G_N_ELEMENTS (layers_blend_space_actions),
|
||||
NULL, 0,
|
||||
G_CALLBACK (layers_blend_space_cmd_callback));
|
||||
layers_blend_space_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "layers-action",
|
||||
layers_composite_space_actions,
|
||||
G_N_ELEMENTS (layers_composite_space_actions),
|
||||
NULL, 0,
|
||||
G_CALLBACK (layers_composite_space_cmd_callback));
|
||||
layers_composite_space_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "layers-action",
|
||||
layers_composite_mode_actions,
|
||||
G_N_ELEMENTS (layers_composite_mode_actions),
|
||||
NULL, 0,
|
||||
G_CALLBACK (layers_composite_mode_cmd_callback));
|
||||
layers_composite_mode_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "layers-action",
|
||||
layers_color_tag_actions,
|
||||
G_N_ELEMENTS (layers_color_tag_actions),
|
||||
G_CALLBACK (layers_color_tag_cmd_callback));
|
||||
layers_color_tag_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "layers-action",
|
||||
layers_mask_apply_actions,
|
||||
G_N_ELEMENTS (layers_mask_apply_actions),
|
||||
G_CALLBACK (layers_mask_apply_cmd_callback));
|
||||
layers_mask_apply_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "layers-action",
|
||||
layers_mask_to_selection_actions,
|
||||
G_N_ELEMENTS (layers_mask_to_selection_actions),
|
||||
G_CALLBACK (layers_mask_to_selection_cmd_callback));
|
||||
layers_mask_to_selection_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "layers-action",
|
||||
layers_alpha_to_selection_actions,
|
||||
G_N_ELEMENTS (layers_alpha_to_selection_actions),
|
||||
G_CALLBACK (layers_alpha_to_selection_cmd_callback));
|
||||
layers_alpha_to_selection_cmd_callback);
|
||||
|
||||
layers_actions_fix_tooltip (group, "layers-alpha-selection-replace",
|
||||
GDK_MOD1_MASK);
|
||||
@ -727,17 +727,17 @@ layers_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "layers-action",
|
||||
layers_select_actions,
|
||||
G_N_ELEMENTS (layers_select_actions),
|
||||
G_CALLBACK (layers_select_cmd_callback));
|
||||
layers_select_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "layers-action",
|
||||
layers_opacity_actions,
|
||||
G_N_ELEMENTS (layers_opacity_actions),
|
||||
G_CALLBACK (layers_opacity_cmd_callback));
|
||||
layers_opacity_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "layers-action",
|
||||
layers_mode_actions,
|
||||
G_N_ELEMENTS (layers_mode_actions),
|
||||
G_CALLBACK (layers_mode_cmd_callback));
|
||||
layers_mode_cmd_callback);
|
||||
|
||||
items_actions_setup (group, "layers");
|
||||
}
|
||||
|
@ -178,8 +178,9 @@ static GimpInterpolationType layer_scale_interp = -1;
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
layers_edit_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -189,17 +190,18 @@ layers_edit_cmd_callback (GtkAction *action,
|
||||
|
||||
if (gimp_item_is_text_layer (GIMP_ITEM (layer)))
|
||||
{
|
||||
layers_edit_text_cmd_callback (action, data);
|
||||
layers_edit_text_cmd_callback (action, value, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
layers_edit_attributes_cmd_callback (action, data);
|
||||
layers_edit_attributes_cmd_callback (action, value, data);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_edit_text_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_edit_text_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -237,8 +239,9 @@ layers_edit_text_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_edit_attributes_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_edit_attributes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -287,8 +290,9 @@ layers_edit_attributes_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_new_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -363,8 +367,9 @@ layers_new_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_new_last_vals_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_new_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -382,7 +387,7 @@ layers_new_last_vals_cmd_callback (GtkAction *action,
|
||||
*/
|
||||
if (gimp_image_get_floating_selection (image))
|
||||
{
|
||||
layers_new_cmd_callback (action, data);
|
||||
layers_new_cmd_callback (action, value, data);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -417,16 +422,19 @@ layers_new_last_vals_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_new_from_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_new_from_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplayShell *shell;
|
||||
GimpLayer *layer;
|
||||
GimpPickable *pickable;
|
||||
GimpColorProfile *profile;
|
||||
return_if_no_image (image, data);
|
||||
return_if_no_shell (shell, data);
|
||||
|
||||
pickable = GIMP_PICKABLE (image);
|
||||
pickable = gimp_display_shell_get_canvas_pickable (shell);
|
||||
|
||||
gimp_pickable_flush (pickable);
|
||||
|
||||
@ -446,8 +454,9 @@ layers_new_from_visible_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_new_group_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_new_group_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -460,16 +469,19 @@ layers_new_group_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
layers_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
GimpContainer *container;
|
||||
GimpLayer *new_layer;
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
GimpContainer *container;
|
||||
GimpLayer *new_layer;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
layer = gimp_image_get_active_layer (image);
|
||||
|
||||
if (layer)
|
||||
@ -477,7 +489,7 @@ layers_select_cmd_callback (GtkAction *action,
|
||||
else
|
||||
container = gimp_image_get_layers (image);
|
||||
|
||||
new_layer = (GimpLayer *) action_select_object ((GimpActionSelectType) value,
|
||||
new_layer = (GimpLayer *) action_select_object (select_type,
|
||||
container,
|
||||
(GimpObject *) layer);
|
||||
|
||||
@ -489,8 +501,9 @@ layers_select_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_raise_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_raise_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -501,8 +514,9 @@ layers_raise_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_raise_to_top_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_raise_to_top_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -513,8 +527,9 @@ layers_raise_to_top_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_lower_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_lower_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -525,8 +540,9 @@ layers_lower_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_lower_to_bottom_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_lower_to_bottom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -537,8 +553,9 @@ layers_lower_to_bottom_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_duplicate_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -559,8 +576,9 @@ layers_duplicate_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_anchor_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -574,8 +592,9 @@ layers_anchor_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_merge_down_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_merge_down_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -590,8 +609,9 @@ layers_merge_down_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_merge_group_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_merge_group_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -602,8 +622,9 @@ layers_merge_group_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -614,8 +635,9 @@ layers_delete_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_text_discard_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_text_discard_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -626,8 +648,9 @@ layers_text_discard_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_text_to_vectors_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_text_to_vectors_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -650,8 +673,9 @@ layers_text_to_vectors_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_text_along_vectors_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_text_along_vectors_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -707,8 +731,9 @@ layers_text_along_vectors_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_resize_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_resize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -753,8 +778,9 @@ layers_resize_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_resize_to_image_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_resize_to_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -767,8 +793,9 @@ layers_resize_to_image_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_scale_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_scale_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -811,8 +838,9 @@ layers_scale_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_crop_to_selection_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_crop_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -849,8 +877,9 @@ layers_crop_to_selection_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_crop_to_content_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_crop_to_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -895,8 +924,9 @@ layers_crop_to_content_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_add_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_mask_add_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -930,8 +960,9 @@ layers_mask_add_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_add_last_vals_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_mask_add_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -960,7 +991,7 @@ layers_mask_add_last_vals_cmd_callback (GtkAction *action,
|
||||
|
||||
if (! channel)
|
||||
{
|
||||
layers_mask_add_cmd_callback (action, data);
|
||||
layers_mask_add_cmd_callback (action, value, data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -977,9 +1008,9 @@ layers_mask_add_last_vals_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_apply_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
layers_mask_apply_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -987,7 +1018,7 @@ layers_mask_apply_cmd_callback (GtkAction *action,
|
||||
|
||||
if (gimp_layer_get_mask (layer))
|
||||
{
|
||||
GimpMaskApplyMode mode = (GimpMaskApplyMode) value;
|
||||
GimpMaskApplyMode mode = (GimpMaskApplyMode) g_variant_get_int32 (value);
|
||||
|
||||
gimp_layer_apply_mask (layer, mode, TRUE);
|
||||
gimp_image_flush (image);
|
||||
@ -995,8 +1026,9 @@ layers_mask_apply_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_edit_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_mask_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -1004,9 +1036,7 @@ layers_mask_edit_cmd_callback (GtkAction *action,
|
||||
|
||||
if (gimp_layer_get_mask (layer))
|
||||
{
|
||||
gboolean active;
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_layer_set_edit_mask (layer, active);
|
||||
gimp_image_flush (image);
|
||||
@ -1014,8 +1044,9 @@ layers_mask_edit_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_show_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_mask_show_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -1023,9 +1054,7 @@ layers_mask_show_cmd_callback (GtkAction *action,
|
||||
|
||||
if (gimp_layer_get_mask (layer))
|
||||
{
|
||||
gboolean active;
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_layer_set_show_mask (layer, active, TRUE);
|
||||
gimp_image_flush (image);
|
||||
@ -1033,8 +1062,9 @@ layers_mask_show_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_disable_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_mask_disable_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -1042,9 +1072,7 @@ layers_mask_disable_cmd_callback (GtkAction *action,
|
||||
|
||||
if (gimp_layer_get_mask (layer))
|
||||
{
|
||||
gboolean active;
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_layer_set_apply_mask (layer, ! active, TRUE);
|
||||
gimp_image_flush (image);
|
||||
@ -1052,9 +1080,9 @@ layers_mask_disable_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_mask_to_selection_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
layers_mask_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -1065,16 +1093,18 @@ layers_mask_to_selection_cmd_callback (GtkAction *action,
|
||||
|
||||
if (mask)
|
||||
{
|
||||
gimp_item_to_selection (GIMP_ITEM (mask),
|
||||
(GimpChannelOps) value,
|
||||
GimpChannelOps operation = (GimpChannelOps) g_variant_get_int32 (value);
|
||||
|
||||
gimp_item_to_selection (GIMP_ITEM (mask), operation,
|
||||
TRUE, FALSE, 0.0, 0.0);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_add_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_alpha_add_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -1088,8 +1118,9 @@ layers_alpha_add_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_remove_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_alpha_remove_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -1103,24 +1134,26 @@ layers_alpha_remove_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_alpha_to_selection_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
layers_alpha_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
GimpChannelOps operation;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
gimp_item_to_selection (GIMP_ITEM (layer),
|
||||
(GimpChannelOps) value,
|
||||
operation = (GimpChannelOps) g_variant_get_int32 (value);
|
||||
|
||||
gimp_item_to_selection (GIMP_ITEM (layer), operation,
|
||||
TRUE, FALSE, 0.0, 0.0);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
layers_opacity_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
layers_opacity_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -1144,9 +1177,9 @@ layers_opacity_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_mode_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
layers_mode_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
@ -1181,16 +1214,16 @@ layers_mode_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_blend_space_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
layers_blend_space_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
GimpLayerColorSpace blend_space;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
blend_space = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
blend_space = (GimpLayerColorSpace) g_variant_get_int32 (value);
|
||||
|
||||
if (blend_space != gimp_layer_get_blend_space (layer))
|
||||
{
|
||||
@ -1209,16 +1242,16 @@ layers_blend_space_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_composite_space_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
layers_composite_space_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
GimpLayerColorSpace composite_space;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
composite_space = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
composite_space = (GimpLayerColorSpace) g_variant_get_int32 (value);
|
||||
|
||||
if (composite_space != gimp_layer_get_composite_space (layer))
|
||||
{
|
||||
@ -1237,16 +1270,16 @@ layers_composite_space_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_composite_mode_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
layers_composite_mode_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
GimpLayerCompositeMode composite_mode;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
composite_mode = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
composite_mode = (GimpLayerCompositeMode) g_variant_get_int32 (value);
|
||||
|
||||
if (composite_mode != gimp_layer_get_composite_mode (layer))
|
||||
{
|
||||
@ -1265,59 +1298,64 @@ layers_composite_mode_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_visible_cmd_callback (GtkAction *action,
|
||||
layers_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
items_visible_cmd_callback (action, image, GIMP_ITEM (layer));
|
||||
items_visible_cmd_callback (action, value, image, GIMP_ITEM (layer));
|
||||
}
|
||||
|
||||
void
|
||||
layers_linked_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
items_linked_cmd_callback (action, image, GIMP_ITEM (layer));
|
||||
items_linked_cmd_callback (action, value, image, GIMP_ITEM (layer));
|
||||
}
|
||||
|
||||
void
|
||||
layers_lock_content_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
items_lock_content_cmd_callback (action, image, GIMP_ITEM (layer));
|
||||
items_lock_content_cmd_callback (action, value, image, GIMP_ITEM (layer));
|
||||
}
|
||||
|
||||
void
|
||||
layers_lock_position_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
items_lock_position_cmd_callback (action, image, GIMP_ITEM (layer));
|
||||
items_lock_position_cmd_callback (action, value, image, GIMP_ITEM (layer));
|
||||
}
|
||||
|
||||
void
|
||||
layers_lock_alpha_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
layers_lock_alpha_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
gboolean lock_alpha;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
lock_alpha = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
lock_alpha = g_variant_get_boolean (value);
|
||||
|
||||
if (lock_alpha != gimp_layer_get_lock_alpha (layer))
|
||||
{
|
||||
@ -1336,16 +1374,19 @@ layers_lock_alpha_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
layers_color_tag_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
layers_color_tag_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
GimpImage *image;
|
||||
GimpLayer *layer;
|
||||
GimpColorTag color_tag;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
color_tag = (GimpColorTag) g_variant_get_int32 (value);
|
||||
|
||||
items_color_tag_cmd_callback (action, image, GIMP_ITEM (layer),
|
||||
(GimpColorTag) value);
|
||||
color_tag);
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,119 +19,155 @@
|
||||
#define __LAYERS_COMMANDS_H__
|
||||
|
||||
|
||||
void layers_edit_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_edit_text_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_edit_attributes_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_edit_text_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_edit_attributes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_new_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_new_last_vals_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_new_from_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_new_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_new_from_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_new_group_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_new_group_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_select_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void layers_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_raise_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_raise_to_top_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_lower_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_lower_to_bottom_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_raise_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_raise_to_top_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_lower_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_lower_to_bottom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_duplicate_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_anchor_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_merge_down_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_merge_group_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_text_discard_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_text_to_vectors_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_text_along_vectors_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_merge_down_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_merge_group_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_text_discard_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_text_to_vectors_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_text_along_vectors_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_resize_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_resize_to_image_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_scale_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_crop_to_selection_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_crop_to_content_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_resize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_resize_to_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_scale_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_crop_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_crop_to_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_mask_add_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_mask_add_last_vals_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_mask_apply_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void layers_mask_edit_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_mask_show_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_mask_disable_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_mask_to_selection_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void layers_mask_add_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_mask_add_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_mask_apply_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_mask_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_mask_show_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_mask_disable_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_mask_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_alpha_add_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_alpha_remove_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_alpha_to_selection_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void layers_alpha_add_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_alpha_remove_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_alpha_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_opacity_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void layers_mode_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void layers_blend_space_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void layers_composite_space_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void layers_composite_mode_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void layers_opacity_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_mode_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_blend_space_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_composite_space_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_composite_mode_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_linked_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_lock_content_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_lock_position_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_lock_alpha_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void layers_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_lock_alpha_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void layers_color_tag_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void layers_color_tag_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __LAYERS_COMMANDS_H__ */
|
||||
|
@ -46,37 +46,37 @@ static const GimpActionEntry mypaint_brushes_actions[] =
|
||||
{ "mypaint-brushes-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("mypaint-brushes-action", "_New MyPaint Brush"), NULL,
|
||||
NC_("mypaint-brushes-action", "Create a new MyPaint brush"),
|
||||
G_CALLBACK (data_new_cmd_callback),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_MYPAINT_BRUSH_NEW },
|
||||
|
||||
{ "mypaint-brushes-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("mypaint-brushes-action", "D_uplicate MyPaint Brush"), NULL,
|
||||
NC_("mypaint-brushes-action", "Duplicate this MyPaint brush"),
|
||||
G_CALLBACK (data_duplicate_cmd_callback),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_MYPAINT_BRUSH_DUPLICATE },
|
||||
|
||||
{ "mypaint-brushes-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("mypaint-brushes-action", "Copy MyPaint Brush _Location"), NULL,
|
||||
NC_("mypaint-brushes-action", "Copy MyPaint brush file location to clipboard"),
|
||||
G_CALLBACK (data_copy_location_cmd_callback),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_MYPAINT_BRUSH_COPY_LOCATION },
|
||||
|
||||
{ "mypaint-brushes-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("mypaint-brushes-action", "Show in _File Manager"), NULL,
|
||||
NC_("mypaint-brushes-action", "Show MyPaint brush file location in the file manager"),
|
||||
G_CALLBACK (data_show_in_file_manager_cmd_callback),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_MYPAINT_BRUSH_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "mypaint-brushes-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("mypaint-brushes-action", "_Delete MyPaint Brush"), NULL,
|
||||
NC_("mypaint-brushes-action", "Delete this MyPaint brush"),
|
||||
G_CALLBACK (data_delete_cmd_callback),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_MYPAINT_BRUSH_DELETE },
|
||||
|
||||
{ "mypaint-brushes-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("mypaint-brushes-action", "_Refresh MyPaint Brushes"), NULL,
|
||||
NC_("mypaint-brushes-action", "Refresh MyPaint brushes"),
|
||||
G_CALLBACK (data_refresh_cmd_callback),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_MYPAINT_BRUSH_REFRESH }
|
||||
};
|
||||
|
||||
@ -100,7 +100,7 @@ mypaint_brushes_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_string_actions (group, "mypaint-brushes-action",
|
||||
mypaint_brushes_edit_actions,
|
||||
G_N_ELEMENTS (mypaint_brushes_edit_actions),
|
||||
G_CALLBACK (data_edit_cmd_callback));
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -47,13 +47,13 @@ static const GimpActionEntry palette_editor_actions[] =
|
||||
{ "palette-editor-edit-color", GIMP_ICON_EDIT,
|
||||
NC_("palette-editor-action", "_Edit Color..."), NULL,
|
||||
NC_("palette-editor-action", "Edit this entry"),
|
||||
G_CALLBACK (palette_editor_edit_color_cmd_callback),
|
||||
palette_editor_edit_color_cmd_callback,
|
||||
GIMP_HELP_PALETTE_EDITOR_EDIT },
|
||||
|
||||
{ "palette-editor-delete-color", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("palette-editor-action", "_Delete Color"), NULL,
|
||||
NC_("palette-editor-action", "Delete this entry"),
|
||||
G_CALLBACK (palette_editor_delete_color_cmd_callback),
|
||||
palette_editor_delete_color_cmd_callback,
|
||||
GIMP_HELP_PALETTE_EDITOR_DELETE }
|
||||
};
|
||||
|
||||
@ -61,7 +61,7 @@ static const GimpToggleActionEntry palette_editor_toggle_actions[] =
|
||||
{
|
||||
{ "palette-editor-edit-active", GIMP_ICON_LINKED,
|
||||
NC_("palette-editor-action", "Edit Active Palette"), NULL, NULL,
|
||||
G_CALLBACK (data_editor_edit_active_cmd_callback),
|
||||
data_editor_edit_active_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_PALETTE_EDITOR_EDIT_ACTIVE }
|
||||
};
|
||||
@ -119,12 +119,12 @@ palette_editor_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_enum_actions (group, "palette-editor-action",
|
||||
palette_editor_new_actions,
|
||||
G_N_ELEMENTS (palette_editor_new_actions),
|
||||
G_CALLBACK (palette_editor_new_color_cmd_callback));
|
||||
palette_editor_new_color_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
palette_editor_zoom_actions,
|
||||
G_N_ELEMENTS (palette_editor_zoom_actions),
|
||||
G_CALLBACK (palette_editor_zoom_cmd_callback));
|
||||
palette_editor_zoom_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -34,8 +34,9 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
palette_editor_edit_color_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
palette_editor_edit_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
|
||||
|
||||
@ -43,12 +44,13 @@ palette_editor_edit_color_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
palette_editor_new_color_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
palette_editor_new_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
|
||||
gboolean background = (gboolean) g_variant_get_int32 (value);
|
||||
|
||||
if (data_editor->data_editable)
|
||||
{
|
||||
@ -56,7 +58,7 @@ palette_editor_new_color_cmd_callback (GtkAction *action,
|
||||
GimpPaletteEntry *entry;
|
||||
GimpRGB color;
|
||||
|
||||
if (value)
|
||||
if (background)
|
||||
gimp_context_get_background (data_editor->context, &color);
|
||||
else
|
||||
gimp_context_get_foreground (data_editor->context, &color);
|
||||
@ -67,8 +69,9 @@ palette_editor_new_color_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
palette_editor_delete_color_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
palette_editor_delete_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
|
||||
@ -82,11 +85,12 @@ palette_editor_delete_color_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
palette_editor_zoom_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
palette_editor_zoom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
|
||||
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
|
||||
GimpZoomType zoom_type = (GimpZoomType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_palette_editor_zoom (editor, (GimpZoomType) value);
|
||||
gimp_palette_editor_zoom (editor, zoom_type);
|
||||
}
|
||||
|
@ -19,17 +19,19 @@
|
||||
#define __PALETTE_EDITOR_COMMANDS_H__
|
||||
|
||||
|
||||
void palette_editor_edit_color_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void palette_editor_new_color_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void palette_editor_delete_color_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void palette_editor_edit_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void palette_editor_new_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void palette_editor_delete_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void palette_editor_zoom_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void palette_editor_zoom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __PALETTE_EDITOR_COMMANDS_H__ */
|
||||
|
@ -47,49 +47,49 @@ static const GimpActionEntry palettes_actions[] =
|
||||
{ "palettes-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("palettes-action", "_New Palette"), NULL,
|
||||
NC_("palettes-action", "Create a new palette"),
|
||||
G_CALLBACK (data_new_cmd_callback),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_PALETTE_NEW },
|
||||
|
||||
{ "palettes-import", "gtk-convert",
|
||||
NC_("palettes-action", "_Import Palette..."), NULL,
|
||||
NC_("palettes-action", "Import palette"),
|
||||
G_CALLBACK (palettes_import_cmd_callback),
|
||||
palettes_import_cmd_callback,
|
||||
GIMP_HELP_PALETTE_IMPORT },
|
||||
|
||||
{ "palettes-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("palettes-action", "D_uplicate Palette"), NULL,
|
||||
NC_("palettes-action", "Duplicate this palette"),
|
||||
G_CALLBACK (data_duplicate_cmd_callback),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_PALETTE_DUPLICATE },
|
||||
|
||||
{ "palettes-merge", NULL,
|
||||
NC_("palettes-action", "_Merge Palettes..."), NULL,
|
||||
NC_("palettes-action", "Merge palettes"),
|
||||
G_CALLBACK (palettes_merge_cmd_callback),
|
||||
palettes_merge_cmd_callback,
|
||||
GIMP_HELP_PALETTE_MERGE },
|
||||
|
||||
{ "palettes-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("palettes-action", "Copy Palette _Location"), NULL,
|
||||
NC_("palettes-action", "Copy palette file location to clipboard"),
|
||||
G_CALLBACK (data_copy_location_cmd_callback),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_PALETTE_COPY_LOCATION },
|
||||
|
||||
{ "palettes-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("palettes-action", "Show in _File Manager"), NULL,
|
||||
NC_("palettes-action", "Show palette file location in the file manager"),
|
||||
G_CALLBACK (data_show_in_file_manager_cmd_callback),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_PALETTE_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "palettes-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("palettes-action", "_Delete Palette"), NULL,
|
||||
NC_("palettes-action", "Delete this palette"),
|
||||
G_CALLBACK (data_delete_cmd_callback),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_PALETTE_DELETE },
|
||||
|
||||
{ "palettes-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("palettes-action", "_Refresh Palettes"), NULL,
|
||||
NC_("palettes-action", "Refresh palettes"),
|
||||
G_CALLBACK (data_refresh_cmd_callback),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_PALETTE_REFRESH }
|
||||
};
|
||||
|
||||
@ -113,7 +113,7 @@ palettes_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_string_actions (group, "palettes-action",
|
||||
palettes_edit_actions,
|
||||
G_N_ELEMENTS (palettes_edit_actions),
|
||||
G_CALLBACK (data_edit_cmd_callback));
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -54,8 +54,9 @@ static void palettes_merge_callback (GtkWidget *widget,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
palettes_import_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
palettes_import_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
return_if_no_widget (widget, data);
|
||||
@ -68,8 +69,9 @@ palettes_import_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
palettes_merge_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
palettes_merge_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GtkWidget *dialog;
|
||||
|
@ -19,10 +19,12 @@
|
||||
#define __PALETTES_COMMANDS_H__
|
||||
|
||||
|
||||
void palettes_import_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void palettes_merge_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void palettes_import_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void palettes_merge_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __PALETTES_COMMANDS_H__ */
|
||||
|
@ -46,43 +46,43 @@ static const GimpActionEntry patterns_actions[] =
|
||||
{ "patterns-open-as-image", GIMP_ICON_DOCUMENT_OPEN,
|
||||
NC_("patterns-action", "_Open Pattern as Image"), NULL,
|
||||
NC_("patterns-action", "Open this pattern as an image"),
|
||||
G_CALLBACK (data_open_as_image_cmd_callback),
|
||||
data_open_as_image_cmd_callback,
|
||||
GIMP_HELP_PATTERN_OPEN_AS_IMAGE },
|
||||
|
||||
{ "patterns-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("patterns-action", "_New Pattern"), NULL,
|
||||
NC_("patterns-action", "Create a new pattern"),
|
||||
G_CALLBACK (data_new_cmd_callback),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_PATTERN_NEW },
|
||||
|
||||
{ "patterns-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("patterns-action", "D_uplicate Pattern"), NULL,
|
||||
NC_("patterns-action", "Duplicate this pattern"),
|
||||
G_CALLBACK (data_duplicate_cmd_callback),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_PATTERN_DUPLICATE },
|
||||
|
||||
{ "patterns-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("patterns-action", "Copy Pattern _Location"), NULL,
|
||||
NC_("patterns-action", "Copy pattern file location to clipboard"),
|
||||
G_CALLBACK (data_copy_location_cmd_callback),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_PATTERN_COPY_LOCATION },
|
||||
|
||||
{ "patterns-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("patterns-action", "Show in _File Manager"), NULL,
|
||||
NC_("patterns-action", "Show pattern file location in the file manager"),
|
||||
G_CALLBACK (data_show_in_file_manager_cmd_callback),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_PATTERN_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "patterns-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("patterns-action", "_Delete Pattern"), NULL,
|
||||
NC_("patterns-action", "Delete this pattern"),
|
||||
G_CALLBACK (data_delete_cmd_callback),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_PATTERN_DELETE },
|
||||
|
||||
{ "patterns-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("patterns-action", "_Refresh Patterns"), NULL,
|
||||
NC_("patterns-action", "Refresh patterns"),
|
||||
G_CALLBACK (data_refresh_cmd_callback),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_PATTERN_REFRESH }
|
||||
};
|
||||
|
||||
@ -106,7 +106,7 @@ patterns_actions_setup (GimpActionGroup *group)
|
||||
gimp_action_group_add_string_actions (group, "patterns-action",
|
||||
patterns_edit_actions,
|
||||
G_N_ELEMENTS (patterns_edit_actions),
|
||||
G_CALLBACK (data_edit_cmd_callback));
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -38,7 +38,9 @@
|
||||
#include "plug-in/gimppluginmanager-menu-branch.h"
|
||||
#include "plug-in/gimppluginprocedure.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpactionimpl.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
@ -81,7 +83,7 @@ static const GimpActionEntry plug_in_actions[] =
|
||||
{ "plug-in-reset-all", GIMP_ICON_RESET,
|
||||
NC_("plug-in-action", "Reset all _Filters"), NULL,
|
||||
NC_("plug-in-action", "Reset all plug-ins to their default settings"),
|
||||
G_CALLBACK (plug_in_reset_all_cmd_callback),
|
||||
plug_in_reset_all_cmd_callback,
|
||||
GIMP_HELP_FILTER_RESET_ALL }
|
||||
};
|
||||
|
||||
@ -253,18 +255,18 @@ plug_in_actions_unregister_procedure (GimpPDB *pdb,
|
||||
if ((plug_in_proc->menu_label || plug_in_proc->menu_paths) &&
|
||||
! plug_in_proc->file_proc)
|
||||
{
|
||||
GtkAction *action;
|
||||
GimpAction *action;
|
||||
|
||||
#if 0
|
||||
g_print ("%s: %s\n", G_STRFUNC,
|
||||
gimp_object_get_name (procedure));
|
||||
#endif
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
gimp_object_get_name (procedure));
|
||||
action = gimp_action_group_get_action (group,
|
||||
gimp_object_get_name (procedure));
|
||||
|
||||
if (action)
|
||||
gtk_action_group_remove_action (GTK_ACTION_GROUP (group), action);
|
||||
gimp_action_group_remove_action (group, action);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -346,7 +348,7 @@ plug_in_actions_add_proc (GimpActionGroup *group,
|
||||
entry.help_id = gimp_procedure_get_help_id (GIMP_PROCEDURE (proc));
|
||||
|
||||
gimp_action_group_add_procedure_actions (group, &entry, 1,
|
||||
G_CALLBACK (plug_in_run_cmd_callback));
|
||||
plug_in_run_cmd_callback);
|
||||
|
||||
if (proc->menu_label)
|
||||
{
|
||||
@ -487,8 +489,8 @@ plug_in_actions_build_path (GimpActionGroup *group,
|
||||
|
||||
if (p1 && p2 && ! g_hash_table_lookup (path_table, copy_original))
|
||||
{
|
||||
GtkAction *action;
|
||||
gchar *label;
|
||||
GimpAction *action;
|
||||
gchar *label;
|
||||
|
||||
label = p2 + 1;
|
||||
|
||||
@ -497,8 +499,8 @@ plug_in_actions_build_path (GimpActionGroup *group,
|
||||
copy_original, label);
|
||||
#endif
|
||||
|
||||
action = gtk_action_new (copy_original, label, NULL, NULL);
|
||||
gtk_action_group_add_action (GTK_ACTION_GROUP (group), action);
|
||||
action = gimp_action_impl_new (copy_original, label, NULL, NULL, NULL);
|
||||
gimp_action_group_add_action (group, action);
|
||||
g_object_unref (action);
|
||||
|
||||
g_hash_table_insert (path_table, g_strdup (copy_original), action);
|
||||
|
@ -67,15 +67,21 @@ static void plug_in_reset_all_response (GtkWidget *dialog,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
plug_in_run_cmd_callback (GtkAction *action,
|
||||
GimpProcedure *procedure,
|
||||
gpointer data)
|
||||
plug_in_run_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpValueArray *args = NULL;
|
||||
GimpDisplay *display = NULL;
|
||||
GimpProcedure *procedure;
|
||||
gsize hack;
|
||||
return_if_no_gimp (gimp, data);
|
||||
|
||||
hack = g_variant_get_uint64 (value);
|
||||
|
||||
procedure = GSIZE_TO_POINTER (hack);
|
||||
|
||||
switch (procedure->proc_type)
|
||||
{
|
||||
case GIMP_EXTENSION:
|
||||
@ -157,8 +163,9 @@ plug_in_run_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
plug_in_reset_all_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
plug_in_reset_all_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *dialog;
|
||||
|
@ -19,12 +19,13 @@
|
||||
#define __PLUG_IN_COMMANDS_H__
|
||||
|
||||
|
||||
void plug_in_run_cmd_callback (GtkAction *action,
|
||||
GimpProcedure *proc,
|
||||
gpointer data);
|
||||
void plug_in_run_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void plug_in_reset_all_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void plug_in_reset_all_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __PLUG_IN_COMMANDS_H__ */
|
||||
|
@ -45,7 +45,7 @@ static const GimpActionEntry quick_mask_actions[] =
|
||||
|
||||
{ "quick-mask-configure", NULL,
|
||||
NC_("quick-mask-action", "_Configure Color and Opacity..."), NULL, NULL,
|
||||
G_CALLBACK (quick_mask_configure_cmd_callback),
|
||||
quick_mask_configure_cmd_callback,
|
||||
GIMP_HELP_QUICK_MASK_EDIT }
|
||||
};
|
||||
|
||||
@ -54,7 +54,7 @@ static const GimpToggleActionEntry quick_mask_toggle_actions[] =
|
||||
{ "quick-mask-toggle", GIMP_ICON_QUICK_MASK_ON,
|
||||
NC_("quick-mask-action", "Toggle _Quick Mask"), "<shift>Q",
|
||||
NC_("quick-mask-action", "Toggle Quick Mask on/off"),
|
||||
G_CALLBACK (quick_mask_toggle_cmd_callback),
|
||||
quick_mask_toggle_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_QUICK_MASK_TOGGLE }
|
||||
};
|
||||
@ -89,7 +89,7 @@ quick_mask_actions_setup (GimpActionGroup *group)
|
||||
G_N_ELEMENTS (quick_mask_invert_actions),
|
||||
NULL,
|
||||
FALSE,
|
||||
G_CALLBACK (quick_mask_invert_cmd_callback));
|
||||
quick_mask_invert_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -65,14 +65,15 @@ static void quick_mask_configure_callback (GtkWidget *dialog,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
quick_mask_toggle_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
quick_mask_toggle_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
gboolean active;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
active = g_variant_get_boolean (value);
|
||||
|
||||
if (active != gimp_image_get_quick_mask_state (image))
|
||||
{
|
||||
@ -82,17 +83,17 @@ quick_mask_toggle_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
quick_mask_invert_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
quick_mask_invert_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
gint value;
|
||||
gboolean inverted;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
inverted = (gboolean) g_variant_get_int32 (value);
|
||||
|
||||
if (value != gimp_image_get_quick_mask_inverted (image))
|
||||
if (inverted != gimp_image_get_quick_mask_inverted (image))
|
||||
{
|
||||
gimp_image_quick_mask_invert (image);
|
||||
gimp_image_flush (image);
|
||||
@ -100,8 +101,9 @@ quick_mask_invert_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
quick_mask_configure_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
quick_mask_configure_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
|
@ -19,13 +19,15 @@
|
||||
#define __QUICK_MASK_COMMANDS_H__
|
||||
|
||||
|
||||
void quick_mask_toggle_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void quick_mask_invert_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void quick_mask_configure_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void quick_mask_toggle_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void quick_mask_invert_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void quick_mask_configure_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __QUICK_MASK_COMMANDS_H__ */
|
||||
|
@ -47,7 +47,7 @@ static const GimpToggleActionEntry sample_points_toggle_actions[] =
|
||||
NC_("sample-points-action", "_Sample Merged"), "",
|
||||
NC_("sample-points-action",
|
||||
"Use the composite color of all visible layers"),
|
||||
G_CALLBACK (sample_points_sample_merged_cmd_callback),
|
||||
sample_points_sample_merged_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_SAMPLE_POINT_SAMPLE_MERGED }
|
||||
};
|
||||
|
@ -30,13 +30,12 @@
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
sample_points_sample_merged_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
sample_points_sample_merged_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpSamplePointEditor *editor = GIMP_SAMPLE_POINT_EDITOR (data);
|
||||
gboolean active;
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_sample_point_editor_set_sample_merged (editor, active);
|
||||
}
|
||||
|
@ -19,8 +19,9 @@
|
||||
#define __SAMPLE_POINTS_COMMANDS_H__
|
||||
|
||||
|
||||
void sample_points_sample_merged_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void sample_points_sample_merged_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __SAMPLE_POINTS_COMMANDS_H__ */
|
||||
|
@ -49,92 +49,92 @@ static const GimpActionEntry select_actions[] =
|
||||
{ "select-all", GIMP_ICON_SELECTION_ALL,
|
||||
NC_("select-action", "_All"), "<primary>A",
|
||||
NC_("select-action", "Select everything"),
|
||||
G_CALLBACK (select_all_cmd_callback),
|
||||
select_all_cmd_callback,
|
||||
GIMP_HELP_SELECTION_ALL },
|
||||
|
||||
{ "select-none", GIMP_ICON_SELECTION_NONE,
|
||||
NC_("select-action", "_None"), "<primary><shift>A",
|
||||
NC_("select-action", "Dismiss the selection"),
|
||||
G_CALLBACK (select_none_cmd_callback),
|
||||
select_none_cmd_callback,
|
||||
GIMP_HELP_SELECTION_NONE },
|
||||
|
||||
{ "select-invert", GIMP_ICON_INVERT,
|
||||
NC_("select-action", "_Invert"), "<primary>I",
|
||||
NC_("select-action", "Invert the selection"),
|
||||
G_CALLBACK (select_invert_cmd_callback),
|
||||
select_invert_cmd_callback,
|
||||
GIMP_HELP_SELECTION_INVERT },
|
||||
|
||||
{ "select-float", GIMP_ICON_LAYER_FLOATING_SELECTION,
|
||||
NC_("select-action", "_Float"), "<primary><shift>L",
|
||||
NC_("select-action", "Create a floating selection"),
|
||||
G_CALLBACK (select_float_cmd_callback),
|
||||
select_float_cmd_callback,
|
||||
GIMP_HELP_SELECTION_FLOAT },
|
||||
|
||||
{ "select-feather", NULL,
|
||||
NC_("select-action", "Fea_ther..."), NULL,
|
||||
NC_("select-action",
|
||||
"Blur the selection border so that it fades out smoothly"),
|
||||
G_CALLBACK (select_feather_cmd_callback),
|
||||
select_feather_cmd_callback,
|
||||
GIMP_HELP_SELECTION_FEATHER },
|
||||
|
||||
{ "select-sharpen", NULL,
|
||||
NC_("select-action", "_Sharpen"), NULL,
|
||||
NC_("select-action", "Remove fuzziness from the selection"),
|
||||
G_CALLBACK (select_sharpen_cmd_callback),
|
||||
select_sharpen_cmd_callback,
|
||||
GIMP_HELP_SELECTION_SHARPEN },
|
||||
|
||||
{ "select-shrink", GIMP_ICON_SELECTION_SHRINK,
|
||||
NC_("select-action", "S_hrink..."), NULL,
|
||||
NC_("select-action", "Contract the selection"),
|
||||
G_CALLBACK (select_shrink_cmd_callback),
|
||||
select_shrink_cmd_callback,
|
||||
GIMP_HELP_SELECTION_SHRINK },
|
||||
|
||||
{ "select-grow", GIMP_ICON_SELECTION_GROW,
|
||||
NC_("select-action", "_Grow..."), NULL,
|
||||
NC_("select-action", "Enlarge the selection"),
|
||||
G_CALLBACK (select_grow_cmd_callback),
|
||||
select_grow_cmd_callback,
|
||||
GIMP_HELP_SELECTION_GROW },
|
||||
|
||||
{ "select-border", GIMP_ICON_SELECTION_BORDER,
|
||||
NC_("select-action", "Bo_rder..."), NULL,
|
||||
NC_("select-action", "Replace the selection by its border"),
|
||||
G_CALLBACK (select_border_cmd_callback),
|
||||
select_border_cmd_callback,
|
||||
GIMP_HELP_SELECTION_BORDER },
|
||||
|
||||
{ "select-flood", NULL,
|
||||
NC_("select-action", "Re_move Holes"), NULL,
|
||||
NC_("select-action", "Remove holes from the selection"),
|
||||
G_CALLBACK (select_flood_cmd_callback),
|
||||
select_flood_cmd_callback,
|
||||
GIMP_HELP_SELECTION_FLOOD },
|
||||
|
||||
{ "select-save", GIMP_ICON_SELECTION_TO_CHANNEL,
|
||||
NC_("select-action", "Save to _Channel"), NULL,
|
||||
NC_("select-action", "Save the selection to a channel"),
|
||||
G_CALLBACK (select_save_cmd_callback),
|
||||
select_save_cmd_callback,
|
||||
GIMP_HELP_SELECTION_TO_CHANNEL },
|
||||
|
||||
{ "select-fill", GIMP_ICON_TOOL_BUCKET_FILL,
|
||||
NC_("select-action", "_Fill Selection Outline..."), NULL,
|
||||
NC_("select-action", "Fill the selection outline"),
|
||||
G_CALLBACK (select_fill_cmd_callback),
|
||||
select_fill_cmd_callback,
|
||||
GIMP_HELP_SELECTION_FILL },
|
||||
|
||||
{ "select-fill-last-values", GIMP_ICON_TOOL_BUCKET_FILL,
|
||||
NC_("select-action", "_Fill Selection Outline"), NULL,
|
||||
NC_("select-action", "Fill the selection outline with last used values"),
|
||||
G_CALLBACK (select_fill_last_vals_cmd_callback),
|
||||
select_fill_last_vals_cmd_callback,
|
||||
GIMP_HELP_SELECTION_FILL },
|
||||
|
||||
{ "select-stroke", GIMP_ICON_SELECTION_STROKE,
|
||||
NC_("select-action", "_Stroke Selection..."), NULL,
|
||||
NC_("select-action", "Paint along the selection outline"),
|
||||
G_CALLBACK (select_stroke_cmd_callback),
|
||||
select_stroke_cmd_callback,
|
||||
GIMP_HELP_SELECTION_STROKE },
|
||||
|
||||
{ "select-stroke-last-values", GIMP_ICON_SELECTION_STROKE,
|
||||
NC_("select-action", "_Stroke Selection"), NULL,
|
||||
NC_("select-action", "Stroke the selection with last used values"),
|
||||
G_CALLBACK (select_stroke_last_vals_cmd_callback),
|
||||
select_stroke_last_vals_cmd_callback,
|
||||
GIMP_HELP_SELECTION_STROKE }
|
||||
};
|
||||
|
||||
|
@ -72,8 +72,9 @@ static void select_shrink_callback (GtkWidget *widget,
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
select_all_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_all_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -83,8 +84,9 @@ select_all_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_none_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_none_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -94,8 +96,9 @@ select_none_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_invert_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_invert_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -105,8 +108,9 @@ select_invert_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_float_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_float_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
@ -131,8 +135,9 @@ select_float_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_feather_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_feather_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -148,6 +153,7 @@ select_feather_cmd_callback (GtkAction *action,
|
||||
if (! dialog)
|
||||
{
|
||||
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
GtkWidget *button;
|
||||
gdouble xres;
|
||||
gdouble yres;
|
||||
|
||||
@ -165,6 +171,19 @@ select_feather_cmd_callback (GtkAction *action,
|
||||
G_OBJECT (image), "disconnect",
|
||||
select_feather_callback, image);
|
||||
|
||||
/* Edge lock button */
|
||||
button = gtk_check_button_new_with_mnemonic (_("_Selected areas continue outside the image"));
|
||||
g_object_set_data (G_OBJECT (dialog), "edge-lock-toggle", button);
|
||||
gimp_help_set_help_data (button,
|
||||
_("When feathering, act as if selected areas "
|
||||
"continued outside the image."),
|
||||
NULL);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
config->selection_feather_edge_lock);
|
||||
gtk_box_pack_start (GTK_BOX (GIMP_QUERY_BOX_VBOX (dialog)), button,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
dialogs_attach_dialog (G_OBJECT (image), FEATHER_DIALOG_KEY, dialog);
|
||||
}
|
||||
|
||||
@ -172,8 +191,9 @@ select_feather_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_sharpen_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_sharpen_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -183,8 +203,9 @@ select_sharpen_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_shrink_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_shrink_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -246,8 +267,9 @@ select_shrink_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_grow_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_grow_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -295,8 +317,9 @@ select_grow_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_border_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_border_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
@ -372,8 +395,9 @@ select_border_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_flood_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_flood_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -383,8 +407,9 @@ select_flood_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_save_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_save_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
@ -411,8 +436,9 @@ select_save_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_fill_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_fill_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -427,8 +453,9 @@ select_fill_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_fill_last_vals_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_fill_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -440,8 +467,9 @@ select_fill_last_vals_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_stroke_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_stroke_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -456,8 +484,9 @@ select_stroke_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
select_stroke_last_vals_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
select_stroke_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
@ -479,11 +508,16 @@ select_feather_callback (GtkWidget *widget,
|
||||
{
|
||||
GimpImage *image = GIMP_IMAGE (data);
|
||||
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
GtkWidget *button;
|
||||
gdouble radius_x;
|
||||
gdouble radius_y;
|
||||
|
||||
button = g_object_get_data (G_OBJECT (widget), "edge-lock-toggle");
|
||||
|
||||
g_object_set (config,
|
||||
"selection-feather-radius", size,
|
||||
"selection-feather-edge-lock",
|
||||
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)),
|
||||
NULL);
|
||||
|
||||
radius_x = config->selection_feather_radius;
|
||||
@ -506,7 +540,9 @@ select_feather_callback (GtkWidget *widget,
|
||||
radius_x *= factor;
|
||||
}
|
||||
|
||||
gimp_channel_feather (gimp_image_get_mask (image), radius_x, radius_y, TRUE);
|
||||
gimp_channel_feather (gimp_image_get_mask (image), radius_x, radius_y,
|
||||
config->selection_feather_edge_lock,
|
||||
TRUE);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
@ -617,7 +653,7 @@ select_shrink_callback (GtkWidget *widget,
|
||||
button = g_object_get_data (G_OBJECT (widget), "edge-lock-toggle");
|
||||
|
||||
g_object_set (config,
|
||||
"selection-shrink-radius", size,
|
||||
"selection-shrink-radius", size,
|
||||
"selection-shrink-edge-lock",
|
||||
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)),
|
||||
NULL);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user