1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 13:42:40 +02:00

Compare commits

...

2210 Commits

Author SHA1 Message Date
Hartmut Kuhse
d687fa857a Restore GimpMetadata API - merge with Master 2016-11-13 07:41:37 +01:00
Hartmut Kuhse
2a5f27c406 plug-ins: remove channel attributes from attributes viewer 2016-11-13 07:39:46 +01:00
Hartmut Kuhse
31b8a78ec3 app: fix compiler warning for missing const 2016-11-13 07:15:40 +01:00
Hartmut Kuhse
b49e1a21f8 restore more old GimpMetadata API
restore xcf-functions
restore file-load/save functions
2016-11-13 07:14:23 +01:00
Hartmut Kuhse
2d7ebcadab fix behaviour after restoring old gimpmetadata api 2016-11-12 19:06:25 +01:00
Mario Blättermann
f9cacf478a Update German translation 2016-11-12 15:12:09 +00:00
Hartmut Kuhse
2564ddf217 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2016-11-12 14:02:30 +01:00
Hartmut Kuhse
2c1540bca8 revert app: gdbus with windows 2016-11-12 14:02:02 +01:00
Christian Kirbach
60ecc6fa82 Update German translation 2016-11-12 13:29:02 +01:00
Hartmut Kuhse
2ad628d1d8 restore old metadata api function calls 2016-11-12 11:21:43 +01:00
Christian Kirbach
16fe4b2dce Update German translation 2016-11-12 10:07:34 +00:00
Hartmut Kuhse
dbdc5de66a Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2016-11-12 07:22:31 +01:00
Øyvind Kolås
3bc2d25ccd app: preinit more fishes commonly used for filters on u8 images 2016-11-11 13:55:05 +01:00
Michael Natterer
17ac37ef8e app: pass a status_callback to gimp_babl_init_fishes()
and make it report progress. Also call it at the end of initialization.
2016-11-11 13:09:12 +01:00
Michael Natterer
7386ed4a19 Revert "app: initialize GEGL after showing the splash"
This reverts commit 93da8ca8b6.
2016-11-11 12:34:10 +01:00
Michael Natterer
49b47674f6 Revert "app: move the call to gimp_gegl_init() to gimp_real_initialize()"
This reverts commit 99c040095d.
2016-11-11 12:33:39 +01:00
Jordi Mas
406fa555ee Update Catalan translation 2016-11-11 06:53:09 +01:00
Michael Natterer
0788db4702 app: split babl fish creating to a separate function gimp_babl_init_fishes()
and call that function later in gimp_real_initialize() so the splash
is always fully drawn when it's called.
2016-11-11 01:06:14 +01:00
Øyvind Kolås
99b9a60e8b app: pre-initialize some babl fishes 2016-11-11 00:54:04 +01:00
Michael Natterer
99c040095d app: move the call to gimp_gegl_init() to gimp_real_initialize() 2016-11-11 00:48:30 +01:00
Michael Natterer
93da8ca8b6 app: initialize GEGL after showing the splash
It will soon become more expensive, so the splash should be
visible already.
2016-11-10 23:57:28 +01:00
Michael Natterer
7abe5ddb95 app: move the gamma setting to the top of the convert precision dialog
and don't show the dithering options if they can't be selected,
instead of just making them insensitive.
2016-11-10 23:43:27 +01:00
Michael Natterer
ccf151446d app: cleanup enum order and comments in the dither GUI code 2016-11-10 23:19:12 +01:00
Anders Jonsson
35d4867797 Update Swedish translation 2016-11-10 21:44:32 +00:00
Øyvind Kolås
30a8edeab5 app: treat half precision float the same as single and double
.. which is to say encourage use of linear gamma, by making it one fewer step
to end up in linear than gamma corrected.
2016-11-10 15:20:18 +01:00
Michael Natterer
da49a3fadf app: always default to linear for float precision and gamma for 8-bit
In the "New Image" and "Convert Precision" dialogs. The "Gamma/Linear"
switches get adjusted automatically to the new defaults, but can be
changed manually.
2016-11-10 13:50:56 +01:00
Michael Natterer
0631f1c629 Bug 735895 - Precision Conversion "Dithering" dialog
Don't offer dithering options when converting to 16 bit, it doesn't
make much sense to dither for anything but 8 bit. Thanks to Elle for
testing that this assumption is indeed true.

Use a properly commented #define instead of just a hardcoded "8 bits"
to make clear that this is a pure GUI "restriction".
2016-11-10 12:14:40 +01:00
Michael Natterer
e3115f1565 Bug 774155 - gimp crashes on pressing OK in grid configuration
Pass the right user_data to grid_dialog_response().

Unrelated: call gimp_image_flush() so the menus get updated after
confirming the new grid.
2016-11-10 01:06:59 +01:00
Marco Ciampa
a5efd8a5cc Updated Italian translation 2016-11-09 23:02:42 +01:00
Michael Natterer
91df48ef37 Bug 735895 - Precision Conversion "Dithering" dialog
Disable the convert precision dialog's dithering controls when
converting to higher bit depths o to anything > 16 bit.

Make sure the disabled dithering widgets always says "None", which
implies duplicating the bit depth checking logic in both the dialog
and its callback, in order to protect the values in GimpDialogConfig
from being overwritten by NONE.
2016-11-09 13:10:56 +01:00
Michael Natterer
56ce447bc9 Bug 735895 - Precision Conversion "Dithering" dialog
gimp_drawable_convert_type(): never dither when converting to a higher
bit depth, or to anything more than 16 bits.
2016-11-09 12:45:52 +01:00
Michael Natterer
ab5a27d74a app: CLAMP(bits, 1, 16) in gimp_gegl_apply_color_reduction()
which is the range of the GEGL op's properties.
2016-11-09 12:33:13 +01:00
Michael Natterer
4f6dd8a66f app: reorganize GimpTemplateEditor's "Precision" controls
to have separate "precision" and "gamma" widgets, like the image's
"Precision" menu.
2016-11-09 12:21:39 +01:00
Michael Natterer
2f7009d427 app: add 'component-type' and 'linear' properties to GimpTemplate
The new properties are "virtual", they share their storage with the
"precision" property and are not serialized, they are meant for GUI
property widgets.
2016-11-09 12:03:38 +01:00
Michael Natterer
c1ae0864de app: add gimp_babl_linear()
which completes gimp_babl_component_type() and gimp_babl_precision().
2016-11-09 12:02:12 +01:00
Christian Kirbach
f92c2b9698 Update German translation 2016-11-09 09:01:21 +00:00
Jehan
b58f4fec0b icons: make Color theme's "broken chain" icons more obvious.
In 24x24, there was barely 1 pixel between the 2 links of the chain, and
not even inside a perfect pixel (so with interpolation, that's barely
recognizable).
I don't know if it's a very good-looking change but for now, that will
do. Designers are welcome to contribute improvements!
Symbolic icons were already taken care of in commit 3ff408f.
2016-11-08 22:24:56 +01:00
Michael Natterer
d3d1ce246d Bug 770897 - Opening and overwriting a linear gamma tiff produces wrong colors
Add support for writing linear TIFFs, the same way as for PNG in
commit e404e6ba93, please test.
2016-11-08 18:41:12 +01:00
Michael Natterer
ad7259beb7 Bug 772317 - Change detach icon of transform tools on-canvas dialog
Use GIMP_STOCK_DETACH which looks horrible but is the right icon and
can be fixed by the icon masters.
2016-11-08 17:36:07 +01:00
Alexis Wilhelm
768d06614f Bug 316479 - The Perspective Tool creates an empy image...
...instead of transforming it

Add gimp_matrix3_will_explode() which determines if a transform
matrix will blow up something in a rectangle to infinity, and use
the function so set both the GIMP and GEGL code paths to clip the
transform to the input size.
2016-11-08 17:26:21 +01:00
Michael Natterer
ac2b9a5e41 configure.ac: require gegl >= 0.3.10
which will be good enough for about five minutes...
2016-11-08 17:07:54 +01:00
Mihail Zenkov
07eb13c73d Bug 769976 - JPEG export ignores quality setting and subsampling fix.
Set use_orig_quality when both the quality and the subsampling are the
same as in the originally-imported jpeg.

Also improve subsampling initial selection: use the original subsampling
unless the default one is the best or the original one is the worst.
The current code was wrong and would often use the default subsampling
even when worse than the original one.
2016-11-08 16:09:37 +01:00
Michael Natterer
7c29077acd app: allow to remove the last added IScissors segment with backspace 2016-11-08 13:45:12 +01:00
Piotr Drąg
e98f45db58 Update Polish translation 2016-11-08 10:24:21 +01:00
Jordi Mas
a82bd87b3b Update Catalan translation 2016-11-08 07:56:07 +01:00
Jehan
294d92250c plug-ins: fixing error popup when canceling webp export.
Even when the export dialog does not end as success, we must cleanly
exit the plugin by setting the return values.
2016-11-08 03:48:49 +01:00
Jehan
9ab041d36a plug-ins: small typo fix - s/framese/frames/ 2016-11-08 01:39:42 +01:00
Jehan
8fdee80ff8 plug-ins: clean and fix webp export.
- Default parameters must be set before gimp_get_data(). Otherwise
  when you export the first time, you end up with broken defaults
  (basically everything to 0, in particular a problem with quality
  values of 0 which makes an export failure).
- Some minor formatting here and there and an unused variable.
2016-11-08 01:39:32 +01:00
Pascal Massimino
d516f9bef8 Bug 773450 - Animated WEBP images should be able to set frame delay.
animated webp saving: parse time-stamp from layer_name (instead of using
default value of '100')

also:
- add a default delay field to UI, in case time-stamps are not present.
- add a 'force delay' checkbox
- revamp the whole UI to look like the GIF saving UI.
2016-11-08 01:32:49 +01:00
Michael Natterer
87d38194d7 app, pdb: use GeglDitherMethod instead of simply an integer 2016-11-07 20:41:39 +01:00
Michael Natterer
c767179ced app, pdb: fix bug in recent gimp-drawable-threshold change
Actually use the passed ranges again, instead of using uninitialized
local variables.
2016-11-07 20:27:36 +01:00
Michael Natterer
5e2a61850e app: file_open_image(): fix opening of unknown remote files
This got lost when dropping the file-uri plug-in and switching to
interal download using GIO. The file-uri plug-in would just download
whatever remote thing and open it locally, using local magic matching.

We now do the same internally and try the magic matching again on the
downloaded file.
2016-11-07 18:35:48 +01:00
Michael Natterer
2a9b20d384 Bug 772789 - Mac DMG 2.8.18 gets plug-ins path wrong, can't open JPEG files
Don't migrate any paths from an older gimprc. This unfortunately kills
all manually added paths, but makes sure all paths default to the
files of the new GIMP version, could be improved by parsing the path
and replacing only the right elements.
2016-11-07 17:04:05 +01:00
Michael Natterer
b249a998aa Bug 763214 - Wrong rendering of shadings in PDF imports...
...(in libpoppler -> requires a more recent version)

Require libpoppler >= 0.44.0 which contains a fix for this bug.
2016-11-07 16:00:52 +01:00
Michael Natterer
483c282687 Bug 766988 - Colors applied to images are not color managed
Add color management to GimpDrawableFilter and GimpFilterTool, GEGL
ops applied to drawables can be applied in color managed space
now. Sadly, this is very slow, so disabled by default.

I'm sure the profile guessing based on the operation's format doesn't
always work, but this general bug counts as fixed now.
2016-11-07 15:39:48 +01:00
Michael Natterer
be6b6c7ba4 Bug 642565 - Use private pointer instead GET_PRIVATE macro in GimpCanvasItem
Do as the but title says, based on a patch from Javier Jardón.
2016-11-07 14:14:16 +01:00
Jehan
123a9092ed app: fix the angular value when tilt_y == tilt_x == 0.0.
Further improves commit bb17853. We can see in the generic tilt
computation that if tilt_y is 0, whatever the value of tilt_x, tilt
becomes 0.
2016-11-07 13:39:09 +01:00
Michael Natterer
be66d1a2be app: make an assertion more correct in GimpDrawableUndo 2016-11-07 13:10:21 +01:00
Jeremiah Darais
bb1785396f Bug 760737 - Brush angle jumps when tablet pen is tilted horizontally.
Fix cursor rotation jump when tablet pen is tilted horizontally.
This changes to the correct values for the special case of tilt_x == 0.0.

Reviewer (Jehan)'s note: computing the convergence of the tilt function
in the `else` block, when tilt_x approaches 0, tilt value indeed
converges to 0.25 with tilt_y > 0 and 0.75 (or -0.25 which is the same)
with tilt_y < 0.
2016-11-07 02:51:04 +01:00
Piotr Drąg
d905f5bcc1 Update Polish translation 2016-11-06 21:39:55 +01:00
Piotr Drąg
c369333d3d Update Polish translation 2016-11-06 21:36:57 +01:00
Michael Natterer
46bcd82800 Bug 773233 - CVE-2007-3126 - Gimp 2.3.14 allows context-dependent attackers...
...to cause a denial of service (crash) via an ICO file with an
InfoHeader containing a Height of zero

Add some error handling to ico-load.c and bail out on zero width or height
icons. Also some formatting cleanup.
2016-11-06 21:34:43 +01:00
Michael Natterer
bcdd2e8d1a app: cleanup in GimpOperationProfileTransform 2016-11-06 21:08:10 +01:00
Jehan
58d84f6ebe Bug 750178 - Remove "again" from "Export the image again".
This "again" is meaningless in this context.
2016-11-06 20:57:41 +01:00
Jordi Mas
e2e31643fc Update Catalan translation 2016-11-06 20:14:56 +01:00
Piotr Drąg
56808c7ff1 Update Polish translation 2016-11-06 18:57:40 +01:00
Pascal Massimino
21d8c00d16 plug-ins: make file_gif_spin_button_int_init() generic.
Use the `value_pointer` parameter instead of modifying the globale
`gsvals.default_delay`. This doesn't change anything in current code
where file_gif_spin_button_int_init() is only used for connecting this
variable to the delay spin button, but could have been a problem if it
were reused in the future.
2016-11-06 18:04:32 +01:00
Anders Jonsson
a39ee69656 Fix typo and double space between words
https://bugzilla.gnome.org/show_bug.cgi?id=774004
2016-11-06 17:41:04 +01:00
Jehan
4a0653e12d Bug 773960 - smudge tool not working in tiling symmetry.
Initialization was failing when a paint buffer could not be returned for
a stroke (which was bound to happen in tiling). Instead it must just
ignore the coordinates which won't result in painting, and continue to
the next ones.
2016-11-06 17:14:55 +01:00
Hartmut Kuhse
7b43a1f46c icons: typo in iconlist 2016-11-05 11:55:40 +01:00
Gábor Kelemen
59bbd3819b Update Hungarian translation 2016-11-05 10:42:26 +00:00
Gábor Kelemen
d3fce3ca6a Update Hungarian translation 2016-11-05 09:34:14 +00:00
Hartmut Kuhse
57f75bbc2b add icons for metadata 2016-11-05 10:03:27 +01:00
Michael Natterer
7c2bfd3246 Bug 745313 - Description of Equalize wrong in PDB
gimp_drawable_equalize(): is mask_only is FALSE, suspend the selection
around gimp_drawable_apply_operation() so the operation affects the
entire drawable.
2016-11-04 22:28:59 +01:00
Michael Natterer
3c7fbe93b3 app: make gimp_item_mask_bounds() and _intersect() honor a suspended selection
and remove the same check from the stroke and fill code.
2016-11-04 22:28:59 +01:00
Mario Blättermann
1bd9d3dd5b Update German translation 2016-11-04 19:23:10 +00:00
Hartmut Kuhse
146b7bde86 app: typo: make string translatable 2016-11-04 16:23:33 +01:00
Hartmut Kuhse
4d1dd479ca Revert "Update German translation"
This reverts commit 750aa5a495.
2016-11-04 15:44:59 +01:00
Hartmut Kuhse
750aa5a495 Update German translation 2016-11-04 15:03:46 +01:00
Jehan
e83ed61178 plug-ins: cleaning out some indentation tabs. 2016-11-03 23:02:19 +01:00
Michael Natterer
1449d3cb8f app: remove the "Recent Filters" actions from action search again
The code was still checking for "plug-in-recent-*". Also, rename the
actions to "filters-recent-*" instead of "filter-recent-*" for
consistency with the other filters actions.
2016-11-03 22:37:13 +01:00
Hartmut Kuhse
abf78ef364 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2016-11-02 18:06:32 +01:00
Hartmut Kuhse
a652f63321 merge to master to be up to date
# Conflicts:
#	libgimp/gimp.def
#	libgimp/gimpitem_pdb.h
2016-11-02 17:39:35 +01:00
Jehan
aa4f4d677c NEWS: update 2.9.6 news. 2016-11-02 16:50:46 +01:00
Michael Natterer
3cef404e20 app, pdb, libgimp: allow to choose the channel when thresholding
so the threshold can now be based on the GimpHistogramChannel enum.
Add a channel menu to the threshold dialog and a channel argument to
the PDB procedure (which is new in 2.10).

If I hadn't forgotten what the "RGB" channel is supposed to do I would
have implemented the RGB mode in GimpOperationThreshold correctly.
Right now I'm just guessing. Anyone?
2016-11-01 22:45:37 +01:00
Michael Natterer
3307c71966 pdb, app, libgimp: change ranges for histogram and threshold to 0.0..1.0
They used to be 0..255, inherited from the old gimp_histogram() and
gimp_threshold() procedures. This commit deprecates these old
procedures and changes the ranges in the new gimp_drawable_histogram()
and gimp_drawable_threshold() to double with a 0.0..1.0 range.
2016-11-01 20:57:16 +01:00
Christian Kirbach
d918a212d0 Update German translation 2016-11-01 19:11:37 +00:00
Michael Natterer
94e28b3f5b configure.ac: remove the check for a "too new" gdk-pixbuf version
We are way past the 2.31 that was in the check, and unfortunately we
can't get rid of the deprecated inline pixbufs until GIMP 3.0, so just
kill the useless check for good and never define
-DGDK_PIXBUF_DISABLE_DEPRECATED.
2016-11-01 18:27:59 +01:00
Jordi Mas
bd1c9dc4ce Fix to Catalan translation 2016-11-01 07:53:46 +01:00
Sebastian Rasmussen
570d89adfe Update Swedish translation 2016-11-01 00:17:27 +00:00
Michael Natterer
162cd570f5 NEWS: some fixes 2016-10-31 23:23:46 +01:00
Alexandre Prokoudine
0a36051004 Update NEWS for the GIMP 2.9.6 release 2016-11-01 01:09:06 +03:00
Elle Stone
ccb30a625c Bug 765850 - Deal with libpng error gracefully when exporting...
...an image with the color profile "sRGB IEC61966-2.1"

Eliminate libpng warnings about known incorrect sRGB profiles.

These "known incorrect sRGB profiles" are only considered "incorrect"
by libpng. Such profiles are perfectly good sRGB profiles currently
being embedded by PhotoShop 5 and 6 and also already embedded in many,
many images on the web.
2016-10-31 09:41:28 +01:00
Michael Natterer
a5073ad928 configure.ac: require libpng 1.6.25
Addresses bug #765850, and probably avoids a gazillion of
vulnerabilities in the versions since the ancient 1.2.37
we required before.
2016-10-31 09:36:15 +01:00
Michael Natterer
a13460b8c3 configure.ac: remove remaining traces of optional librsvg 2016-10-31 01:36:35 +01:00
Michael Natterer
f5ecc53f3e Fix a lot of warnings all over the place
Deprecated stuff, unused variables. Includes parts of a patch from
Shlomi Fish from bug #768855.
2016-10-31 01:36:35 +01:00
Piotr Drąg
44aedebb53 Update Polish translation 2016-10-31 01:31:21 +01:00
Alexandre Prokoudine
a10758acf8 Update Russian translation 2016-10-31 02:53:57 +03:00
Michael Natterer
b4120e3f61 Bug 767650 - Uncommitted scissors selection is discarded on tool change
gimp_iscissors_tool_commit(): if the curve is not closed, close and
recalculate it.
2016-10-30 23:08:13 +01:00
Michael Natterer
bc6679974b app: clean up template-options-dialog like other dialogs 2016-10-30 20:54:47 +01:00
Michael Natterer
43e218859b Bug 773382 - --without-librsvg broken by tools/Makefile.am
Fixed by making librsvg a hard dependency.
2016-10-30 19:44:28 +01:00
Michael Natterer
d551a675fa Bug 773460 - Color Picker shows wrong values
Remove rounding from the RGB, HSV and CMYK modes of GimpColorFrame,
and add one decimal digit.
2016-10-30 19:28:24 +01:00
Michael Natterer
9f9307edcb app: color manage the new color tag color areas 2016-10-30 18:05:57 +01:00
Michael Natterer
967ac88c35 app: remove the "edit" button from GimpItemTreeView
the layers and paths dialogs were already hiding it, now it's gone
also from the channels dialog. It was redundant anyway.
2016-10-30 17:36:32 +01:00
Michael Natterer
039a322445 menus: add "fill" items to the path and selection menus 2016-10-30 17:30:13 +01:00
Michael Natterer
76f9e0ca2d po: add items-commands.c to POTFILES.in 2016-10-30 17:05:55 +01:00
Michael Natterer
bd8f15a758 app: reduce code duplication in the filling/stroking code
Move most of the fill/stroke callback code to items-commands.[ch] and
call the new functions from the respective selection and vectors
files.
2016-10-30 17:02:59 +01:00
Michael Natterer
31fcd79dd9 Bug 769738 - Add color tags/labels for layers/channels/paths
Add property "color-tag" of type enum GimpColorTag to GimpItem so all
layers, channels and paths can be tagged with a color.

For interoperability, use the color list from Krita which is a
superset of Photoshop's colors.

Features a "Color Tag" submenu in the layers, channels and paths
menus, a row of color radio buttons in the properties dialogs,
undo and PDB API.

As a side effect, some common code is now factores out into
items-actions.[ch] and items-commands.[ch] which adds visible, linked
and lock actions for layers and channels.
2016-10-29 17:02:16 +02:00
Michael Natterer
956d45bf61 libgimpwidgets: add property GimpCellRendererToggle:override-background
which makes the cell paint its background color even when the row is
selected.
2016-10-29 16:47:36 +02:00
Michael Natterer
afedbd0010 app: set "always-show-image" on some menu items generically
- the GimpDockBook item which has the current dockable's menu as submenu
- all menu items which have colors or previews as images
2016-10-28 23:11:44 +02:00
Michael Natterer
440a1bae82 app: one more round of general dialog cleanup
- consistent coding style
- hide public structs
- add callbacks to move logic out of app/dialogs/
2016-10-27 21:26:07 +02:00
Michael Natterer
f47c012ab5 app: fix layer-options-dialog.c return width and height again
Being able to create layers is important...
2016-10-27 21:00:14 +02:00
Marco Ciampa
6abcc37ad9 Updated Italian translation 2016-10-27 10:35:41 +02:00
Piotr Drąg
4baf4cb69c Update Polish translation 2016-10-27 02:19:41 +02:00
Alexandre Prokoudine
3f01af582f Update Russian translation 2016-10-27 03:12:28 +03:00
Michael Natterer
b81b60950b app: bring the "Switches" column to the channel and path properties dialogs
Introduce item-options-dialog.[ch] which abstracts this away and use
it from the layer, channel, vectors options dialogs. This is all
pretty ugly but better than duplicating that code three times. The
vector-options-dialog is now completely pointless but I kept it anyway
for now, let's see what unique path options we come up with.
2016-10-26 16:51:56 +02:00
Sebastian Rasmussen
f4a059b8af Update Swedish translation 2016-10-25 21:37:17 +00:00
Pascal Massimino
26a6a39b6b fix animation layer order when saving as webp 2016-10-25 16:43:01 +02:00
Alexandre Prokoudine
1133a8bff3 Makes 'Switches' in the Layer Attributes dialog translatable 2016-10-25 01:09:29 +03:00
Alexandre Prokoudine
1ed8f63c94 Sync the release howto to the version from the 'gimp-2-8' branch 2016-10-25 00:57:38 +03:00
Balázs Meskó
35556c91ca Update Hungarian translation 2016-10-24 20:54:59 +00:00
Michael Natterer
6813dd0975 app: consistent titles for the new channel and new path dialogs. 2016-10-23 23:01:47 +02:00
Michael Natterer
9a969a2b53 Bug 770901 - Improve the "New Layer" and "Layer Attributes" dialogs
Add toggles for visible, linked, lock pixels, lock position, lock alpha.
2016-10-23 22:45:08 +02:00
Piotr Drąg
fb512c9446 Update Polish translation 2016-10-23 18:55:30 +02:00
Michael Natterer
8e65aca452 Bug 773334 - GimpColorScale's scrolling behaviour is inverted...
...(scroll up decreases the value)

Implement GtkWidget::scroll_event() and turn GDK_SCROLL_UP into RIGHT
and DOWN into LEFT. The default behaviour or good for scrollbars but
not for widgets where "right" == "higher value" == "up" like
GimpColorScale.
2016-10-23 18:38:06 +02:00
Michael Natterer
5ce223b552 app: cleanup in GimpEditSelectionTool
Rename and reorder members to be more clear. Move variables to local
scopes. Minor code reorganization.
2016-10-23 17:49:47 +02:00
Jordi Mas
459dbde60d Fixes to Catalan translation 2016-10-23 16:13:08 +02:00
Balázs Meskó
fc23aab1d9 Update Hungarian translation 2016-10-23 08:05:13 +00:00
Balázs Meskó
17730dbf35 Update Hungarian translation 2016-10-23 08:02:18 +00:00
Jordi Mas
c76699dad4 Update Catalan translation 2016-10-22 20:33:54 +02:00
Jehan
3ff408ffe3 icons: make "broken" chains (for proportional fields) more obvious...
... by adding more space between the 2 parts of the chain.
Only done the symbolic icons for now. The color ones later.
2016-10-22 19:33:59 +02:00
Alexandre Prokoudine
72ac00ad9a Update Russian translation 2016-10-22 03:36:31 +03:00
Michael Natterer
3518a15064 Bug 770901 - Improve the "New Layer" and "Layer Attributes" dialogs
Add "Mode", "Opacity" and "Offset" controls to the dialogs. Remember
the "New Layer" mode and opacity in GimpDialogConfig.

Also addresses bug #361810.
2016-10-21 22:54:10 +02:00
Michael Natterer
ca2156ee35 app: language.c contains no translatable strings, remove "gimp-intl.h" 2016-10-21 18:44:39 +02:00
Tiago Santos
2576e93462 Update Portuguese translation 2016-10-20 20:59:25 +00:00
Jordi Mas
de4bf50107 Update Catalan translation 2016-10-20 21:27:57 +02:00
Michael Natterer
34eff7322e Bug 599573 - Remember dialog defaults between Gimp sessions
Add resize and fill options for the "Layer Boundary Size" and
"Canvas Size" dialogs to GimpDialogConfig.
2016-10-20 00:31:59 +02:00
Jordi Mas
6dd12d680d Fixes to Catalan translation 2016-10-19 21:56:20 +02:00
Jordi Mas
2414909818 Update Catalan translation 2016-10-19 21:10:05 +02:00
Piotr Drąg
4f465e9172 Update Polish translation 2016-10-19 18:33:44 +02:00
Michael Natterer
bfeb93afe6 app: add a tooltip to the resize dialog's "resize text layers" toggle
"Resizing text layers will make them uneditable"
2016-10-19 12:56:50 +02:00
Michael Natterer
f9170b667e Bug 647957 - GimpColorFrame's CMYK mode is not color managed
Convert GimpRGB to CMYK using a color transform to the configured CMYK
profile instead of the naive gimp_rgb_to_cmyk().

Add gimp_color_frame_set_color_config() and call it on all color
frames in the GUI (color picker tool, cursor info, sample point view).
Keep a GimpColorTransform around that does the conversion.

Also color manages the frame's color area now (visible in the sample
point view), which was forgotten earlier. Addresses bug #467930.
2016-10-18 22:48:04 +02:00
Michael Natterer
865d8796e0 libgimpconfig: gimp_scanner_parse_color(): parse nevative color values
instead of choking and aborting parsing of the entire config file. The
negative values are still clamped away after parsing, but at least we
properly read them now.
2016-10-18 22:34:51 +02:00
Michael Natterer
fce404cea2 app: minor formatting paranoia in GimpContainerTreeView 2016-10-18 20:19:52 +02:00
Michael Natterer
bafe4419c6 libgimpconfig: (de)serialize GFile properties as config paths
so they are found in relocated prefixes / user configs.
2016-10-17 18:55:50 +02:00
Michael Natterer
b8bb52b721 Bug 773058 - Enable grid views of dynamics and tool presets 2016-10-17 18:43:22 +02:00
Michael Natterer
3dc5d3da9f Bug 155164 - Merge Palettes is unimplemented
We have multiple selection in lists, so finally fix merge palette.
2016-10-17 09:25:51 +02:00
Jehan
fb51bc6802 Bug 772981 - missing some vector icons in the dist tarballs.
This fixes building with --enable-vector-icons from tarballs generated
by `make dist`.
2016-10-17 02:28:44 +02:00
Jehan
0adb1d4a14 Bug 771895 - add 128x128 and 256x256 versions for "folder" icon.
Freedesktop's "Thumbnail Managing Standard" defines 2 standard sizes
for thumbnails: 128x128 and 256x256 (section 5.3. Thumbnail Size).
Since the "folder" icon is used in-place of thumbnail when selecting a
folder in the GTK+ file dialog, it should also provide these default
sizes.
2016-10-17 01:39:13 +02:00
Balázs Meskó
2f46b2145a Update Hungarian translation 2016-10-16 22:25:51 +00:00
Piotr Drąg
5c2042ac70 Update Polish translation 2016-10-16 19:40:50 +02:00
Cédric Valmary
59efc8b91a Update Occitan translation 2016-10-16 15:24:02 +00:00
Cédric Valmary
6ff7d61df3 Update Occitan translation 2016-10-16 15:21:44 +00:00
Cédric Valmary
1df9e4190a Update Occitan translation 2016-10-16 15:21:33 +00:00
Cédric Valmary
c40cf2979c Update Occitan translation 2016-10-16 15:21:22 +00:00
Cédric Valmary
7d81205ce1 Update Occitan translation 2016-10-16 15:20:30 +00:00
Cédric Valmary
6daadf3227 Update Occitan translation 2016-10-16 15:19:36 +00:00
Cédric Valmary
d10572e62e Update Occitan translation 2016-10-16 15:18:38 +00:00
Michael Natterer
151b44e4bb Bug 759939 - Ghost brush outline in FG Select tool
Fix the check that keeps events on overlay widgets from entering the
tool event mechanism, they have no business there.

gimp_overlay_child_realize(): set the embedding widget's event mask on
all overlay children, so their windows will be used as event window,
so their events become distinguishable from events on the parent (the
canvas).

gimp_display_shell_canvas_tool_events(): fix the check for events on
overlays, and skip them for real this time.
2016-10-14 22:14:11 +02:00
Michael Natterer
3a52bf4cce Bug 731279 - Tool Preset Editor not working correctly
Call gimp_context_tool_preset_changed() on the global user context,
not on the tool preset list's or tool preset editor's local
context. Fixes restoring of presets in MWM. Tracked down by Jose
Americo Gobbo.
2016-10-13 11:36:51 +02:00
Michael Natterer
3d1c5641f7 Bug 731279 - Tool Preset Editor not working correctly
Have "Save" and "Restore" buttons in both the tool preset list/grid
and the tool preset editor. The save button stores the active tool's
options in the preset, if possible.
2016-10-12 23:51:24 +02:00
Michael Natterer
b8db0aa54e app: actually edit the template's color profile in GimpTemplateEditor
The "add default profile of image type" code was resetting it without
implementing the FIXME of setting it again. Spotted by Elle.
2016-10-12 23:48:06 +02:00
Michael Natterer
33276a000e app: add precondition check on "object" in gimp_context_set_by_type() 2016-10-12 22:44:19 +02:00
Michael Natterer
1e69bbdef6 libgimpconfig: don't unref the GFile in gimp_config_serialize_value()
g_value_get_object() doesn't return a new reference, so it must
not be dropped. Fixes random crashes when a profile was chosen
in a GimpTemplate (e.g. in new image or prefs). Spotted by Elle.
2016-10-12 22:39:31 +02:00
Michael Natterer
2e1a5bcba9 app: don't leak GimpTemplate's "color_profile" GFile in finalize() 2016-10-12 21:56:14 +02:00
Mario Blättermann
035336721e Update German translation 2016-10-12 19:30:10 +00:00
Michael Natterer
f722bc99d2 app: remove GimpDataEditor's save button, it was useless and confusing 2016-10-12 20:43:35 +02:00
Michael Natterer
d1e3d7c5c7 Bug 731279 - Tool Preset Editor not working correctly
This fixes restoring of brush properties (size, spacing angle etc.)
from presets, which was utterly broken before. The fix consists of
two parts:

- In tool_manager_preset_changed(), always copy the brush properties
  again after setting the preview on the tool options, in order to
  override brush properites that get copied from a linked brush when
  that brush gets set on the tool options.

But no amount of copying stuff again and again would help without:

- In gimp_context_set_by_type(), don't use g_object_set() to set the
  object (brush, pattern etc.). Instead, build a GValue and call
  gimp_context_set_property(). This may seem odd, but avoids a
  g_object_freeze_notify()/thaw_notify() around the g_object_set(),
  which was causing "notify" to be emitted at the very end, after
  everything this context change has triggered. GimpContext is an
  essential core object and there is an expectation of a reasonable
  order of signal emissions and callbacks being called. The "notify"
  at the end was keeping any callbacks of the context's "foo-changed"
  signals to override anything an earlier callback had done, if a
  "notify" callback was overriding that overriding again.

This was probably the reason for a lot of odd behavior observed over
the years. In fact, I have been searching for this for at least 5
years.
2016-10-12 20:33:23 +02:00
Dimitris Spingos (Δημήτρης Σπίγγος)
cecdbb7713 Update Greek translation 2016-10-12 14:57:53 +03:00
Dimitris Spingos (Δημήτρης Σπίγγος)
bb8a1e6c8e Update Greek translation 2016-10-12 14:55:04 +03:00
Michael Natterer
184f0929ce Bug 771678 - Parametric Brush Aspect Ratio and Angle values...
...are not submitted to respective Tool Options sliders

Treat brush angle and aspect ratio like all other paint options values
that can be linked to brush defaults and take their default values
from the brush. They were special casing their defaults to constants,
and GimpBrushGenerated was adding the passed dynamic radius and aspect
values to its own. This was totally incomprehensible.

Now GimpBrushGenerated's transform_size() and transform_mask()
implementations just translate between these APIs value ranges and the
brush's own value range and only use the passed values (not the
brush's native values), which makes the editor <-> tool options
interaction and the painted brush shape predictable.

Also connect the active brush's property notifications to the paint
options properties, so the paint options follow a brush edit live if
the respective "linked" toggles are checked.

And some cleanup.
2016-10-12 00:21:12 +02:00
Marco Ciampa
8c10f8a409 Updated Italian translation 2016-10-11 09:35:25 +02:00
Tiago Santos
e9b162b8b8 Update Portuguese translation 2016-10-10 18:01:13 +00:00
Balázs Meskó
e7cfbb6944 Update Hungarian translation 2016-10-10 13:42:24 +00:00
Michael Natterer
dc0ffa4891 Bug 764024 - Allow to choose fill color when resizing layers and images
Add a fill type combo to the crop tool options, only visible
when "Allow enlarging" is checked.
2016-10-10 00:21:36 +02:00
Michael Natterer
997ae1e28b Bug 764024 - Allow to choose fill color when resizing layers and images
Add a GimpFillType argument to GimpItem::resize() and fill type
widgets to the canvas and layer resize dialogs. Fill the new parts of
the drawable according to fill type in gimp_drawable_resize(). Make
sure places that need the old behavior get GIMP_FILL_TRANSPARENT
passed by hardcoding it in the GimpItem::resize() implemetations of
channel, mask, selection etc.
2016-10-10 00:02:16 +02:00
Matthias Junker-Petschick
3139cb9305 Bug 771558 - PSD files with a layer additional data length...
...not divisible by 4 are incorrectly reported as corrupt

file-psd: Do not round up the extra data length field when reading
layer info.

Fixes the PSD layer extra information handling in read_layer_info() by
not rounding up the data length field to a multiple of 4.

Layers can contain extra data, which is encoded at the end of layer
records. The length of this data should always be stored rounded up to
an even byte count. When loading a PSD file, it can be expected that
this value is already rounded up and this operation should not be
necessary. If an uneven byte count is encountered, a warning is
emitted but the loading process is not aborted.
2016-10-09 22:29:51 +02:00
Michael Natterer
a06f7e78f1 app: use BG fill in gimp_drawable_fill() if the drawable has no alpha 2016-10-09 21:30:43 +02:00
Michael Natterer
f027bf53ab app: clean up the palette-import-dialog in the spirit of recent dialog cleanup 2016-10-09 21:08:21 +02:00
Michael Natterer
ce639f031b app: fall back to BG fill if gimp_get_fill_params() doesn't find a pattern 2016-10-09 21:07:08 +02:00
Michael Natterer
be6a47e750 app: some more cleanup in IScissors
Move quite some code to new functions of ICurve, preparation for
getting rid of a bunch of outstanding IScissors inconsistencies with
other tools.
2016-10-09 17:19:42 +02:00
Michael Natterer
e9e1bc1e22 Bug 766988 - Colors applied to images are not color managed
We didn't convert patterns to the target drawable's profile when using
gimp_drawable_fill().

Introduce gimp_drawable_fill_buffer() as single filling utility
function that does things right and use it from gimp_drawable_fill()
and gimp_fill_options_create_buffer().
2016-10-09 15:53:43 +02:00
GNOME Translation Robot
7646157c28 Update Scottish Gaelic translation 2016-10-09 10:56:46 +00:00
Jiri Grönroos
322cc636b6 Add Finnish translation
(cherry picked from commit f17340493e)
2016-10-09 09:05:12 +00:00
Piotr Drąg
88b016fe91 Update Polish translation 2016-10-09 08:43:17 +02:00
Jernej Simončič
6f0bb88e43 Installer: simplify file inclusion rules
No more separate GIMP/everything else directories, also got rid of some old cruft
2016-10-09 00:26:28 +02:00
Ask Hjorth Larsen
c2e3d64c5a Update Danish translation
(cherry picked from commit 2c84150c34)
2016-10-08 21:02:01 +00:00
Ask Hjorth Larsen
30728c9063 Update Danish translation
(cherry picked from commit e022fdc386)
2016-10-08 20:52:06 +00:00
Ask Hjorth Larsen
a030c59952 Update Danish translation 2016-10-08 19:21:50 +00:00
Michael Natterer
46b73bb1fa Bug 772541 - change Quick Mask Attributes mask opacity slider
Use a GimpSpinScale in channel-options-dialog.c and clean up the
dialog layout. Affects the "Quick Mask Attributes", "New Channel" and
"Channel Attributes" dialogs.
2016-10-08 17:00:38 +02:00
Michael Natterer
6ca9ebdb95 app: remove the dynamic programming buffer from the GimpIscissorsTool struct
It's only used in one function and recreated each time, so create and
destroy it locally.
2016-10-07 01:58:37 +02:00
Michael Natterer
152c5a2c44 app: change most of Iscissors to use a GimpPickable not a GimpImage
This is just cleanup and enables adding a mode that doesn't behave like
"sample merged".
2016-10-07 01:18:16 +02:00
Michael Natterer
fbb6b5d425 app: cleanup in GimpFreeSelectTool
Mainly reduction of excessive micro utility functions by folding them
into their single (or two) caller(s). A bit more readable now.
2016-10-06 22:44:07 +02:00
Tiago Santos
3ee1ff9984 Updated Portuguese translation 2016-10-05 15:35:59 +00:00
Tiago Santos
400b9b4607 Updated Portuguese translation 2016-10-05 15:32:51 +00:00
Michael Natterer
439a3ff7bd Bug 667862 - Allow mouse to optionally configure tablet devices
Add new setting GimpGuiConfig:devices-share-tool. When TRUE, we never
copy any properties between the user context and the GimpDeviceInfo's
context, so no tool or anything changes.

We do however still keep track of the active device so the setting can
be enabled/disabled at any time. Also hide GimpDeviceStatus' tool,
brush etc. indicators in "shared" mode.
2016-10-04 22:32:08 +02:00
Michael Natterer
5cf3cf27fd app: make sure a floating selection always has its drawable's format + alpha
we were missing a conversion when pasting whole images to channels
and masks.
2016-10-04 19:49:57 +02:00
Jehan
8aa0a04854 app: keep focus on the quit dialog when saving.
Otherwise the quit dialog is still in front yet it has no focus and
one doesn't see this immediately.
Hitting ctrl-d to exit and ignore any subsequent files for instance
duplicates the current active image instead.
2016-10-04 12:15:41 +02:00
Jehan
f67bc227dc app: set active shell on image cell selection in quit dialog...
... not on activation (i.e. raise on single click rather than double
click).
2016-10-04 11:42:38 +02:00
Michael Natterer
ecf4af88b8 app: add "gboolean new_has_alpha" to gimp_drawable_convert_type()
making its external API "complete". Remove the redundant
"new_base_type" and "new_precision" from the internal (vfunc) API (the
Babl format has the same information).
2016-10-04 01:39:15 +02:00
Michael Natterer
3f8d55fe79 app: don't set "follow-state" on GimpCellRendererButton
The button's function doesn't change so it shouldn't look differently.
2016-10-04 01:21:52 +02:00
Jehan
20d45e5919 po: only warn on pot generation.
Commit c4bb708 was making `make check` fail. I should not return `false`
on the .pot file generation, simply warn. I explicitly fail the `make
update-po` command though when $(INTLTOOL_UPDATE) is the `true` command
because I know the message merge will fail and there won't be any proper
error message explaining why when it does.
2016-10-03 15:28:18 +02:00
Balázs Meskó
badd7ce257 Updated Hungarian translation 2016-10-03 09:48:26 +00:00
Balázs Meskó
b0cdd51256 Updated Hungarian translation 2016-10-03 09:44:15 +00:00
Ask Hjorth Larsen
ba1d545302 Updated Danish translation
(cherry picked from commit 85ae7d6dee)
2016-10-03 06:50:01 +00:00
Michael Natterer
de87b0ac68 app: disconnect the "add" and "remove" handlers on dialog destruction
Broke this in the last commit.
2016-10-02 20:36:14 +02:00
Simon Budig
e1b31bd37e vectortool: one more explaining message. 2016-10-02 20:04:46 +02:00
Jehan
15d9f4a354 icons, libgimpwidgets: delete "gimp-path-(new|up|down|delete)" icons.
Commit 82737bf got rid of the only pieces of code where these icons were
used. Since they were never available in any version release of GIMP,
let's delete them from libgimpwidgets API as well.
2016-10-02 19:48:48 +02:00
Michael Natterer
f8d816cb96 app: some cleanup in quit-dialog.c
Rename "dialog" variables to "private" like in the other recently
cleaned up dialogs. Use less complicated code when connecting to the
container of dirty images.
2016-10-02 18:10:50 +02:00
Robert McHardy
768b44a0c4 Bug 772315 - Dependency mentioned twice in INSTALL.in 2016-10-02 17:47:33 +02:00
Piotr Drąg
63a7a94920 Updated Polish translation 2016-10-02 13:49:46 +02:00
Piotr Drąg
f2e63397af Fix a typo in a translatable string ("represantation") 2016-10-02 13:47:50 +02:00
Balázs Meskó
256a317d22 Updated Hungarian translation 2016-10-02 10:50:00 +00:00
Jehan
3943d9fe63 app: give focus back to quit dialog after changing active shell.
Otherwise keyboard interaction (like hitting Escape or ctrl-d) ends up
broken and you may not realize immediately the dialog lost focus since
it is still the top window.
2016-10-02 04:10:26 +02:00
Jehan
c4bb7089d1 po: explain why make update-po will fail on a VPATH build.
Commit c96006919 worked around a still-existing bug (well at least the
bug report is still open) of intltool with automake 1.15 when the build
and source directories are different (VPATH build) by replacing
`intltool-update` by `true`. But because of this `make update-po` fails
on such a build and the make output is totally unclear at why. Add an
error message when this happens.
2016-10-02 02:03:03 +02:00
Jehan
9e9955480b app: add an extracted comment for translators on the quit dialog's text.
"There is one image" should not necessarily be translated to '1' in
other languages. It depends if their singular applies only to 1, like
in English. For instance in French, it can also apply to 0, so I fixed
the French translation.
2016-10-02 00:26:37 +02:00
Jehan
f4abe9a8c0 app: s/seperator/separator/ in an extracted comment for the translators. 2016-10-02 00:07:24 +02:00
Jehan
2340f37ef4 Updated French translation.
"dépôt" is not a proper translation for "commit".
"Modification" seems more appropriate, though the Pro Git book (which
is a reference on the topic) keeps the English word "commit" even in
the French version (simply italicized when in a sentence). But let's
use a French word for now.
2016-10-01 23:46:35 +02:00
Jehan
b517dd27d4 Updated French translation.
<small> tag was not closed, provoking the following warning with French
translations (and failing to display the text on the canvas):
(lt-gimp-2.9:23730): Pango-WARNING **: pango_layout_set_markup_with_accel:
Erreur à la ligne 5, caractère 54 : L'élément « markup » a été fermé, mais
l'élément actuellement ouvert est « small »
2016-10-01 23:46:35 +02:00
Michael Natterer
713e4071b2 Bug 770911 - Move tool should display relative coordinates in statusbar...
...when moving guides

Show relative coordinates when moving guides and sample points, the
cursor display in the statusbar already shows absolute coordinates.
2016-10-01 22:45:51 +02:00
Michael Natterer
12cb09836a Bug 772303 - preferences > folders don't have tooltips
Add tooltips to all buttons and indicators of GimpFileEntry and
GimpPathEditor.
2016-10-01 21:44:59 +02:00
Michael Natterer
82737bf904 libgimpwidgets: don't use GIMP-specific icons for GimpPathEditor
These are file search paths, not vector shape paths, so the new icons
were using the wrong metaphor.

This reverts the only functional part of commit
92a9117ae0, we should
probably get rid of the icons too (they are now unused).
2016-10-01 21:14:03 +02:00
Michael Natterer
0089a017f0 Bug 706309 - Add a “Save As” button to the “Quit GIMP” dialog
Add GimpCellRendererButton and use it to add a "Save" icon to each row
of dirty images. Click invokes the "edit-save" action, shift-click
invokes "edit-save-as". Also add a tooltip for the icon button.

Involves minor changes to GimpContainerTreeView to allow
GimpCellRendererButton to be added, and to allow external
"query-tooltip" handlers to run.
2016-10-01 21:00:39 +02:00
Michael Natterer
aa0afe0d01 app: invoke the right action when the quick mask button is clicked
instead of implementing the toggling in display/. One more bit
moved to actiona/.
2016-10-01 01:06:02 +02:00
Michael Natterer
41754669e6 pdb: fix PDB compat wrappers which i just broke
and simplify them using gimp_color_config_get_rgb_color_profile().
2016-10-01 00:43:17 +02:00
Michael Natterer
0524b60228 app: consistently treat GimpColorConfig profile paths as config paths
and use gimp_file_new_for_config_path() and _get_config_path() when
dealing with them. We used a weird mix of config paths and plain
(filesystem encoded) paths, waiting to to break on umlauts or
whatever. The code in gimpcolorconfig.c was particularly bad.
2016-10-01 00:29:44 +02:00
Michael Natterer
3e84c551de app: remember the size of the prefs dialog 2016-10-01 00:20:00 +02:00
Michael Natterer
eeb9364445 app: fix capitalization in prefs frame title 2016-10-01 00:19:37 +02:00
Michael Natterer
e8309826b7 app, libgimpwidgets: use the new config path <-> GFile functions
Gets rid of temporary variables to hold both expanded and unexpanded
paths.
2016-09-30 22:07:00 +02:00
Michael Natterer
d36d956770 libgimpconfig: add gimp_file_new_for_config_path() and _get_config_path()
Which turn a UTF-8 encoded config path directly into a GFile and back,
using gimp_config_path_expand() and _unexpand().
2016-09-30 22:03:34 +02:00
Michael Natterer
beb3279bf2 Bug 320447 - fast switching between "color managed display" and "softproof"
Add a SELECT_SOFTPROOF_PROFILE mode to the color profile dialog and
use it to select a profile from a newly added "Soft-Proofing Profile..."
menu item in view -> color management.
2016-09-30 20:56:04 +02:00
Michael Natterer
a898f22cce libgimpwidgets: don't chain up in gimp_frame_size_allocate()
We completely replace GtkFrame's implementation here, and chaining up
caused an infinite loop in the widget layout apparatus in some cases.

This reverts 53f34ebc0b for this file.
2016-09-30 19:25:10 +02:00
Balázs Meskó
cb2fe2893e Updated Hungarian translation 2016-09-30 08:53:15 +00:00
Michael Natterer
2019756747 app: add the chosen GFile to GimpColorProfileCallback 2016-09-29 23:06:46 +02:00
Michael Natterer
6464b47b9d app: reorder callbacks in view-commands.c, same order as in the header 2016-09-29 22:48:02 +02:00
Michael Natterer
edc903ca32 app: add a callback to the color profile dialog
and move the image modifying calls to image-commands.c
2016-09-29 22:43:37 +02:00
Marco Ciampa
58dc31ef58 Updated Italian translation 2016-09-29 12:20:43 +02:00
Marco Ciampa
2ad8b83364 Updated Italian translation 2016-09-28 21:23:34 +02:00
Tiago Santos
406b2d05b3 Updated Portuguese translation 2016-09-28 17:58:43 +00:00
Tiago Santos
d9561ee506 Updated Portuguese translation 2016-09-28 17:27:34 +00:00
Michael Natterer
ada5fe977b Bug 772025 - Incomplete toolrc file causes GIMP to hang
gimp_config_deserialize_properties(): don't loop infinitely when
encountering EOF in a truncated file.
2016-09-28 18:32:25 +02:00
Michael Natterer
ce4c4a44a6 libgimpconfig: fix typo: s/next level/nest level/ 2016-09-28 18:29:38 +02:00
Michael Natterer
062df6bd09 Bug 772025 - Incomplete toolrc file causes GIMP to hang
gimp_tools_restore(): print the error message when parsing toolrc fails.
2016-09-28 14:53:42 +02:00
Øyvind Kolås
e1db36360b gegl-apply-operation: s/dither-strategy/dither-method/ 2016-09-28 12:05:41 +02:00
Michael Natterer
b27f3ff460 app: don't leak the passed file in file_open_dialog_show()
That ref should have been removed in commit ff6ea69.
2016-09-28 01:14:05 +02:00
Michael Natterer
88ff45eb05 app: keep the statusbar progress from drawing over the right docks
In a blocking operation we don't give the main loop time to lay out
the statusbar correctly after showing the progress bar. Force a size
on the progress bar using gtk_widget_size_allocate(). This sucks.
2016-09-28 00:44:14 +02:00
Michael Natterer
a6b6259b22 Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the 'Indexed Color Conversion' dialog settings in
GimpDialogConfig.
2016-09-28 00:31:59 +02:00
Michael Natterer
009417e450 app: reorder and rename indexed conversion parameters to make more sense 2016-09-27 23:51:33 +02:00
Michael Natterer
d5f34e7ce5 app: rename indexed conversion dither option variables and parameters 2016-09-27 22:49:05 +02:00
Michael Natterer
f43760aea6 app: add a callback to the convert indexed dialog
and call gimp_image_convert_indexed() in image-commands.c where it
belongs. Also remember the default values there, they will to to
GimpDialogConfig next.
2016-09-27 15:43:25 +02:00
Michael Natterer
0932386d1b app: add a callback to the stroke dialog
and move the actual stroking code to select-commands.c,
vectors-commands.c and gimpvectorstool.c. Remember the active drawable
so the stroke always happens on the drawable the dialog was invoked
with.
2016-09-27 11:15:52 +02:00
Michael Natterer
81603eaa58 Bug 767178 - Segment fault on deleting an automatic folder tag
The GimpTaggedContainer->tag_ref_counts keeps pointers to GimpTags but
didn't ref them. Ref the tags while they are in the hash table.
2016-09-27 10:14:45 +02:00
Simon Budig
75853eec01 fix typo 2016-09-27 02:27:09 +02:00
Simon Budig
c333a04f18 gimpwarptool: use the linear sampler for the warp tool to ensure crisp lines after an erase. 2016-09-27 00:37:42 +02:00
Michael Natterer
905bb370bd app: add a callback to the fill dialog
and move the actual filling code to select-commands.c and
vectors-commands.c. Remember the active drawable so the fill always
happens on the drawable the dialog was invoked with.
2016-09-27 00:01:11 +02:00
Michael Natterer
bbbfe5cafc app: add a callback to the offset dialog
and move the actual offset call to drawable-commands.c.
2016-09-26 23:08:29 +02:00
Michael Natterer
2a04cc91a2 app: add a callback to the convert precision dialog
and move the image manipulation code out of convert-precision-dialog.c
into image-commands.c where it belongs.
2016-09-26 22:44:34 +02:00
Michael Natterer
98232c25a5 Bug 735895 - Precision Conversion "Dithering" dialog
Remember the convert precision dialog's dithering options in
GimpDialogConfig. Also addresses bug 599573.
2016-09-26 17:38:26 +02:00
Balázs Meskó
1ddccf07a6 Updated Hungarian translation 2016-09-26 08:01:16 +00:00
Michael Natterer
ec64dbb3b7 app: also reset the profile import policy when resetting color management 2016-09-26 00:56:40 +02:00
Michael Natterer
28c0e752b2 app: use prefs_file_chooser_button_add() for the temp and swap paths 2016-09-26 00:23:08 +02:00
Michael Natterer
f07b9e17cc Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the "Export Paths" and "Import Paths" dialog settings in
GimpDialogConfig, including their last used folders.
2016-09-26 00:16:47 +02:00
Michael Natterer
ea98f9967e app: change gimp_pickable_auto_shrink()'s parameters
from x1, y1, x2, y2 to x, y, width, height.
2016-09-25 22:40:28 +02:00
Michael Natterer
9a9899e542 app: general review and cleanup in actions/*-commands.c 2016-09-25 22:18:37 +02:00
Piotr Drąg
c01a251366 Updated Polish translation 2016-09-25 20:53:23 +02:00
Michael Natterer
99319182b7 app: attach the "Reset all filters" dialog to Gimp
so it's not shown multiple times.
2016-09-25 20:32:50 +02:00
Michael Natterer
1886f556e1 app: use dialogs_attach_dialog() for the canvas padding color dialog 2016-09-25 01:24:42 +02:00
Michael Natterer
12428ea7d7 app: add dialogs_destroy_dialog(), destroys an attached dialog by its key 2016-09-25 01:23:55 +02:00
Michael Natterer
c5957f146b app: remove the "filters_dialog" member from GimpDisplayShell
and attach the dialog using dialogs_attach_dialog().
2016-09-25 01:06:13 +02:00
Michael Natterer
8ab530ffc0 Bug 599573 - Remember dialog defaults between Gimp sessions
Forgot to add the "merge visible layers" and "convert to color
profile" settings to prefs' "Dialog Defaults" page.
2016-09-25 00:33:58 +02:00
Michael Natterer
da23240478 app: use gimp_enum_radio_frame_new_with_range() in the merge layers dialog
instead of "manually" building the widgets using
gimp_int_radio_group_new().
2016-09-25 00:31:41 +02:00
Michael Natterer
5f0e6cf148 libgimpbase: add translatable descriptions to enum GimpMergeType 2016-09-25 00:18:43 +02:00
Michael Natterer
3c7fcf4c58 Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the "Convert to Color Profile" dialog's "intent" and "black
point compensation" in GimpDialogConfig.
2016-09-24 22:54:42 +02:00
Michael Natterer
e703f8482e app: make the ChannelOptionsDialog private
and provide a custom callback instead. Also attach the "New Layer",
"Edit Layer Attributes" and "Configure Quick Mask" dialogs to their
image/channel.
2016-09-24 22:10:32 +02:00
Michael Natterer
c2f264f5ca app: make the LayerOptionsDialog private
and provide a custom callback instead. Also attach the "New Layer"
and "Edit Layer Attributes" to their image/layer.
2016-09-24 21:10:54 +02:00
Julien Hardelin
3d28113ec9 Updated French translation 2016-09-24 19:08:15 +00:00
Michael Natterer
2522c7ed02 app: make the VectorsOptionsDialog private
and provide a custom callback instead. Also attach the "New Path"
and "Edit Path Attributes" to their image/path.
2016-09-24 20:32:44 +02:00
Claude Paroz
e8a0e6a276 Updated French translation 2016-09-24 17:34:00 +02:00
Michael Natterer
aba0b03b92 app: reorder arguments of layer,channel,vectors_dialog_new()
So common ones are before dialog-specific ones.
2016-09-24 16:05:39 +02:00
Claude Paroz
96709da1ab Updated po-plug-ins French translation
Based on Julien Hardelin's work on master.
Forward port of 80c449fd32 from gimp-2-8.
2016-09-24 15:17:15 +02:00
Michael Natterer
0a0f8044aa app: don't connect the print size and scale dialogs to GimpImage::disconnect
GimpViewableDialog already does that.
2016-09-24 15:13:34 +02:00
Michael Natterer
d90ce3b97c app: attach the "Set Canvas Size" dialog to the image 2016-09-24 15:10:19 +02:00
Michael Natterer
8a59640b1b app: remove helper struct ImageResizeOptions
Instead, pass a GimpContext in GimpResizeCallback, it's needed
in all callbacks anyway.
2016-09-24 15:07:04 +02:00
Michael Natterer
3f1104b626 app: remove the "grid_dialog" member from GimpDisplayShell
and attach the dialog to the image, just like other dialogs.
2016-09-24 14:49:43 +02:00
Michael Natterer
1c82fc5f3c app: attach the layer scale dialog to the layer 2016-09-24 14:14:43 +02:00
Michael Natterer
905dec866e Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the "Merge Visible Layers" dialog settings in GimpDialogConfig.
2016-09-24 12:33:42 +02:00
Cédric Valmary
94d3c7dc72 Updated Occitan translation 2016-09-23 21:57:30 +00:00
Tiago Santos
a87b5a6540 Updated Portuguese translation 2016-09-23 19:36:06 +00:00
Michael Natterer
14fc49a001 app: make ImageMergeLayersDialog private and provide a cutom callback instead
and attach the dialog to the image so we can't have multiple dialogs.
2016-09-23 19:44:11 +02:00
Michael Natterer
88b60e9947 app: make gimp_edit_paste() do what its told to do
Don't change the paste_type to NEW_LAYER just because there is a
complex thing in the clipboard. Instead, honor the request to paste
FLOATING or FLOATING_INTO and reduce the pasted thing to a simple flat
layer. Also remove the message and paste_type change from edit_paste()
in edit-commands.c, it had the same purpose, just with a user
notification.

In order to paste the full layer one needs to explicitly invoke
"Paste as new layer" now.

It still changes the paste_type to NEW_LAYER if it's impossible to
attach a floating selection to the target, the menu item was simply
insensitive before.
2016-09-23 16:49:11 +02:00
Michael Natterer
41a64b7a63 app: make the LayerAddMaskDialog struct private
Instead, provide a custom GimpAddMaskCallback, connect to "response"
internally and call the callback. Takes clutter out of layers-commands.c.
Also attach the dialog to the layer so we don't show multiple add
mask dialogs. Should do the same to all dialogs with public structs,
the custom callback approach keep things more encapsulated.
2016-09-23 14:35:14 +02:00
Balázs Meskó
390b8a3afc Updated Hungarian translation 2016-09-23 08:49:57 +00:00
Hartmut Kuhse
15a838a612 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2016-09-23 09:20:38 +02:00
Michael Natterer
e909b77969 Bug 771851 - Vertical ruler shows artifacts if the status bar isn't showing
gimp_ruler_draw_pos(): when remembering the just drawn rectangle's
position, don't just unconditionally overwrite the previous position's
rectangle. Instead, if the previous position's rectangle has not been
cleared yet (has a non-zero size), remember the union of old and new
rectangle.

Why this only happened to the vertical ruler with statusbar off is
beyond my mind, it should have always produced artifacts.

Unrelated: make sure the idle function is removed if we decide to
immediately redraw in gimp_ruler_set_position().
2016-09-22 23:10:10 +02:00
Balázs Meskó
88008b9b77 Updated Hungarian translation 2016-09-22 21:06:10 +00:00
Cédric Valmary
30a0d62419 Updated Occitan translation 2016-09-22 20:07:45 +00:00
Ell
6da1775dd7 app: more performance improvements to fuzzy-select/bucket-fill
Not as dramatic this time...
2016-09-22 17:46:07 +00:00
Michael Natterer
7b0307d22d app: add preferences-dialog-utils.[ch]
with some code from preferences-dialog.c, the file was way too large
(it still is...)
2016-09-22 19:15:42 +02:00
Piotr Drąg
1f9451b878 desktop: fix keywords
The semicolons should be used instead of spaces if we want
it to work and validate.

Also adds a translator comment to avoid broken translations.
2016-09-22 19:04:03 +02:00
Michael Natterer
9645f9039f app: make "Color Management" and "Dialog Defaults" resettable individually 2016-09-22 18:54:18 +02:00
Michael Natterer
cc8b5cd37e app: add gimp_prefs_box_set_page_resettable()
which adds a "Reset" button to a prefs page.
2016-09-22 18:54:18 +02:00
Massimo Valentini
5037ff35ca Bug 771444: Tablet stylus misbehaves when crossing...
the edge of a dock in multi-window-mode

when the pointer is grabbed do not process a
motion-notify-event having the wrong 'device' member.

This avoids a harmful device change.
2016-09-22 18:18:40 +02:00
Jehan
472608fe75 desktop: add "GIMP" in keywords to fix search with flatpak.
The only reason "gimp" can be used to search for the software (for
instance in GNOME overview) is because it is the Exec (the short name
is written neither in the Name nor Comment sections). When packaged by
systems like flatpak, this key is changed to `flatpak run ...` and
searching "gimp" does not even return the software!
Adding a Keywords entry to our desktop file fixes this.

Apart from "gimp", I take the opportunity to add other relevant keywords
from our website which currently would not display GIMP as a result:
graphic design illustration painting.
2016-09-22 14:24:35 +02:00
Michael Natterer
ca43284bb1 app: convert tabs to spaces in gimpprefsbox.h 2016-09-21 17:15:47 +02:00
Michael Natterer
0d5fa53b0e devel-docs: add new stuff to *-sections.txt, and cleanup 2016-09-21 15:47:02 +02:00
Michael Natterer
dd1ac4603f app: simplify pasting code in edit-commands.c
by using the new gimp_clipboard_get_object().
2016-09-21 12:37:51 +02:00
Michael Natterer
21ec859c4a app: rename gimp_layer_flatten() to gimp_layer_remove_alpha() 2016-09-21 11:56:25 +02:00
Michael Natterer
1d76d085c9 app: fix position of pasted layers in gimp_edit_paste()
and make that code more readable.
2016-09-21 11:15:34 +02:00
Marek Černocký
5c2df432cf Updated Czech translation 2016-09-21 10:19:51 +02:00
Michael Natterer
f677e156af app: special case empty layer groups in gimp_edit_get_paste_offset()
They have a size of 1x1, treat them a image-sized when pasting layers
on top of them.

(my commit below was also about gimp_edit_get_paste_offset(), not
 about gimp_edit_paste() as the log claims)
2016-09-21 09:22:30 +02:00
Øyvind Kolås
dfad0d115e icons: set GEGL_USE_OPENCL=no for symbolic icon inversion
Observed initialization time for OpenCL observed on modern systems has been up
to 1 second - OpenCL speed ups will not outweigh initialization costs for these
small icons.
2016-09-21 01:03:26 +02:00
Michael Natterer
7b4895fd1e app: use x,y,width,height instead of x1,y1,x2,y2 in gimp_edit_paste()
and gimp_item_mask_intersect() instead of _bounds().
2016-09-21 00:53:42 +02:00
Michael Natterer
35588d79c8 app: add utility functions to get a generic paste GimpObject
to Gimp and GimpClipboard. The object is either an image or a buffer
or NULL.
2016-09-21 00:11:15 +02:00
Michael Natterer
fa94ab03ca app: fix warning in gimp_edit_paste()
gimp_image_add_layer()'s "parent" parameter is a layer.
2016-09-21 00:09:38 +02:00
Michael Natterer
f869933eb3 libgimp: sort gimp.def properly 2016-09-20 20:46:01 +02:00
Michael Natterer
3ed4b3bbec app: add "paste as new layers" for the list of named buffers
and globally reorder "paste as new layer" before "paste as new image"
so it's next to "paste" and "paste into".
2016-09-20 20:43:01 +02:00
Michael Natterer
754b9a849c script-fu: port two scripts to gimp-edit-paste-as-new-image 2016-09-20 20:23:04 +02:00
Michael Natterer
109e01dbdd pdb, app, libgimp: rename *-paste-as-new to *-paste-as-new-image
Keep the old function names around as deprecated compat wrappers.
2016-09-20 20:20:25 +02:00
Michael Natterer
be91db8107 pdb: fix typo in edit-paste's help 2016-09-20 18:54:34 +02:00
Mario Blättermann
f5f25de606 Updated German translation 2016-09-20 16:25:31 +00:00
Michael Natterer
67863dabf9 Bug 637313 - Should be possible to copy/paste whole layers in a single step
Use the newly added clipboard for entire images to copy/paste layers
(we only create single-layer clipboard images, and use only the first
layer of any recieved image, the layers can be arbitrarily complex
though):

- change gimp_edit_copy,cut,paste() to return/take a GimpObject
  that can be a GimpImage or GimpBuffer
- cut/copy the whole layer if there is no selection
- always paste layers as new layers, not floating selections
- always paste news layers on top of the active layer, where
  we would attach a floating selection
- add enum GimpPasteType { FLOATING, FLOATING_INTO, NEW_LAYER }
- add GimpPasteType parameter to gimp_edit_paste() and handle all
  three cases there because there is now a lot of common code
  involved
- change all callers accordingly, use only legacy buffer pasting
  from the PDB for now
2016-09-20 00:20:07 +02:00
Balázs Meskó
f960e8e636 Updated Hungarian translation 2016-09-19 19:23:50 +00:00
Michael Natterer
70d6cd906c app: connect the Gimp instance's clipboard_image to the system clipboard
In gui.c's "clipboard-changed" callback, check for the clipboard_image
and set it on GimpClipboard.
2016-09-19 20:14:21 +02:00
Michael Natterer
7130ba95e1 app: add gimp->clipboard_image and API to set/get it 2016-09-19 20:13:39 +02:00
Michael Natterer
f0acb3301a app: factor gimp_edit_get_paste_offset() out of gimp_edit_paste()
and also use it for "paste as new layer", so we get the same
positioning logic for both paste variants.
2016-09-19 17:30:41 +02:00
Michael Natterer
08513f50f8 app: paste as new layer if the target layer can't be modified
Which happens on layer groups and locked drawables.
2016-09-19 12:36:11 +02:00
Michael Natterer
557965e593 app, menus: rename everything "paste as new" to "paste as new image"
Actions, functions, variables, help IDs. Also added user profile
migration code for importing old menurc files.
2016-09-19 12:15:39 +02:00
Göran Uddeborg
8eb1a909fb Updated Swedish translation 2016-09-19 09:48:37 +00:00
Michael Natterer
1f00b5e70f app: add setting/getting and sending/recieving images via GimpClipboard
The new functionality is not used yet.
2016-09-18 22:01:13 +02:00
Michael Natterer
0740d8d688 app: don't keep images from the clipboard in gimp->images
They are temporary internal objects. In gimp->images they would
be visible in the GUI and PDB.
2016-09-18 21:56:47 +02:00
Michael Natterer
5136f131be app: add gimp_selection_data_set_xcf() and _get_xcf()
using the new load/save XCF stream APIs added below.
2016-09-18 21:43:45 +02:00
Michael Natterer
63bcc69827 app: factor out xcf_load_stream() and xcf_save_stream()
which can be used to load/save XCF from/to arbitrars streams. Use the
new functions from the load/save procedure invokers.

This commit also fixes a leaked open file ans input stream for each
loaded XCF.
2016-09-18 20:19:42 +02:00
Tiago Santos
6b48a68cec Updated Portuguese translation 2016-09-18 16:21:18 +00:00
Милош Поповић
484b91c0e9 Updated Serbian translation 2016-09-17 23:26:52 +00:00
Милош Поповић
b4f8bb35d8 Updated Serbian translation 2016-09-17 23:23:38 +00:00
Michael Natterer
b092a80e51 app: reorder edit_fade_cmd_callback() in edit-commands.c
and group the prototypes in edit-commands.h
2016-09-17 19:45:45 +02:00
Michael Natterer
de5bbd637e app: don't call gimp_layer_set_lock_alpha() on layer groups
in gimp_image_new_from_drawable().
2016-09-17 19:19:30 +02:00
Michael Natterer
d85157c376 app: rename gimp->global_buffer to gimp->clipboard_buffer
Also rename the "buffer-changed" signal and the setter, and add a
getter.
2016-09-17 17:39:54 +02:00
Michael Natterer
9bb33914bf app: set tooltips on the tool options' brush, gradient etc edit buttons
Also make the tooltips of the edit buttons of the brush, gradient etc
dialogs consistent.
2016-09-17 17:10:20 +02:00
Michael Natterer
21f8a0fd1e app: clean up and simplify gimp_selection_extract()
It was ported to GEGL pretty much 1:1, leaving too many and even
one completely redundant if()s around.
2016-09-17 15:32:22 +02:00
Michael Natterer
d5ffc50c2e app: rename w, h to width, height in gimp_item_mask_bounds() 2016-09-16 23:57:24 +02:00
Michael Natterer
dba7d58b56 app: port gimp_drawable_bucket_fill() to x, y, width, height
because x1, y1, x2, y2 are evil.
2016-09-16 23:31:56 +02:00
Michael Natterer
cbac0a4ddc app: don't show the "Fonts" startup status message if we don't loas fonts 2016-09-15 18:47:55 +02:00
Ell
7e6d67ac4b app: various performance improvements to fuzzy-select/bucket-fill
thru gimp_pickable_contiguous_region_by_seed()
2016-09-15 14:57:04 +00:00
Michael Natterer
3ee5df9ee8 Bug 771484 - text loading impossible, in version commit 4b4e1c8
gimp_restore(): the call to gimp_fonts_load() got lost in
commit 64a2c395d1.

Also adjust init progress percentages again.
2016-09-15 14:48:51 +02:00
Michael Natterer
0ce364ee4d configure.ac, app: require liblcms2 >= 2.7
and add an lcms2 runtime version check to app/sanity.c

Fixes:
Bug 736701 - LCMS2 rounding errors cause problems with certain GIMP blend modes
2016-09-15 12:52:20 +02:00
Michael Natterer
572d556643 Bug 553855 - Bucket fill colour is always blended with filled pixel colour...
...when threshold > 0

Add an "Antialias" toggle to the bucket fill options and set it on the
GimpFillOptions. In gimp_drawable_bucket_fill(), pass it to
gimp_pickable_contiguous_region_by_seed() instead of always defaulting
to TRUE.

The position of the toggle and its huge tooltip may need some
adjustment.
2016-09-15 12:24:37 +02:00
Michael Natterer
ea6946edf0 app: small whitespace fix in gimppickable-contiguous-region.h 2016-09-15 10:22:53 +02:00
Dimitris Spingos (Δημήτρης Σπίγγος)
4d25640fd3 Update Greek translation 2016-09-15 10:13:04 +03:00
Dimitris Spingos (Δημήτρης Σπίγγος)
95ebc39dcc Update Greek translation 2016-09-15 10:09:42 +03:00
Massimo Valentini
0ecd936f57 Bug 771208: 'Y' axis name of Flow Graph Parameter...
on Paint Dynamics curve is wrong
2016-09-14 18:32:16 +02:00
Balázs Meskó
c26c506958 Updated Hungarian translation 2016-09-14 12:46:11 +00:00
Michael Natterer
20a32d970d Bug 599573 - Remember dialog defaults between Gimp sessions
Add GimpFillOptions and GimpStrokeOptions to GimpDialogConfig and use
them in the Fill/Stroke Selection/Path dialogs and for the "with last
values" commands. Add GUI for them to Preferences -> Dialog Defaults.

This requires most of the stuff in my last few commits, and some
more changes:

GimpFillOptions is a GimpContext which has all sorts of connections to
everything, including a Gimp pointer. Hack around in GimpDialogConfig
to add a Gimp property, and add "gimp" parameters to quite some GimpRC
functions. Treat the Gimp* as a GObject* in all public API because
core/ stuff is not known in config/.
2016-09-14 01:27:42 +02:00
Michael Natterer
b63fed76eb libgimpconfig: serialize empty value arrays as (property-name 0)
not (property-name NULL), which means nothing to the parser.
A "0" simply means an array with zero values.
2016-09-14 00:56:17 +02:00
Michael Natterer
7daa7d080a app: implement GimpConfig::serialize() in GimpFillOptions
so it doesn't inherit GimpContext's changed implementation.
2016-09-14 00:27:31 +02:00
Jehan
7a5d0810a3 icons: "gimp-print-resolution" icons better fit "document-print".
Also alias GIMP_STOCK_PRINT_RESOLUTION to "document-print" until we
get a proper icon for it.
2016-09-13 23:49:26 +02:00
Jehan
70a3584437 icons: fix icons with crazy sizes.
Gaaah! Export error.
2016-09-13 22:48:50 +02:00
Jehan
410b23ea36 icons: updated "gimp-prefs-folders" and new "folder" icons.
The former "gimp-prefs-folders" actually becomes the new "folder", which
is used for instance in file dialogs.
2016-09-13 22:21:09 +02:00
Michael Natterer
6fe900f7a7 app: always call gimp_load_config() on a newly created Gimp instance
Simply creating and destroying a Gimp now creates and destroys more
members, and some of them always need a gimp->config object.
2016-09-13 12:55:17 +02:00
Michael Natterer
f1897b655e app: free Gimp members in reverse order of creation 2016-09-13 12:44:10 +02:00
Michael Natterer
7f3090febb app: gimp_fonts_exit() don't disconnect from a NULL gimp->config 2016-09-13 12:24:15 +02:00
Michael Natterer
314027f0c9 app: create members of the Gimp instance earlier
Move fonts, data factories, document list, paint methods and user
context creation to gimp_init() or gimp_constructed() so that most
members are created when gimp_new() is done. This does not load any
data earlier, it just makes sure that all containers exist when
gimp_load_config() is called. It's also cleaner and less fragile,
2016-09-13 09:47:27 +02:00
Michael Natterer
631110e061 app: merge units.[ch] into core/gimp-units.[ch]
and initialize units in gimp_init(). This was completely
over-engineered but in the end boils down to a bad hack that needs a
static "the_unit_gimp" pointer anyway, so let's at least have the hacks
in one file.
2016-09-12 23:51:29 +02:00
Michael Natterer
9188f549e8 app, pdb: remove useless include of "core/gimpunit.h" 2016-09-12 23:46:21 +02:00
Jehan
5289a25b7c icons, app: "folder-new" icon used for new layer group. 2016-09-12 22:26:46 +02:00
Jehan
42ee8c7bb9 icons: move icon to the right folder.
Oups!
2016-09-12 22:17:20 +02:00
Jehan
49abdc33fd icons: add "edit-delete" icon.
Based off icons from Klaus Staedtler, who proposed separate icons for
layers, channels and paths. I only extracted the "cross" part for a
generate delete icon.
2016-09-12 21:39:11 +02:00
Jehan
4b4e1c8e60 app: use Freedesktop standard "edit-paste" icon rather than "gtk-paste". 2016-09-12 03:59:53 +02:00
Jehan
75e97a23f3 icons, libgimpwidgets: gimp-buffer icons renamed to edit-copy...
... and GIMP_STOCK_BUFFER redefined to "edit-paste", half-reverting
commit cb7d93d (except we use standard Freedesktop icon naming instead
of the GTK stock name).
The gimp-buffer icon was indeed definitely looking like a typical copy
icon, which was missing, and this has priority over a buffer icon.
2016-09-12 03:53:17 +02:00
Michael Natterer
64a2c395d1 app: add gimp-data-factories.[ch] with some code from gimp.c
This should improve readability in gimp.c, and moves all data factory
handling code to a common place.
2016-09-12 02:55:49 +02:00
Jehan
c6a570d33e configure, INSTALL, devel-docs: vectorial icons is not proper English.
We should use "vector icons" instead. Thanks to nomis for raising the
question and ankh to confirm the proper English.
2016-09-12 01:58:41 +02:00
Jehan
0377e61cc4 app: "help-action-search" has been renamed to "dialogs-action-search"...
... since commits 36f87b5b and 2b6a10b7.
With the renaming, action-search was showing itself in its list.
2016-09-12 01:49:08 +02:00
Michael Natterer
61c260c727 app: add a trivial attach-dialog-to-arbitrary-object utility
Namely dialogs_attach_dialog(), _detach_dialog(), _get_dialog()

So we don't create the same dialogs multiple times, but raise the
already existing ones. Port some places that did this manually
to the new functions, and use it for many other dialogs.
2016-09-12 00:07:41 +02:00
Pascal Massimino
342c602546 Bug 771012 - Improve WebP animation-saving
WebP saving: various improvements in file-webp-save.c

- reorganizes the main loop
- fixes (temporarily) the bad timestamp by using fixed 100ms delay between frames
- fixes the progress bar
- takes care of resource clean-up for some previously unchecked error paths
- uses 'minimize_size' and 'allow_mixed' options more appropriately
- only remuxes the final bytestream when ICC profile is present. For
  most common case, we insert the loop-count information during muxer
  creation instead of by remuxing at the end.
2016-09-11 20:36:43 +02:00
Michael Natterer
6bc8b4ee74 app: don't copy alpha in gimp_operation_profile_transform_process()
GimpColorTransform abstracts that lcms problem away.
2016-09-10 01:09:11 +02:00
Michael Natterer
b5cc2a977f Bug 768966 - Keyboard Shortcut hint disappears from tooltips...
...after entering single window mode

In GimpToolPalette, implement GtkWidget::hierarchy_changed() and
re-set the tooltips using the new toplevel's actions.

In gimp_widget_set_accel_help(), make sure we don't connect to the
same action twice, and make sure we disconnect everything if either
the widget or the accel_group go away.
2016-09-10 00:26:23 +02:00
Michael Natterer
57d0c89818 libgimpwidgets: stop using GTK_TYPE_HSCALE
Use GTK_TYPE_SCALE with orientation = HORIZONTAL instead.
2016-09-09 21:52:09 +02:00
Michael Natterer
a5868e1f13 app: some cleanup in GimpSearchPopup 2016-09-09 21:40:09 +02:00
Timm Bäder
53f34ebc0b Chain up in some size-allocate implementations
The default implementation does just the right thing for most widgets.
2016-09-09 21:31:09 +02:00
Michael Natterer
64a93c6051 libgimpwidgets: merge a small GimpRuler optimization from gtk3-port
In size_allocate(), call gimp_ruler_make_pixmap() only if the widget
was resized, not only moved around.
2016-09-09 10:02:53 +02:00
Michael Natterer
4df9a1d568 Get rid of gtk_misc_set_alignment(label) and use gtk_label_set_x,yalign() 2016-09-08 19:11:20 +02:00
Michael Natterer
d78d4ce82b libgimpwidgets: add gtk_label_set,get_x,yalign() to gimp3migration.[ch]
They are deprecated in GTK+ 3.x and cause tons of warnings, now we can
port calls to gtk_misc_set_alignment(label) to the new API and have
the same code in master and gtk3-port.
2016-09-08 18:56:44 +02:00
Balázs Meskó
8952b49142 Updated Hungarian translation 2016-09-07 21:02:54 +00:00
Kristian Rietveld
b462418dfc plug-ins: common: fix scripts to generate Makefile.am correctly
This complements the preceding commit "plug-ins: fix the build on OS X".
2016-09-07 22:10:19 +02:00
Timm Bäder
f4f7b894ed app: fix position of "inline" keyword in about-dialog.c 2016-09-07 20:23:36 +02:00
Michael Natterer
4033415a79 app, libgimpwidgets, plug-ins: kill gtk_scrolled_window_add_with_viewport()
It's deprecated in GTK+ 3.x, so we get rid of some deprecation
warnings. Also, it has always only been a utility function that hides
what is really going on in the widget hierarchy.
2016-09-07 20:12:28 +02:00
Piotr Drąg
19239c2477 Updated Polish translation 2016-09-07 19:39:55 +02:00
Kristian Rietveld
51d26b06db plug-ins: fix the build on OS X
We need to have -xobjective-c specified only for compile commands
that will perform compilation. Otherwise, for compile commands
that only link the compiler interprets .o files as C source ...
2016-09-07 10:32:15 +02:00
Tiago Santos
0b933a2941 Updated Portuguese translation 2016-09-07 06:16:59 +00:00
Tiago Santos
adef990e2a Updated Portuguese translation 2016-09-07 06:10:14 +00:00
Michael Natterer
f91a19b1ef libgimpwidgets: merge some GimpColorButton API from gtk3-port 2016-09-07 02:22:57 +02:00
Michael Natterer
308efbb514 Bug 767830 - Help browser does not launch on OS X
Try harder to show help when webkit is missing or the help browser
won't start:

- offer to switch to the web browser when the help browser is
  present, but won't start for some reason
- in prefs, don't bother showing the help browser GUI when webkit
  is missing, otherwise show a warning label if the help browser
  is not installed even though webkit is there. Switch to the web
  browser in both cases (modified patch from lisanet)
- add OS X replacement for gtk_show_uri() in plug-in-web-browser
  (modified patch from lisanet)
2016-09-06 20:51:47 +02:00
Massimo Valentini
b7d41c83c6 Bug 770928: Critical warning clicking history color button
(gimp-2.9:3): Gimp-Core-CRITICAL **: gimp_marshal_VOID__OBJECT_POINTER: assertion 'n_param_values == 3' failed

Conflict between signal marshal function
and signal emission.
2016-09-06 18:39:52 +02:00
Massimo Valentini
61530c74a4 app: plug a memory leak
AddressSanitizer output (paths manually shortened)

Direct leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0x7f543247d1d0 in realloc (/lib64/libasan.so.3+0xc71d0)
    #1 0x7f542d3ad02f in g_realloc glib/glib/gmem.c:159
    #2 0x57918d in gimp_color_history_set_property gimp/app/widgets/gimpcolorhistory.c:169
    #3 0x7f542d681ec0 in object_set_property glib/gobject/gobject.c:1423
    #4 0x7f542d681ec0 in g_object_new_internal glib/gobject/gobject.c:1817
    #5 0x7f542d6839ed in g_object_new_valist glib/gobject/gobject.c:2042
    #6 0x7f542d683c73 in g_object_new glib/gobject/gobject.c:1626
2016-09-06 18:39:45 +02:00
Jehan
ab328ec79a libgimpwidgets: bring back GIMP_STOCK_EDIT as "gtk-edit".
Commit c6f1761 deletes a stock item id. But this is also part of our API
and cannot be deleted. Yet since the associated label ("_Edit") is
identical to the one for GTK_STOCK_EDIT, we can simply redefine it
to "gtk-edit".
Ideally we would also add a deprecation warning when this macro is used,
but I can't find a good way to add deprecation on macros.
2016-09-06 03:17:09 +02:00
Tiago Santos
3f3e385c4b Updated Portuguese translation 2016-09-05 20:26:49 +00:00
Michael Natterer
ee49c0b700 plug-ins: latest perl or whatever seems to need "require './plugin-defs.pl';"
instead of just "require 'plugin-defs.pl';".
2016-09-05 19:35:35 +02:00
Balázs Meskó
0856c71b85 Updated Hungarian translation 2016-09-05 07:33:20 +00:00
Jehan
c6f1761af7 icons, app, libgimpwidgets: replace GIMP_STOCK_EDIT with GTK_STOCK_EDIT. 2016-09-05 02:53:51 +02:00
Michael Natterer
e404e6ba93 Bug 770853 - Opening and overwriting a linear gamma png produces wrong colors
Add support for writing linear PNGs. But only if we also save a color
profile, otherwise we would get loaders confused. Please test, I might
have a knot in my brain...

Also clean up some formatting and fix compile warnings, now let's wait
for bugs about shit libpng versions which break the build.
2016-09-05 01:04:09 +02:00
Jehan
8bff597c6f icons: install the new Freedesktop/GTK+ icons. 2016-09-05 00:45:15 +02:00
Klaus Staedtler
0eeee33c70 icons: many new icons.
These icons were massively renamed by Jehan, from a feature branch, in
order to fit either into Freedesktop's "Icon Naming Specification", or
as standard GTK+ icons.
2016-09-05 00:45:15 +02:00
Klaus Staedtler
a440f6cbff icons: updated icons.
As squashed by Jehan from the work of Klaus Staedtler in a feature
branch.
2016-09-05 00:45:14 +02:00
Pascal Massimino
252da1bdd5 Bug 769960 - animated WebP loader is not properly handling blending...
...and transparency

Use most recent API for decoding WebP animation. WebPAnimDecoder
handles transparency and blending automatically.
2016-09-04 18:56:57 +02:00
Michael Natterer
e4ecba584a plug-ins: lots of cleanup and fixes in file-webp
- handle all sorts of image types, gegl_buffer_get() will convert to u8
- specify GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION
- modify the export duplicate, not the original image
- fix handling of the drawable type and only save "R'G'B'A u8"
  or "R'G'B' u8", fixes bug 770664.
- completely redo run(SAVE_PROC) to deal with export correctly
- turn global variables into the standard SAVE_PROC, PLUG_IN_BINARY etc
  defines
- simplify the save dialog
2016-09-04 17:57:52 +02:00
Mihail Zenkov
3ab1389b9b Bug 770600 - Fix broken export to PBM
Use the drawable's (indexed bitmap) format instead of "Y' u8" when
exporting to PBM, this got broken when porting to GEGL.
2016-09-04 17:20:52 +02:00
Michael Natterer
f222a08e26 libgimp: gimpexport.c: default to saving as animation
if the plug-in specifies GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_AMINATION
(instead of defaulting to flattening or merging visible layers).
2016-09-04 17:12:34 +02:00
Piotr Drąg
598def517d Updated Polish translation 2016-09-04 16:38:27 +02:00
Michael Natterer
42647ec6d6 libgimpconfig: forgot debug output in gimp_config_path_unexpand_only() 2016-09-04 15:25:45 +02:00
Michael Natterer
7ce538b85f libgimpwidgets: store profile locations as config paths in profilerc
so we can potentially ship profiles and they will be found reliably,
and users can store profiles in their gimpdir. Still parses the old
uri-based locations.
2016-09-04 15:12:38 +02:00
Jehan
f0bd6e7da3 etc: s/gtk-cdrom/media-optical/ and s/gtk-floppy/media-floppy/
Use Freedesktop standard names in priority when possible.
2016-09-04 02:06:19 +02:00
Michael Natterer
eee7b556bd app: fix typo in GimpGeglConfig 2016-09-04 00:29:14 +02:00
Jehan
6f0be266a2 icons: forgot to rename some "gimp-open" icons into "document-open".
Argh! I should always test both the vectorial and raster icons before
pushing!
2016-09-03 17:58:24 +02:00
Jehan
6c674e973c app, libgimp*, plug-ins, icons: revert icon names into freedesktop...
... standard icon names and GTK+ icon names as second choice.
We should only use GIMP specific icon names as last resort, when there
is no standard or GTK+ names dedicated to the function.
This is made possible thanks to commit 3cc77b0.

s/gimp-document-recent/document-open-recent/
s/gimp-indent/format-indent-more/
s/gimp-next/go-next/
s/gimp-previous/go-previous/
s/gimp-save/document-save/
s/gimp-save-as/document-save-as/
s/gimp-revert/document-revert/
s/gimp-open/document-open/
s/gimp-document-recent/document-open-recent/
s/gimp-quit/window-close/ ou s/gimp-quit/application-exit/
s/gimp-warning/dialog-warning/
s/gimp-edit-clear/edit-clear/

s/gimp-justify-.*/gtk-justify-.*/
s/gimp-font/gtk-select-font/
s/gimp-color-palette/gtk-select-color/
s/gimp-cancel/gtk-cancel/
2016-09-03 15:49:29 +02:00
Michael Natterer
f40e36ffab Bug 770171 - Mypaint eraser won't work unless there is an alpha channel
In eraser mode, paint with the background color on layers without alpha.
2016-09-03 15:48:02 +02:00
Michael Natterer
44010beaed libgimpwidgets: use gimp_config_path_unexpand() in gimp_prop_file_choose_button
instead of a plain g_filename_to_utf8(), so special paths like
${gimp_dir}, ${gimp_plug_in_dir} etc get substituted correctly.
2016-09-02 20:47:51 +02:00
Michael Natterer
9317952375 libgimpwidgets: call gimp_file_entry_set_filename() with filename encoding
GimpPathEditor wass passing an UTF-8 string.
2016-09-02 20:44:43 +02:00
Massimo Valentini
3cc77b03bf Bug 759904: Some icons can't be set from the icon theme
make it possible to use themed standard named icons
so to have also gtk dialogs show icons in the same style
as GIMP ui.
2016-09-02 12:30:49 +02:00
Michael Natterer
12ac114f71 app: use gimp_config_path_unexpand() when writing pluginrc
instead of the previous ad-hoc hack.
2016-09-01 00:44:19 +02:00
Michael Natterer
6b391156be libgimpconfig: add gimp_config_path_unexpand()
which is the opposite of gimp_config_path_expand() and replaces all
occurances of well-known gimprc paths with their respective
identifiers such as ${gimp_data_directory}, ${gimp_directory} etc.
2016-09-01 00:39:34 +02:00
Christian Kirbach
d15101382f Updated German translation 2016-08-31 20:38:47 +00:00
Michael Natterer
9f343f25eb app: try to store plug-in paths in terms of ${gimp_plug_in_dir}
so they get found without re-querying by relocatable GIMP packages.
2016-08-31 22:04:46 +02:00
Balázs Meskó
d6a3cc2818 Updated Hungarian translation 2016-08-31 05:54:57 +00:00
Michael Natterer
0b054f00f4 app: simplify preferences-dialog.c by adding prefs_entry_add()
also add a GimpContext* parameter to prefs_color_button_add()
and call gimp_color_panel_set_context() for the caller.
2016-08-29 17:38:33 +02:00
Michael Natterer
d0263efd80 app: minor cleanup in gimpoperationblend.c 2016-08-29 17:38:06 +02:00
Alexandre Prokoudine
78db28a717 Update Russian translation 2016-08-29 09:59:59 +03:00
Martin Srebotnjak
f65429eee7 Updated Slovenian translation 2016-08-27 22:47:29 +02:00
Martin Srebotnjak
2c3448d558 Updated Slovenian translation 2016-08-27 22:43:13 +02:00
Martin Srebotnjak
fb0bcc4401 Updated Slovenian translation 2016-08-27 22:35:22 +02:00
Martin Srebotnjak
16d8fac2ef Updated Slovenian translation 2016-08-27 22:35:12 +02:00
Tiago Santos
d20eb19292 Updated Portuguese translation 2016-08-27 17:54:09 +00:00
Martin Srebotnjak
cc54e9e669 Updated Slovenian translation 2016-08-26 22:34:28 +02:00
Martin Srebotnjak
2521e52373 Updated Slovenian translation 2016-08-26 22:33:59 +02:00
Martin Srebotnjak
f20509c44f Updated Slovenian translation 2016-08-26 22:32:58 +02:00
Michael Natterer
dfa390fd95 Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the "Feather Selection", "Grow Selection", "Shrink Selection"
and "Border Selection" dialog settings in GimpDialogConfig.
2016-08-26 15:43:25 +02:00
Jehan
bbe6b3828d Bug 768371 - reason for failed configure due to missing dependencies...
... easier to detect automatically.
2016-08-26 03:13:46 +02:00
Милош Поповић
045df2c7dd Updated Serbian translation 2016-08-25 22:21:25 +00:00
Michael Natterer
63fce277d0 app: fix some warnings i introduced in preferences-dialog.c 2016-08-25 23:06:39 +02:00
Martin Srebotnjak
f11504f220 Updated Slovenian translation 2016-08-25 21:36:11 +02:00
Martin Srebotnjak
6615a99f52 Updated Slovenian translation 2016-08-25 21:33:53 +02:00
Martin Srebotnjak
d85b68cf32 Updated Slovenian translation 2016-08-25 21:12:32 +02:00
Piotr Drąg
6790938b1d Update POTFILES.in 2016-08-24 21:09:19 +02:00
Michael Natterer
2ae3393c3b Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the "New Path" dialog settings in GimpDialogConfig.
2016-08-24 19:49:59 +02:00
Michael Natterer
8132d51b29 Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the "New Channel" dialog settings in GimpDialogConfig.
2016-08-24 18:28:36 +02:00
Милош Поповић
f3b7f33b3a Updated Serbian translation 2016-08-24 16:19:25 +00:00
Michael Natterer
6c29429a78 .dir-locals.el: configure emacs to show trailing whitespace 2016-08-24 17:46:57 +02:00
Jehan
451f0b5c78 .dir-locals.el: fixing (hopefully) the emacs config file.
Not tested, but I am told that should fix the warning asking for input
at each buffer opening. Thanks to Roman Lebedev for the fix.
2016-08-24 16:03:20 +02:00
Michael Natterer
9b8009d8c7 Bug 766628 - Preferences window is too tall
Add gimp_prefs_box_set_page_scrollable() which does what it says, and
make the tallest pages of the prefs dialog scrollable. This method
allows the dialog's smaller pages to still enforce a minimum height
for the window.
2016-08-24 12:52:33 +02:00
Michael Natterer
981a1b9c2e Bug 599573 - Remember dialog defaults between Gimp sessions
Remeber the "New Layer" dialog settings in GimpDialogConfig.
2016-08-24 12:33:56 +02:00
Jehan
acfca30899 HACKING: add a comment about the 3 config files for common editors.
We have coding style config files for Emacs, Kate and Vim.
2016-08-23 20:00:13 +02:00
Benoit Touchette
0b7381a822 Bug 759601 - Add/Remove layer masks by clicking the layer preview
Quite heavily modified by Mitch to address the more general issues
mentioned in comment 35 of the bug:

- Remember the added mask's type and the invert boolean in
  GimpDialogConfig
- Add new prefs page "Dialog Defaults" which will contain
  only stuff from GimpDialogConfig and can be reset separately
- Remove static mask variables from layers-commands.c and
  use the new config values for both interactive mask adding
  with the dialog, and for the shortcut based method
- Add a button to the layers dialog which supports add, add
  with last values, delete, apply
- Add modifier-click shortcuts on the layer preview with the
  same modifiers as on the button
2016-08-23 19:18:20 +02:00
Jehan
dabf8de59f Bug 770123 - Add emacs locale settings for GNU coding style.
Taken from: https://gcc.gnu.org/wiki/FormattingCodeForGCC
I assumed it is upstream enough, but since I don't use emacs, I have not
tested and just hope it is good. Do not hesitate to commit better emacs
settings to follow our coding style!
2016-08-23 18:11:53 +02:00
Jehan
cc02ee1160 devel-docs: c.vim to help contributors enforce our coding style in VIM.
The GNU coding standards rules can be found in:
https://gcc.gnu.org/wiki/FormattingCodeForGCC
I added a few rules, like if the file has existing tabs, we want to show
them as 8 columns. Yet typing tabs automatically expands to 2 spaces.

I also added a rule to highlight (in red) trailing whitespaces, but also
tabs (everywhere, not only trailing) making them easy to spot.
This file can be easily sourced from vimrc for the whole GIMP tree, but
I advise against setting VIM to automatic discover a locale .vimrc,
which is possible but a high security risk since a third-party vimrc
could contain random shell commands.
2016-08-23 17:37:10 +02:00
Roman Lebedev
eb94b1e3f7 Add .kateconfig with modelines for Kate
Directly follows GIMP HACKING Hackordnung:
  - 2 characters indentation level
  - no tabs. TAB should not put TAB characters in the file.
  - tab stops at 8 column intervals.
2016-08-23 14:53:38 +02:00
Милош Поповић
c29098e82e Updated Serbian translation 2016-08-22 22:28:01 +00:00
Sveinn í Felli
baf8d8ebfa Updated Icelandic translation 2016-08-22 22:05:51 +00:00
Sveinn í Felli
ab8075fb55 Updated Icelandic translation 2016-08-22 21:56:06 +00:00
Michael Natterer
d13bc78a95 plug-ins: remove accidentially added .orig file 2016-08-22 09:06:25 +02:00
Hartmut Kuhse
96c1ec3ff8 Merge remote-tracking branch 'remotes/origin/gimp-attributes-wip' into gimp-attributes-wip 2016-08-21 11:46:49 +02:00
Hartmut Kuhse
e91392c7bf Corrections after merge 2016-08-21 11:42:45 +02:00
Hartmut Kuhse
b870a67791 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	app/core/gimpimage.c
2016-08-21 08:47:46 +02:00
Michael Natterer
73c664ec97 app: fix code duplication in GimpMybrushCore, and clean up coding style
Also fixes a case where converting to the color managed image color
via gimp_pickable_srgb_to_image_color() was forgotten.
2016-08-20 23:46:23 +02:00
Piotr Drąg
618719b3e5 Updated Polish translation 2016-08-19 13:43:51 +02:00
Balázs Meskó
e16215f899 Updated Hungarian translation 2016-08-17 09:30:54 +00:00
Benoit Touchette
05e4c5fe28 Bug 769871 - Adds selection to save exif/xmp when exporting a webp file.
This adds an expander to the webp file plug-in  to select whether
to save or not the exif, and xmp data for webp files. This harmonizes
the plug-in with a similar option to the jpg/png file plug-ins.

https://bugzilla.gnome.org/show_bug.cgi?id=769871
2016-08-16 16:49:57 -04:00
Benoit Touchette
7663ff289f plugin: fix for errors during export of webp animation with file-webp plugin
This fixes an error during export of webp animations when the layer is size smaller than the image size.

https://bugzilla.gnome.org/show_bug.cgi?id=769872
2016-08-16 16:34:09 -04:00
Jehan
7725f1dc0e INSTALL: libwebp must be built with --enable-libwebpmux...
... and --enable-libwebpdemux.
2016-08-16 21:04:58 +02:00
skal
e4a2f220e0 Bug 769959 - crash during WebP file loading
WebPDataClear() was called on already-free'd data.
2016-08-16 03:11:26 +02:00
Jehan
9e9cd496f7 INSTALL: adding libwebp in optional dependency list. 2016-08-16 02:41:34 +02:00
Michael Natterer
87f14fbdbc libgimpwidgets: support enums with mnemonics in GimpEnumStrore
Strip the '_' away, combo boxes don't have mnemonics.
2016-08-15 21:57:34 +02:00
Jehan
0652cd016b tools: invert-svg needs glib and GIO dependencies. 2016-08-15 15:06:35 +02:00
Piotr Drąg
ad0a98848e Updated Polish translation 2016-08-15 00:01:55 +02:00
Michael Natterer
3a14a646f5 app: add new config class GimpDialogConfig
which will keep all settings of the "don't ask me again" kind. For
now, moved the "color-profile-policy" there.
2016-08-14 22:21:59 +02:00
Michael Natterer
1027c71f36 app: rename variable in preferences-dialog.c (irrelevant nitpicking) 2016-08-14 15:52:46 +02:00
Jehan
c83ee61c07 Bug 729765 - remove focusability of various widgets...
... starting with toolbox buttons.
This is particularly a problem in single window mode (and sometimes in
multi-window mode) where canvas easily loses focus, hence key events.
2016-08-14 01:47:56 +02:00
Michael Natterer
381d9e9b7a plug-ins: clean up the file-webp loading code 2016-08-13 20:54:09 +02:00
Massimo Valentini
52b6eaa11a tools: 2 typos
one prevented a successfull make distcheck
on my platform
2016-08-13 11:30:13 +02:00
Christian Kirbach
5ea8cdc909 Updated German translation 2016-08-12 18:04:35 +00:00
Michael Natterer
183183effd AUTHORS: commit generated changes 2016-08-12 19:02:06 +02:00
Tiago Santos
683540d763 Updated Portuguese translation 2016-08-10 20:25:16 +00:00
Christian Kirbach
3a5338dd40 Updated German translation 2016-08-10 20:09:46 +00:00
Michael Natterer
f2ff74c08c plug-ins: cleanup in file-webp, mostly simplify the save dialog 2016-08-10 21:49:23 +02:00
Michael Natterer
a9c436ea0b plug-ins: disable the WebP loader/saver in file-gegl
so the new dedicated WebP plug-in is used.
2016-08-10 21:49:23 +02:00
Jehan
8d78a9ad9f authors.xml: adding Nathan Osman.
Commit c1021a3 was co-authored.
2016-08-10 15:12:23 +02:00
Ell
26b978d2a8 app: avoid expensive rotated scale calculation when scale_x == scale_y
Ditto for the rulers' resolution calculation.
2016-08-09 22:28:21 +00:00
Ell
5663daa6e7 app: code layout/typo fixes
The sort of things that only become visible *after* pushing.
2016-08-09 21:55:19 +00:00
Ell
5bdb20c839 app: make rulers rotation aware
Place the rulers' origin at the top-left corner of the canvas
(screen space) bounding box, and set their scale to the image-
space scale along the screen-space horizontal/vertical directions
(in other words, measuring a distance using the rulers should
give the same results as the measure tool; note that rotation
comes into play here only when the horizontal and vertical
image or screen resolutions are different, since otherwise the
scale is direction invariant.)

Make scrollbar step match ruler step under the new behavior.
2016-08-09 21:31:07 +00:00
Ell
720b73ca86 app: fix a few canvas scroll/scale rounding inconsistencies
Apply rounding more consistently across some of the scroll/scale
functions, to avoid annoying one-pixel-off scrollbar size/position
issues.
2016-08-09 21:31:06 +00:00
Ell
e384d533e7 app: don't round results of gimp_display_shell_transform_bounds()
The rounding causes some one-pixel-off errors in the canvas scaling
code; the rest of its callers shouldn't be affected.
2016-08-09 21:31:06 +00:00
Piotr Drąg
2808384363 Updated POTFILES.skip 2016-08-09 22:44:11 +02:00
Benoit Touchette
c1021a3e3a Bug 769651 - Add webp file format support to gimp master
Patch to add webp file format support. Includes supports for
loading/saving, icc profiles, exif, and xmp data.
Co-authored with Nathan Osman.
2016-08-09 21:21:52 +02:00
Balázs Meskó
98e43b9452 Updated Hungarian translation 2016-08-08 22:57:55 +00:00
Jehan
8493711f21 devel-docs: update the icons doc with some of Mitch explanations.
This explains a little better why some systems (i.e. GNOME…) would show
no icons in menus whereas other (i.e. Linux Mint, Windows…) would show
them. GIMP_ICONS_LIKE_A_BOSS environment variable is a developer trick
to show icons in menus anyway to see how things render on such systems.
2016-08-06 02:16:59 +02:00
Jehan
562404f52d devel-docs: information about the icon themes. 2016-08-05 23:43:02 +02:00
Tiago Santos
a047e9a06f Updated Portuguese translation 2016-08-05 10:26:29 +00:00
Michael Natterer
8d902b8df5 Bug 768966 - Keyboard Shortcut hint disappears from tooltips...
...after entering single window mode

This commit fixes dangling pointers in GimpDockColumns, it doesn't fix
the bug but it's a prerequisite. Original patch by Massimo.
2016-08-03 23:44:14 +02:00
Michael Natterer
45922c71c7 plug-ins: fix some formatting in border-average.c 2016-08-03 23:42:37 +02:00
Massimo Valentini
060291c34e Bug 768934: Invisible main menu bar menu...
...items except File menu item in Mint Cinnamon 18

set GtkMenuItem::horizontal-padding = 4
2016-08-03 18:38:03 +02:00
Balázs Meskó
cd792a1303 Updated Hungarian translation 2016-08-02 11:04:24 +00:00
Massimo Valentini
eb287169c4 Bug 735774: Zarro Boogs found for PF_FILENAME - Ambiguous Entry Dialog
Before commit 20523c61ac
PF_FILE used to open a "open file" filechooser dialog.
That commit, while adding the ability to open
a "save dialog" filechooser dialog using PF_FILENAME,
changed the behavior of the existing gimpfu PF_FILE type.

Restore the previous behavior and update the
built-in plug-ins using a save dialog to the new
PF_FILENAME.
2016-08-01 09:06:12 +02:00
Nils Philippsen
ce2e95139a use better prefix for previous patch 2016-07-31 20:53:11 +02:00
Nils Philippsen
454c60970f avoid clashing with remove(3) prototype 2016-07-31 20:50:29 +02:00
Jehan
99a22418b9 Bug 769340 - GIF export dialog: false memory.
"As animation" is checked while being insensitive on a single-layer
image when previously exporting a GIF animation in the same session.
2016-07-31 06:26:48 +02:00
Akkana Peck
df6034884a Fix variable used uninitialized warnings.
Set upper bound to the size of the image, though the size_entry
seems to ignore upper and lower bounds anyway.
2016-07-30 21:17:16 -06:00
Balázs Meskó
ad17eeb895 Updated Hungarian translation 2016-07-30 11:24:15 +00:00
Massimo Valentini
a1a4a067e4 Bug 735774: Zarro Boogs found for PF_FILENAME - Ambiguous Entry Dialog
FileChooser 'action' and 'buttons' should be consistent
and call set_alternative_button_order to be consistent
on platforms using the alternative button order.
2016-07-28 17:57:47 +02:00
Massimo Valentini
f51acf3bfb Bug 761140: importing gimpui module causes plugin query failure
Remove gimp_ui_init call from gimpui module initialization.

Add gimp_ui_init method to gimpui module and call it from
gimpplugin _run method before running the user code.
2016-07-27 19:11:31 +02:00
Tiago Santos
3574814897 Updated Portuguese translation 2016-07-27 06:57:13 +00:00
Michael Schumacher
2f62555d29 Bug 744878 - Python console should not close on Escape key
The code is set up to work without returning early, use a pass instead.
2016-07-25 00:59:04 +02:00
Akkana Peck
a9b85bff5f Bug 744878 - Python console should not close on Escape key 2016-07-25 00:57:07 +02:00
Michael Natterer
f06f691a92 Bug 768952 - Select by color works correctly only in srgb
Separate clearing/creating the image's cached color transforms from
clearing/creating its color profile. Clear the transforms when the
color profile changes, and when image type or precision change. Create
the transforms only on demand, so clearing them multiple times doesn't
trigger any redundant (and expensive) transform creations.
2016-07-25 00:04:12 +02:00
Michael Natterer
4ea518fee3 Bug 768736 - Button order differs in "Quit GIMP" and "Close View"...
...dialogs with modified images

Move the "Discard Changes" button to the right (affirmative) position
in gimp_display_shell_close_dialog().
2016-07-24 23:55:35 +02:00
Jehan
02adc61b05 plug-ins: add a new possible format for TIFF tag warning messages.
Completing fix from commit 3cb70e6.
Checking further into libtiff logs, I can see another version of the
warning message for private tags which was used before libtiff 3.7.
For sake of completeness, let's check against this version of the
warning as well.
2016-07-23 18:35:16 +02:00
Jehan
3cb70e67cc Bug 768950 - TIFF private tags should not generate warnings.
This is a regression from bug 131975. Any unknown tag over 32768 is not
an error. This is a reserved zone where it is allowed to create custom
tags.
The warning indeed changed since libtiff 4.0.0alpha where it has become:
"Unknown field with tag %d (0x%x) encountered"
This explains why it was not recognized anymore.
2016-07-23 18:20:53 +02:00
Jehan
35a0d8ddbb plug-ins: tiff_open() returns a pointer, not a boolean. 2016-07-23 17:41:00 +02:00
Sebastian Pipping
42420c3c4d Bug 769102: fix creation of output directories for inverted icons.
https://bugs.gentoo.org/show_bug.cgi?id=589394
2016-07-23 14:35:23 +02:00
Piotr Drąg
d95744c13f Updated Polish translation 2016-07-22 01:49:56 +02:00
Ell
cd767505fc app: make GimpNavigationView rotation aware
Rotate the viewport marker to correctly reflect the visible part
of the image.
2016-07-21 21:25:49 +00:00
Ell
168b935d43 app: make scale_{to_rectangle,fit_in,fill,shrink_wrap} rotation aware
Use the (screen space) bounding box of the rectangle/canvas for these
functions.
2016-07-21 21:24:06 +00:00
Ell
3fbd47eb2e Bug 768726 - Canvas rotation, flipping applied in image space ...
... not screen space

Flip and rotate the canvas around the center of the viewport,
instead of the center of the image.  Scroll the display as
necessary to keep the center of the viewport fixed during
these operations.  This applies to both the corresponding
menu items, and rotation using Shift+Space.

Likewise, flip the canvas across the designated axis in
screen space, instead of image space.  Rotate the display as
necessary, such that the reflection appears to happen in
screen space, regardless of the current rotation angle of the
canvas.
2016-07-21 21:24:06 +00:00
Ell
bfba49d203 app: make scrollbar limits and scroll-offset clamping rotation aware
Limit the scrollbars by the (screen space) bounding box of the canvas.
Scroll offsets are clamped to 1.5 that.
2016-07-21 21:22:49 +00:00
Ell
3183b894df app: fix gimp_display_shell_untransform_viewport() ...
... when the canvas is rotated.

Use gimp_display_shell_untransform_bounds() instead of transforming
the two endpoints independently.
2016-07-21 21:20:53 +00:00
Ell
1663675031 app: fix gimp_display_shell_un{rotate,transform}_xy() ...
... when the canvas is rotated.

s/fy/fx/ in one of the arguments to cairo_matrix_transform_point().
2016-07-21 21:20:53 +00:00
Michael Natterer
84439a8748 tools: build the SVG tools unconditionally, and clean up the Makefile a bit 2016-07-21 12:20:59 +02:00
Yolanda Álvarez Pérez
4a3b56c5ac Updated Spanish translation 2016-07-21 06:49:45 +00:00
Massimo Valentini
fa621d60bb Bug 768952: Select by color works correctly only in srgb
pass to pickable_contiguous_region_by_color the
color in the same color space as the pickable.
2016-07-19 18:05:09 +02:00
Jehan
7d5ebbe225 app: rename mirror properties to mirror-position-x|y.
As proposed by Mitch. This completes first renaming attempt (commit
08ffc10) with even less ambiguous names.
"horizontal-axis-position" and "vertical-axis-position" are now
respectively "mirror-position-y" and "mirror-position-x".
2016-07-19 14:24:54 +02:00
Jehan
65be37b37b Bug 768871: improve symmetry labels. 2016-07-19 12:34:01 +02:00
Dimitris Spingos (Δημήτρης Σπίγγος)
f46ab933c1 Update Greek translation 2016-07-19 08:39:28 +03:00
Jehan
08ffc1035b app: rename properties s/(horizontal|vertical)-position/\1-axis-position/.
"Horizontal position" and "Vertical position" could be mistaken as
meaning respectively the x and y coordinates, hence the vertical (resp.
horizontal) guide's positions.
The more accurate "horizontal-axis-position" and "vertical-axis-position"
namings are less misleading.
2016-07-18 02:52:37 +02:00
Piotr Drąg
8cf8600b93 Updated Polish translation 2016-07-18 01:31:55 +02:00
Jordi Mas
c1734f375c Fixes to Catalan translation 2016-07-17 21:20:08 +02:00
Piotr Drąg
76484765c0 Add Language headers to po files
Future versions of gettext will fail if this header is missing.
2016-07-17 15:17:42 +02:00
Yolanda Álvarez Pérez
522aa6a024 Updated Spanish translation 2016-07-17 10:38:41 +00:00
Yolanda Álvarez Pérez
50559bd3a3 Updated Spanish translation 2016-07-17 10:36:09 +00:00
Massimo Valentini
aa293ae9a7 Bug 675748: Text tool: text editor inhibits text...
...selection on the canvas

if the editor dialog is active do not copy to the
clipboard the text selected, copy it instead when
selected with keys <Shift>-left/right.
2016-07-16 16:28:35 +02:00
klausstaedtler
3a75d98679 translation: correct 2 typo's in german translation 2016-07-16 15:47:47 +02:00
Christian Kirbach
cabcabf7fd Updated German translation 2016-07-16 11:45:39 +00:00
Michael Natterer
119678eefa configure.ac: post-release version bump to 2.9.5 2016-07-12 22:38:20 +02:00
Michael Natterer
becd85e18a configure.ac: release 2.9.4 2016-07-12 21:16:03 +02:00
Michael Natterer
a802bd2a20 docs, etc: regenerated the default gimprc and the gimprc manpage 2016-07-12 21:08:30 +02:00
Michael Natterer
bb66166e22 app: be smarter about handling the Space key in GimpPopup
Don't remove the GDK_KEY_space in GimpSearchPopup because that's
impossible and removes it from the entire GimpPopup class. Instead,
don't handle the "space -> confirm" binding manually if the focus
widget is a text widget.
2016-07-12 20:35:41 +02:00
Massimo Valentini
23d5944ef8 Bug 768625: gimp-gradient-segment-range-move crashes...
...GIMP invoked with end-segment < 0

correct a typo
2016-07-10 17:21:32 +02:00
Massimo Valentini
fede5ccba9 Bug 768519: File->Open Recent does not show...
... recently opened xcf files

be consistent regarding xcf files mime type
image/x-xcf is used in the installed gimp.desktop
use it everywhere.
2016-07-08 18:38:19 +02:00
Michael Natterer
954f50a097 app: fix description of GIMP_COLOR_PROFILE_POLICY_CONVERT in the header
it was only fixed in the generated .c file.
2016-07-08 15:07:41 +02:00
Michael Natterer
8b685e7bfe app: move PROP_PERFECT_MOUSE to the end of the enum in GimpDisplayConfig 2016-07-08 11:50:27 +02:00
Jehan
7fb07e1da1 app: typo fix - s/widht/width/ 2016-07-07 02:28:44 +02:00
Michael Natterer
7b1401293d app: add GIMP_CONFIG_PARAM_IGNORE to the obsolete perfect-mouse setting 2016-07-06 20:29:56 +02:00
Michael Natterer
d3de67a9de app: always return a profile from gimp_drawable_transform_buffer_*()
Assign the buffer_profile return value early, so it doesn't stay
uninitialized when we bail out half way through the functions.
2016-07-06 20:29:56 +02:00
Marco Ciampa
349a18cb5a Updated Italian translation 2016-07-06 19:19:56 +02:00
Michael Natterer
eae2261f16 app: tag the symmetry properties as pixel-coordinate/pixel-distance
so they get the proper soft limits in the generated GUI. Also rename
some properties for consisency, and add some blank lines for better
readability.
2016-07-06 12:37:10 +02:00
Michael Natterer
a96c273621 app: add smarter soft boundaries for GimpSpinScale widgets
Pass a GeglRectangle to all gimp_prop_gui_*() functions, and set
the soft limits to the rectangle's extents if the GParamSpec
metadata's "unit" is "pixel-coordinate" or "pixel-distance".

In GimpSymmetryEditor, pass the image extents, in GimpOperationTool
pass the drawable extents.
2016-07-06 12:19:40 +02:00
Michael Natterer
ecfa0abca3 NEWS: some fixes, capitalization of headers 2016-07-06 12:17:27 +02:00
Massimo Valentini
f7569cad82 Bug 767345: Color Erase Blend Mode Do not working in Paint tools correctly (exception Bucket fill Tool) 2016-07-05 18:15:10 +02:00
klausstaedtler
8631dda659 icons: remove Prototype directory. Many of the icons there are in use or
superseded in iconswip.
2016-07-04 20:52:33 +02:00
Michael Natterer
8c2c22ccb4 app: don't pass a NULL profile to gimp_image_convert_color_profile()
In gimp_image_import_color_profile(), when converting
non-interactively, pass the image's built-in profile.
2016-07-04 12:28:42 +02:00
Massimo Valentini
a93cea0ef5 Bug 768273: Rapid sequence of commands causes crash
do not access progress object after destruction.

silence warnings like:

(gimp-2.8:1): GLib-GObject-WARNING **: gsignal.c:2635: instance '0x17083f0' has no handler with id '56146'

(gimp-2.8:1): Gimp-Plug-In-CRITICAL **: plug_in_icc_profile_apply_rgb: assertion 'progress == NULL || GIMP_IS_PROGRESS (progress)' failed
2016-07-03 18:26:37 +02:00
Hartmut Kuhse
2e06258d03 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2016-07-03 12:14:26 +02:00
klausstaedtler
0111c196f3 icons: scalable&color-scalable
replace
gimp-tool-preset

the new icon reflects that it is used in fact for an editor (and not a static setting)
(even better would be gimpdynamicseditor would use a different icon than
gimptoolpreseteditor)

consequently
gimp-prefs-folders-tool-presets
has changed too

some other minor corrections on other icons
2016-07-02 18:18:05 +02:00
Jehan
38f1b50a15 app: type s/Thia/This/. 2016-07-01 19:50:13 +02:00
Jehan
e8aac6d5ac app: do not allow mandala center position out of the image dimensions. 2016-07-01 14:58:24 +02:00
Daniel Mustieles
bf6d45eafe Updated Spanish translation 2016-07-01 12:21:57 +00:00
Jehan
4e6d320591 app: remove current implementation of GimpSpinScale soft bounds.
Mitch gets a better idea to deal with soft limits (i.e. min/max values
different from the property min/max) applied to a spin scale created by
gimp_prop_spin_scale_new().
So let's just remove the current implementation (using locale data on
the GimpConfig object). The symmetry spin scales are back with crazy
huge maximums, which makes quite a horrible GUI, but this is only
temporary until Mitch commits his new implementation.
2016-07-01 13:58:55 +02:00
Michael Natterer
58dd48564a app: simplify and fix paint dynamics editor sensitivity
Simplify because it's now a one-liner, fix because I broke it with
the previous commit.
2016-07-01 12:32:52 +02:00
Ell
f4e8cf29f2 app: add missing cleanup to the previous commit 2016-06-30 18:55:09 +00:00
Ell
bd5544394b app: eliminate double application of the selection mask ...
... in gimp_drawable_bucket_fill()

gimp_drawable_apply_buffer() already takes the selection mask into
account.  Intersecting the selection mask with the fill region
prior to that leads to wrong (too low) alpha values, in general,
when partial selection is involved.

This commit eliminates the intersection of the fill region and
selection mask data before the apply_buffer() call, although it
does calculate the intersection of their bounds, to avoid
processing regions that won't be visible anyway.
2016-06-30 18:42:55 +00:00
Michael Natterer
af88e98afd Bug 767348 - Make Paint Dynamics icon customizable
Add an icon button to the dynamics editor's "mapping matrix" page. It
looks just as ugly as the icon button of the tool preset editor, the
two should be visually improved together.
2016-06-30 11:38:03 +02:00
Michael Natterer
b3c1867ba1 Revert "Bug 768030 - keep same button placement on quit and close image dialogs."
That setting affects all dialogs.

This reverts commit 5e29293ef7.
2016-06-30 08:11:40 +02:00
Jehan
c73560b1a1 app: tab cleanup. 2016-06-30 03:08:34 +02:00
Jehan
5e29293ef7 Bug 768030 - keep same button placement on quit and close image dialogs.
The code to reorder buttons was actually already there, yet the
alternative order was not taken into account unless the setting
"gtk-alternative-button-order" is TRUE.
2016-06-30 02:46:07 +02:00
Jehan
a10b688b64 app: rename "update-ui" signal to "gui-param-changed".
Therefore having a signal name more in line with other signals. This
reflects the property flag's naming: GIMP_SYMMETRY_PARAM_GUI.
2016-06-28 20:04:38 +02:00
Jehan
f713c86d9f app: disconnect symmetries' callbacks connected to image signals...
... on symmetry destruction.
Use g_signal_connect_object() which does this automatically.
2016-06-28 19:30:44 +02:00
Massimo Valentini
b37ca78151 Bug 768086: Inconsistent text-layer focusing from text style editor
do not place cursor when it is already there
2016-06-28 18:15:52 +02:00
Ell
8e9a89d0b9 app: always use the image's mask format for quick mask
Previously, activating quick mask while the selection was empty
would use the image's channel format for the mask, instead of its
mask format; these formats are different for sRGB images.
2016-06-28 13:30:49 +00:00
Daniel Korostil
b20ddc2555 Updated Ukrainian translation 2016-06-28 13:29:18 +03:00
Massimo Valentini
ee860a0c30 Bug 767935: Foreground Select Freezes Gimp if accidentally...
...clicking outside canvas
2016-06-27 17:25:01 +02:00
Massimo Valentini
1e07de1858 app: remove empty text layer when it becomes inactive
only if auto_rename is TRUE and text->box_mode is not
FIXED
2016-06-27 16:48:19 +02:00
Massimo Valentini
4eef125153 Bug 766706: Deleting text layer content does not clean canvas 2016-06-27 16:48:14 +02:00
Christian Kirbach
5ca2794d40 Updated German translation 2016-06-26 09:27:27 +00:00
Richard Kreckel
dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Christian Kirbach
6f3c251eca Updated German translation 2016-06-25 12:14:47 +00:00
Massimo Valentini
aa8d29deac Bug 767476: Previously bolded font un-bolds on edit, cannot be undone 2016-06-24 12:39:01 +02:00
Ell
763062890b app: fix wrong initialization in gimp_operation_{grow,shrink}_process()
s/radius_x/radius_y/ in the max buffer initialization.  Lead to
occasional wrong results when radius_y > radius_x.
2016-06-24 01:14:51 +00:00
Ell
3232f38697 app: align gimp_operation_shrink_process() with 2.8
radius_x/radius_y got swapped in a few spots, which lead to
segfaults and such when they weren't equal.
2016-06-24 01:14:51 +00:00
Tiago Santos
86159a5d27 Updated Portuguese translation 2016-06-22 13:31:41 +00:00
Tiago Santos
09c5723f61 Updated Portuguese translation 2016-06-22 13:27:03 +00:00
Shmuel H
6d804bf9ae Bug 767873 - (CVE-2016-4994) Multiple Use-After-Free when parsing...
...XCF channel and layer properties

The properties PROP_ACTIVE_LAYER, PROP_FLOATING_SELECTION,
PROP_ACTIVE_CHANNEL saves the current object pointer the @info
structure. Others like PROP_SELECTION (for channel) and
PROP_GROUP_ITEM (for layer) will delete the current object and create
a new object, leaving the pointers in @info invalid (dangling).

Therefore, if a property from the first type will come before the
second, the result will be an UaF in the last lines of xcf_load_image
(when it actually using the pointers from @info).

I wasn't able to exploit this bug because that
g_object_instance->c_class gets cleared by the last g_object_unref and
GIMP_IS_{LAYER,CHANNEL} detects that and return FALSE.
2016-06-22 12:47:13 +02:00
Carol Spears
245bbbc107 Bug 623886 - CancelError exception support for gimpfu.py 2016-06-22 01:22:08 +02:00
Jehan
e4cf16e53a NEWS: some cleanups.
Remove trailing spaces.
Change some UK English into US English (s/grey/gray/ and
s/artefact/artifact/).
Some minor other English bugs.
2016-06-21 14:33:49 +02:00
Alexandre Prokoudine
df7431750a Update NEWS for GIMP 2.9.4 2016-06-21 02:18:10 +03:00
klausstaedtler
31dd427140 icons: scalable&color-scalable
gimp-char-picker 16x16 was missing

replace with better fitting icons:

gimp-image-reload
2016-06-20 20:54:43 +02:00
klausstaedtler
06b4a38157 icons: color-scalable
replace with better fitting icons

gimp-edit

intended to replace gtk-edit too
2016-06-20 18:49:21 +02:00
klausstaedtler
e36846124c icons: color-scalable
replace with better fitting icons

gimp-prefs-folders-mypaint-brushes

add 16x16 png's
2016-06-20 17:35:32 +02:00
klausstaedtler
5684840f2d icons: scalable&color-scalable
replace with better fitting icons

gimp-shred
gimp-path-up
gimp-path-down
gimp-path-new
gimp-path-delete
2016-06-19 22:30:28 +02:00
Tiago Santos
b26f92e36f Updated Portuguese translation 2016-06-18 13:24:30 +00:00
Tiago Santos
50d4e702a8 Updated Portuguese translation 2016-06-18 12:58:01 +00:00
Michael Natterer
1df2e8c9d8 configure.ac, sanity.c: require babl >= 0.1.18 and GEGL >= 0.3.8 2016-06-16 20:42:48 +02:00
A S Alam
f225e19db0 Completed Punjabi Translation 2016-06-15 22:08:53 -05:00
Michael Natterer
f3b234f543 Bug 767663 - Images appear completely black when images dockable is visible
(file_open_sanitize_image): invalidate the entire projection after
loading in order to enforce its construction from completely loaded
layers.
2016-06-16 00:57:31 +02:00
Jehan
cafa912c98 app: allow locale lower and upper values in gimp_prop_spin_scale_new().
Currently a GimpSpinScale created with gimp_prop_spin_scale_new() will
use the associated property's lower and upper values.
Unfortunately these generic values may not be always relevant and we
may want to construct a spin scale UI adapted to the current image.
For instance, several symmetry painting have a x/y property which has
to stay within the image's dimension, but changing the property's lower
and upper values would affect the symmetry on the class level (i.e. for
all similar symmetries on all images).
Let's allow setting data on object with key "property-name:min|max" to
provide locale min/max values specifically for this object.
This is used only on the symmetry dock for now, but could be used as
well on GEGL op UIs.
2016-06-14 16:52:52 +02:00
Jehan
4f0ee8b9b5 INSTALL: pretty-fix and conjugation error. 2016-06-14 00:07:12 +02:00
Jehan
8ac1e407c5 Bug 763202 - Create $XDG_DATA_HOME if it doesn't exist.
This has shown a problem especially on non-Linux platforms since XDG
is more of a Linux standard.
2016-06-13 03:34:26 +02:00
Jehan
93d9265f0a libgimpwidgets: $XDG_DATA_HOME/icc/ is a common profile storage.
Even though many documentations will tell of $XDG_DATA_HOME/color/icc/,
some programs actually store color profiles in $XDG_DATA_HOME/icc/.
This is at least the case for GNOME color management.
Test it after $XDG_DATA_HOME/color/icc/ but before $HOME/.color/icc/.
2016-06-13 03:16:59 +02:00
Jehan
3618df0999 configure: run AX_PROG_CC_FOR_BUILD before AM_PROG_CC_C_O.
It was working fine for me, but someone had the error:
error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O
/usr/share/aclocal/ax_prog_cc_for_build.m4:38: AX_PROG_CC_FOR_BUILD is expanded
from...
I can indeed see that AX_PROG_CC_FOR_BUILD code runs AC_PROG_CC again.
So let's make sure this is run before AM_PROG_CC_C_O.
Thanks to Francesco Riosa for reporting the bug.
2016-06-13 01:53:07 +02:00
Jehan
8159aa04a9 tools: compute-svg-viewbox is not to be built for the time being.
librsvg has too many bugs and is not reliable for vectorial icon
extraction. I keep the code around for when it changes, but right now,
it is dead code.
2016-06-12 14:10:15 +02:00
Jehan
fec8d46002 icons: wrong directory created.
Likel copy-paste typo.
2016-06-12 13:38:22 +02:00
Jehan
18b0468cc9 tools: invert-svg is a build-only tool.
It must be built with a native compiler and native libs only.
2016-06-12 04:25:53 +02:00
Jehan
500589e97c configure: fix linking with ExcHndl for Dr. MinGW. 2016-06-12 04:19:59 +02:00
Jehan
ff5587cd53 app: fix win32 build with Dr. MinGW.
GIMPDIR and GIMP_USER_VERSION macros need to be defined in app/ as well!
2016-06-12 04:04:11 +02:00
Jehan
81a062f06f libgimp: fix Win32 build with Dr. MinGW.
GIMPDIR and GIMP_USER_VERSION macros need to be defined in libgimp now.
2016-06-12 03:36:05 +02:00
Jehan
0b4fa971b3 configure: AC_CHECK_FILE() does not work when cross-compiling.
As autoconf docs say: "like most Autoconf macros, they test a feature
of the host machine, and therefore, they die when cross-compiling."
Therefore use shell-type file existence instead which works for all
cases. This fixes configure failing with:
"error: cannot check for file existence when cross compiling"
2016-06-12 02:45:44 +02:00
Jehan
24334f3e59 INSTALL, configure: add Dr. MinGW information...
... in the INSTALL file, but also in the summary of optional
dependencies at the end of the configure script.
2016-06-11 23:35:39 +02:00
Piotr Drąg
3a9117dc97 Updated Polish translation 2016-06-11 17:43:39 +02:00
Jehan
5f19ef41c9 Bug 765040 - GIMP not remembering the order of dockable dialogs.
Docks position is relevant when saving a session, so we should not
simply append it to the end of the docks list when we move a dock.
2016-06-11 16:51:21 +02:00
Jehan
02b1bd494c icons: missing exported bitmap icon. 2016-06-10 15:48:02 +02:00
Jehan
8c6fd83cd2 icons: 22/gimp-indent.png not svg.
Sorry, my bad!
2016-06-10 15:39:43 +02:00
Jehan
1056016e67 icons, libgimpwidgets: s/gimp-justify-block/gimp-justify-fill/.
We may have to rename them later into standard GTK+ names.
But anyway, the right name would be (gtk|gimp)-justify-fill.
Cf. bug 759904.
2016-06-10 15:13:36 +02:00
Jehan
705c946dda icons: gimp-indent icons were not installed. 2016-06-10 13:50:47 +02:00
Jehan
3c76796e11 app: fix various typos and missing commas. 2016-06-10 13:50:47 +02:00
Jehan
eef30a2702 icons, libgimpwidgets: s/gimp-intend/gimp-indent/. 2016-06-10 13:50:47 +02:00
Jehan
c9217ca386 libgimpwidgets: s/GIMP_STOCK_FILE_MANGER/GIMP_STOCK_FILE_MANAGER/...
... and a few missing include to gimpicons.h.
2016-06-10 13:50:47 +02:00
Jehan
fbdc20f862 icons: fix broken icon names. 2016-06-10 13:50:46 +02:00
klausstaedtler
cb7d93d556 icons: Bug 759904
add
gimp-buffer

remove
gimp/libgimpwidgets/gimpicons.h:#define GIMP_STOCK_BUFFER                   GTK_STOCK_PASTE

patch
gimpicons.c
gimpicons.h
2016-06-10 13:50:46 +02:00
klausstaedtler
f87a8d27dd icons: Bug 759904
add
gimp-justify-block
gimp-justify-center
gimp-justify-left
gimp-justify-right

patch
gimpicons.c
gimpicons.h


to get active and replace gtk-justify-*
'gimp/app/tools/gimptextoptions.c:  box = gimp_prop_enum_icon_box_new (config, "justify", "gtk-justify", 0, 0);
must be patched
2016-06-10 13:50:46 +02:00
klausstaedtler
1199a7e6fb icons: Bug 759904
add
gimp-document-recent


patch: replace "document-open-recent" by "gimp-document-recent" (or GIMP_STOCK_DOCUMENT_RECENT)


gimp/app/dialogs/dialogs.c:            N_("History"), N_("Document History"), "document-open-recent",
gimp/app/actions/documents-actions.c:  { "documents-popup", "document-open-recent",
gimp/app/actions/dialogs-actions.c:  { "dialogs-document-history", "document-open-recent",


patch
gimpicons.c
gimpicons.h
2016-06-10 13:50:46 +02:00
klausstaedtler
b79e754480 icons: Bug 759904
add
gimp-open

patch: replace "document-open" by "gimp-open" (or GIMP_STOCK_OPEN)

gimp/plug-ins/imagemap/imap_browse.c:   icon = gtk_image_new_from_icon_name ("document-open", GTK_ICON_SIZE_BUTTON);
gimp/libgimpwidgets/gimpfileentry.c:  image = gtk_image_new_from_icon_name ("document-open", GTK_ICON_SIZE_BUTTON);
gimp/app/actions/text-editor-actions.c:  { "text-editor-load", "document-open",
gimp/app/actions/vectors-actions.c:  { "vectors-import", "document-open",
gimp/app/actions/patterns-actions.c:  { "patterns-open-as-image", "document-open",
gimp/app/actions/documents-actions.c:  { "documents-open", "document-open",
gimp/app/actions/brushes-actions.c:  { "brushes-open-as-image", "document-open",
gimp/app/actions/text-tool-actions.c:  { "text-tool-load", "document-open",
gimp/app/actions/file-actions.c:      entries[i].icon_name      = "document-open";
gimp/app/widgets/gimpsettingsbox.c:                                     "document-open",
gimp/app/widgets/gimpsettingseditor.c:                            "document-open",

patch
gimpicons.c
gimpicons.h
2016-06-10 13:50:46 +02:00
klausstaedtler
0ae2422c77 icons: Bug 759904
patch: replace "edit-copy" by "gimp-clipboard" (or GIMP_STOCK_CLIPBOARD)

gimp/app/actions/palettes-actions.c:  { "palettes-copy-location", "edit-copy",
gimp/app/actions/mypaint-brushes-actions.c:  { "mypaint-brushes-copy-location", "edit-copy",
gimp/app/actions/vectors-actions.c:  { "vectors-copy", "edit-copy",
gimp/app/actions/dynamics-actions.c:  { "dynamics-copy-location", "edit-copy",
gimp/app/actions/tool-presets-actions.c:  { "tool-presets-copy-location", "edit-copy",
gimp/app/actions/edit-actions.c:  { "edit-copy", "edit-copy",
gimp/app/actions/patterns-actions.c:  { "patterns-copy-location", "edit-copy",
gimp/app/actions/documents-actions.c:  { "documents-copy-location", "edit-copy",
gimp/app/actions/brushes-actions.c:  { "brushes-copy-location", "edit-copy",
gimp/app/actions/gradients-actions.c:  { "gradients-copy-location", "edit-copy",

patch: replace "edit-copy" by "gimp-duplicate" (or GIMP_STOCK_DUPLICATE)

gimp/app/actions/edit-actions.c:  { "edit-named-copy", "edit-copy", duplicate
gimp/app/actions/text-tool-actions.c:  { "text-tool-copy", "edit-copy", duplicate
2016-06-10 13:50:46 +02:00
klausstaedtler
b614734dd4 icons: symbolic revert gimp-prefs-color-management
to avoid confusion with new gnome control-center use the 'old' symbolic
2016-06-10 13:50:46 +02:00
klausstaedtler
1b13a41c14 icons: add forgotten update icon-list.mk 2016-06-10 13:50:46 +02:00
klausstaedtler
62a4a714dc icons: add missing gimp-pattern
patch
gimpicons.c
gimpicons.h
2016-06-10 13:50:46 +02:00
klausstaedtler
312691312d icons: Bug 759904
add
gimp-shred

patch: replace "edit-clear" by "gimp-shred" (or GIMP_STOCK_SHRED)

gimp/app/actions/documents-commands.c:                                    "edit-clear",
gimp/gimp/app/actions/edit-actions.c:  { "edit-undo-clear", "edit-clear",
gimp/app/actions/documents-actions.c:  { "documents-clear", "edit-clear",
gimp/app/dialogs/preferences-dialog.c:  button = prefs_button_add ("edit-clear", shred

add
gimp-edit-clear

patch: replace "edit-clear" by "gimp-edit-clear" (or GIMP_STOCK_EDIT_CLEAR)

gimp/app/actions/text-editor-actions.c:  { "text-editor-clear", "edit-clear",
gimp/app/actions/edit-actions.c:  { "edit-clear", "edit-clear",
gimp/app/actions/error-console-actions.c:  { "error-console-clear", "edit-clear",
gimp/app/actions/text-tool-actions.c:  { "text-tool-clear", "edit-clear",
gimp/app/widgets/gimptextstyleeditor.c:  image = gtk_image_new_from_icon_name ("edit-clear", GTK_ICON_SIZE_MENU);
gimp/app/dialogs/preferences-dialog.c:  button = prefs_button_add ("edit-clear",


patch
gimpicons.c
gimpicons.h

update
icon-list.mk
2016-06-10 13:50:45 +02:00
klausstaedtler
71bedb70f6 icons: Bug 759904
patch: replace "window-close" by "gimp-quit" (or GIMP_STOCK_QUIT)

gimp/app/actions/dock-actions.c:  { "dock-close", "window-close",
gimp/app/actions/view-actions.c:  { "view-close", "window-close",
gimp/app/actions/dockable-actions.c:  { "dockable-close-tab", "window-close",

patch: replace "gtk-directory" by "gimp-file-manager" (or GIMP_STOCK_FILE_MANAGER)

gimp/libgimpwidgets/gimpfileentry.c:  image = gtk_image_new_from_icon_name ("gtk-directory", GTK_ICON_SIZE_BUTTON);
gimp/app/actions/palettes-actions.c:  { "palettes-show-in-file-manager", "gtk-directory",
gimp/app/actions/mypaint-brushes-actions.c:  { "mypaint-brushes-show-in-file-manager", "gtk-directory",
gimp/app/actions/dynamics-actions.c:  { "dynamics-show-in-file-manager", "gtk-directory",
gimp/app/actions/tool-presets-actions.c:  { "tool-presets-show-in-file-manager", "gtk-directory",
gimp/app/actions/patterns-actions.c:  { "patterns-show-in-file-manager", "gtk-directory",
gimp/app/actions/documents-actions.c:  { "documents-show-in-file-manager", "gtk-directory",
gimp/app/actions/brushes-actions.c:  { "brushes-show-in-file-manager", "gtk-directory",
gimp/app/actions/gradients-actions.c:  { "gradients-show-in-file-manager", "gtk-directory",


add
gimp-rivert

patch
gimpicons.c
gimpicons.h

patch: replace "document-revert" by "gimp-revert" (or GIMP_STOCK_REVERT)

gimp/app/actions/tool-options-actions.c:  { "tool-options-restore-preset-menu", "document-revert",
gimp/app/actions/tool-presets-actions.c:  { "tool-presets-restore", "document-revert",
gimp/app/actions/gradient-editor-actions.c:  { "gradient-editor-load-left-color", "document-revert",
gimp/app/actions/gradient-editor-actions.c:  { "gradient-editor-load-right-color", "document-revert",
gimp/app/widgets/gimptooloptionseditor.c:    gimp_editor_add_button (GIMP_EDITOR (editor), "document-revert",
gimp/app/widgets/gimpdataeditor.c:                            "document-revert",
2016-06-10 13:50:45 +02:00
klausstaedtler
b4463ad22f icons: Bug 759904
patch: replace "document-save" by "gimp-save" (or GIMP_STOCK_SAVE) and "document-save-as" by "gimp-save-as" (or GIMP_STOCK_SAVE_AS)


gimp/plug-ins/gimpressionist/presets.c:                        gtk_image_new_from_icon_name ("document-save",
gimp/libgimp/gimpexport.c:                        gtk_image_new_from_icon_name ("document-save",
gimp/app/actions/tool-options-actions.c:  { "tool-options-save-preset-menu", "document-save",
gimp/app/actions/vectors-actions.c:  { "vectors-export", "document-save",
gimp/app/actions/error-console-actions.c:  { "error-console-save-all", "document-save-as",
gimp/app/actions/error-console-actions.c:  { "error-console-save-selection", "document-save-as",
gimp/gimp/app/actions/gradient-editor-actions.c:  { "gradient-editor-save-left-color", "document-save",
gimp/app/actions/gradient-editor-actions.c:  { "gradient-editor-save-right-color", "document-save",
gimp/gimp/app/actions/gradients-actions.c:  { "gradients-save-as-pov", "document-save-as",
gimp/gimp/app/widgets/gimptooloptionseditor.c:    gimp_editor_add_button (GIMP_EDITOR (editor), "document-save",
gimp/app/widgets/gimpdevicestatus.c:    gimp_editor_add_button (GIMP_EDITOR (status), "document-save",
gimp/app/widgets/gimpsettingsbox.c:                                     "document-save",
gimp/app/widgets/gimpsettingseditor.c:                            "document-save",
gimp/gimp/app/widgets/gimpdataeditor.c:                            "document-save",
gimp/app/dialogs/preferences-dialog.c:  button = prefs_button_add ("document-save",
gimp/app/dialogs/preferences-dialog.c:  button = prefs_button_add ("document-save",
gimp/app/dialogs/preferences-dialog.c:  button = prefs_button_add ("document-save",
gimp/app/dialogs/preferences-dialog.c:  button = prefs_button_add ("document-save",
2016-06-10 13:50:45 +02:00
klausstaedtler
3842c58169 icons: Bug 759904
add
gimp-image-open
gimp-image-reload
gimp-close-all
gimp-save-as
gimp-quit
gimp-file-manager
gimp-clipboard

patch
file-actions.c
2016-06-10 13:50:45 +02:00
klausstaedtler
2696611d1e icons: Bug 759904
add
gimp-group-layer

patch
gimpgrouplayer.c
2016-06-10 13:50:45 +02:00
klausstaedtler
628e9feb19 icons: Bug 759904 revert patch file-pdf-save.c 2016-06-10 13:50:45 +02:00
klausstaedtler
8b1ea3cc13 icons: Bug 759904
add
gimp-cancel
gimp-save

patch
gimpstatusbar.c
fil-pdf-save.c
gimpicons.c
gimpicons.h
2016-06-10 13:50:45 +02:00
klausstaedtler
37c3c01cf1 icons: Bug 759904
add
gimp-next
gimp-previous


patch
gimpcolordisplayeditor.c
gimpcontrollerlist.c
dialog.c
tips-dialog.c
gimpicons.c
gimpicons.h
2016-06-10 13:50:44 +02:00
klausstaedtler
022cd64105 icons: Bug 759904
add
gimp-intend

patch
gimptextoptions.c
gimpicons.c
gimpicons.h
2016-06-10 13:50:44 +02:00
klausstaedtler
4be77e0418 icons: fix typo 2016-06-10 13:50:44 +02:00
klausstaedtler
ba9d11cdc7 icons: add missing prefs icons
gimp-prefs-image-windows-appearance
gimp-prefs-image-windows-snapping
gimp-prefs-folders-mypaint-brushes


patch
app/dialogs/preferences-dialog.c
2016-06-10 13:50:44 +02:00
klausstaedtler
210a834f4c icons: Bug 759904
patch
gimpfont.c
2016-06-10 13:50:44 +02:00
klausstaedtler
b55b4ac38d icons: Bug 759904
add
gimp-font

patch
gimpicons.c
gimpicons.h
2016-06-10 13:50:44 +02:00
klausstaedtler
92a9117ae0 icons: Bug 759904
add
gimp-path-delete
gimp-path-new
gimp-path-up
gimp-path-down

patch
gimppatheditor.c
gimpicons.c
gimpicons.h
2016-06-10 13:50:43 +02:00
Piotr Drąg
f0fbc75b52 Updated Polish translation 2016-06-10 11:57:32 +02:00
Yolanda Álvarez Pérez
114f35c438 Updated Spanish translation 2016-06-10 07:06:38 +00:00
Jehan
a5bccf3080 configure: do not consider the target architecture.
From autoconf docs:
> ‘$target’ is for use by a package creating a compiler or similar.
> For ordinary packages it's meaningless and should not be used.
Since GIMP is not a compiler, nor anything similar, let's not make
anything from this information.
Thanks to Quentin Glidic for reporting the issue (on libmypaint bug
tracker, since it was using nearly the same code there too).

This commit also improves configure output regarding host detection,
and uses dedicated canonical variables $host_cpu/os instead of the full
value.
2016-06-09 19:56:34 +02:00
Alexandre Prokoudine
6eb777a615 Bring soft-proofing consistence to blurbs 2016-06-08 23:46:09 +03:00
Michael Natterer
23c3cf7249 app: add gimp_gegl_node_get_format()
which is a wrapper around gegl_operation_get_format().
2016-06-08 00:04:50 +02:00
Michael Natterer
56596da23a app: support premultiplied formats in some gimp_babl functions 2016-06-08 00:03:48 +02:00
Michael Natterer
8634418be5 libgimpconfig: commit regenerated enums.c file 2016-06-08 00:02:03 +02:00
Michael Natterer
06aa05e422 libgimpcolor: gimp_color_profile_get_format: support premultiplied formats 2016-06-08 00:00:36 +02:00
Alexandre Prokoudine
3e01419b0c Introduce consistent use of 'soft-proofing' in user-visible messages 2016-06-08 00:21:51 +03:00
Michael Natterer
583887f986 app: use combo boxes for the color color management optimize settings
because they can properly say "Speed vs. Precision" which makes
more sense than a toggle button.
2016-06-07 13:08:18 +02:00
Dimitris Spingos
718c0caac2 Updated Greek translation 2016-06-07 13:19:38 +03:00
Piotr Drąg
e8816ba7da Updated Polish translation 2016-06-07 11:39:55 +02:00
Michael Natterer
4b18b1ac39 libgimpconfig: rename gimpcolorconfig-enums.[ch] to gimpconfigenums.[ch]
It makes no sense to do this differently than in all other of our
libraries.
2016-06-06 21:05:16 +02:00
Massimo Valentini
7858eb3df2 Bug 766683: Burn Mode on Paint tools are producing artefacts
This operation produces NAN (0 / 0) and division
by zero when a layer component is zero.

Inline CLAMP to make sure it swallows also NAN.
A NAN is mapped to 1 for backward compatibility.
[the 2variate function comp (in[b], layer[b]) is
discontinuous at layer[b] = 0]
2016-06-06 18:53:22 +02:00
Jehan
a1f0197098 app: do not commit IM preedit text after switching text layer.
Whereas some IME would just cancel any preediting on IM context reset,
others would commit their preedit (for instance Ibus-Hangul).
Unfortunately it is not necessarily immediate, even after
gtk_im_context_reset() and gtk_im_context_focus_out(), so when switching
text layer, any preedit text is committed on the new layer.
Let's recreate the IM context on abort to make sure we don't share any
input between text layers.
2016-06-06 15:03:20 +02:00
Jehan
97b537d496 app: remove preedit text on abort.
The IM should be the one taking care of it by sending the proper
signals, and I would assume this should be done when we run:
gtk_im_context_focus_out ().
But it doesn't and leaves a dangling styled preedit text on leaving
a text layer, either because the IME is not properly implemented (not
reacting to the context leaving the focused widget), or GTK+2 is bugged,
or maybe we just don't understand exactly how this all works. Anyway
let's explicitly clean preedit text, not waiting for preedit-end or
commit signals on IM abort.
2016-06-06 15:03:20 +02:00
Yolanda Álvarez Pérez
9916353394 Updated Spanish translation 2016-06-06 06:50:54 +00:00
Michael Natterer
a743ae712b libgimpconfig: add "optimize" options for display and softproofing
Honor them in gimp_widget_get_color_transform() and make them
configurable in prefs. The code and GUI avoid the negation in
the lcms "NOOPTIMIZE" flag.
2016-06-06 01:15:26 +02:00
Michael Natterer
8abf1aab5e libgimpconfig: add getters for all GimpColorConfig members
and use them instead of peeking the public object struct.
2016-06-05 23:58:02 +02:00
Jehan
bea4b5e4db app: the preedit_end mark must be created with right gravity.
With left gravity, the mark is moved back 1 character to the left of the
cursor, whereas with right gravity, it is right after newly-inserted
text. This resulted sometimes into non-deleted preedit characters.
I don't understand all the subtleties since the problem only occurred
for the first character of a text layer, at least in my tests.
Anyway now it should be good.
2016-06-05 23:20:06 +02:00
Michael Natterer
741be87d0f app: don't let display color management settings affect file import
gimp_image_import_color_profile(): get the intent and bpc settings
from the profile import dialog instead of asking the global
GimpColorConfig.
2016-06-05 22:36:52 +02:00
Michael Natterer
372a985d2b plug-ins: link file-compressor against GIO
mkgen.pl: add support for "gio => 1" in plug-in-desf.pl,

Regenerate Makefile.am
2016-06-05 22:10:56 +02:00
Jehan
7b9a7439dc Bug 767269 - Japanese IM undoes too much.
Japanese IME emits the preedit-commit before preedit-end (Hangul or
Unicode don't, but we could assume other IMEs may be doing the same).
As a consequence, the undo step was not pushed, thus breaking undo
history and consistency.
The solution is to simulate preediting end then restart when a commit
happens during preediting.
2016-06-05 21:54:29 +02:00
Michael Natterer
2e9733859c modules: hardcode the CMYK selector's conversion parameters
Always use intent=PERCEPTUAL and bpc=TRUE, taking the settings from
the global GimpColorConfig is wrong.
2016-06-05 21:32:42 +02:00
Jehan
acc570d929 app: code reorganization in gimptexttool.c.
Since commit b593462, gimp_text_tool_apply() is a semi-public function
(only to be used from gimptexttool-editor.c). Therefore move it to the
"public functions" section.
2016-06-05 21:06:29 +02:00
Jehan
b5934625de Bug 751333 - Crash when moving cursor with ibus "Hangul" input method.
Commit cd147a4 reintroduced the crash. The culprit was the idle function
gimp_text_tool_apply_idle() which may not have been processed when
gimp_text_tool_move_cursor() is called, resulting in inconsistencies
between the text in the text tool's pango layout and its buffer.
Force any pending text commits to be applied before moving the cursor.
2016-06-05 21:04:18 +02:00
Massimo Valentini
ffd97c0eb8 Bug 766886: the save bar keeps saving even whit a full bar
get_file_info is copied from plug-ins/common/file-raw-data.c
2016-06-05 18:52:47 +02:00
Michael Natterer
fcf5b708e5 libgimpwidgets: rename gimp_color_config_get_printer_color_profile()
to gimp_color_config_get_simulation_color_profile(), along with
various internal "printer" strings. Also reduce the number of
user-visible "print" stuff from the preferences color management page.
2016-06-05 18:00:24 +02:00
Michael Natterer
b4f34375b7 Bug 767062 - Lags when zooming or dragging zoomed image (cmsFLAGS_NOOPTIMIZE)
Use cmsFLAGS_NOOPTIMIZE only for actual image buffer or single color
transforms, but not for previews or the image display. Makes things a
lot more responsive again.
2016-06-05 16:50:02 +02:00
Michael Natterer
cd147a4a48 app: fix various undo- and preedit-related text tool issues
In the text tool editor code, connect to GtkIMContext::preedit-start
and introduce a boolean text_tool->preedit_active which indicates that
a preedit is going on.

Remove the new preedit-removal code from gimp_text_tool_reset_im_context()
because it was not reflecting the IM's internal state and made things
worse. Instead, added gimp_text_tool_abort_im_context() which really
gets rid of any ongoing preedit by force.

In the main text tool code, check for preedit_active and if TRUE,
apply any edits directly widhout pushing undo steps. Factored out
gimp_text_tool_apply_list() for that purpose in order not do
duplicate a lot of code.

On undo and on button_press, force-abort any ongoing preedit. This is
the right thing to do on undo, but not really on button_press, but I
don't see another way to keep states consistent.
2016-06-05 16:36:56 +02:00
Michael Henning
2d71da0703 build/win: Disable webkitgtk. 2016-06-04 21:33:42 -04:00
Michael Henning
296dc590c6 modules: Add missing libraries to color_selector_libadd. 2016-06-04 19:23:35 -04:00
Michael Natterer
fe12bc8ed1 app: factor out a bunch of code in gimptexttool-editor.c
The new gimp_text_tool_im_delete_preedit() also makes sure that
text_tool->preedit_string is non-NULL when modifying the buffer,
so it can be used as indication whether or not a preedit is
going on (in order to skip undo stuff while preediting).
2016-06-05 00:04:01 +02:00
Michael Henning
c52ec55f3a build/win: Clear DISPLAY before building. 2016-06-04 13:29:42 -04:00
Michael Henning
e8d523ed63 build/win: Upgrade exiv2 to 0.25 2016-06-04 13:17:10 -04:00
Michael Henning
cb02b22db2 build/win: Add pcre and upgrade glib2 to 2.48.1 2016-06-04 13:17:10 -04:00
Michael Henning
508b883c1e build/win: Start building libmypaint. 2016-06-04 13:17:10 -04:00
Kevin Cozens
3ef6033276 Make various limits configurable (from TinyScheme SVN r109) 2016-06-02 15:32:04 -04:00
Kevin Cozens
7297ace6bf Added "tinyscheme" to the features list. From SVN version 106 of offical version of TinyScheme. 2016-06-02 15:32:03 -04:00
Kevin Cozens
4b55c551f3 Removed redundant 'break;' statement. Based on SVN version 105 of offical version of TinyScheme. 2016-06-02 15:32:00 -04:00
Jehan
2fae5d7d8b libgimpwidgets: fix some "incompatible pointer type" warnings on Win32.
Thanks nmat for reporting the warning.
2016-06-02 20:38:20 +02:00
Jehan
730547e0bb libgimpwidgets: fix commit e6ba618.
- Missing comma;
- headers from libgimpwidgets can't be included in app/core. So icon
  macros can't be used there.
2016-06-02 20:06:54 +02:00
klausstaedtler
73e6b6fce8 icons: correct gimpicons.h 2016-06-02 18:41:36 +02:00
klausstaedtler
2c05b4288c Merge git://git.gnome.org/gimp 2016-06-02 18:28:00 +02:00
klausstaedtler
e6ba618bb9 icons: add new icon gimp-color-palette
patch
gimppalette.c
gimpicons.c
gimpicons.h
2016-06-02 18:24:29 +02:00
Jehan
0a8c322ef8 plug-ins: if --with-sendmail is set with a value, use it. (2)
I should always test my patches thoroughly! Commit 912fcec was not
working as planned. This is!
2016-06-02 18:17:09 +02:00
Jehan
8bd53dc09f INSTALL: typo or agreement fix. s/This options/This option/ 2016-06-02 12:51:39 +02:00
Jehan
2f8467e3a7 icons: s/gimp-char-picker-24.svg/gimp-char-picker.svg/
Small bug in commit 89b163b.
Fixes --enable-vector-icons option.
2016-06-02 12:51:14 +02:00
klausstaedtler
89b163b72c icons: fixes
add forgotten gimp-char-picker-24.svg

other minor fixes
2016-06-02 07:29:03 +02:00
Jehan
8a37c928eb app, plug-ins, libgimp*: clean out all remaining trailing spaces/tabs.
Rather than just discovering them by chance, a simple grep and some
search and replace are much more efficient! :-)
Cleaning only done on C and automake files.
2016-06-02 02:04:26 +02:00
Jehan
2781450c3b configure: minor alignment fix of option description. 2016-06-02 01:24:10 +02:00
Jehan
28942c9843 INSTALL: add description of --enable-vector-icons. 2016-06-02 01:16:17 +02:00
Jehan
912fcec37f plug-ins: if --with-sendmail is set with a value, use it.
Assume sendmail has to be installed in the path which was (optionally)
given at build time. If no path is given at build, simply search in the
$PATH.
2016-06-02 01:14:15 +02:00
Jehan
ed8a9c97cf INSTALL: libmypaint doesn't use scons anymore...
... and --with-sendmail option has a slightly different usage.
2016-06-02 00:52:53 +02:00
Jehan
1a36798098 icons: various file extensions (.svg) missing from the icon list. 2016-06-02 00:28:51 +02:00
Michael Natterer
3ed305f6f5 libgimpwidgets, app: have all previews track the monitor they are on
and update their color transforms with the new monitor's color
profile. A widget is considered changing monitors when its toplevel
window's center crosses, in order to let widgets within one window
have consistent colors.
2016-06-01 22:42:00 +02:00
klausstaedtler
4a16a9f714 icons: symbolic-scalable
adding 24px twins is now complete ...

add 'pixel-perfect' 24px vectorial twins (as replacement for 22px)
gimp-prefs-folders-palettes
gimp-prefs-folders-patterns
gimp-prefs-folders-plug-ins
gimp-prefs-folders-scripts
gimp-prefs-folders-themes
gimp-prefs-folders-tool-plug-ins
gimp-prefs-folders-tool-presets
gimp-prefs-folders-tools
2016-06-01 21:08:32 +02:00
Michael Natterer
71384a4115 app: add gimp_widget_track_monitor()
Which installs a callback that behaves as if GtkWidget had a
"monitor-changed" signal. Additionally, moving widgets around between
windows is handled automatically.
2016-06-01 20:40:42 +02:00
klausstaedtler
dfc8488dca icons: add new icons to gimpicons.c too 2016-06-01 20:28:26 +02:00
klausstaedtler
225b9bd3f1 icons:
correct icon-list.mk

gimp-color-palette will be a future patch,  not now
2016-06-01 19:46:06 +02:00
klausstaedtler
a91adeb5fb icons:
symbolic-scalable
add 'pixel-perfect' 24px vectorial twins (as replacement for 22px)
gimp-prefs-folders-dynamics
gimp-prefs-folders-environ
gimp-prefs-folders-fonts
gimp-prefs-folders-gradients
gimp-prefs-folders-icon-themes
gimp-prefs-folders-interp
gimp-prefs-folders-modules

symbolic-scalable & color-scalable
add new icons
gimp-color-cmyk
gimp-color-water

patch
color-selector-cmyk.c
color-selector-water.c
gimpicons.c

This is the first patch to solve Bug 759904
many more have to follow

Thanks to Jehan for the assistance
2016-06-01 19:41:47 +02:00
Jehan
cd641fa14f app: create separate tag lists for IME preedit colors.
In particular, I don't want the preedit foreground colors to be
displayed in the text style editor UI. They are only temporary hints
and should not be taken into account as user-chosen style.
2016-06-01 17:44:03 +02:00
Jehan
a86b0cf0a2 app: create a different tag for underlined text during preedit.
It still shows up as underlined during preedit, but does not toggle the
underline button in the style editor.
2016-06-01 17:43:56 +02:00
Jehan
e7b754087c app: clean out tag indentation.
Trying to protect Mitch's mental health!
2016-06-01 17:43:45 +02:00
Jehan
2cfed0cb52 app: IM preedit displayed as expected.
When gtk_im_context_get_preedit_string(), we have to inspect the
returned Pango attributes, so that the preedit string can be displayed
in the expected fashion (i.e. as in other programs).
Some input methods in particular would even break the preedit strings
in several chunks of text displayed differently (for instance Japanese),
depending on the cursor position within the preedit string.
2016-06-01 17:43:38 +02:00
Jehan
f1dbd57d49 app: GimpText can be set background colors.
There is nothing in our UI to set background color to text, but this
can be used internally, for instance to display input method's preedit
texts with specific colors.
2016-06-01 17:43:25 +02:00
Piotr Drąg
e15d1e397b Updated Polish translation 2016-06-01 15:35:10 +02:00
Jonathan Tait
6e900c5bbb Bug 755005 - Align Tool > Distribute - vertical offset is missing 2016-06-01 00:31:03 +02:00
Michael Natterer
bf9b14e40d app: tiny indentation fix in view-commands.c 2016-05-31 23:12:42 +02:00
Michael Natterer
f67100f554 plug-ins: attach the default comment to all screenshots
not only to screenshots made with the X11 backend.
2016-05-31 22:29:49 +02:00
Michael Natterer
790cde3dd8 app: don't validate the terminating \0 of a gimp-comment parasite
Valid UTF-8 doesn't contain nul bytes.
2016-05-31 22:28:44 +02:00
Michael Natterer
44f918af2d libgimpwidgets: always ask the toplevel window for its color profile
so all a window's widgets get their profile from the same monitor.
2016-05-31 21:57:31 +02:00
klausstaedtler
a5d9419aef icons:symbolic-scalalable
symbolic-scalable
add 'pixel-perfect' 24px vectorial twins (as replacement for 22px)
gimp-prefs-folders-dynamics
gimp-prefs-folders-environ
gimp-prefs-folders-fonts
gimp-prefs-folders-gradients
gimp-prefs-folders-icon-themes
gimp-prefs-folders-interp
gimp-prefs-folders-modules
2016-05-31 18:46:58 +02:00
Michael Natterer
ca990287a7 app: set the color config on the color picker tool dialog's color area 2016-05-31 12:51:14 +02:00
Michael Natterer
4ad2493283 libgimpwidgets, modules: improve set_color_config() functions a bit
Don't do anything if the config doesn't change.
2016-05-31 12:27:15 +02:00
Tiago Santos
77aedefc9d Updated Portuguese translation 2016-05-31 09:39:57 +00:00
Jehan
df8fded8f7 configure: output the list of missing dependencies at the end...
... on configuration failure. This makes the failure as well as the list
of errors more visible.
2016-05-31 01:23:32 +02:00
Michael Natterer
bb9b899f37 plug-ins: set SCREENSHOT_CAN_SHOOT_REGION on backends that support it 2016-05-31 01:19:12 +02:00
Jehan
4d23939c3d plug-ins: make "filename" accessible to the loop of "with-files" macro.
The filename of the current bash file being processed is a pretty useful
data to access in a script.
2016-05-30 19:37:22 +02:00
Jehan
ce2e187b08 plug-ins: script-fu bash processing should not finish with gimp-quit.
This is not the macro business to quit GIMP. The user may still have
processing to do after looping over images.
2016-05-30 19:37:22 +02:00
saul
b6611b94ad Simplify command line processing by adding a 'with-files' macro. 2016-05-30 19:37:22 +02:00
Michael Natterer
cf3b6903c0 Bug 766824 - Invalid comment string causes export crash
UTF-8 validate the "gimp-comment" parasite and reject it on failure.
2016-05-30 18:56:29 +02:00
Tiago Santos
74c0df76a5 Updated Portuguese translation 2016-05-30 14:45:50 +00:00
Michael Natterer
726552b085 libgimpcolor: return a NULL transform if cmsCreate[Proofing]Transform() fails
It doesn't really "fail", we check if an error was logged during
transform creation and get rid of the transform even if lcms returned
a pointer. This totally sucks but is better than crashing on a corrupt
transform.
2016-05-30 12:48:54 +02:00
Michael Natterer
70463a74fa libgimpwidgets: don't unref a NULL transforms from the transform cache 2016-05-30 12:48:10 +02:00
Michael Natterer
d8271ed33f libgimpcolor: return NULL GimpColorTransform if creating cmsHTRANSFORM fails 2016-05-30 10:58:48 +02:00
Michael Natterer
be8146d529 app: don't invalidate all images on color config changes
Now all previews and the display shell connect to the color config
itself, there is no need any longer to connect to the global color
config's "notify" any longer from GimpImage. Also, the settings there
are for display purposes only, so nothing in the image itself needs
to be notified of the config change.
2016-05-30 10:51:18 +02:00
Michael Natterer
e33b2e77a7 app: remove gimp_display_shell_profile_convert_buffer()
It's exactly the same as calling gimp_color_transform_process_buffer()
directly.
2016-05-30 01:26:50 +02:00
Michael Natterer
710ba9bef3 app: make display color management work with the transform cache
Need to connect_after() to the shell's GimpColorConfig "notify" so the
profile transform cache in gimp_widget_get_color_transform() is
already invalidated when we call gimp_color_managed_profile_changed()
in the shell's notify callback.

This is a hack. Actually the shell should create its transform only on
demand, and a config change should simply get rid of the previous
transform, just as all other widgets are doing it.
2016-05-30 01:16:07 +02:00
Ell
513446a85b app: fix initial display state when dot-for-dot is off by default
... and image_resolution != screen_resolution.

Partially revert commit 26ea7a3530.

Also, reset shell->dot_for_dot in gimp_display_shell_fill(), so that new
images that use the first display don't inherit the dot-for-dot state of the
previous image that used the same display.
2016-05-29 19:57:35 +00:00
Michael Natterer
729c1edd45 app: color manage GimpColorPanel and its color dialog
if a context is set on the panel.
2016-05-29 21:54:39 +02:00
Michael Natterer
2530b03f3c app: color manage the color DND icon widget 2016-05-29 21:32:05 +02:00
klausstaedtler
45d705df39 icons:symbolic-scalalable
symbolic-scalable
add 'pixel-perfect' 24px vectorial twins (as replacement for 22px)
gimp-prefs-new-image
gimp-prefs-playground
gimp-prefs-session
gimp-prefs-system-resources
gimp-prefs-theme
gimp-prefs-toolbox
gimp-prefs-tool-options
gimp-prefs-window-management
gimp-prefs-folders-brushes

symbolic-scalalable & color-scalable
former gimp-prefs-color-management
moved to /Prototype/.../16/gimp-color-profile
2016-05-29 21:12:42 +02:00
Michael Natterer
4bad9b2144 libgimpcolor: optimize gimp_color_transform_process_buffer()
for the case we're transforming the same buffer in place.
2016-05-29 20:24:37 +02:00
Michael Natterer
8379f7e31d Bug 766988 - Colors applied to images are not color managed
Color manage text layer rendering.
2016-05-29 19:59:41 +02:00
Pedro Gimeno
139801f222 Bug 690544 - Script-fu (rand 4294967295) hangs on machines with 64-bit longs 2016-05-29 19:42:26 +02:00
Michael Natterer
b3c6163450 Bug 766988 - Colors applied to images are not color managed
Color manage the applied pattern in gimp_fill_options_create_buffer()
so filling and stroking with a pattern look right.
2016-05-29 19:41:12 +02:00
Jehan
6edc9380f3 app: fix warnings for win32 builds.
Eliminates some "assignment from incompatible pointer type" warnings,
on calls to GetProcAddress().
2016-05-29 18:27:58 +02:00
Michael Natterer
fc2a4cd589 app: add gimp_fill_options_create_buffer()
Which creates a buffer from GimpFillOptions that can be applied to a
drawable. Eliminates three slightly different copies of the same
code. Also adds to the color history for each color fill, we missed
two places before.
2016-05-29 18:25:14 +02:00
Michael Natterer
4fefc3817c Bug 766988 - Colors applied to images are not color managed
Color manage colors applied when painting, and when filling, merging,
resizing and transforming drawables.
2016-05-29 17:51:06 +02:00
Jehan
d13ed2a42b Bug 575043 - GIMP ignores 'Maximized' windows hints on startup.
Now the max parameter from Windows is taken into account and takes
precedence over the saved session state if set.
This can be applied either through the "run" property of a shortcut,
or by command line: `start /max gimp-2.9.exe`.
There is a start for min handling as well but I can clearly see the
window being minimized and immediately re-raised. There must be a call
later which deiconifies the window. This will have to be fixed.
2016-05-29 17:48:09 +02:00
klausstaedtler
9e4b9628f2 icons:symbolic-scalalable & color-scalable
symbolic-scalable
add 'pixel-perfect' 24px vectorial twins (as replacement for 22px)
gimp-prefs-color-management
gimp-prefs-controllers
gimp-prefs-default-comment
gimp-prefs-default-grid
gimp-prefs-display
gimp-prefs-help-system
gimp-prefs-icon-theme
gimp-prefs-image-title
gimp-prefs-image-windows
gimp-prefs-input-devices
gimp-prefs-interface

symbolic-scalalable & color-scalable
sync gimp-prefs-color-management with gnome-color-manager
2016-05-29 17:41:20 +02:00
Piotr Drąg
34c5d90982 Updated Polish translation 2016-05-29 14:44:56 +02:00
Pedro Gimeno
f665e4cfa9 Bug 738951 - (modulo n m) may fail for m >= 46342 (in 32-bit) or m >= 3037000501 (in 64-bit) 2016-05-29 13:48:44 +02:00
Jehan
48b8df2f14 Indentation (tabs) cleanup. 2016-05-29 02:37:32 +02:00
Jehan
2bb0f1b1c9 app: fix "_WIN32_WINNT" redefined when cross-compiling with mingw-w64.
It was already defined in _mingw.h, provided with mingw-w64 headers.
2016-05-29 02:26:04 +02:00
klausstaedtler
0236bbdb76 icons: symbolic-scalable
add 'pixel-perfect' 24px vectorial twins (as replacement for 22px)
gimp-dynamics
gimp-histogram
gimp-input-device
gimp-landscape
gimp-letter-spacing
gimp-line-spacing
gimp-path
gimp-paths
gimp-portrait
gimp-prefs-folders
gimp-tool-preset
gimp-wilber
2016-05-28 18:26:31 +02:00
Hartmut Kuhse
41d382a147 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2016-05-28 17:58:15 +02:00
Hartmut Kuhse
4a7d1e59f9 plug-ins: convert screenshot-win32 to gegl
and do some repairs.
2016-05-28 17:56:14 +02:00
Hartmut Kuhse
01a24a3ccb plug-ins: convert screenshot-win32 to gegl
and do some repairs.
2016-05-28 17:52:44 +02:00
klausstaedtler
49c81ffc44 icons: color-scalable
add 'pixel-perfect' 24px vectorial twins (as replacement for 22px)
gimp-prefs-folders-brushes
gimp-prefs-folders-dynamics
gimp-prefs-folders-environ
gimp-prefs-folders-fonts
gimp-prefs-folders-gradients
gimp-prefs-folders-icon-themes
gimp-prefs-folders-interp
gimp-prefs-folders-modules
gimp-prefs-folders-palettes
gimp-prefs-folders-patterns
gimp-prefs-folders-plug-ins
gimp-prefs-folders-scripts
gimp-prefs-folders-themes
gimp-prefs-folders-tool-plug-ins
gimp-prefs-folders-tool-presets
gimp-prefs-folders-tools
2016-05-28 16:39:30 +02:00
klausstaedtler
4b4ebe9fc2 icons: color-scalable
add 'pixel-perfect' 24px vectorial twins (as replacement for 22px)
gimp-dynamics
gimp-histogram
gimp-input-device
gimp-landscape
gimp-letter-spacing
gimp-line-spacing
gimp-path
gimp-paths
gimp-portrait
gimp-prefs-color-management
gimp-prefs-controllers
gimp-prefs-default-comment
gimp-prefs-default-grid
gimp-prefs-display
gimp-prefs-folders
gimp-prefs-help-system
gimp-prefs-icon-theme
gimp-prefs-image-title
gimp-prefs-image-windows
gimp-prefs-input-devices
gimp-prefs-interface
gimp-prefs-new-image
gimp-prefs-playground
gimp-prefs-session
gimp-prefs-system-resources
gimp-prefs-theme
gimp-prefs-toolbox
gimp-prefs-tool-options
gimp-prefs-window-management
gimp-tool-preset
gimp-wilber
2016-05-28 13:35:19 +02:00
Hartmut Kuhse
63a49a4def Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2016-05-28 11:45:25 +02:00
Hartmut Kuhse
910c385f49 repairs after merge 2016-05-28 11:44:34 +02:00
Hartmut Kuhse
93d1161950 plug-ins: remove obsolete win-snap, because its functionality is in plug-ins/screenshot 2016-05-28 11:38:02 +02:00
Michael Natterer
0f98eda5a5 app: remove gimp_context_[get|set]_[foreground|background]_pixel()
Artifacts from early GEGL posting.
2016-05-28 09:35:25 +02:00
Michael Natterer
ef78897c67 app: set a color config on color areas created from menu actions
and set a GimpContext on the actions so they can find the config.
2016-05-28 03:01:37 +02:00
Alexandre Prokoudine
9225176ce3 Merge branch 'undo-preview-size' 2016-05-28 03:05:20 +03:00
Alexandre Prokoudine
e494779509 Add configuration for undo preview size 2016-05-28 02:53:28 +03:00
Michael Natterer
dbb96f57bb Bug 467930 - color selectors are not color managed
Color manage GimpFgBgView.
2016-05-28 01:41:46 +02:00
Jehan
2a7ee53273 INSTALL: adding list of runtime dependencies.
As far as I know: darktable and xdg-email/sendmail.
2016-05-28 01:01:41 +02:00
Jehan
0d8d5a0cfe plug-ins: sendmail is also a runtime dependency.
Such as `xdg-email`, if --with-sendmail is set, sendmail presence should
actually be checked at runtime and not be a blocker during build.
2016-05-28 00:52:38 +02:00
Michael Natterer
ee0c51a43e Bug 467930 - color selectors are not color managed
Color manage the water color selector.
2016-05-28 00:38:57 +02:00
Michael Natterer
9a871f6262 app: color manage palette and gradient previews 2016-05-27 23:59:07 +02:00
Michael Natterer
a35276ed91 app: make all GimpViewRenderers color manage themselves
Automatically connect to the global GimpColorConfig unless a different
one is set manually (like for previews that belong to a
GimpDisplayShell and should follow its color management settings.  Add
public API for subclasses to get to the renderer's color
transform. Automatically color manage rendered pixbufs, just as we
already manage temp_bufs.
2016-05-27 23:54:46 +02:00
Jehan
c0aff6b0f0 plug-ins: enter in the filename field activates email sending. 2016-05-27 22:09:18 +02:00
Jehan
22905e7174 plug-ins: fix sendmail alternative.
Oups! I should have retested --with-sendmail before pushing, after the
changes in commit 05f7726.
2016-05-27 22:09:18 +02:00
Michael Natterer
d6ee1dc5cf libgimpwidgets: cache gimp_widget_get_color_transform()'s GimpColorTransforms
Now that more and more widgets are color managed, we need transforms
for all of them. Creating them is very expensive.

The new cache returns the same transform for a combination of (config,
src_profile, src_format, dest_format) and invalidates itself
automatically on config changes. The number of transforms goes down
from potentially hundreds to a handful, and the cost of a config
change from many seconds to virtually instant.
2016-05-27 21:58:46 +02:00
Michael Natterer
984e3d8f5a libgimpcolor: small optimization in gimp_color_transform_process_pixels()
no need to copy the alpha channel separately if src and dest are the
same.
2016-05-27 21:58:46 +02:00
Jehan
cef26867c5 plug-ins: redirect stdout to /dev/null when checking xdg-email presence. 2016-05-27 21:45:19 +02:00
Jehan
59f1b18a93 plug-ins: do not show all fields in dialog for xdg-email.
xdg-email would usually open an email client where you can edit all
fields, like recipients, mail title, etc. Setting it first in GIMP
is redundant.
Of course, these fields can still be set in non-interactive mode (in
which case, maybe xdg-email could be set to some non-interactive email
client as well).
2016-05-27 21:45:05 +02:00
Jehan
05f7726eab plug-ins: xdg-email is a runtime dependency. 2016-05-27 21:44:52 +02:00
Jehan
8c4d03ada8 plug-ins: email plugin brought back from the dead.
By default, it will now use xdg-email to select the user's preferred
email client, which means it only works on platforms with xdg-email.
The sendmail implementation is still available if requested explicitly
with --with-sendmail.
2016-05-27 21:44:45 +02:00
Cédric Valmary
b8b9f8a3c3 Updated Occitan translation 2016-05-27 19:41:04 +00:00
Cédric Valmary
34982a5b95 Updated Occitan translation 2016-05-27 19:40:10 +00:00
Cédric Valmary
ddf6db022e Updated Occitan translation 2016-05-27 19:39:22 +00:00
Cédric Valmary
78fb78b270 Updated Occitan translation 2016-05-27 19:38:34 +00:00
Cédric Valmary
f9d0479f72 Updated Occitan translation 2016-05-27 19:38:24 +00:00
Cédric Valmary
cd453597aa Updated Occitan translation 2016-05-27 19:38:16 +00:00
Cédric Valmary
09dbcc6995 Updated Occitan translation 2016-05-27 19:33:44 +00:00
Massimo Valentini
062cf1a5ab Bug 766895: The --dump-pdb-procedures-deprecated...
argument triggers a segmentation fault

Initialize babl so that, when gimp is unreffed,
using a babl_format to destroy a std brush does
not crash.
2016-05-27 19:30:49 +02:00
Hartmut Kuhse
617b90a40b repairs after merge 2016-05-27 18:28:53 +02:00
Hartmut Kuhse
55abb62159 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	app/core/core-enums.c
	app/core/core-enums.h
	app/core/core-types.h
	app/core/gimpimage-merge.c
	app/core/gimpimage-undo-push.c
	app/core/gimpimage-undo-push.h
	app/core/gimpimageundo.c
	app/core/gimpimageundo.h
	app/xcf/xcf-load.c
	configure.ac
	plug-ins/file-tiff/file-tiff.c
2016-05-27 08:28:02 +02:00
Yolanda Álvarez Pérez
0637074743 Updated Spanish translation 2016-05-27 06:19:55 +00:00
Michael Natterer
0d8b8c2f99 Bug 467930 - color selectors are not color managed
Color manage the wheel/triangle color selector.
2016-05-27 01:12:35 +02:00
Michael Natterer
9014fbeb32 Bug 467930 - color selectors are not color managed
Color manage GimpColorScale and GimpColorScales.
2016-05-27 00:51:32 +02:00
Michael Natterer
ff3e9d76ac libgimpcolor: add CMYK formats to gimp_color_profile_get_format()
Makes the CMYK color selector not crash.
2016-05-27 00:33:56 +02:00
Michael Natterer
ca349f88cd libgimpcolor: add gimp_color_transform_can_gegl_copy()
Which takes two profiles and returns TRUE if converting between
them works correctly without a GimpColorTransform. Use it in
gimp_color_transform_new() to return a NULL transform if none
is needed. Took the code from gimp-gegl-loops.c.
2016-05-26 23:14:57 +02:00
Cédric Valmary
365f4e417e Updated Occitan translation 2016-05-26 20:46:14 +00:00
Cédric Valmary
1a09bb0f2b Updated Occitan translation 2016-05-26 20:40:13 +00:00
Michael Natterer
e6d4053567 app: don't forget to ref GimpOperationProfileTransform's profiles 2016-05-26 22:26:07 +02:00
Michael Natterer
0cd3d7aa7b app: color manage GimpFgBgEditor, as used e.g. in the toolbox 2016-05-26 22:25:03 +02:00
Michael Natterer
0acff06465 app: color manage the color buttons of GimpColorHistory 2016-05-26 22:24:35 +02:00
Michael Natterer
bd38b7b9fd libgimpwidgets: set the color config on the "GIMP" page of color selectors 2016-05-26 22:23:29 +02:00
Michael Natterer
e080df349c libgimpwidgets: set the color config on GimpColorSelection's color areas
so they are color managed.
2016-05-26 22:22:50 +02:00
Michael Natterer
0bfa402c1a Argh, this was meant to be squashed into the previous commit... 2016-05-26 22:18:50 +02:00
Michael Natterer
cc92887908 libgimpcolor: add new object GimpColorTransform
which encapsulates a cmsHTRANSFORM and does all the pixel format
conversion magic. It has API to create transforms and proofing
transforms, and to convert pixels arrays and GeglBuffers.

Before, each place which has a transform had to keep around the
transform and its input and output Babl formats, and had to implement
lots of stuff itself. Now all that lives in GimpColorTransform,
removing lots of logic from many places, and pretty much removing lcms
from the public API entirely.

This removes including <lcms2.h>, LCMS_LIBS and LCMS_CFLAGS from
almost all directories and potentially allows to replace lcms by
something else.
2016-05-26 22:15:54 +02:00
Marco Ciampa
97d16bd1d6 Updated Italian translation 2016-05-26 18:05:13 +02:00
Adrian Likins
bf9b33ece2 Bug 749044 - Exporting as KISS - CELL (*.cel) results in error 2016-05-26 03:51:38 +02:00
Cédric Valmary
e20af20fc4 Updated Occitan translation 2016-05-25 20:08:43 +00:00
Michael Natterer
060c03a119 libgimpconfig: don't include gimpcolorconfig-enums.h in gimpcolorconfig.c
gimpcolortypes.h already includes it.
2016-05-25 21:34:49 +02:00
Simon Budig
bdae0de1aa script-fu: make regex matching return character indexes
Since tinyscheme uses utf-8 for strings match the behaviour for the
script-fu regex utilities as well. Fixes bug #764811
2016-05-25 20:18:34 +02:00
klausstaedtler
5feba030ca icons: color-scalable & symbolic-scalable
minor corrections
2016-05-25 18:11:27 +02:00
Michael Natterer
1cffaa7120 libgimpwidgets: add gimp_color_area_set_color_config()
And do a display profile transform on the color area if it's set.
2016-05-25 12:39:31 +02:00
Michael Natterer
7326f346c3 libgimpcolor: optimize gimp_color_profile_get_format() for cairo-RGB24
Trick lcms into converting cairo-RGB24 pixels directly, by using
TYPE_BGRA_8 on little endian and TYPE_ARGB_8 on big endian. They have
the same byte order, and the alpha channel (ignored by lcms anyway)
takes the place of the unused byte of cairo-RGB24.

This saves two babl conversions around cmsDoTransform().
2016-05-25 12:33:38 +02:00
Yolanda Álvarez Pérez
f93ca2c63a Updated Spanish translation 2016-05-25 06:37:28 +00:00
Michael Natterer
9c99d61feb libgimpwidgets: add gimp_preview_area_set_color_config()
If a config is set, apply its settings when drawing the preview's
pixels. This is preparation for fixing:

Bug 467930 - color selectors are not color managed
Bug 556608 - Monitor color profile is not applied to filter preview
2016-05-24 21:43:20 +02:00
klausstaedtler
3a458d1756 icons: color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-info
gimp-user-manual
gimp-video


all current 24px icons from scalable icons-themes have now
'pixel-perfect' 24px vector twins.

Next step would be 'port' all remaining 22x22px icons to 24x24
(so 22x22 can be deprecated in future builds). As gimp refuses to use
24px for these icons, the 22px icons have to stay until gimp is ready for 24px.
2016-05-23 21:56:05 +02:00
Massimo Valentini
9e96996138 Bug 764608: Smudge tool clips out of gamut channel values...
on layers with alpha channels
2016-05-23 18:45:49 +02:00
klausstaedtler
7a19e5ce44 icons: color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-controller
gimp-controller-keyboard
gimp-controller-linux-input
gimp-controller-midi
gimp-cintroller-wheel
gimp-cursor
gimp-sample-point
2016-05-23 17:47:13 +02:00
Michael Natterer
cb578e3df7 app: add GimpOperationProfileTransform
which converts between two color profiles.
2016-05-23 14:00:35 +02:00
Michael Natterer
5b4d0219d8 app: add GimpPickable::srgb_to_pixel()
which isn't really for "picking", but it just fits too nicely into
GimpPickable to not put it there.

Also add utility function gimp_pickable_srgb_to_image_color() which
takes a "real" (sRGB) GimpRGB value, transforms it to the pickable's
colorspace and puts it into an "image color" GimpRGB.
2016-05-23 01:33:52 +02:00
Michael Natterer
f7842bc8db app: add gimp_image_color_profile_srgb_to_pixel()
which is the reverse of gimp_image_color_profile_pixel_to_srgb()
2016-05-23 01:18:55 +02:00
Michael Natterer
26251695b0 Bug 748749 - picked colors don't match image colors...
...when a color profile is active

Add GimpPickable::pixel_to_srgb() which puts a picked raw image
pixel into a GimpRGB. Default to gimp_rgba_set_pixel() but implement
pixel_to_srgb() in GimpLayer, GimpProjection and GimpImage and
run the pixel through gimp_image_color_profile_pixel_to_srgb().
2016-05-22 23:28:31 +02:00
Michael Natterer
c73104e3ea Bug 766327 - gimptool-2.0 not quoting filenames/directories
Quote installation paths with g_shell_quote().
2016-05-22 22:38:12 +02:00
Michael Natterer
bb43a89ef8 app: treat the layer mask correctly in gimp_layer_get_opacity_at()
Only take the mask into account if it is actually applied.
2016-05-22 19:53:10 +02:00
Michael Natterer
adaa67548e libgimpwidgets: set a minimum width on GimpColorProfileComboBox
so ellipsation doesn't shrink the entire text away in narrow dialogs.
2016-05-22 18:44:59 +02:00
Michael Natterer
836972b736 app: use the new function in GimpTemplateEditor
It now offers the right default profiles for the selected image
type/precision.
2016-05-22 13:26:50 +02:00
Michael Natterer
490b33fd85 app: use the new function in the color profile assign/convert dialog 2016-05-22 13:26:20 +02:00
Michael Natterer
ae1fdd9eeb app: fix the new gimp_color_profile_store_add_defaults()
A NULL profile is only an error if it's NULL because opening
the .icc failed, not just because none is configured...
2016-05-22 13:24:20 +02:00
Piotr Drąg
193101b9d7 Updated Polish translation 2016-05-22 13:00:58 +02:00
Dušan Kazik
2f32b94626 Updated Slovak translation 2016-05-22 09:27:04 +00:00
Michael Natterer
57d497b486 app: add gimp_color_profile_store_add_defaults()
which adds default profiles for an image type/precision.
2016-05-22 01:19:18 +02:00
Alexandre Prokoudine
9853400a5b Update Russian translation 2016-05-22 00:44:01 +03:00
Michael Natterer
dcf5c526e7 Bug 320447 - fast switching between "color managed display" and "softproof"
Replace the 3-state "off", "display" and "softproof" radio items by
two toggles "enable" and "softproof". Also add separate controls for
display and softproof options.
2016-05-21 21:38:47 +02:00
klausstaedtler
0f3e8ea116 icons: update icon-list.mk 2016-05-21 17:09:53 +02:00
klausstaedtler
92739a5d90 icons: color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-template
gimp-tools
gimp-undo-history
2016-05-21 17:04:48 +02:00
Michael Natterer
6b246ff6c2 app: remove ancient utility function gimp_toggle_button_set_visible()
and use g_object_bind_property() instead.
2016-05-21 14:28:11 +02:00
Yolanda Álvarez Pérez
85ca7c5895 Updated Spanish translation 2016-05-21 08:26:12 +00:00
Michael Natterer
ce8e484764 app: fix color profile logic in gimp_image_convert_precision()
Not only the logic was broken, a local variable was also shadowing the
"dest_profile" variable and preventing the broken logic to be applied
at all. Double fail.
2016-05-21 00:37:28 +02:00
Michael Natterer
eba2d2d88b plug-ins: rename file-darktable format names to "Raw Foo"
so they are ordered together in the file dialogs. Also rename the
procedures to "file-farktable-foo".
2016-05-21 00:01:10 +02:00
Michael Natterer
9f3052583b app: remove gimp_session_write_position()
and un-overengineer the session position accuracy code a bit.
2016-05-21 00:00:07 +02:00
klausstaedtler
21742cca1b icons: color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-device-status
gimp-display-filter
gimp-display-filter-colorblind
gimp-display-filter-contrast
gimp-display-filter-gamma
gimp-display-filter-lcms
gimp-display-filter-proof
2016-05-20 20:12:58 +02:00
Michael Natterer
5080da50e6 app: move the undo impl object typedefs out of the *-types.h files
They are completely private to the undo system and don't need to
be used anywhere else. Removes some clutter from the typed headers.
2016-05-20 18:29:13 +02:00
Michael Natterer
2ef8719cbe app: rename more stuff from "floating sel" to "floating selection" 2016-05-20 16:46:26 +02:00
nmat
cf4d0cc40e Fix wrong reference to .ico .cur and resource.h for to fix compilation errors on windows. 2016-05-20 16:14:36 +02:00
Michael Natterer
28e1a379e6 app: remove const qualifiers from all object parameters
They are unreliable because every type checking cast discards them,
they are useless anyway, visual clutter, added inconsistently, and
generally suck. Wanted to do this a long time ago, it was a bad idea
in the first place.
2016-05-19 23:54:14 +02:00
klausstaedtler
71dfbbf9c2 icons: color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-question
gimp-warning
gimp-error
2016-05-19 19:54:23 +02:00
Michael Natterer
2b170e3a80 app: include gimpdrawable-floating-selection.h in gimplayer-floating-sel.c 2016-05-19 19:22:09 +02:00
Michael Natterer
81fd3e9c3f app: move GimpDrawable's FS to gimpdrawable-floating-selection.[ch]
and refactor it a bit to have separate functions for adding, removing
and updating the FS' drawable filter. Should be a lot more
understandable now.
2016-05-19 17:40:33 +02:00
Piotr Drąg
eacfd6a9ca Updated Polish translation 2016-05-19 16:06:30 +02:00
Piotr Drąg
c7bc0b5f07 Fix typos in app/actions/view-actions.c 2016-05-19 15:59:51 +02:00
klausstaedtler
dfd2e56250 icons: color-scalable & symbolic-scalable&legacy
add 'pixel-perfect' 24x24px twins
gimp-selection
gimp-navigation

the legacy png icons are done with GIMP (no upscaling).

color-scalable & symbolic-scalable

add 'pixel-perfect' 24x24px twins
gimp-floating-layer
2016-05-18 18:53:59 +02:00
Michael Natterer
79cdbadc95 plug-ins: replace some gimp_spin_button_new() by plain GTK+ calls 2016-05-18 09:49:22 +02:00
Michael Natterer
201b11e230 app: add separate opacity and mode API to GimpDrawableFilter 2016-05-18 09:47:58 +02:00
Michael Natterer
265dfec525 app: split GimpApplicator's opacity and mode API into two functions
Added gimp_applicator_set_opacity() and remove the opacity argument
from set_mode().
2016-05-18 01:51:09 +02:00
Jehan
1c6b85d0a5 configure: request libmypaint version 1.3.0 or higher.
libmypaint just got ported to autotools, which makes GIMP again easily
built on all kind of platforms. There is no need to rely on older
versions of this library which would only give us headaches.
2016-05-17 21:47:37 +02:00
klausstaedtler
8370fb13a7 icons: color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-colormap
gimp-transparency
gimp-web
2016-05-17 20:07:38 +02:00
Massimo Valentini
3a43478fda Bug 766116: Behind mode is not working correctly
use same var names as gimp-2-8 to make
it easier to spot unwanted differences
2016-05-17 19:56:39 +02:00
Alexandre Prokoudine
d41e362b8c Update Russian translation 2016-05-17 01:12:17 +03:00
klausstaedtler
d83692a70a icons: color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-center
gimp-channel
gimp-channel-alpha
gimp-channel-blue
gimp-channel-gray
gimp-channel-green
gimp-channel-indexed
gimp-channel-red
gimp-channels
2016-05-16 22:56:22 +02:00
klausstaedtler
ea3c9b7829 icons: color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-layer
gimp-layer-mask
gimp-layers
gimp-text-layer
2016-05-16 18:36:27 +02:00
Massimo Valentini
2dd4d3a2fa Bug 766369: Split view shows transparency filtering...
... layers with alpha channel

add an operation that selectively outputs aux
or source if out/inside the rectangle (x,y,width,height),
independently of the alpha channel and use it
in filters split preview.

mostly copied from gimp:mask-components
2016-05-16 18:08:48 +02:00
Michael Natterer
c0fb136203 app: add tooltips that mention that disabling color management == sRGB
Also say "better leave this enabled".
2016-05-16 17:41:04 +02:00
Michael Natterer
335727dd26 libgimpwidgets: change the tooltip of GimpColorConfig:mode
to say "How images are displayed on screen." instead of "Mode of
operation for color management.". The old text was never accurate.
2016-05-16 17:38:49 +02:00
klausstaedtler
0bc53235b2 icons: color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-symmetry
gimp-image
gimp-images
2016-05-16 16:42:23 +02:00
Ell
e897abd1bf app: add missing NULL check in action_search_match_keyword() 2016-05-16 12:48:15 +00:00
Ell
8d9df886e2 app: don't hold a direct reference to actions in the action history
Instead, store only the action's name, and look it up upon searching.

Keeping a reference to the actions in the history extended the lifetime of
actions that sohuld have otherwise died, leading to all sorts of nastiness.  In
particular, the Alt+[n] actions to switch between images would remain bound to
their accelerator after the image has been closed, holding a dangling display
pointer, which would lead to a segfault, or fail with a CRITICAL message, when
using the accelerator again.
2016-05-16 12:47:20 +00:00
Ell
4132c0b3e7 app, libgimpwidgets: reset "old" selection color of GimpColor{Button,Panel} ...
... when the button is clicked

Previously, the old color retained its previous value, so when the color
selection dialog was canceled, the button's color would go back to a
potentially outdated value, instead of the color it had when it was
clicked (for continuously-updated color buttons, at least.)
2016-05-16 11:49:00 +00:00
Michael Natterer
84d60ad943 app: clean up toggle callbacks in view-commands.c 2016-05-16 13:39:45 +02:00
Michael Natterer
a28778475f Bug 320447 - fast switching between "color managed display" and "softproof"
Add rendering intent, black point compensation and gammut warning menu
items to View -> Color Management. They set the respective values of
the active color management mode, so both "color managed display" and
"print simulation" are almost completely configurable per-display
now. Setting the simulation profile is still missing.
2016-05-16 13:27:59 +02:00
Michael Natterer
a942b771fb app: add gimp_display_shell_set_action_sensitive() 2016-05-16 13:00:27 +02:00
klausstaedtler
762e324d9a icons: color-scalable & symbolic-scalable & legacy
add 'pixel-perfect' 24x24px twins
gimp-grid

the legacy png icon is done with GIMP (no upscaling).

color-scalable & symbolic-scalable
add 'pixel-perfect' 24x24px twins
gimp-tool-options
2016-05-16 11:19:19 +02:00
klausstaedtler
c1e1d375f8 icons:
correct typo
2016-05-15 22:51:55 +02:00
klausstaedtler
7e0a2fa716 icons: color-scalable & symbolic-scalable & legacy
add 'pixel-perfect' 24x24px twins
gimp-resize
gimp-scale

the legacy png icons are done with GIMP (no upscaling).
2016-05-15 22:46:49 +02:00
klausstaedtler
1b108e008e icons: scalable
color-scalable & symbolic-scalable

add 'pixel-perfect' 24x24px twins
gimp-print-resolution
gimp-move-to-screen
2016-05-15 17:51:57 +02:00
Michael Natterer
5dda47aae0 menus: forgot to push with the last commit 2016-05-15 00:12:36 +02:00
Michael Natterer
406d1b9c65 Bug 320447 - fast switching between "color managed display" and "softproof"
Add a View -> Color Management submenu that allows to change
the color management mode per-display.

Internally, keep a GimpColorConfig object around per-display that
is synchronized with the global config except for the properties
that have a per-display GUI (currently the mode).

Also provide an "As in Preferences" menu item to follow the global
settings again.
2016-05-14 23:50:58 +02:00
Michael Natterer
388bf5d4ca app: add gimpdisplayshell-actions.[ch]
which contains functions to update shell-related actions in the "view"
group. Took the code out of gimpdisplayshell-appearance.c.
2016-05-14 22:54:11 +02:00
Alexandre Prokoudine
382f20450c Mark user-visible-message for translation 2016-05-14 17:58:21 +03:00
Michael Natterer
f93369b354 app: clean up Preferences -> Color Management
Add groups and reorder things. Shorten labels that are redundant with
group titles.
2016-05-14 14:48:58 +02:00
Piotr Drąg
062b3764ac Updated Polish translation 2016-05-14 15:36:09 +03:00
Michael Natterer
af976a75c3 app: add a GimpColorConfig to GimpDisplayShell
Use the shell's color config for color managing the display and
various auxiliary widgets attached to it, like the notebook tab widget
and navigation popup.

The config is currently just a reference to the global prefs config,
so no behavior changed.
2016-05-14 00:56:26 +02:00
Michael Natterer
9bbc52c1be app: add a GimpColorConfig member to GimpViewRenderer
and use it if set to create the display transform, otherwise use the
global config from prefs.
2016-05-14 00:28:15 +02:00
Michael Natterer
fd2ee899f9 app: add a private struct to GimpViewRenderer
and move some members there, including "needs_render" which means
GimpViewRenderer now manages that all by itself.
2016-05-14 00:14:51 +02:00
Michael Natterer
f56ca4471b app: don't use unrelated prefs values for the color profile convert dialog
The values from the global GimpColorConfig are for displaying images
on screen, not default values for profile conversion. Instead, default
to intent = RELATIVE_COLORIMETRIC and bpc = TRUE.
2016-05-13 22:49:07 +02:00
Michael Natterer
13b1e6aafc app: clean up a lot of werid code in GimpColorOptions and GimpFilterOptions
First of all, derive GimpFilterOptions from GimpColorOptions, not the
other way around, which was a sick way of magically showing the right
options for various tools. That approach has failed and needed
additional hacks to do the right thing. Simply have the right class
hierarchy and call the right tool options GUI constructors and done.

Remove gimp_histogram_options_gui(), we don't need histogram scale
controls in tool options when we already have them next to the
histograms in the tool dialogs.

Also remove gimp_histogram_options_connect_view() and use a simple
g_object_bind_property() instead.
2016-05-13 22:06:14 +02:00
Massimo Valentini
81e7cb6ba5 Bug 766342: EEEEeEeek! 4 GeglBuffers leaked 2016-05-13 13:13:22 +02:00
Yolanda Álvarez Pérez
418577087c Updated Spanish translation 2016-05-13 09:57:14 +00:00
Mario Blättermann
758ef392dd Updated German translation 2016-05-12 21:36:55 +02:00
klausstaedtler
93cc47ff4b icons: color-scalable
minor corrections:
gimp-path
gimp-paths
gimp-path-stroke
gimp-duplicate
gimp-selection-to-path
gimp-selection-stroke
2016-05-12 20:48:30 +02:00
Yolanda Álvarez Pérez
bb767ac3d5 Updated Spanish translation 2016-05-12 06:40:37 +00:00
Michael Natterer
9fb70a44f2 app: rename GimpImageMap to GimpDrawableFilter
and gimpdrawable-filter.[ch] to gimpdrawable-filters.[ch] because of
the name clash.
2016-05-12 01:49:53 +02:00
Michael Natterer
f7c104c6ae app: use gegl:distance-transform in the blend tool, it has a progress now
Also, don't start the progress in GimpBlendTool, let
gimp_gegl_progress_connect() do its job.
2016-05-12 00:14:35 +02:00
Michael Natterer
cb1a6024ff app: normalize gegl:distance-transform, it's unusuable otherwise 2016-05-12 00:13:33 +02:00
Michael Natterer
43990e8e0e app: more cleanup in GimpImageMap
Remove the filter area calculation code from gimp_image_map_apply().
Instead, automatically update the area when adding the filter to the
drawable, and when the selection changes. Also, connect to the
drawable's "removed" and remove the filter when the drawable gets
removed from the image.
2016-05-11 22:53:49 +02:00
Michael Natterer
e7d2edb665 app: connect to the new operation progress in GimpFilterTool 2016-05-11 22:51:58 +02:00
Michael Natterer
cea4ea6cff app: require a text in gimp_gegl_progress_connect()
and simplify and fix the progress callback.
2016-05-11 22:50:33 +02:00
Michael Natterer
4f0521c7cf app: don't call gimp_gegl_progress_connect() with a NULL text 2016-05-11 22:50:05 +02:00
Massimo Valentini
85cb525c7e Bug 766128: Use gegl_operation_progress
instead of reimplementing it in two operations
2016-05-11 19:09:56 +02:00
Piotr Drąg
ec99c99b7a Updated Polish translation 2016-05-11 18:26:29 +02:00
Michael Natterer
b10fd2aa30 app: use the proper help ID in gimp_operation_tool_get_settings_ui()
GimpFilterTool has the right help ID since a while, no need to
use a dummy help ID aly longer.
2016-05-11 14:38:33 +02:00
Michael Natterer
9bb03073b6 app: turn the "Gamma Hack" into a non-serializable property
To make it at least behave like other widgets in the dialogs while it
exits.
2016-05-11 14:33:08 +02:00
Michael Natterer
7d1567cae0 app: move tool undo typedefs out of tools-types.h 2016-05-11 11:23:14 +02:00
Michael Natterer
059a92b4b6 app: rename "image_map" member of GimpFilterTool to "filter" 2016-05-11 10:19:50 +02:00
Yolanda Álvarez Pérez
2c36e71938 Updated Spanish translation 2016-05-11 06:45:01 +00:00
Michael Natterer
3bd783283e app: change the prefs property from image-map-tool-max-recent to filter-tool
but still parse the old property too.
2016-05-11 01:03:40 +02:00
Michael Natterer
67e192e77b app: remove gimp_filter_tool_preview()
Its remaining two callers are more obvious when doing a simple call to
gimp_image_map_apply() manually.
2016-05-10 15:57:49 +02:00
Michael Natterer
6a9ce551cb app: rename GimpImageMapTool to GimpFilterTool 2016-05-10 13:52:24 +02:00
Alexandre Prokoudine
7d480b62b3 Update Russian translation 2016-05-10 01:16:41 +03:00
Alexandre Prokoudine
e66ec72a3f Fix a user-visible typo 2016-05-10 01:08:14 +03:00
Michael Natterer
68936e4cc2 app: don't preserve() GimpImageMapTool around most GimpImageMap calls
It's useles ever since we ported GimpImageMap to GEGL.
2016-05-09 21:48:16 +02:00
Michael Natterer
477987dce3 app: make GimpImageMap a subclass of GimpFilter
Reduces members and all sorts of duplication and is a much better
abstraction of what it does. Also make it a lot smarter and
self-updating, chop up the apply() function and move its parts where
they belong. Also, it's now aware of selection changes and does the
right thing.

Don't abort GimpImageMapTool on selection changes, it now nicely
handles that.
2016-05-09 21:40:20 +02:00
Michael Natterer
9bb6d19f6c app: remove a call to gimp_image_map_apply() from GimpBlendTool
It's not needed any longer after gimp_image_map_set_mode().
2016-05-09 01:49:32 +02:00
Michael Natterer
288cf2c0cc app: remove most calls to gimp_image_map_tool_preview()
see commit below, they are not needed any longer. Also call
gimp_image_map_tool_preview() from gimp_image_map_tool_create_map()
and remove more other calls to preview().
2016-05-09 01:41:02 +02:00
Michael Natterer
143a2bcb95 app: make GimpImageMap setters update the drawable by itself
As in, don't require a call to gimp_image_map_apply() after setting.
2016-05-09 01:40:01 +02:00
Michael Natterer
c77357053c app: make gimp_image_map_tool_preview() private
- call it in gimp_image_map_tool_get_operation() so
  gimp_operation_tool_set_operation() doesn't need to call it

- gimp_image_map_tool_settings_import() doesn't need to call it because
  importing settings changes the config object anyway
2016-05-09 01:21:03 +02:00
Michael Natterer
c6c458a2eb app: don't call gimp_image_map_tool_preview() in GimpOperationTool
Instead, emit "notify" in the config object, which is a hack,
but a temporary one. If should be the right code tho, if only
Gegl pads would be normal properties...
2016-05-09 01:07:21 +02:00
Ell
48c2038951 Bug 765326 - Status bar progress messages aren't always updated
Keep GimpStatusbar progress messages at the front of the list.

Previously, gimp_statusbar_push() and friends would push progress
messages behind temporary messages, and would push normal messages,
added after a progress had started, in front of progress messages.
This resulted in the progress bar text not being updated if a
temporary message was active at the time the progress started, or
if a normal message was pushed after the progress started.

This commit fixes this by always keeping progress messages at the
front of the message list.
2016-05-08 22:33:08 +00:00
Ell
ce8cbe6540 app: update GimpStatusbar message icon even when the text is unchanged
Probably just academic.
2016-05-08 22:32:28 +00:00
Ell
bb4d04dce5 app: refactor GimpStatusbar message pushing/popping code
... to reduce duplication, and make less assumptions about the
position of messages on the list.

In preperation for some bug fixes.
2016-05-08 22:32:28 +00:00
Michael Natterer
54c0b047b2 app: add basic support for creating images with color profiles
Add "gboolean color_managed" and "GFile *color_profile" to
GimpTemplate. Add a toggle and profile combo to GimpTemplateEditor.
Honor the new template properties in gimp_image_new_from_template().

Using a GFile property instead of a GIMP_TYPE_CONFIG_PATH is
preliminary, see the previous commit. I'd like to use GFile more
directly when dealing with config files, this is for testing that.
2016-05-08 23:20:26 +02:00
Michael Natterer
d4d03d186d app: use gimp_config_path_expand() in gimp_prop_profile_combo_box_new() 2016-05-08 23:12:29 +02:00
Michael Natterer
64fb18453c libgimpconfig: add support for (de)serializing GFile properties
Use g_file_get_parse_name() and g_file_parse_name() in order to turn
them into strings and back. Not really sure if we will end up needing
this, but I need it for current hacking. It's clean code and easy
enough to revert, so no harm done in either case.
2016-05-08 23:08:38 +02:00
Ell
ce27a627e0 app: fix menu icon of "Selection Editor"
Was GIMP_STOCK_TOOL_RECT_SELECT; changed to GIMP_STOCK_SELECTION, to
match the actual icon of the dialog.
2016-05-08 20:30:13 +00:00
Ell
2f96950eaa pdb: Modify gimp-selection-border to use BORDER_STYLE_SMOOTH
instead of BORDER_STYLE_FEATHERD.

Changes the behavior of the function, but probably for the better.

This, and the previous 5 commits, fix bug 764614.
2016-05-08 19:23:48 +00:00
Ell
60b31cce0f app: Add "Border style" combo to the "Select -> Border..." dialog
instead of the "Feather border" toggle, and pass the selected style
to gimp_channel_border().

The border style defaults to "Smooth", whereas the previous default
behavior corresponds to "Hard".
2016-05-08 19:22:24 +00:00
Ell
8b11a505d9 app: Handle zero radius in gimp_channel_border()
Can only be triggered through PDB.  Currently assigns illegal values
to the GEGL ops' properties.
2016-05-08 19:22:24 +00:00
Ell
15d4908076 app, pdb: Modify gimp_channel_border() to take a style parameter
isntead of the feather parameter, and pass it to
gimp_gegl_apply_border().

Make the necessary changes to the rest of the code to maintain the
current behavior.

Mass parameter alignment changes to gimpchannel.h. Sigh #2...
2016-05-08 19:22:24 +00:00
Ell
45efe6c405 app: Modify gimp_gegl_apply_border() to take a style parameter
instead of the feather parameter.

The BORDER_STYLE_HARD and BORDER_STYLE_FEATHERED styles are implemented
using the "gimp:border" operation, as was done previously.  The
BORDER_STYLE_SMOOTH style is implemented by performing a "gimp:grow" and
a "gimp:shrink", and subtracting the shrunk image from the grown image
using "gegl:substract".

gimp_channel_border() is modified to pass either BORDER_STYLE_HARD or
BORDER_STYLE_FEATHER, depending on its feather parameter, to maintain
the current behavior.  The next commit replaces it with a style
parameter as well.

Mass parameter alignment changes to gimp-gegl-apply-operation.h.  Sigh...
2016-05-08 19:22:24 +00:00
Ell
46a9690353 app: Add GimpChannelBorderStyle enum
Will be used as a parameter to control the behavior of
gimp_channel_border(), and the corresponding "Select -> Border..."
action, instead of the feather flag.

Can be one of:

  - GIMP_CHANNEL_BORDER_STYLE_HARD: Current behavior, unfeathered.
  - GIMP_CHANNEL_BORDER_STYLE_SMOOTH: Smooth border, better handling
    partial selection, implemented as explained in the next commit.
  - GIMP_CHANNEL_BORDER_STYLE_FEATHERED: Current behavior, feathered.
2016-05-08 19:22:24 +00:00
Michael Natterer
d37d39bc71 app: some cleanup in gimp_prop_profile_combo_box_new()
- don't warn if an object property is passed (for GFile properties)
- pass the history file to gimp_color_profile_combo_box_new()
2016-05-08 21:13:55 +02:00
Michael Natterer
3244637dc4 app: enable color management when a profile is assigned to the image 2016-05-08 20:56:54 +02:00
Michael Natterer
20f5e25195 app: add gimp_prop_profile_combo_box_new()
and remove the same but less flexible code from the prefs dialog.
2016-05-08 20:38:46 +02:00
Michael Natterer
a544ad4718 app: #include "gimpimage-color-profile.h" in gimplayer-new.c 2016-05-08 19:56:16 +02:00
Michael Natterer
1da4236e44 app: set the image's "is color managed" in gimp_image_new_from_drawable()
based on the src image's setting.
2016-05-08 19:53:16 +02:00
Michael Natterer
cc83d9461c app: move the image-duplicate action next to image-new
Just code rordering.
2016-05-08 19:53:16 +02:00
Michael Natterer
58d17e70be app: add Image -> Color Management -> Color Management Enabled
To enable/disable color management for the image.
2016-05-08 19:53:16 +02:00
Michael Natterer
e69bb90197 app: show the image's "is color managed" state in the window title string
Instead of the profile name, print "(not color managed)".
2016-05-08 19:53:16 +02:00
Michael Natterer
8eb6cdf488 app: pass profiles around along with the buffers in the transform code
"transform" as in flip, rotate, affine. Same reasoning as in the
gimp_selection_float() commit below.
2016-05-08 18:35:40 +02:00
Michael Natterer
2739c34573 app: pass the right color profile around in gimp_selection_float()
This doesn make any difference because a NULL profile would do the
same, but it's safer to pass the actual profile instead of relying on
the magic meaning of NULL in the call to
gimp_layer_new_from_gegl_buffer().
2016-05-08 18:33:22 +02:00
Michael Natterer
5ec6d2c0f7 app: same fix as below in gimplayer-new.c
Don't use the (wrong) global display color managment switch to
determine whether or not to convert the buffer to the image's
profile. Use the image's "is color managed" switch.
2016-05-08 18:30:17 +02:00
Michael Natterer
0e3c7ea204 app: handle profile conversion correctly in gimp_layer_convert()
We used to depend on the global color management OFF switch from
prefs, but that's meant for display color management. Now, don't do a
profile transform if the target image's color management is disabled.
2016-05-08 18:23:09 +02:00
Michael Natterer
cc9154b425 app: don't return any cached transforms is the image is not color managed 2016-05-08 18:20:19 +02:00
Michael Natterer
34a826d735 app: return built-in profiles from GimpColorManaged::get_color_profile(image)
if the image is not color managed.
2016-05-08 18:15:36 +02:00
Michael Natterer
c28244c49d app: enable color management when the image is converted to a profile 2016-05-08 18:12:28 +02:00
Michael Natterer
7fffa9dc2a app: don't run and color profile import if the image is not color managed 2016-05-08 18:10:50 +02:00
Michael Natterer
801b1bb9bc app: reorder private functions in gimpimage-color-profile.c 2016-05-08 18:06:16 +02:00
Michael Natterer
81845552ef app: add a per-image "is color managed" switch
in order to enable/disable color management for this image. Completely
unused at the moment.
2016-05-08 18:02:57 +02:00
Piotr Drąg
1dc9deb309 Updated Polish translation 2016-05-08 14:21:32 +02:00
Kristian Rietveld
a31fe9521f libgimpwidgets: Mac OS X: fix build 2016-05-07 09:09:06 +02:00
Michael Natterer
c3c4387d35 app: add Image -> Color Management -> Save Color Profile to File...
using the stuff added in the last few commits.
2016-05-07 03:01:18 +02:00
Michael Natterer
6c64cb0f16 libgimpwidgets: support saving profile in GimpColorProfileChooserDialog
Add the right action buttons, enable overwrite confirmation, and add
user-writable folders to the shortcuts pane. Also use the right API on
OS X instead of hardcoding /Library and ~/Library.
2016-05-07 01:36:23 +02:00
Michael Natterer
83df7f410d libgimpwidgets: more parameters for gimp_color_profile_chooser_dialog_new()
Add "parent" and "action", contraidicting myself from two commits
earlier.
2016-05-07 01:19:26 +02:00
Michael Natterer
f7f9174a9c Revert "libgimpwidgets: remove gimp_color_profile_chooser_dialog_new()"
This reverts commit 2bfd0711e8.

Don't ask...
2016-05-07 00:57:40 +02:00
Michael Natterer
2bfd0711e8 libgimpwidgets: remove gimp_color_profile_chooser_dialog_new()
Its API was too limited, and adding parameters for what we need next
would be equally random. It's a rarely used and mostly internal
widget, so simply use g_object_new().
2016-05-06 22:57:32 +02:00
Kristian Rietveld
61a1c877c1 libgimpwidgets: Mac OS X: read ICC profile from the correct buffer
Clearly, the buffer to read the ICC profile from is pointed to by
"buffer", not "data" which is a CFDataRef. I doubt the old code was
ever tested.
2016-05-06 20:53:41 +02:00
Kristian Rietveld
48721b5152 libgimpwidgets: update OS X code to get display profile to new API
The API that is currently used is deprecated since 10.6.
2016-05-06 20:53:09 +02:00
Michael Natterer
1bfd57b99c libgimpwidgets: add a shortcut to the profile chooser dialog on OS X too
Apparently it's "/Library/ColorSync/Profiles".
2016-05-05 19:40:52 +02:00
Jordi Mas
31a1d543db Update Catalan translation 2016-05-05 07:29:37 +02:00
Michael Natterer
46096a17e3 libgimpcolor: add gimp_color_profile_save_to_file() 2016-05-04 20:40:04 +02:00
Michael Natterer
086dc60505 libgimpcolor: don't leak the path in gimp_color_profile_new_from_file() 2016-05-04 18:58:37 +02:00
Michael Natterer
95f7cab96c app: don't use a NULL profile to create the new "layer from visible"
While NULL does the right thing, better not rely on that magic parameter,
pass the right profile and let the profile convert logic do its job.
2016-05-04 00:00:28 +02:00
Michael Natterer
08b67de9bf app: don't disable profile import when display color management is off
It's the wrong switch, and the dialog has its own "don't ask me again"
logic.
2016-05-03 23:57:04 +02:00
Tobias Ellinghaus
2359c29895 plug-ins: Only have one thumb loader for darktable 2016-05-03 15:10:32 +02:00
Yolanda Álvarez Pérez
bcdd2ebdd1 Updated Spanish translation 2016-05-03 11:10:04 +00:00
Michael Natterer
58f8808847 app: transfer the right profile in gimp_image_new_from_drawable()
Use the drawable's profile not the image's.
2016-05-03 12:51:52 +02:00
Michael Natterer
f1f91ecc2f app: don't reverse lists in GimpFilterStack and GimpUndoEditor
GimpList has a tail pointer now and can be traversed in reverse order.
2016-05-03 01:05:49 +02:00
Piotr Drąg
1334788ce4 Updated POTFILES.in 2016-05-02 12:22:21 +02:00
Tobias Ellinghaus
3123b49852 plug-ins: Add a bunch of formats for file-darktable
The mime types will need some love, and the magics might be buggy, but
only testing it in the wild will tell.
2016-05-02 00:20:45 +02:00
Kristian Rietveld
596d5f7435 pygimp: disable deprecation warnings for gimpmodule, drawable, tile
We need to bind deprecated methods and cannot just implement these using
the replacements. So therefore, do not disturb us with deprecation
warnings for these files.
2016-05-01 21:44:04 +02:00
Kristian Rietveld
b1117908f4 pygimp: add override for gimp_zoom_preview_get_source 2016-05-01 21:44:04 +02:00
Kristian Rietveld
a2d7a04700 pygimp: add overrides for two _convert_surface() methods 2016-05-01 21:44:04 +02:00
Kristian Rietveld
f29877dcc4 pygimp: require Pycairo in configure, link gimpui against pycairo 2016-05-01 21:44:04 +02:00
Kristian Rietveld
7934e1c8f1 pygimp: make GimpParasite type known to the code generator 2016-05-01 21:44:03 +02:00
Kristian Rietveld
fd7c1eff47 pygimp: add type definition for GimpColorManaged 2016-05-01 21:44:03 +02:00
Kristian Rietveld
f3583e21c5 pygimp: add GimpColorConfig object 2016-05-01 21:44:03 +02:00
Kristian Rietveld
5a1c4e035d pygimp: disable deprecation warnings for gimpui.c
gimpui.c is the language binding which is generated from gimpui.defs.
We need to bind deprecated methods, so please do not disturb us
with deprecation warnings for this file.
2016-05-01 21:44:03 +02:00
Kristian Rietveld
57a310ebd6 pygimp: add binding for GimpImageType 2016-05-01 21:44:03 +02:00
Massimo Valentini
79ce219a32 Bug 761823: TIFF export generates corrupted output...
... if picture has EXIF
2016-05-01 19:57:37 +02:00
Michael Natterer
a856fdab50 plug-ins: forgot to change an #include after renaming screenshot files 2016-05-01 19:25:52 +02:00
Michael Natterer
eb6ce6ebc6 plug-ins: rename all screenshot win32 files to screenshot-win32-* 2016-05-01 19:20:56 +02:00
Hartmut Kuhse
0303bd2a1a Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	plug-ins/file-tiff/file-tiff-load.c
	plug-ins/file-tiff/file-tiff-load.h
	plug-ins/file-tiff/file-tiff.c
2016-05-01 19:19:09 +02:00
Hartmut Kuhse
ed80db30c9 plug-ins: convert win-snap to screenshot
works as win-snap, lots of optimizing work to be done.
2016-05-01 19:10:57 +02:00
Hartmut Kuhse
64ee853bf5 plug-ins: convert win-snap to screenshot
works as win-snap, lots of optimizing work to be done.
2016-05-01 19:02:05 +02:00
Michael Natterer
ad25307a3b plug-ins: remove the magic from file-nef-load
It was matching a lot of TIFFs.
2016-05-01 18:41:21 +02:00
Michael Natterer
6b4dd30fca app: prefer magic-less file procedures again when matching a filename
This essentially reverts 1bf8eef14f
which tried to prefer file procedured that are GIO-enabled over
indirect loading via the file-uri plug-in. But file-uri is gone now so
we can treat all file procedured the same again, restoring the
original logic.

Now a file procedure which specifies only an extension is again
preferred over magic matching.
2016-05-01 18:41:21 +02:00
Tiago Santos
fe351b7c35 Updated Portuguese translation 2016-05-01 14:43:34 +00:00
Michael Natterer
a659036b40 app: switch the list of tools to using "append" mode
and ret rid of registering tools in reverse order, and reversing the
list after deserializing it.
2016-05-01 16:05:44 +02:00
Michael Natterer
0ab6e6be69 app: make sure the last *visible* layer is displayed in normal mode
The bottom visible layer must be rendered in normal mode because
every other mode on top of nothing renders nothing.

Before, we would display a stack's last layer in normal mode, which
was a braindead attempt to make the layer stack look like in 2.8. Now
we set GimpFilter's "is-last-node" property the right way by looking
at the filters' visibility in GimpFilterStack.
2016-05-01 15:38:36 +02:00
Michael Natterer
39909b6008 app: replace GimpList's internal GList with a GQueue
so we can easily iterate in reverse order, and access the last element
in O(1). Nothing makes use of this yet.
2016-05-01 15:22:44 +02:00
Michael Natterer
7ae81e70b9 app: move the "visible" property from GimpItem to GimpFilter
Same for the "visibility_changed" signal. GimpItem keeps its
visibility API because it adds undo over GimpItem's API.
2016-05-01 14:27:43 +02:00
Piotr Drąg
c11c61d00e Updated Polish translation 2016-05-01 12:43:54 +02:00
Michael Natterer
8c107963e6 app: implement GimpColorManaged in GimpDrawable
so now all drawables have a profile. Default to the babl format's
bultin profile and override to use the image's format in GimpLayer.
2016-04-30 23:41:32 +02:00
Michael Natterer
5c57885ac3 app: add ellipses to the color mode conversion menu items
if they show a dialog.
2016-04-30 19:41:09 +02:00
Michael Natterer
329d5c0a0f app: #include gimp-babl.h in gimpimage-convert-type.c 2016-04-30 18:50:23 +02:00
Michael Natterer
5aff776a8a app: rename convert-type-dialog.[ch] to convert-indexed-dialog.[ch] 2016-04-30 18:49:02 +02:00
Michael Natterer
182da6d2e9 Bug 765176 - ICC profile conversions between grayscale and RGB images
When converting between RGB and GRAY and the image has a profile,
invoke the convert profile dialog with the newly added image type
conversion feature.
2016-04-30 18:35:52 +02:00
Michael Natterer
12f9aa9bd2 Bug 765176 - ICC profile conversions between grayscale and RGB images
Add a dest_profile parameter to gimp_image_convert_type() so a profile
can be chosen when converting between RGB and GRAY. Has no GUI yet.
2016-04-30 18:35:52 +02:00
Michael Natterer
33adec2a3e app: add gimp_image_validate_color_profile_by_format()
which checks if a color profile is suited for pixels of a Babl format.
2016-04-30 18:35:52 +02:00
Michael Natterer
1cf04cc4b9 app: prepare the color profile dialog for doing RGB <-> GRAY conversion
Get rid of individual constructors for assign and convert, instead
have one constructor that takes a dialog type enum. No new features
yet in this commit.
2016-04-30 18:35:52 +02:00
Michael Natterer
ef8b802032 app: move indexed conversion to gimpimage-convert-indexed.[ch]
It's so much code and takes so many additional parameters over RGB and
GRAY conversion, it got its own place and function now.
2016-04-30 18:35:52 +02:00
Michael Natterer
4086932e8d app: tiny and completely irrelevant stylistic cleanup 2016-04-30 18:35:52 +02:00
Michael Natterer
ef4ab94a12 app: change GimpDrawable::convert_type() to take a target profile
instead of just a boolean "convert_profile". This takes the logic to
figure the right target profile out of gimp_layer_convert_type(), it
can't possibly know everything about how to convert anyway, and having
the logic in the callers conveniently splits it up and distributes its
parts to the places they belong.

This commit should cause no behavor change and is just preparation for
fixing bug 765176.
2016-04-30 18:35:52 +02:00
Balázs Meskó
3708f50fd9 Updated Hungarian translation 2016-04-30 12:45:51 +00:00
Kristian Rietveld
fb5d4ac076 pygimp: remove calls to gimp_context_set_transform_recursion
This deprecated function is currently a no-op anyway.
2016-04-29 21:35:43 +02:00
Kristian Rietveld
bb4cb5b4c1 pygimp: fix typo 2016-04-29 21:35:43 +02:00
Kristian Rietveld
6746e502c2 pygimp: fix implicit enum casts 2016-04-29 21:35:43 +02:00
Kristian Rietveld
04ef2c34db pygimp: python-console: ensure initial width of 80 characters 2016-04-29 21:35:43 +02:00
Kristian Rietveld
2f1c947abc pygimp: pyconsole: set up a default size of 80x40 characters
A default width of 80 characters makes Python help readable by default.
2016-04-29 21:35:42 +02:00
Kristian Rietveld
cd5dfb8642 pygimp: pyconsole: use appropriate Pango function to estimate char width 2016-04-29 21:35:42 +02:00
Kristian Rietveld
d9bb8d18f9 pygimp: pyconsole: replace raw_input builtin with modal raw input
We need to run raw_input in modal mode, such that we can return the
text that has been entered as the return value. This makes the use
of "raw_input()" within the pyconsole work as well as makes "help()"
not get stuck (it was blocking on input on stdin).
2016-04-29 21:35:42 +02:00
Kristian Rietveld
229285379b pygimp: pyconsole: comment the code a bit
So the code can be understood by mere mortals like me.
2016-04-29 21:35:42 +02:00
Kristian Rietveld
a795c1c4ff pygimp: pyconsole: coding style 2016-04-29 21:35:42 +02:00
Kristian Rietveld
21a4999230 pygimp: pyconsole: remove unused method 2016-04-29 21:35:42 +02:00
Tobias Ellinghaus
3d86a6c709 plug-ins: Use GIMP's internal profile when loading EXR
... when it's appropriate.
2016-04-29 13:10:30 +02:00
Marco Ciampa
1c4fc5620f Updated Italian translation 2016-04-29 08:47:17 +02:00
João S. O. Bueno
207e904d7a Bug 765685: Disambiguates octal-escaped output in c-source image output
Fixes the plug-in output to render decimal digit
characters as octal escaped, so they can't be acidentally
combined in preceding escaped sequences. (i.e. the sequence
of values '255, 49'  is now rendered as '\377\049' instead of
 '\3771')

Thanks Steve Baker for noticing and reporting the issue.
2016-04-27 23:46:19 -03:00
Michael Natterer
52af9145d7 libgimpcolor: handle palette formats in gimp_color_profile_get_format()
Return "R'G'B'[A] u8" and "TYPE_RGB[A]_8" and babl and lcms formats.

I'm not sure which code triggered the warning about an unhandled
format, but now it handles indexed images too.
2016-04-27 00:48:23 +02:00
Michael Natterer
3a34a2b54c Bug 764320 - Xsane Gimp no device dialog
Pass the run_mode again to GIMP_EXTENSION plug-ins, this got lost in
the cleanup in commit dda06ac065.
Spotted by Massimo.
2016-04-26 16:10:08 +02:00
Tobias Ellinghaus
68b91cc9f6 plug-ins: Get an image size when creating thumbs with darktable
The reported size isn't very precise but close enough to get an idea of
what you will get. The problem is that raw files always have some unused
regions that get cropped away later.
Another source of discrepancy can be manual cropping by the user in
darktable, but there isn't much we can do about that.
2016-04-26 13:38:33 +02:00
Tobias Ellinghaus
980b08e380 plug-ins: Don't start darktable when creating thumbnails
... instead use the non-interactive darktable-cli. This is still
somewhat work in progress as the image size isn't returned yet.
2016-04-26 01:03:35 +02:00
Tobias Ellinghaus
9888824730 plug-ins: Try harder to export an image from darktable
Before there wouldn't be any intermediate file being written when
darktable sees more than one XMP file. Now the first image in its
temporary database gets exported.
2016-04-25 15:34:36 +02:00
Michael Natterer
eca44cc87d app: fix file_check_magic_list() to handle "and" matches again
where the magic is only supposed to match if all magics in the "and"
list match.
2016-04-25 01:04:07 +02:00
Michael Natterer
f3502d72b3 plug-ins: add a magic for Nikon NEF files to file-darktable
...which I hope is the right one...
2016-04-25 00:35:39 +02:00
Michael Natterer
6af83a5a08 app: improve file magic matching
Change file magic matching from using a simple boolean "magic matches"
logic to using a matching quality. The quality is measured by the
number of bytes that matched.

Matching a single file procedure's magics now tries all magics and
returns the best match quality.

Searching a file procedure for a given file now tries all file
procedures and returns the one with the best match quality.

This fixes raw camera files being opened as TIFF, given a better magic
than just the generic TIFF magic is provided.
2016-04-24 23:56:57 +02:00
Michael Natterer
dc3f276476 plug-ins: use the right magic for EXR files
and shorten a function name.
2016-04-24 23:31:25 +02:00
Michael Natterer
8e52057e8c plug-ins: use the right magic for Canon CR2 files
and some general code cleanup.
2016-04-24 23:30:25 +02:00
Michael Natterer
1263552f24 libgimp: don't #define TILE_HEIGHT gimp_tile_width()
Fortunately, tile width and height were alyways the same.
2016-04-24 20:04:42 +02:00
Massimo Valentini
022439e463 Bug 765492: Memory leak in gimp_brush_cache_add
g_free the lru 'unit' when removed from the cache

and keep track of the list length and last item
while looking for a duplicate already present in
the cache.
2016-04-24 19:41:22 +02:00
Michael Natterer
19738412ce app: simplify gimp_image_convert_type()
It's pretty pointless to have 5 differently-styled if(INDEXED) blocks
after each other, with zero non-INDEXED code in between.
2016-04-24 00:55:04 +02:00
Jehan
77a68e00af Bug 765459 - Artifacts symmetry painting with big brushes.
Use gegl_node_blit() instead of gegl_node_process() as proposed by
Massimo in the bug report.
2016-04-24 00:01:45 +05:30
Piotr Drąg
7433c65c84 Updated Polish translation 2016-04-23 14:19:56 +02:00
Michael Natterer
785c104c69 plug-ins: more code cleanup in file-bmp
Use GLib endian macros in bmp-save.c
2016-04-23 01:07:20 +02:00
Michael Natterer
e5a669bdfc libgimpbase: fix gimp_metadata_set_from_xmp() to really expect XMP
Don't skip the first 10 bytes. That code was there to skip the magic
"GIMP_XMP_1" of the old "gimp-metadata" parasite. Instead, properly
check for that magic in xcf_load_image() and pass only the actual XMP
to gimp_metadata_set_from_xmp(). Also remove the +10 hack in file-exr.
2016-04-22 22:49:06 +02:00
Massimo Valentini
a3f4c50b3e Bug 765411: CRITICAL warnings loading an xcf with...
"exif-data" parasite

To migrate old "exif-data" parasites to GimpMetadata
an exif-only jpeg file is generated in memory, but its
APP1 marker length was 2 bytes short resulting in a
CRITICAL warning:

** (gimp-2.9:9): CRITICAL **: Directory Photo: IFD exceeds data buffer, cannot read next pointer.

Properly terminating the jpeg with an EOI marker also
gets rid of the WARNING:

** (gimp-2.9:9): WARNING **: JPEG format error, rc = 5
2016-04-22 17:30:44 +02:00
Tobias Ellinghaus
4e144fea69 plug-ins: Read Xmp data from EXR files
This commit needs review as it uses an ugly hack to make
gimp_metadata_set_from_xmp() do what it wants.
2016-04-22 17:01:58 +02:00
Tobias Ellinghaus
e81cef7c03 plug-ins: Read comment and Exif data from EXR files 2016-04-22 14:41:34 +02:00
Massimo Valentini
5e5fb7776c Bug 765336: CRITICAL warning loading a thumbnail-less...
tiff GIMP saved

the plugin unconditionally used to add a TIFFTAG_SUBIFD
whose number_of_sub_IFDs was wrong when the user asked
not to include a thumbnail.

Reloading the file in GIMP resulted in:

** (file-tiff:1): CRITICAL **: Directory SubImage1 with 18761 entries considered invalid; not read.
2016-04-21 18:47:54 +02:00
klausstaedtler
e62d46ae80 icons: add icon prototypes
the icons in the Prototype directory are intended as a
'icon-pool' dedicated for developers, e.g. for solving
Bug 759904

All icons in there a not optimized (e.g. not pixel-perfect),
the are available as vectorial too.

Once they are in use by GIMP they will get all needed optimizations
(Pixel-Perfect, Size.... what is necessary)

Available icons are for symbolical and color icons themes and have 16x16  pixels.
2016-04-21 18:32:55 +02:00
Tobias Ellinghaus
24b9a24a66 plug-ins: Only enable darktable loading when it's installed
For now we only check if darktable is in PATH, of the right version and
supporting the featuers we need (i.e., Lua scripting). We still want to
have a way to manually specify the path to the darktable installation in
preferences I guess.
2016-04-21 11:42:50 +02:00
Elle Stone
db400d558a Make grayscale profile with LAB companding curve TRC 2016-04-21 05:05:00 -04:00
Yolanda Álvarez Pérez
0467d8c861 Updated Spanish translation 2016-04-21 08:15:50 +00:00
klausstaedtler
9e8a4501c5 icons: Changes color
color-scalable
remove gradient for more crisp

gimp-tool-align
gimp-tool-flip
gimp-tool-handle-transform
gimp-tool-path
gimp-tool-perspective-clone
gimp-tool-rotate
gimp-tool-scale
gimp-tool-shear
gimp-tool-unified-transform
2016-04-20 20:12:17 +02:00
Michael Natterer
eb15808e86 po-plug-ins: forgot to push this with the last commit 2016-04-20 13:57:03 +01:00
Michael Natterer
f6a02b5665 plug-ins: cleanup in file-bmp
Rename files, functions, variables, remove globals, indent, foo.
2016-04-20 13:55:53 +01:00
Yolanda Álvarez Pérez
e63147555b Updated Spanish translation 2016-04-20 09:18:17 +00:00
Massimo Valentini
a357bfec89 Bug 765247: Foreground select tool does not respect item offsets 2016-04-20 06:48:04 +02:00
Michael Natterer
3968226644 Bug 765176 - ICC profile conversions between grayscale and RGB images
gimp_image_convert_type(): call gimp_drawable_convert_type() with
convert_profile = TRUE.
2016-04-20 04:20:58 +01:00
Michael Natterer
66525e634e app: fix wrong parameter name in gimp_drawable_real_convert_type() 2016-04-20 04:19:44 +01:00
Michael Natterer
c4551cf1d2 plug-ins: fix error from manual patch applying (height instead of width) 2016-04-20 01:34:09 +01:00
Michael Natterer
4cf6dad0a0 plug-ins: port file-tiff to GIO
Using code from gegl:tiff-load and gegl:tiff-save which has a mode for
local buffering if the input/output streams don't support seeking.
Unfortunately this code is broken and is disabled for now.
2016-04-19 23:09:26 +01:00
Tobias Ellinghaus
1722e13c78 plug-ins: Fix copyright header of darktable lua script 2016-04-19 22:39:20 +02:00
Piotr Drąg
d6fd58aaa3 Updated POTFILES.skip 2016-04-19 21:57:32 +02:00
klausstaedtler
554c8c6438 icons: Changes color
color-scalable
pixel-perfect 16x16
gimp-display-filter-colorblind
gimp-display-filter-gamma
gimp-display-filter-lcms
gimp-display-filter-proof
gimp-dynamics
gimp-reshow-filter
gimp-sample-point
2016-04-19 18:37:24 +02:00
Michael Natterer
b4e48c7ecd plug-ins: pass GFiles around instead of filenames in file-tiff
This is no port to GIO yet.
2016-04-19 17:18:17 +01:00
Ell
76adffa943 app: clear cond and mutex after usage 2016-04-19 17:43:55 +02:00
Yolanda Álvarez Pérez
9a4f5800d4 Updated Spanish translation 2016-04-19 10:19:59 +00:00
Tobias Ellinghaus
b360d5a678 plug-ins: Actually export to linear sRGB from darktable 2016-04-19 02:29:29 +01:00
Michael Natterer
aebda88bd3 plug-ins: minor cleanups in file-darktable 2016-04-19 02:28:24 +01:00
Tobias Ellinghaus
f89d8fcaa7 plug-ins: don't create a temp dir when using darktable 2016-04-19 02:19:39 +01:00
Tobias Ellinghaus
74a249cabe plug-ins: Don't leak the gegl buffer in pnm loader 2016-04-19 01:20:28 +01:00
Tobias Ellinghaus
fc0f42def4 plug-ins: add new plug-in file-darktable
Which loads raw files by having them developed in darktable.
Also disable NEF support in file-gegl.
2016-04-19 00:21:15 +01:00
Simon Budig
87dd280e2c pagecurl: reduce fish genocide. 2016-04-18 22:57:16 +02:00
klausstaedtler
800ef53c09 icons: Changes color
color-scalable
pixel-perfect 16x16
gimp-paste-as-new
gimp-paste-into
gimp-question
2016-04-18 22:15:26 +02:00
Andrew Worsley
69e5c553d4 Bug 155733 - need to check return values of gimp_drawable_mask_bounds()
Add mask_intersect() to pygimp that allows access to
gimp_drawable_mask_intersect() and returns an exception if there is no
overlap.
2016-04-18 21:12:51 +01:00
Simon Budig
c4498e78f6 pagecurl: avoid 8 bit handling. 2016-04-18 22:09:50 +02:00
Andrew Worsley
455a91819b plug-ins: add back some menu entries for plugins
So we see what we have. Need some other way of dealing with this stuff...
2016-04-18 21:06:16 +01:00
Andrew Worsley
cfa9132c4d Bug 155733 - need to check return values of gimp_drawable_mask_bounds()
Remove calls to gimp_drawable_mask_bounds() from most plug-ins.
This just leaves a python gimp interface plug-in.
2016-04-18 21:02:32 +01:00
Thomas Manni
f4cb2dd881 Bug 109161 - Improve Histogram with Luminance Channel
Add a luminance channel to GimpHistogram
2016-04-18 19:35:06 +01:00
Michael Natterer
1d337877d8 plug-ins: some cleanup in file-exr 2016-04-18 19:06:41 +01:00
klausstaedtler
c3efe1b75b icons: Changes
add gimp-symmetry to icon-list.mk

all vectorial themes (color & Symbolic)
add gimp-symmetry.svg to ...\scalable directory

color-scalable
pixel-perfect 16x16
gimp-symmetry
gimp-color-pick-from-screen
gimp-path
gimp-path-stroke
gimp-move-to-screen
2016-04-18 19:11:31 +02:00
Simon Budig
f456565de2 pagecurl: do a pretty basic port to the gegl API. Still 8 bit though. 2016-04-18 15:21:24 +02:00
Massimo Valentini
a41b4a0436 Bug 765205 - GIMP crashes dropping the fg color on a text layer
Pass the GimpRGB's address again to gimp_text_layer_set(), not
the entire struct.
2016-04-18 12:52:56 +01:00
Andrew Worsley
d7efab3daf fix missing semicolon in emboss 2016-04-18 12:45:08 +01:00
Dimitris Spingos
2c455978fd Updated Greek translation 2016-04-18 11:36:46 +03:00
Michael Natterer
8bb48ac5de Bug 555525 - 64 Bit Build on Mac OS X Leopard fails...
...because of TWAIN interface

Remove all Mac TWAIN stuff, we will get proper OS X scanner support
pretty soon.
2016-04-18 00:05:41 +01:00
Andrew Worsley
4f99c7294a Bug 155733 - need to check return values of gimp_drawable_mask_bounds()
Remove gimp_drawable_mask_bounds() from several plug-ins

Also avoid null pointer crash by returning if called with null
drawable which appears to happen once on the initial update. Instead
prints a message for some one who might want to fix it

Change gimp_drawable_mask_intersect() to check return value

We still get some GIMP Error and Warnings but no crashes now
2016-04-17 21:42:49 +01:00
Michael Natterer
29f55a95ef app, pdb: minor cleanup in the new font loading code 2016-04-17 21:06:00 +01:00
klausstaedtler
a75fa755f4 icons: Changes color
color-scalable
pixel-perfect 16x16
gimp-gradient-bilinear
gimp-gradient-conical-asymmetric
gimp-gradient-conical-symmetric
gimp-gradient-linear
gimp-gradient-radial
gimp-gradient-shapeburst-angular
gimp-gradient-shapeburst-dimpled
gimp-gradient-shapeburst-sherical
gimp-gradient-square
gimp-gradient-spiral-clockwise
gimp-gradient-spiral-anticlockwise
2016-04-17 19:18:58 +02:00
Michael Natterer
f7fc87884e Bug 765180 - Hard-coded NTSC parameters in babl/GEGL/GIMP
Port GimpColorWheel to GIMP_RGB_LUMINANCE().
2016-04-17 17:52:28 +01:00
Kristian Rietveld
30b73125f8 Bug 449848 - Startup: initialize fontconfig in the background ...
... to avoid long pause on start

On non-Linux operating systems the fontconfig cache is often not
initialized by default. The first time GIMP was launched, this led
to a non-responding application, confusing many users.

The initialization of fontconfig has now been moved to a separate
thread. The main thread will wait for this fontconfig thread to
complete, regularly pulsing the UI.

This patch was partly based on an earlier patch by Tor Lillqvist.
2016-04-17 17:27:06 +01:00
Michael Natterer
d23135ef97 app: enable a pulsing progress bar in the splash
Startup functions can now make the progress bar pulse in order
to report that something of unknown duration is in progress.

Call status_callback (NULL, NULL, same_percentage)
2016-04-17 16:52:31 +01:00
klausstaedtler
57ef0a6c36 icons: Changes color&symbolic
color-scalable & symbolic-scalable harmonize with cursor
gimp-tool-scale

color-scalable
pixel-perfect 16x16
gimp-resize
gimp-merge-down
gimp-scale
2016-04-17 16:11:03 +02:00
Piotr Drąg
0cc7468d53 Updated Polish translation 2016-04-17 15:51:33 +02:00
klausstaedtler
18709e9f24 icons: Changes color
color-scalable.svg
pixel-perfect 16x16
gimp-controller-midi
gimp-cursor
gimp-device-status
gimp-duplicate
gimp-error
gimp-floating-selection
gimp-image
gimp-images
gimp-input-device
gimp-layer-to-imagesize
gimp-list
gimp-prefs-default-grid
gimp-text-layer
gimp-warning
gimp-portrait
gimp-landscape
2016-04-17 13:17:15 +02:00
Michael Natterer
5730278eeb Bug 759796 - Blend tool regression
We must not dither the alpha channel if it is fully opaque or fully
transparent. 2.8 did the same but the dithering of these values was
apparently consumed be putting the result into 8 bit values.
2016-04-17 01:06:08 +01:00
Michael Natterer
d9e608f722 app: fix crash in config property cleanup 2016-04-17 00:59:47 +01:00
Kristian Rietveld
cdc7542d46 Bug 756178 - Crash on new layer creation in fullscreen mode
Disable "new-style" fullscreen mode on OS X, we need support in
GTK+ in order for this to work properly. The currently available
fullscreen option in View > Fullscreen works fine and we plan to
migrate to the "new-style" fullscreen support in the future.
2016-04-17 00:39:40 +01:00
Michael Natterer
3a837ed17c app: cruft removal and cleanup in the config classes 2016-04-17 00:32:07 +01:00
Michael Natterer
f11e1d141d libgimpconfig: deprecate all GIMP_CONFIG_INSTALL_PROP_FOO() macros 2016-04-17 00:12:33 +01:00
Michael Natterer
d17fa32ca2 libgimpconfig: port to GIMP_CONFIG_PROP_FOO() 2016-04-17 00:12:10 +01:00
Michael Natterer
9fd0c74ebe modules: port to GIMP_CONFIG_PROP_FOO() 2016-04-17 00:11:39 +01:00
Michael Natterer
65d3ce7cb8 app: port everything to GIMP_CONFIG_PROP_FOO() 2016-04-17 00:11:06 +01:00
klausstaedtler
4b1a27f011 icons: Changes color & symbolic
color-scalable.svg
pixel-perfect 16x16
gimp-center
gimp-controller-keyboard
gimp-display-filter-contrast
gimp-flip-horizontal
gimp-flip-vertical
gimp-invert
gimp-rotate-90
gimp-rotate-180
gimp-rotate-270
gimp-tools
gimp-curve-free
gimp-curve-smooth


symbolic-scalable.svg
harmonize with color-scalable
gimp-flip-horizontal
gimp-flip-vertical
gimp-tool-rotate
2016-04-16 22:49:37 +02:00
Jehan
f3d6dd356d app: indentation cleanup.
Replace tabs with spaces.
2016-04-16 19:08:13 +01:00
Michael Natterer
9e01106046 app: set a reasonable minimum height for prop text buffers/views 2016-04-16 17:51:32 +01:00
klausstaedtler
d79d904cec icons: Changes color
color-scalable.svg
pixel-perfect 16x16
gimp-cap-butt
gimp-cap-round
gimp-cap-square
gimp-colormap
gimp-histogram
gimp-histogram-linear
gimp-histogram-logarithmic
gimp-join-bevel
gimp-join-miter
gimp-join-round
gimp-layer
gimp-tool-options
gimp-tool-preset
2016-04-16 16:18:46 +02:00
Jehan
0fcfd4f7b7 Bug 751333 - Crash when moving cursor with ibus "Hangul" input method...
... and improve input method UI. IM should not use some floating overlay
frame to display the preedit text. Instead it is now directly inserted
into the text tool box, as selected text. It permits redimensionning of
the text box while typing, and push the rest of the text when inserting
in the middle (instead of superimposing an overlay box over the current
text box, making everything unreadable).
Input methods still have a few more issues, but this fixes the main UI
weirdness as well as the crash with Hangul IM.
2016-04-16 14:24:54 +01:00
Kristian Rietveld
ca9365f2b5 core: bail out of gimp_exit if exit was cancelled by user 2016-04-16 14:20:43 +01:00
Kristian Rietveld
1e4cbd3232 core: move final unref of images from gimp_real_exit to gimp_exit
We needed to get rid of these images at a later point. This fixes (at
least) a crash seen on Mac OS X, where the images were being unreffed
before the last GimpActions (with a reference to the image) were
unreffed.
2016-04-16 13:55:46 +01:00
klausstaedtler
a2d25e5390 icons: Changes color
color-scalable.svg
pixel-perfect 16x16
gimp-channel
gimp-channels
gimp-channel-red
gimp-channel-green
gimp-channel-blue
gimp-channel-alpha
gimp-channel-indexed
gimp-channel-gray
2016-04-16 14:04:34 +02:00
Michael Natterer
c9b8582db5 menus: really add gegl:gegl to the menus 2016-04-16 11:31:08 +01:00
klausstaedtler
aa4b125eae icons: Changes color
color-scalable.svg
pixel-perfect 16x16
gimp-convert-grayscale
gimp-convert-indexed
gimp-convert-rgb
2016-04-16 11:16:57 +02:00
Sven Claussner
c5aef38613 Make PDBGEN documentation clearer.
Tell the developer not to run pdbgen.pl manually, but make.
Describe the destdir environment variable.
Update the /lib directory to the current /libgimp directory.
README_NEW_PDB_PROC: correct spelling.
2016-04-16 07:29:26 +00:00
Sven Claussner
0fa6c7f121 flood: improve PDB description completely
Improve PDB description in generator template and all generated files.
2016-04-16 06:19:36 +00:00
Michael Natterer
020b524e59 app: add gegl:gegl to Filters -> Generic
Also fix packing of the operation GUI in GimpOperationTool,
so the text box can expand.
2016-04-16 03:18:29 +01:00
Michael Natterer
a638a30f8d app: use gimp_gegl_config_connect_node() in GimpImageMapTool
And remove all explicit node syncing, which also removes the need for
gimp_image_map_tool_map().
2016-04-16 03:02:05 +01:00
Michael Natterer
adc5237845 app: support GEGL error string properties in gimp_prop_gui_new_from_pspec() 2016-04-16 03:02:05 +01:00
Michael Natterer
b5f5a1cd28 app: add gimp_gegl_config_connect_node()
which connects the properties of a config GObject and a GeglNode, much
like g_object_bind_property() which we can't be used because GeglNode
properties can't be registered with the GObjectClass.
2016-04-16 03:02:05 +01:00
Kristian Rietveld
2213f29677 app: block edited signal in GimpDataFactory edited callback
This fixes a problem where in some cases the item next to the edited
item was changed inadvertently. This was caused by the fact that
the change of the label within the tree_name_edited callback triggered
a re-ordering of the items, which triggered a stop editing signal, which
finally caused a re-entrance in the tree_name_edited callback. By this
time the item below "path_str" has changed, which caused the name of
another object to be edited.
2016-04-15 23:39:57 +01:00
Michael Natterer
3fd6435198 app: add gimp_babl_format_get_color_profile()
and remove the code duplication added a few commits before.
2016-04-15 23:02:19 +01:00
klausstaedtler
1b2c64efd9 icons: Changes color
color-scalable.svg
pixel-perfect 16x16
gimp-selection-all
gimp-selection-border
gimp-selection-grow
gimp-selection-none
gimp-selection-shrink
gimp-selection-stroke
gimp-selection-to-channel
gimp-selection-to-path
2016-04-15 21:40:36 +02:00
Michael Natterer
5f8b6ce8da app: s/gimp_babl_get_description/gimp_babl_format_get_description/ 2016-04-15 19:19:09 +01:00
klausstaedtler
ba246b93c7 icons: Changes color
color-scalable.svg
pixel-perfect 16x16
gimp-reset
gimp-selection
gimp-selection-add
gimp-selection-intersect
gimp-selection-replace
gimp-selection-subtract
2016-04-15 19:40:27 +02:00
Michael Natterer
0a5ba05e45 app: GimpBuffer: same preview colorspace fixes as below for images/layers
Plus, implement GimpColorManaged so the view renderer can ask the
buffer for its profile.

This also fixes colors in cross-application copy & paste when GIMP
is the source.
2016-04-15 18:16:15 +01:00
Michael Natterer
f718940772 app: don't assume that a GimpColorManaged is always also a GimpPickable
Instead, get the color config via GimpViewRenderer's context.
2016-04-15 18:14:08 +01:00
Michael Natterer
9e8499bb48 Bug 478528 - Layer and Image previews are not color managed
Change gimp_viewable_get_[new]_preview() to return buffers of the
image's and layers' colorspace, but in u8. This way layer and image
previews can transform them correctly to the display profile.

Note: this makes plug-ins receive thumbnail buffers in that
pixel format too.

Also change gimp_viewable_get_[new]_pixbuf() to always return sRGB
buffers that can reasonably be put to screen directly, or put into DND
buffers. This is at least more correct now.
2016-04-15 16:52:25 +01:00
Michael Natterer
0ee27de463 app: cache more lcms transforms in GimpImage
Keep around transforms not only to/from the image's pixels to
"R'G'B'A double" (GimpRGB's format), but also to/from "R'G'B'A u8"
(GdkPixbuf's format). Also add API to access all cached transforms
and the Babl formats expected when calling lcms.
2016-04-15 16:49:36 +01:00
Cédric Valmary
13c08c7894 Updated Occitan translation 2016-04-15 12:34:37 +00:00
Yolanda Álvarez Pérez
062dc2f54d Updated Spanish translation 2016-04-15 10:43:48 +00:00
Michael Natterer
2120742cb9 app: don't unconditionally call tool_manager_modifier_state_active()
Only call it if the display is the active tool's focus display.
2016-04-15 11:28:13 +01:00
Michael Natterer
2a31b96f4b Bug 732160 - menu activation with alt-somekey makes tools stay...
...in "alt-pressed" mode

Menu activation doesn't cause a focus-out becaus menu keyboard
grabbing is implemented with a simple gtk_grab_add() (the menu popup
never gets the focus). Therefore, the canvas never gets a focus-out
event and the pressed modifiers are stuck.

Fixed by connecting to "grab-notify" on the canvas, and artificially
releasing all modifiers when the canvas is shadowed by a grab.
2016-04-15 00:22:25 +01:00
klausstaedtler
2db14d057a icons: Changes color
color-scalable.svg
replace 16x16 icons by 'pixel-perfect' 12x12px
gimp-quick-mask-on
gimp-quick-mask-off
gimp-zoom-follow-window

pixel-perfect 16x16
gimp-edit
gimp-layers
gimp-paths
gimp-visible
gimp-linked
2016-04-14 22:15:41 +02:00
Michael Natterer
70a81412b4 app: keep the split preview guide always movable
Change things so the guide is preferred over any color picking
interaction of the parent GimpColorTool. Needs a minor change in the
GimpCurvesTool subclass too.
2016-04-14 19:25:59 +01:00
Michael Natterer
ba8dd17396 plug-ins: port file-gif-save to GIO 2016-04-14 18:49:30 +01:00
klausstaedtler
b1396094e0 icons: Changes color
color-scalable.svg
replace 16x16 icons by 'pixel-perfect' 12x12px
gimp-close
gimp-menu-left
gimp-menu-right

replace 16x16 icons by 'pixel-perfect' 18x18px
gimp-color-picker-black
gimp-color-picker-gray
gimp-color-picker-white
2016-04-14 19:16:17 +02:00
Michael Natterer
b85d03eaab plug-ins: cleanup in file-gif-save
From the book of stashes, chapter 42.
2016-04-14 16:54:08 +01:00
Yolanda Álvarez Pérez
bf2471a0b6 Updated Spanish translation 2016-04-14 10:09:07 +00:00
Michael Natterer
8f8da22389 Bug 764630 - Preview curtain: can there be a switch "left/right"...
...for the preview?

Change to allow for split previews in all 4 directions. Remove the
direction controls from the filter dialog, and instead implement
shift- and control-clicking on the split guide to switch
original/filtered sides, or orientation.
2016-04-14 02:34:45 +01:00
klausstaedtler
678ff0bdac icons: Changes color
color-scalable.svg
replace 16x16 icons by 'pixel-perfect' 24x24px
gimp-hchain
gimp-vchain
gimp-hchain-broken
gimp-vchain-broken


replace 16x16 icons by 'pixel-perfect' 22x22px
gimp-char-picker
gimp-letter-spacing
gimp-line-spacing
2016-04-13 20:12:04 +02:00
Yolanda Álvarez Pérez
d6873a6d11 Updated Spanish translation 2016-04-13 07:33:33 +00:00
klausstaedtler
0d8a7ffba5 icons: Changes color
color-scalable.svg
replace 16x16 icons by 'pixel-perfect' 24x24px
gimp-hfill
gimp-hcenter
gimp-vfill
gimp-hcenter
gimp-text-dir-ltr
gimp-text-dir-rtl
2016-04-12 20:59:20 +02:00
Mario Blättermann
5348eec0ba Updated German translation 2016-04-12 17:07:08 +02:00
Mario Blättermann
67bdf19d98 Updated German translation 2016-04-12 17:06:04 +02:00
Mario Blättermann
23df9ab388 Updated German translation 2016-04-12 17:05:05 +02:00
Mario Blättermann
963fb03c5f Updated German translation 2016-04-12 17:03:51 +02:00
klausstaedtler
a8f986a2eb icons: Changes color
pixel-perfect:
gimp-gravity-east
gimp-gravity-west
gimp-gravity-south
gimp-gravity-north
gimp-gravity-north-east
gimp-gravity-north-west
gimp-gravity-south-east
gimp-gravity-south-west
2016-04-11 19:45:30 +02:00
Piotr Drąg
30fc5d26ef Updated Polish translation 2016-04-10 20:50:56 +02:00
klausstaedtler
b4a59a29da icons
'beautify' formatting of icon-list.mk add forgotten tab
2016-04-10 18:56:44 +02:00
klausstaedtler
7480f7468c icons:
add gimp-gegl.svg to vector24_images

color-scalable
pixelperfect 12x12
gimp-swap-colors.svg
2016-04-10 18:54:03 +02:00
Jehan
0e33c7d84d icons: use pixel-perfect 24x24 icons with vectorial icon themes. 2016-04-10 18:17:58 +02:00
klausstaedtler
35cf40e739 icons: Changes color
color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-curves-24
gimp-tool-levels-24
gimp-tool-hue-saturation-24
gimp-tool-threshold-24


minor corrections
gimp-tool-crop
gimp-tool-unified-transform
gimp-tool-rect-select
gimp-tool-align
gimp-tool-ink
gimp-tool-move
2016-04-10 16:56:16 +02:00
Michael Natterer
076ef278d4 app: get rid of x1, y1, x2, y2 in gimp_channel_real_flood()
Use, x, y, width, height instead.
2016-04-10 16:34:53 +02:00
Michael Natterer
47a9c2a54b app: s/Remove holes/Remove Holes/, menu item labels are capitalized 2016-04-10 16:34:14 +02:00
klausstaedtler
feb7145484 icons: Changes color
color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-color-balance-24
gimp-tool-posterize-24
gimp-tool-desaturate-24
gimp-tool-colorize-24
2016-04-10 12:04:46 +02:00
klausstaedtler
09116b2263 icons: Changes color
color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-bucket-fill-24
gimp-tool-paintbrush-24
gimp-tool-mypaint-brush-24
gimp-tool-airbrush-24
2016-04-09 19:39:32 +02:00
Michael Natterer
f34aa5fa6b Bug 756389 - Color-managing grayscale images
Rename profile constructors to say "d65_gray" instead of just "gray",
"srgb_trc" instead of "srgb_gamma", and drop the "srgb" from
"srgb_linear" because we now say "d65". This should be a naming scheme
that doesn't conflict with whatever future functions we might add.
2016-04-09 18:47:51 +02:00
Elle Stone
6ba19a5d46 Bug 756389 - Color-managing grayscale images
Change grayscale profiles to show white point
2016-04-09 18:33:11 +02:00
Michael Natterer
c074c5493c Bug 764822 - gimp man page references incorrect path to system-wide gimprc
Use @gimpsysconfdir@ no just @sysconfdir@ when referring to files
in the systemwide GIMP config files.
2016-04-09 18:10:19 +02:00
klausstaedtler
4135dba1a9 icons: Changes color, symbolic & legacy
color-scalable & symbolic-scalable
add gimp-gegl-24 twin

legacy
move gimp-gegl 22px from icons22_DATA to tools22_DATA

symbolic\scalable
remove unneeded nodes from *.svg
2016-04-09 16:48:54 +02:00
Piotr Drąg
c36f729334 Updated Polish translation 2016-04-09 13:37:27 +02:00
klausstaedtler
46d9197fd8 icons: Changes color
color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-color-picker-24
gimp-tool-scale-24
gimp-tool-zoom-24
gimp-tool-ink-24
2016-04-08 21:44:35 +02:00
klausstaedtler
e2cfdb25fa icons: Changes color
color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-flip-24
gimp-tool-rotate-24
gimp-tool-shear-24
gimp-tool-text-24
gimp-tool-dodge-24
2016-04-08 18:09:16 +02:00
Yolanda Álvarez Pérez
a3a9750205 Updated Spanish translation 2016-04-08 13:16:36 +00:00
Elle Stone
f819db6c80 Bug 764772 - Change GIMP-generated profile names to be more accurate 2016-04-08 12:44:39 +02:00
Sven Claussner
9272da1a21 Flood op: improve descriptions
Add more user friendly description to the PDB op.
Partially keep the technical description for the PDB op and add a
reference to the developer wiki.
Use the new "reference" key for the GEGL op.
2016-04-08 08:52:12 +00:00
Sven Claussner
f4adb9a078 Rename UI strings
After discussion in IRC some weeks ago give the Selection-Flood items
the more meaningful name Selection-Remove holes.
	modified:   app/actions/select-actions.c
        modified:   app/core/gimpselection.c
2016-04-08 08:22:47 +00:00
Michael Natterer
0dc8662764 Bug 764588 - Suggest changing "Select _Custom Color..." to "_Custom Color..."
So be it.
2016-04-07 22:52:36 +02:00
Michael Natterer
c40dd417a2 libgimpcolor: update docs of gimp_color_profile_get_format() 2016-04-07 22:12:22 +02:00
Michael Natterer
454f7fb7ff Bug 763620 - "Export" > "Export..."
Show ellipses on the "Export" and "Save" menu items when selecting
them will show a file chooser.
2016-04-07 22:12:22 +02:00
klausstaedtler
4a0bddd6b3 icons: Changes color
color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-select-by-color-24
gimp-tool-foreground-select-24
gimp-tool-iscissors-24
gimp-tool-heal-24
2016-04-07 20:14:50 +02:00
Yolanda Álvarez Pérez
5ff036cdf7 Updated Spanish translation 2016-04-07 07:17:16 +00:00
Michael Natterer
240fe3b16e app: allow to switch the split preview between horizontal and vertical 2016-04-06 21:09:57 +02:00
Piotr Drąg
14ec2c68c5 Updated Polish translation 2016-04-06 19:42:41 +02:00
klausstaedtler
fadbc387e8 icons: Changes color
color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-seamless-clone-24
gimp-tool-perspective-clone-24
gimp-tool-pencil-24
gimp-tool-free-select-24
gimp-tool-brightness-contrast-24
2016-04-06 18:34:35 +02:00
Yolanda Álvarez Pérez
bdf958b9a5 Updated Spanish translation 2016-04-06 09:31:15 +00:00
Michael Natterer
823fddfba3 app: remove some leftover empty function cruft from GimpImageMapTool 2016-04-05 20:44:43 +02:00
Michael Natterer
3e833b9a5c app: change the cursor when the mouse hovers the split view guide 2016-04-05 20:26:05 +02:00
Michael Natterer
b81c725c6d Bug 764589 - Flip Tool: Use "Transform" and "Direction" instead...
...of "Affect" and "Flip Type"
2016-04-05 18:59:18 +02:00
klausstaedtler
86a4ab8c62 icons: Changes color
rename gimp-tool-perspektive-clone.svg gimp-tool-perspective-clone.svg
2016-04-05 18:42:44 +02:00
klausstaedtler
73ebd5a219 icons: Changes color
repair broken *.svg's in directory Color/scalable

color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-ellipse-select-24
gimp-tool-cage-24
gimp-tool-handle-transform-24
gimp-tool-fuzzy-select-24
gimp-tool-move-24
gimp-tool-clone-24
2016-04-05 18:22:18 +02:00
Yolanda Álvarez Pérez
48f4739609 Updated Spanish translation 2016-04-05 08:06:34 +00:00
Michael Natterer
112dd804bc app: add a "split preview" feature to GEGL ops that can be dragged around
We also commonly call this "preview curtain".
2016-04-04 22:19:30 +02:00
Michael Natterer
8984df028f app: add a canvas style for "split view" guides 2016-04-04 22:12:33 +02:00
Michael Natterer
28a91b045f app: change GimpGuideTool to live-move custom guides
As in, move the guide along with the mouse, don't draw a tool line and
move the guide on button release.
2016-04-04 22:09:51 +02:00
klausstaedtler
1378f8902e icons: Changes color
color-scalable.svg
add to 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-smudge-24
gimp-tool-unified-transform-24
gimp-tool-path-24
gimp-tool-crop-24
2016-04-04 17:57:46 +02:00
Mónica Canizo
8d240cb920 Updated Spanish translation 2016-04-04 06:48:07 +00:00
Michael Natterer
0e050bed7c app: don't push move and remove undo steps for custom guides 2016-04-03 20:33:01 +02:00
Michael Natterer
1b6f414d4d app: add g_return_if_fail() to gimp_guide_get_style() and is_custom() 2016-04-03 20:33:01 +02:00
klausstaedtler
773c973b73 icons: Changes color
color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-blend-24
gimp-tool-eraser-24
gimp-tool-perspective-24
gimp-tool-warp-24
gimp-tool-measure-24
gimp-tool-n-point-deformation-24
gimp-tool-align-24
2016-04-03 17:15:58 +02:00
Michael Natterer
7889ec08f7 Bug 668016 - Accidentally clicking ruler loses active tool's state
Add two new tools, GimpGuideTool and GimpSamplePointTool. They are
one-trick-ponies and can only create new or move existing guides and
sample points. They can't be selected from the toolbox, only
temporarily pushed as active tools on top of any active tool using
their public start() APIs.

Use that API to enable them when the rulers are clicked, and replace
the entire guide and sample point moving code in GimpMoveTool and
GimpColorTool by simple calls to that API.

This might look like overkill but can easily be used for other
features like moving guides from within the paint tools (mirror
painting) or gegl filters (preview curtain).
2016-04-03 16:41:42 +02:00
Jehan
222788342c icons: add Legacy's tool icons in EXTRA_DIST. 2016-04-03 16:23:09 +02:00
klausstaedtler
7f8b951f42 icons: Changes color
color-scalable.svg
add for 16x16 tool icons 'pixel-perfect' 24x24px 'twins'
gimp-tool-blur-24
gimp-tool-rect-select-24
2016-04-03 13:02:22 +02:00
Jehan
c3c2e2954c icons: Legacy tool icons were always superseded by Symbolic icons.
Tool icon's requested size is 24x24, but our legacy icons provide 22x22.
This makes them superseded by our new default icon theme.
The trick is to pretend in the Legacy theme description (index.theme)
that the 22x22 tool icons' nominal size is 24x24.
2016-04-02 23:18:49 +02:00
Jehan
c030d569da icons: update the icon list for new icon themes.
All tool icons have now 24x24 versions, replacing the 22x22 ones.
2016-04-02 22:55:59 +02:00
Jehan
d8325565a8 icons: cleaning.
22/gimp-tool-zoom.png was not deleted from Symbolic.
22/gimp-tool-preset.png must not be deleted (no 24x24 replacement),
neither from Color nor Symbolic.
2016-04-02 22:53:30 +02:00
Hartmut Kuhse
57675e171c Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2016-04-02 21:46:00 +02:00
Michael Natterer
d64120340b plug-ins: more cleanup in screenhot, move the icon to its own file 2016-04-02 21:44:09 +02:00
Hartmut Kuhse
41c129eb47 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2016-04-02 21:40:19 +02:00
Michael Natterer
bbbc103d18 plug-ins: screenshot: #include <glib.h> early for G_OS_WIN32 2016-04-02 21:35:55 +02:00
klausstaedtler
4f9d52b6e8 icons: Changes symbolic&color
As gimp loves 24x24px toolbox icons (24 is preferred over 22)

replace all 22x22 gimp-tool ... icons for color & symbolic
by 24x24 gimp-tool ... icons

upload symbolic 24x24 gimp-tool... -24.svg icons

all color (!) 24x24 gimp-tool ... icons are 'pixel-un(!)perfect'
at the time beeing. Maybe this changes. Contributors are welcome.
2016-04-02 20:40:39 +02:00
klausstaedtler
803450c8ff icons: Changes symbolic
rename symbolic-scalable-gtk3.svg to symbolic-scalable.svg
export all 'gimp-tool-...-24' to 'gimp-tool-....png' to subfolder ...Symbolic/24

all 16x16 tool icons have now 24x24px 'twins'

add 'pixel-perfect' for 24x24
gimp-tool-ellipse-select-24
gimp-tool-foreground-select-24
gimp-tool-free-select-24
gimp-tool-hue-saturation-24
gimp-tool-levels-24
gimp-tool-posterize-24
2016-04-02 18:20:03 +02:00
klausstaedtler
386efef398 icons: Changes symbolic
symbolic-scalable-gtk3.svg:
prepare for gtk3, all 16x16 tool icons get 24x24px 'twins'

add 'pixel-perfect' for 24x24
gimp-tool-scale-24
gimp-tool-threshold-24
gimp-tool-by-color-select-24
gimp-tool-ink-24
gimp-tool-shear-24
gimp-tool-rotate-24
gimp-tool-mypaint-brush-24
gimp-tool-paintbrush-24
2016-04-02 16:35:55 +02:00
Michael Natterer
d164850484 plug-ins: add an (empty) Win32 backend to screenshot
and buld it unconditionally. Somebody please move the code from
win-snap to the new file.
2016-04-02 15:02:00 +02:00
Michael Natterer
cb76253c67 Bug 764450 - Crash in screenshot's gnome-shell backend
Add error reporting to all screenshot backends, but only really use it
in the gnome-shell backend: check all DBus calls for errors instead of
crashing.

Also fix detection if gnome-shell is running: just creating the
GDBusProxy always succeeds, so call org.freedesktop.DBus.Peer.Ping
on the newly created proxy.
2016-04-02 01:28:34 +02:00
Michael Natterer
0ff6777e2c plug-ins: screenshot: minor fix for the OS X screencapture command line
Add the "show cursor" option only in "shot whole screen" mode.
2016-04-02 00:04:36 +02:00
klausstaedtler
785a9dee62 icons: Changes symbolic
symbolic-scalable-gtk3.svg:
prepare for gtk3, all 16x16 tool icons get 24x24px 'twins'

add 'pixel-perfect' for 24x24
gimp-tool-curves-24
gimp-tool-desaturate-24
gimp-tool-fuzzy-select-24
gimp-tool-unified-transform-24
gimp-tool-airbrush-24
2016-04-01 19:06:39 +02:00
Cédric Valmary
b31605556b Updated Occitan translation 2016-04-01 09:53:53 +00:00
Yolanda Álvarez Pérez
6d9e58080e Updated Spanish translation 2016-04-01 07:50:19 +00:00
Michael Natterer
3559097c80 plug-ins: screenshot: quote the filename passed to OS X' screencapture 2016-03-31 22:15:02 +02:00
klausstaedtler
2f408e0a30 icons: Changes symbolic
symbolic-scalable-gtk3.svg:
prepare for gtk3, all 16x16 tool icons get 24x24px 'twins'

add 'pixel-perfect' for 24x24
gimp-tool-text-24
gimp-tool-warp-24
gimp-tool-align-24
gimp-tool-color-picker-24
gimp-tool-colorize-24
gimp-tool-iscissors-24
2016-03-31 21:42:15 +02:00
Hartmut Kuhse
2bd0b5c9a1 merge to stay up-to-date 2016-03-31 17:58:37 +02:00
Hartmut Kuhse
e01e826c99 libgimpbase: check for length of unusual attribute value.
If it is longer than 2048 bytes, the interpreted_value
is set to the length of value.
Those very long values may exist in some makernotes,
as in Exif.Pentax or Exif.PentaxDNG
2016-03-31 17:57:02 +02:00
Michael Natterer
4a45ffeef9 plug-ins: screenshot: unref the GDBusProxy when done 2016-03-31 11:47:59 +02:00
Yolanda Álvarez Pérez
9a2c9420c4 Updated Spanish translation 2016-03-31 07:06:13 +00:00
Michael Natterer
fac99b6a18 plug-ins: cleanups in screenshot
- only open the temp PNG if the screenshot didn't fail
- remove the temp file
2016-03-30 21:03:00 +02:00
klausstaedtler
081e562fc8 icons: Changes symbolic
symbolic-scalable-gtk3.svg:
prepare for gtk3, all 16x16 tool icons get 24x24px 'twins'

add 'pixel-perfect' for 24x24
gimp-tool-flip-24
gimp-tool-cage-24
gimp-tool-color-balance-24
gimp-tool-zoom-24
2016-03-30 18:44:51 +02:00
Yolanda Álvarez Pérez
8a9a7d0c64 Updated Spanish translation 2016-03-30 07:01:56 +00:00
Michael Natterer
cf6cb8d1ff Bug 757687 - Screenshot functionality broken under Wayland
Implement screenshot-gnome-shell.c using the DBus API.
2016-03-29 23:36:12 +02:00
Michael Natterer
7a98b9e043 plug-ins: move screenshot delay function to the main screenshot.[ch]
so it can be used from all backends.
2016-03-29 23:34:51 +02:00
Michael Natterer
a1785e9823 Bug 757687 - Screenshot functionality broken under Wayland
Some more abstraction in the screenshot plug-in, now allows for
runtime backend selection. Add stubs for the gnome-shell backend,
registers itself as unavailable because it's still unimplemented.
2016-03-29 22:08:27 +02:00
klausstaedtler
0119e2841d icons: Changes symbolic
symbolic-scalable-gtk3.svg:
prepare for gtk3, all 16x16 tool icons get 24x24px 'twins'

add 'pixel-perfect' for 24x24
gimp-tool-perspective-clone-24
gimp-tool-heal-24
gimp-tool-eraser-24
gimp-tool-smudge-24
2016-03-29 21:07:35 +02:00
Yolanda Álvarez Pérez
38682e11d1 Updated Spanish translation 2016-03-29 07:17:31 +00:00
klausstaedtler
f8b49daa7b icons: Changes symbolic
symbolic-scalable-gtk3.svg:
prepare for gtk3, all 16x16 tool icons get 24x24px 'twins'

add 'pixel-perfect' for 24x24
gimp-tool-handle-transform-24
gimp-tool-bucket-fill-24
gimp-tool-dodge-24
gimp-tool-blur-24
gimp-tool-rect-select-24
gimp-tool-brightness-contrast-24
gimp-tool-clone-24
gimp-tool-seamless-clone-24
gimp-tool-path-24
gimp-tool-perspective-24
gimp-tool-pencil-24
2016-03-29 08:20:56 +02:00
klausstaedtler
547c887411 icons: Changes symbolic
symbolic-scalable-gtk3.svg:
prepare for gtk3, all 16x16 tool icons get 24x24px 'twins'

add 'pixel-perfect' for 24x24
gimp-tool-ne-point-deformation-24
gimp-tool-blend-24
gimp-tool-crop-24
gimp-tool-measure-24
2016-03-28 19:05:50 +02:00
Jehan
2ecdf13982 icons: commit the extracted SVG images for Color and Symbolic.
librsvg has too many bugs to be used for build-time SVG extraction.
So I will just leave out my extraction script (for the time being) and
simply commit all extracted SVGs (with Inkscape through a script).
The gray inversion script works fine though, so no need to commit
Symbolic-inverted icons.
2016-03-28 16:32:17 +02:00
Michael Natterer
af9fee00f4 app: remove obsolete #define GAMMA_CORRECTION_BLURB 2016-03-28 15:02:27 +02:00
Elle Stone
96d8397114 Bug 763996 - Where appropriate, change "gamma correction" to "gamma adjustment"
Gamma correction refers to correcting how an image is displayed on
various devices. Gamma adjustment is a more general phrase that also
applies to adjusting gamma as a step in image enhancement in a
color-managed workflow.
2016-03-28 14:57:24 +02:00
Michael Natterer
88b4c89415 Bug 761118 - GIMP prints many CRITICAL warnings
Bail out in gimp_overlay_box_scroll() if the widget is not realized.
2016-03-28 14:46:13 +02:00
Jehan
3ee103bfeb icons: Legacy's 22x22/apps icons of "Threshold" type.
Otherwise toolbox icons won't be used preferably to 24x24 default icons.
2016-03-28 13:53:03 +02:00
Michael Natterer
ce741342ce Bug 737570 - Shortcut [some modifier] + Mousewheel for changing pen size
Change the default controllerrc to do some useful things with the
current tool.
2016-03-28 02:01:25 +02:00
Michael Natterer
e76f7174fc Bug 761270 - layer boundary not re-drawn correctly on scrolling
Pass the display scroll offset down to gimp_cairo_stipple_pattern_create()
and set it as offset on the created cairo pattern, so stipple patterns
look the same no matter how the display is scrolled.
2016-03-26 22:50:10 +01:00
Michael Natterer
7529fd987c app: change GEGL op GUI generation so widgets can expand vertically
Currently we only expand scrolled windows, which are used for
multiline text properties' GtkTextViews.
2016-03-26 20:28:24 +01:00
Michael Natterer
2c0ba5cf38 app: fix typo in gimpimagemap.h 2016-03-26 16:34:46 +01:00
Michael Natterer
47ef3be145 Initialize GValues with G_VALUE_INIT instead of { 0, } 2016-03-26 15:59:26 +01:00
klausstaedtler
d1d3a5e2fa Updated/Fixed German translation 2016-03-26 12:46:45 +01:00
Øyvind Kolås
2e46850131 app: remove old GEGL multiline prop type/handling
We're using ui_meta keys now, and no longer specialized param spec subclasses
nor tagging with custom qdata.
2016-03-26 12:29:04 +01:00
Jordi Mas
d8c5c35d34 Fixes to Catalan translation 2016-03-26 07:42:20 +01:00
Piotr Drąg
55625a5200 Updated Polish translation 2016-03-25 23:43:30 +01:00
Jehan
59f4ee55c9 app: do not migrate theme settings.
Themes from 2.8 and before are not fully compatible with 2.10.
In particular, embedded icons would not work and you would end up with
the Symbolic icon theme (light colors), which may not work well with a
custom theme.
It is better to reset to the new defaults upon migration and users can
still try and configure the theming afterwards if they wish.
2016-03-25 21:43:58 +01:00
Jehan
7fe64b747c app, libgimpwidgets: Dark theme and Symbolic icons as defaults.
These seem the expected theming defaults nowaydays, for a graphics
software, and so GIMP will follow these recommendations.
2016-03-25 20:53:22 +01:00
klausstaedtler
d4024d68fe icons: Changes symbolic
symbolic-scalable:
changed to 'pixel-perfect' for 12x12
gimp-default-colors
changed to 'pixel-perfect' for 16x16
gimp-user-manual
2016-03-25 18:15:19 +01:00
klausstaedtler
85b1fe561d icons: Changes symbolic
symbolic-scalable:
changed to 'pixel-perfect' for 16x16
gimp-tool-seamless-clone
gimp-tool-mypaint-brush
gimp-curve-free
gimp-curve-smooth
2016-03-25 16:00:01 +01:00
klausstaedtler
373a46f93e Updated German translation
translate 'Handle Transform' as 'Gitter Transformation' (Grid Transform) like in es.po for spanish,
the previously used 'Käfig Transformation' is already in use for the Cage Tool
2016-03-25 11:17:36 +01:00
Øyvind Kolås
9a01a4ff96 app: recognize multiline meta data from ops 2016-03-25 04:28:15 +01:00
klausstaedtler
cc62e10a9c Update German translation
as the monitor is the same 'wie' must be used in german, not 'als'
2016-03-24 15:40:01 +01:00
klausstaedtler
febd76868a Correct typo in German translation 2016-03-24 14:48:04 +01:00
klausstaedtler
5bc1c8e662 Updated German translation 2016-03-24 14:32:39 +01:00
Hartmut Kuhse
5976f98d1a merge to stay up-to-date 2016-03-24 08:04:00 +01:00
Massimo Valentini
de4bc99448 Bug 763135 - Gimp cage tool doesn't work anymore
Fix various bugs, most importantly make sure the cage node is
properly updated when the config changes.
2016-03-23 23:00:48 +01:00
Michael Natterer
1b71731cb8 app: clean up the GEGL progress code a bit
Includes code from Massimo from bug #763135.
2016-03-23 22:53:09 +01:00
Daniel Sabo
f10067e560 plug-ins: openraster: Ignore the x,y values of layer groups (bug 760348)
Neither MyPaint or Krita sets these values when saving, and when
loading they have conflicting interpretations such that the only
universally valid value will be zero.
2016-03-23 11:44:41 -07:00
Yolanda Álvarez Pérez
2eff66e481 Updated Spanish translation 2016-03-23 09:17:24 +00:00
Michael Natterer
2229d0aed8 Bug 740939 - No shortcut actions for changing tool's spacing, hardness and force
Add generic tool actions for spacing, hardness and force, and the
GimpToolControl infrasctructure to redirect them to tool-specific
actions. Add tool-specific actions for GimpBrushTool, GimpMybrushTool
and GimpWarpTool as redirect targets. Also fix some existing tool
action callbacks to use the right increase/decrease steps.
2016-03-22 23:54:40 +01:00
klausstaedtler
52cf735f27 icons: add forgotten correction symbolic-scalable to Makefile 2016-03-22 20:50:34 +01:00
klausstaedtler
c77d6bdaff icons: Changes symbolic
symbolic:

scalable.svg renamed to symbolic-scalable.svg
(similar to color-scalable.svg)

added and assigned all icons to swatch palette,
icon color of all icons within symbolic-scalable can now be
adjusted to any desired shade of any desired color by simply
adjusting color of swatch palette.
Color of intentiously different colors (like e,g, black or white)
are unaffected.
2016-03-22 20:12:11 +01:00
Jehan
0f67e21c98 themes: rename theme "Default" into "System".
Since we have many themes now, this new name better indicates that it
is meant to follow your desktop theme settings.
Also it will likely not remain the default theme.
2016-03-22 16:37:10 +01:00
Dimitris Spingos
76e1df1bfd Updated Greek translation 2016-03-22 13:07:25 +02:00
Yolanda Álvarez Pérez
b6afb7602e Updated Spanish translation 2016-03-22 11:00:27 +00:00
Jehan
7b27e03799 themes: order themes by shades of gray.
Since current implementation orders by folder, let's prepend install
folders by numbers.
2016-03-22 01:40:18 +01:00
Jehan
4358c783e4 themes: redo fix from commit 9c617d0.
It got lost when renaming the theme on commit ab8aa3b.
2016-03-22 01:36:55 +01:00
Yolanda Álvarez Pérez
3605c53e5b Updated Spanish translation 2016-03-21 15:48:07 +00:00
Michael Natterer
4110840382 app: the range of GimpInkOption's and GimpBlobEditor's angle is [-PI..PI]
not [-90..90]. This will warn on startup for saved values which are
now out-of-range, but only until the tool options got saved again.
2016-03-21 10:37:56 +01:00
Michael Natterer
c0fab2402a app: fix calculation for action values which can wrap around
such as the brush angle action.
2016-03-21 09:19:06 +01:00
Michael Natterer
70c5a1009a app: don't automatically use explicitly stored filter values
only use automatically stored values (only thes can be last used values)
2016-03-20 21:56:51 +01:00
Michael Natterer
9693ab92e7 Bug 761998 - MyPaint brush popup out of screen
Add a lame workaround to GimpContainerPopup (default to 6 instead
of 10 rows of items if the view size is >= LARGE).
2016-03-20 21:34:37 +01:00
Michael Natterer
f7962c27e1 app: implement get_memsize() and get_checksum() in GimpMybrush 2016-03-20 21:16:04 +01:00
Michael Natterer
b8ae89c37f app: actually use the calculated checksum in gimp_brush_get_checksum() 2016-03-20 21:15:37 +01:00
Michael Natterer
dc33afd95b Bug 762279 - "Tip of the day" links opens two links
Fix this the brute force way, don't look it's ugly...
2016-03-20 20:29:43 +01:00
klausstaedtler
661ad454b4 icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 16x16
gimp-prefs-tool-options
2016-03-20 18:03:35 +01:00
klausstaedtler
c6ce8e48d4 icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 22x22
gimp-char-picker
2016-03-20 16:31:49 +01:00
klausstaedtler
f359cbe26a icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 24x24
gimp-text-dir-rtl
gimp-text-dir-ltr
2016-03-20 16:10:48 +01:00
Piotr Drąg
e15093a161 Updated Polish translation 2016-03-20 16:04:18 +01:00
Benoit Touchette
ab8aa3bd83 Themes: Renamed themes. Added 3 themes (Lighter, Gray, Dark).
Updated themes, renamed The-Dark-Side-Of-Gimp to Darker, and renamed The-Light-Side-Of-Gimp
to Light. Added three themes, Lighter, Gray, and Dark.

https://bugzilla.gnome.org/show_bug.cgi?id=759648 (Light)
https://bugzilla.gnome.org/show_bug.cgi?id=759649 (Darker)
https://bugzilla.gnome.org/show_bug.cgi?id=759663 (Gray)
https://bugzilla.gnome.org/show_bug.cgi?id=759830 (Lighter)
https://bugzilla.gnome.org/show_bug.cgi?id=759996 (Dark)
2016-03-20 10:56:47 -04:00
klausstaedtler
bd4f162e6c icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 24x24
gimp-hchain
gimp-vchain
gimp-hchain-broken
gimp-vchain-broken
2016-03-20 13:50:39 +01:00
Hartmut Kuhse
b557263a81 Merge to stay up-to-date 2016-03-20 11:23:06 +01:00
Hartmut Kuhse
21d98413dc Update german translation 2016-03-20 11:21:44 +01:00
Michael Natterer
1c9e5d62fc Bug 763766 - Suggest changing "Postscript" to "PostScript"
We were already using "PostScript" almost everywhere, fix the
remaining strings too.
2016-03-19 22:45:16 +01:00
Michael Natterer
c6d5ca8977 app: remove GimpImageMapTool::get_operation() impl from GimpGeglTool
it was doing absolutely nothing any longer.
2016-03-19 22:29:31 +01:00
Michael Natterer
041659a2ab app: remove the recent_settings container from GimpImageMapToolClass
and use gimp_gegl_config_get_container() locally where needed. This
also removes some special code from gimpoperationtool.c.
2016-03-19 22:06:13 +01:00
Michael Natterer
1051082189 app: use gimp_gegl_config_register() in gimp_gegl_config_new()
instead of manually interting the new type into the table.
2016-03-19 21:08:29 +01:00
Ell
5084bcae87 app: Add a test case for the "gimp:flood" operation 2016-03-19 20:29:37 +01:00
Ell
a11dd0e29a Bug 761795 - Performance improvement for the flood operation
Improve the performance of the "gimp:flood" operation and add plenty
of comments.
2016-03-19 20:29:37 +01:00
Øyvind Kolås
a28964c698 configure/app: bump required GEGL version to 0.3.6 2016-03-19 19:39:56 +01:00
klausstaedtler
99933b35c8 icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 24x24
gimp-hfill
gimp-vfill
gimp-gravity-east
gimp-gravity-west
gimp-gravity-south
gimp-gravity-north
gimp-gravity-north-east
gimp-gravity-north-west
gimp-gravity-south-east
gimp-gravity-south-west
gimp-hcenter
gimp-vcenter
2016-03-19 18:50:03 +01:00
klausstaedtler
052ddafc2a icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 22x22
gimp-line-spacing
gimp-letter-spacing
2016-03-19 17:35:53 +01:00
Hartmut Kuhse
148e86b983 Updated german translation 2016-03-19 16:10:38 +01:00
Hartmut Kuhse
2d3a0560b4 Merge to stay up-to-date 2016-03-19 15:34:06 +01:00
Yolanda Álvarez Pérez
509f911c44 Updated Spanish translation 2016-03-18 10:17:53 +00:00
klausstaedtler
f1a2693d2a icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 16x16
gimp-display-filter-colorblind
gimp-display-filter-contrast
gimp-display-filter-gamma
gimp-display-filter-lcms
gimp-display-filter-proof
2016-03-17 19:40:34 +01:00
Yolanda Álvarez Pérez
10f551c53e Updated Spanish translation 2016-03-17 10:32:04 +00:00
klausstaedtler
b3d2324527 icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 16x16
gimp-color-triangle
gimp-selection-replace
gimp-selection-add
gimp-selection-subtract
gimp-selection-intersect
gimp-selection-none
2016-03-16 21:39:29 +01:00
klausstaedtler
d4110dc9cf icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 16x16

(with some love from material)
gimp-flip-horizontal
gimp-flip-vertical
gimp-controller
2016-03-16 18:30:50 +01:00
Piotr Drąg
587d1e1dbc Updated Polish translation 2016-03-16 17:54:05 +01:00
Daniel Mustieles
927217b65d Updated Spanish translation 2016-03-16 08:17:17 +00:00
Daniel Mustieles
300b25ee72 Updated Spanish translation 2016-03-16 07:52:54 +00:00
Christian Kirbach
b847c9b152 Updated German translation 2016-03-15 22:13:54 +00:00
klausstaedtler
68b2c968e9 icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 16x16
gimp-histogram
gimp-reshow-filter
gimp-tool-preset
gimp-images
gimp-resize
gimp-scale
2016-03-15 21:26:26 +01:00
Michael Natterer
49ffbbbbc0 app: add menu items and a dialog for GimpItem::fill()
which are essentially a copy of the stroking GUI. We now can fill the
exact shape outlined by stroking selections and paths. Suggestions for
the menu item labels are welcome.
2016-03-15 21:07:59 +01:00
Michael Natterer
c09a724bda app: change parameters of gimp_fill_options_new()
to be the same as of gimp_stroke_options_new() because it's about to
be needed for the same purposes.
2016-03-15 20:10:16 +01:00
klausstaedtler
7ce7ff16bb icons: Changes symbolic
scalable.svg
changed to 'pixel-perfect' for 16x16
gimp-reset
gimp-path
gimp-path-stroke
gimp-selection-to-path
2016-03-15 19:01:42 +01:00
Daniel Mustieles
b8f3ff8ace Updated Spanish translation 2016-03-15 08:32:16 +00:00
Balázs Úr
549d062ad0 Updated Hungarian translation 2016-03-15 06:52:45 +00:00
Piotr Drąg
60bd658fac Updated Polish translation 2016-03-15 00:11:42 +01:00
Balázs Úr
4e0068ad3a Updated Hungarian translation 2016-03-14 20:34:12 +00:00
klausstaedtler
6ecbe1ea95 icons: Changes symbolic
symbolic:
scalable.svg

changed to 'pixel-perfect' for 16x16
gimp-tool-handle-transform

changed to 'pixel-perfect' 18
gimp-color-picker-black
gimp-color-picker-white
gimp-color-picker-gray

changed to 'sharp' 12x12
gimp-linked
gimp-visible

changed to 'sharp' 20x20
gimp-linked
gimp-visible
2016-03-14 21:02:15 +01:00
Michael Natterer
ff1c678058 app: add GimpItem::fill() which fills what is outlined by ::stroke()
For selections, it's different from gimp_edit_fill() because it
ignores the selection while filling, just as stroking does. Currently
unused, stay tuned...
2016-03-14 19:02:18 +01:00
Michael Natterer
34913f49a5 app: clean up the color and pattern dropping code in gimpdisplayshell-dnd.c 2016-03-14 00:33:15 +01:00
klausstaedtler
24cb86f79a icons: Changes symbolic
symbolic:
scalable.svg
gimp-tool-dodge, minor retouche

changed to 'pixel-perfect' for 16x16
gimp-tool-perspective-clone
gimp-tool-options
gimp-floating-selection
gimp-tool-path
gimp-navigation
gimp-prefs-playground
gimp-tool-measure
gimp-tool-crop
2016-03-13 23:00:38 +01:00
Michael Natterer
1fa61cae36 app: clean up "drop to new button" code in GimpDrawableTreeView 2016-03-13 19:04:22 +01:00
klausstaedtler
2b14f6c22e icons: Changes symbolic
symbolic:
scalable.svg
changed to 'pixel-perfect' for 16x16
gimp-layers
gimp-layer-mask
gimp-layer-to-imagesize
gimp-text-layer
gimp-convert-indexed
gimp-convert-grayscale
gimp-tool-blend


changed to 'pixel-perfect' 12x12
gimp-close
gimp-zoom-follow-window
gimp-menu-left
gimp-menu-right
gimp-swap-colors
2016-03-13 17:35:47 +01:00
Michael Natterer
d588bff8be Bug 763547 - GIMP git segfaults on exit when the airbrush tool is active
Fix GimpAirbrush to not keep a GimpSymmetry instance around across
paint strokes. The symmetry refs its drawable but lacks the code of
dropping the reference when the drawable is removed from the image, or
the image is closed.

Also cleaned up gimp_airbrush_paint() a bit.
2016-03-13 13:15:19 +01:00
Michael Natterer
ed821c8184 app: formatting cleanup in gimppaintbrush.c 2016-03-13 13:15:19 +01:00
Hartmut Kuhse
ae167888dd Merge to stay up-to-date 2016-03-13 10:47:48 +01:00
Martin Srebotnjak
553a5f5d43 Updated Slovenian translation 2016-03-12 22:24:59 +01:00
Martin Srebotnjak
4ad7413a69 Updated Slovenian translation 2016-03-12 22:08:35 +01:00
klausstaedtler
139d9ac8bd icons: Changes in color-scalable & scalable
color
remove directory outdated (all icons there are back in legacy)
correct size color 16x16
gimp-tool-measure.png
gimp-display-filter.png

symbolic
scalable.svg
changed to 'pixel-perfect' for 16x16 (currently only in svg source, no export to png)
gimp-channels
gimp-channel-red
gimp-channel-blue
gimp-channel-green
gimp-channel-indexed
gimp-channel-gray
gimp-selection-to-channel
gimp-convert-rgb
gimp-layer
gimp-list
gimp-tool-unified-transform
2016-03-12 21:02:26 +01:00
Piotr Drąg
71ebe1e88a Updated Polish translation 2016-03-12 16:29:01 +01:00
Balázs Úr
56c733385d Updated Hungarian translation 2016-03-12 15:14:10 +00:00
Michael Natterer
7b7b8f5d03 app: remove some #includes 2016-03-11 22:45:15 +01:00
Michael Natterer
3b6ab62c1e app: remove boolean return value from gimp_edit_clear() and gimp_edit_fill() 2016-03-11 22:41:25 +01:00
Michael Natterer
d71f53dfe9 app: change gimp_drawable_bucket_fill() to use GimpFillOptions
and get rid of gimp_drawable_bucket_fill_internal().
2016-03-11 22:05:33 +01:00
Martin Srebotnjak
a95fa4cd46 Updated Slovenian translation 2016-03-11 22:05:03 +01:00
Martin Srebotnjak
87036e10ba Updated Slovenian translation 2016-03-11 22:03:46 +01:00
Martin Srebotnjak
dfe1e3e83e Updated Slovenian translation 2016-03-11 21:56:58 +01:00
Michael Natterer
e1e77f88fa app: change gimp_edit_fill() to take a GimpFillOptions
instead of a long list of parameters. Get rid of gimp_edit_fill_full().
2016-03-11 19:55:50 +01:00
Michael Natterer
00932b57af app: add gimp_fill_options_set_by_fill_mode()
which takes a context and a GimpBucketFillMode and configures the
GimpFillOptions accordingly.
2016-03-11 19:48:26 +01:00
Michael Natterer
9ef2428fcb app: add gimp_fill_options_get_undo_desc()
which returns an undo string to be used when filling with the option's
settings.
2016-03-11 18:47:03 +01:00
Cédric Valmary
137379ea66 Updated Occitan translation 2016-03-11 14:46:55 +00:00
Daniel Mustieles
fa5c5eda4f Updated Spanish translation 2016-03-10 10:43:25 +00:00
Yolanda Álvarez Pérez
3b60996368 Updated Spanish translation 2016-03-09 08:09:39 +00:00
Dušan Kazik
b9e80aaf7a Updated Slovak translation 2016-03-08 19:33:28 +00:00
Michael Natterer
d0b113d1ca app: add "style" and "antialias" setters to GimpFillOptions 2016-03-08 19:49:17 +01:00
Piotr Drąg
956b2fc033 Updated Polish translation 2016-03-08 14:34:18 +01:00
Yolanda Álvarez Pérez
df980cc611 Updated Spanish translation 2016-03-08 11:12:31 +00:00
Cédric Valmary
dbc14cd400 Updated Occitan translation 2016-03-08 11:08:31 +00:00
Michael Natterer
05b619cb8c pdb: also fix gimp-edit-bucket-fill-full, see below 2016-03-08 02:26:20 +01:00
Michael Natterer
9fa832c5aa app: add gimp_fill_options_set_by_fill_type()
which sets color, pattern and fill style on a GimpFillOptions, based
on a context and a GimpFillType.
2016-03-08 01:51:10 +01:00
Michael Natterer
ad2c01f8d8 app: move gimp_drawable_fill() to gimpdrawable-fill.[ch]
and get rid of gimp_drawable_fill_full().
2016-03-08 01:44:35 +01:00
Daniel Sabo
19b6b53f66 app: Fix GimpMyBrush action names 2016-03-07 16:26:58 -08:00
Daniel Sabo
2b7088f6e9 Make Burn mode output match Gimp 2.8 ( partial revert of bug 744265 ) 2016-03-07 16:26:58 -08:00
Daniel Sabo
39a417d476 app: Improve math of unaccelerated OperationNormalMode
Hopefully no one is stuck on a CPU old enough to need this, but if
they are the ratio based math is noticeably faster.
2016-03-07 16:26:58 -08:00
Michael Natterer
8d3c6a4f38 pdb: fix gimp-edit-bucket-fill when there is a selection
use the passed opacity and paint mode instead of hardcoding OPAQUE and
NORMAL.
2016-03-08 01:17:35 +01:00
Marco Ciampa
6f2e4ec1a6 Updated Italian translation 2016-03-07 23:42:07 +01:00
Michael Natterer
c77955e434 po: add app/core/gimpdrawable-fill.c to POTFILES.in 2016-03-07 21:40:33 +01:00
Michael Natterer
3f1c39c1b9 app: rename gimp_selection_push,pop_stroking() to selection_suspend,resume() 2016-03-07 21:39:41 +01:00
Michael Natterer
f2a98566d5 app: add gimpdrawable-fill.[ch]
for the filling code from gimpdrawable-stroke.[ch]; and clean up and
untangle the stroking and filling functions.
2016-03-07 21:33:42 +01:00
Øyvind Kolås
2da8aadfe2 icons: use argv chain of ops instead of xml to express inverting graph 2016-03-07 11:48:51 +01:00
Mónica Canizo
5e9379968c Updated Spanish translation 2016-03-07 10:45:43 +00:00
Ask Hjorth Larsen
5de155048c Updated Danish translation
(cherry picked from commit 78ee273965)
2016-03-06 20:15:21 +00:00
Ask Hjorth Larsen
b9440328c8 Updated Danish translation
(cherry picked from commit 04b37eabdc)
2016-03-06 20:06:33 +00:00
Martin Srebotnjak
32705c832f Updated Slovenian translation 2016-03-05 20:52:25 +01:00
Martin Srebotnjak
d422ba9afc Updated Slovenian translation 2016-03-05 20:51:30 +01:00
Martin Srebotnjak
f926478ef2 Updated Slovenian translation 2016-03-05 19:41:41 +01:00
Michael Schumacher
019547cb69 Changed "wilbur" to "wilber" for two icon files
Thanks to Tobias Ellinghaus for pointing this out.
2016-03-03 19:36:04 +01:00
Yolanda Álvarez Pérez
c4c2c04608 Updated Spanish translation 2016-03-03 08:12:13 +00:00
Thomas Manni
a8a214ffcb Bug 724731 - Difference clouds - memory leak if UNDO performed
Create the clouds layer after calling gimp-image-undo-group-start
2016-03-02 19:27:17 +01:00
Mónica Canizo
46296a2641 Updated Spanish translation 2016-03-02 08:17:22 +00:00
Yolanda Álvarez Pérez
9fee12da05 Updated Spanish translation 2016-03-02 08:07:33 +00:00
Mónica Canizo
e9b7bd65c0 Updated Spanish translation 2016-03-01 08:30:24 +00:00
Jehan
c0d96f0130 icons: get the 2.8 pixel-perfect icon theme back under name "Legacy".
It will makes nostalgic people happy. It does not change the plans about
the new Color icon theme, which we are planning to render pixel-perfect
as well in the end.
2016-03-01 00:12:38 +01:00
Jehan
9c617d058c themes: s/menu-item-prelight.png/menuitem-prelight.png/
Fix a typo of an image file's name in gtkrc.
2016-02-29 23:52:02 +01:00
Jehan
58b5c94d92 themes: uninstalled Light theme icon.
spin-fill-bg.png added in commit 0d692ea but not installed.
Fixes the following theme warning:
> Unable to locate image file in pixmap_path: "ui/spin-fill-bg.png"
2016-02-29 23:44:14 +01:00
Jehan
6ff0670323 icons: ignore all generated icons. 2016-02-29 17:38:38 +01:00
Jehan
0e9453d5ee Bug 762282 - Link ends with "/."
Add a comment for translators, which will be extracted by gettext,
ensuring that all translators are aware of the problem.
2016-02-26 17:17:44 +01:00
Piotr Drąg
050534db71 Updated Polish translation 2016-02-26 16:50:41 +01:00
Kevin Payne
faf03bb5e0 icons: gimp-tool-blend and gimp-tool-rect-select 16x16 pixel-perfect.
More to come later.
2016-02-26 15:42:28 +01:00
Jehan
f4c6322a8a icons: s/gimp-tool-align/gimp-tool-align-16/
Rename pixel-perfect icons, ending with size they have been made for.
2016-02-26 15:01:46 +01:00
Yolanda Álvarez Pérez
eb8cd468bb Updated Spanish translation 2016-02-26 08:07:57 +00:00
Mónica Canizo
40e40a3cae Updated Spanish translation 2016-02-26 08:05:29 +00:00
Jehan
1159ec2d90 Bug 762282 - Link ends with "/."
One can't say automatically if the dot is part of the URL (even though
usually not). Simpler is to not finish with a dot.
2016-02-25 17:47:36 +01:00
Yolanda Álvarez Pérez
00e168e830 Updated Spanish translation 2016-02-25 08:00:09 +00:00
Piotr Drąg
e1c80e8460 Updated Polish translation 2016-02-23 20:03:53 +01:00
Alexandre Prokoudine
1f80c48361 Mark user-visible messages for translation 2016-02-23 13:26:44 +03:00
Dimitris Spingos
c1c841430f Updated Greek translation 2016-02-22 23:10:57 +02:00
Jehan
b4422db7b5 icons: gimp-tool-align as 16x16 pixel-perfect color icon.
Working on Inkscape to kickstart pixel-perfection reworking of current
icons. I worked on gimp-tool-align as first attempt.
I perfectly aligned it to the grid (modified to show major grid lines
every 16 pixels) and use only round numbers.
Let's first work on the tools for 16x16 versions, and later for
22x22 versions.
2016-02-22 15:47:39 +01:00
Marco Ciampa
a3662ba561 Updated Italian translation 2016-02-22 02:22:26 +01:00
klausstaedtler
be985eb484 icons:Changes in scalable.svg
minor tweaks
gimp-tool-eraser
gimp-tool-bucket-fill
2016-02-21 14:41:44 +01:00
klausstaedtler
48ed6dea94 icons: add forgotten /22 gimp-tool-measure 2016-02-20 23:37:18 +01:00
klausstaedtler
0488eab57c icons: Changes in color-scalable & scalable
gimp-tool-measure. Gimp misuses an precision-compass icon
(example: http://www.staedtler.co.uk/en/products/technical-drawing-instruments/compasses/mars-comfort-551-precision-compass/)
for measuring. A divider is correct for this purpose (http://www.britannica.com/technology/divider-measurement-instrument).
2016-02-20 23:34:22 +01:00
Hartmut Kuhse
db63b49c1b Merge with master to be up to date 2016-02-19 17:03:48 +01:00
Hartmut Kuhse
2aad13f89c Fixes after merge 2016-02-19 17:02:45 +01:00
Piotr Drąg
d7d18c4401 Updated Polish translation 2016-02-17 22:10:34 +01:00
klausstaedtler
5585c70808 icons: Changes in color-scalable & scalable
revert
gimp-tool-blend
gimp-tool-warp
gimp-tool-perspective
gimp-tool-eraser

to old gimp png's and remove vectorial design

revert gimp-tool-blend in scalable.svg to old gimp design
2016-02-16 23:40:50 +01:00
Michael Natterer
b5bc15c9b9 app: add support for a preview rectangle to GimpImageMap 2016-02-16 21:36:36 +01:00
Michael Natterer
bda7ddc0fd app: disable the preview area in gimp_drawable_merge_filter()
This call has no effect if there was no preview area in the first place.
2016-02-16 21:36:35 +01:00
Michael Natterer
a0b18c7929 app: make GimpApplicator's preview feature optional
Don't add the preview nodes if use_preview_cache is FALSE in
gimp_applicator_new().
2016-02-16 21:36:35 +01:00
Michael Natterer
e3144ecc4c app: add support for a "preview rectangle" to GimpApplicator
When set, it crops the effect to that rectangle, using a cache for
quickly changing the previewed area. When disabling the preview rect,
make sure we don't lose the cached result by processing it into the
output cache through the mode and affect nodes which is cheap-ish.
2016-02-16 21:36:21 +01:00
klausstaedtler
bb4fcf41f0 icons: Changes in color-scalable
gimp-channel-indexed (too much tango color dots, reduced)
gimp-tool-eraser (now wilbur is printed on top)
2016-02-16 19:58:25 +01:00
Thomas Manni
3f5881875a Bug 758915 - port Tile to gegl 2016-02-16 18:56:09 +01:00
Jehan
ec27b539ea plug-ins: various s/save/export/ replacement on visible strings. 2016-02-16 02:35:43 +01:00
klausstaedtler
93e56422b6 icons: Changes in color-scalable
rebuild

gimp-gradient-shapeburst-angular
gimp-channel-indexed

(both where destroyed)
2016-02-15 19:27:34 +01:00
Jehan
e26fdc9e46 icons: allow vectorial icons for the Color icon theme too.
Extraction is still wrong for many icons. I'll see what I can do later.
The icon-list.mk is now common for all 3 icon themes.
2016-02-15 18:01:10 +01:00
Jehan
b2c43f71c9 icons: update some color icons to prepare for SVG extraction.
- gimp-anchor
- gimp-center
- gimp-web
- gimp-list
- gimp-warning
2016-02-15 18:01:10 +01:00
Jehan
be7d48e11d icons: fix gimp-toilet-paper icon exception.
It was infinitely-looping because of a mis-usage of the % matching rule.
On the rule or dependency side, I must use $(@D) instead of % to match
the directory part of the target (I could also have used $* to get only
the matching part of the stem).
2016-02-15 16:15:04 +01:00
Jehan
46ebb0ca60 Makefile.am: tools/ must be built after libgimpbase/.
Commit 8bb1421 broke the build by changing build order. Line back
tools/ after libgimpbase/ and move also icons/ after tools/ (for the
vectorial icons).
2016-02-15 15:21:47 +01:00
klausstaedtler
48af6784e2 icons: Changes in scalable
replace with old gimp design.

gimp-flip-horizontal
gimp-flip-vertical
2016-02-15 08:32:16 +01:00
Jehan
289512e6de icons: s/gimp-display-contrast/gimp-display-filter-contrast/
Wrong icon id in the color icon source.
2016-02-15 02:52:31 +01:00
Jehan
93fd6430d0 icons: update various icons to work around librsvg bugs.
- gimp-gradient-shapeburst-angular (straight path).
- gimp-gradient-spiral-clockwise (stroke-width).
- gimp-gradient-spiral-anticlockwise (stroke-width).
- gimp-gradient-square.
- gimp-info (1-point paths).
- gimp-path-stroke (stroke-width).
- gimp-path (stroke-width).
- gimp-prefs-icon-theme (1-point paths).
- gimp-prefs-playground
- gimp-prefs-toolbox
- gimp-selection-to-path (stroke-width).
- gimp-toilet-paper
- gimp-tool-desaturate (useless path).
- gimp-tool-fuzzy-select
- gimp-tool-n-point-deformation
- gimp-tool-preset
- gimp-tools
- gimp-tool-zoom (straight path).
- gimp-wilber
- gimp-wilber-eek
- gimp-wilber-outline

Note that even with these tweaks, icon extraction is still not perfect
because of a limitation of librsvg which does not return accurate
position/dimensions. As a result, extracted icons may have off-by-1
shift. So the extraction is still marked as experimental until this
librsvg bug is fixed:
https://bugzilla.gnome.org/show_bug.cgi?id=762039

This icon was broken:
- gimp-selection-none (was disformed).
2016-02-15 01:55:31 +01:00
Jehan
819f3201c4 icons: fix gimp-convert-grayscale export.
Avoid strokes under 1 pixels. librsvg does not like them.
2016-02-15 01:54:53 +01:00
Jehan
75fc7fa2a1 icons: fixes gimp-char-picker.
gimp-char-picker: librsvg is quite buggy and returns wrong dimensions
for paths with only 2 points.
See https://bugzilla.gnome.org/show_bug.cgi?id=760112
2016-02-15 01:54:44 +01:00
Jehan
684c196bcd icons: more exceptions in icon generation.
gimp-toilet-paper must not be inverted and gimp-color-picker-white|black
must be inverted from respectively gimp-color-picker-black|white.
2016-02-15 01:54:30 +01:00
Jehan
1d1e2c5c00 icons: do not include generated inverted icons into the distribution. 2016-02-15 01:54:08 +01:00
Jehan
8bb14211bb icons: add configure option --enable-vector-icons.
This will extract vectorial symbolic icons out of the SVG source, and
generate vectorial symbolic inverted icons too.
Vectorial color icons are not extracted yet.
I also make sure that the tools/ subdir is processed by make before
icons/ because a few build tools will be needed to extract the icons.
Yet I mark the feature as experimental because librsvg seems to be
broken on many edge cases and several icons end up wrong. I'll keep
the option experimental until I figure the right way to extract the
icons.
2016-02-15 01:53:33 +01:00
Jehan
b0af146ea3 tools: scripts to extract a single SVG icon from a source file.
SVG sources contains many icons and each icon is extracted by its id.
2016-02-15 01:53:19 +01:00
Jehan
1427b2c795 tools: "invert-svg", new tool to invert grey colors in vectorial icons. 2016-02-15 01:53:01 +01:00
Michael Natterer
c2cef394b2 app: don't invalidate the buffer source in gimp_drawable_real_update()
This was an artifact from the times of the initial GEGL port,
apparently something was broken in GEGL at the time.
2016-02-14 22:41:23 +01:00
klausstaedtler
e73b3ea20e icons: Changes in color-scalable
replace with old gimp design.
The design prefered by inkscape is not clear enough to distinct
between horizontal and vertical.
Even in inkscape itself the directions change with the icon themes.
Scalable sources will follow later (after jehan has finished his tests).

gimp-flip-horizontal
gimp-flip-vertical
2016-02-14 22:35:54 +01:00
klausstaedtler
5383e1a14e icons: Changes in color-scalable
gimp-flip-horizontal (wrong name)
gimp-flip-vertical (wrong name)
2016-02-14 18:55:47 +01:00
Benoit Touchette
0d692eadc0 themes: updates to TLSOG & TDSOG (prelight, text, bug fixes, (C))
Updates to copyright, some button contrast for TDSOG, TDLSOG. Added comment
for button focus area. Fixed selected text for TLSOG themes. Redid screenshots
to match changes. Fixed menu style name. Updated copyright year. Fixed menu
items for Ubuntu unity. Fixed prelight and fg for widget text. Updated to
v0.1.6.
2016-02-14 12:10:10 -05:00
Rūdolfs Mazurs
2ba02d220a Update Latvian translation 2016-02-14 19:03:39 +02:00
Piotr Drąg
d577e26928 Updated Polish translation 2016-02-14 17:16:13 +01:00
Hartmut Kuhse
f26231df1c Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	app/core/gimpimage.c
	app/pdb/internal-procs.c
	libgimp/gimpimagemetadata.c
	plug-ins/file-tiff/file-tiff-load.c
	plug-ins/file-tiff/file-tiff-save.c
2016-02-14 15:15:22 +01:00
klausstaedtler
df333f6c67 icons:Changes in scalable.svg
gimp-flip-horizontal (sync with color and inkscape)
gimp-flip-vertical (sync with color and inkscape)
gimp-tools (no cockwheel and wrench)
gimp-tool-preset (no toolbox, cockwheel and wrench)
gimp-prefs-toolbox (no cockwheel and wrench)
gimp-prefs-folder-tool-presets (no wrench and hammer, only pencils)
gimp-prefs-folders-tools (no hammer, just putty-knife and varnish)
gimp-prefs-tool-options (no cockwheel)
gimp-prefs-folders-tool-plug-ins (no cockwheel)
2016-02-14 13:34:02 +01:00
klausstaedtler
5b1d599930 icons: Changes in color-scalable & scalable
changed
gimp-tool-options (artists need easels)
2016-02-14 00:01:48 +01:00
Piotr Drąg
1067869d64 Updated POTFILES.in 2016-02-13 21:24:21 +01:00
klausstaedtler
be07e3fe05 icons: all old icons from /xcf and /svg are moved to /unused 2016-02-13 18:30:22 +01:00
klausstaedtler
44afe663bd icons: Changes in color-scalable
new
gimp-hcenter
gimp-hfill
gimp-vcenter
gimp-vfill

all color icons are 'ported' now to svg
2016-02-13 18:17:31 +01:00
Dušan Kazik
a5c2536ae6 Updated Slovak translation 2016-02-13 16:40:39 +00:00
Dušan Kazik
fdf36887b9 Updated Slovak translation 2016-02-13 16:20:13 +00:00
Dušan Kazik
94b6ad19f2 Updated Slovak translation 2016-02-13 16:12:53 +00:00
Dušan Kazik
2425765b06 Updated Slovak translation 2016-02-13 15:53:50 +00:00
klausstaedtler
98fc27df6f icons: Changes in color-scalable & scalable
swapped (for better consistency with gimp-tool-scale):
gimp-scale
gimp-resize

changed
gimp-reshow-filter (shutters are in a semantic field with filters, cockwheels not)

new in color-scalable
gimp-sample-point
2016-02-13 11:47:24 +01:00
Michael Natterer
336785ab51 Bug 753683 - default path location
Change the default folder to "Desktop" on OS X because it's expected
on the platform.
2016-02-12 23:09:03 +01:00
Michael Natterer
f2d581a536 Bug 761170 - Warnings building with clang
Fix a bunch of clang warnings.
2016-02-12 22:49:47 +01:00
klausstaedtler
c1902c31ab icons: Changes in color-scalable
changed:
gimp-scale
gimp-resize
gimp-convert-rgb
gimp-tool-preset

new:
gimp-duplicate
gimp-edit
gimp-flip-horizontal
gimp-flip-vertical
gimp-merge-down
gimp-move-to-screen
gimp-shape-square
gimp-shape-diamond
gimp-shape-circle

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-12 18:38:13 +01:00
Jehan
d51de65910 Bug 761731 - Fix icon name in color icon theme source.
s/gimp-tool-presets/gimp-tool-preset/
2016-02-12 01:03:03 +01:00
Michael Natterer
26ff8eb40d Bug 761573 - Problem with Raw Image Loader plugin
Use g_file_query_info() to get the file's size, stat() has some
windows 64 bit problem I've forgotten.
2016-02-12 00:36:11 +01:00
Michael Natterer
bd5d851364 Bug 752071 - less tool preset defaults checked
Don't check palette and gradient, but special case the blend tool for
gradient. The idea is that we check everything except colors.
2016-02-12 00:12:00 +01:00
Michael Natterer
e5b6806fe2 app: port tons of files to the new GIMP_CONFIG_PROP_FOO() macros
and remove lots of labels from calls to gimp_prop_foo_new(). Also
had to manually remove some unwanted labels that are now added
automatically, fixes bug #761880.
2016-02-11 23:46:24 +01:00
klausstaedtler
0bd4b1dd51 icons: Changes in color-scalable
minor clean-ups in many icons

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-11 22:16:47 +01:00
klausstaedtler
d233eddf23 icons:Changes in scalable.svg
some cleanup in sources

wrong uploaded Color/16/gimp-gravity* removed

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-11 19:59:42 +01:00
klausstaedtler
012160f70d icons: Changes in color-scalable
minor change in gimp-convert-rgb


new in color-scalable:
gimp-rotate-270
gimp-rotate-180
gimp-rotate-90
gimp-center
gimp-gravity-north-west
gimp-gravity-north-east
gimp-gravity-south-east
gimp-gravity-south-west
gimp-gravity-north
gimp-gravity-east
gimp-gravity-south
gimp-gravity-west

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-11 19:43:07 +01:00
Jehan
7364c37158 app: update documentation comment of gimp_guide_custom_new().
Say in the doc that custom guides do not follow snapping settings.
2016-02-11 17:40:45 +01:00
Jehan
fa19271859 app: do not snap to custom guides.
I am still not sure whether custom guides should follow snapping rules.
Yet I could easily imagine you could want some normal guides with
snapping and in the same time symmetry without snapping to axis of
symmetry. So for the time being, let's disable snapping to custom guides
all the time and see if logic could be improved later.
2016-02-11 17:35:21 +01:00
Jehan
790f72d4fe app: update "horizontal/vertical guide position" labels.
"Guide" is our internal representation. In geometry, we'll talk about
an "axis" of symmetry.
2016-02-11 17:15:53 +01:00
Jehan
0107335938 app: allow the mirror axis position within image's dimensions only.
This is not ideal since the scale widget is crazy huge, thus
impractical, but the solution used on properties of other symmetries
(updating min/max of the class property) is wrong since it applies to
the whole class.
For the time being, it avoid setting obviously bad values until we
figure out the ideal automatic UI construction.
2016-02-11 17:12:45 +01:00
Jehan
60dc82d08c app: mirror axis should also be settable by scale widget...
... not only by guide moving. Both ways are complementary.
2016-02-11 17:12:45 +01:00
Jehan
609dcc5448 app: mandala center coordinates should also be settable by number...
... not only by guide moving. Both ways are complementary.
2016-02-11 17:12:44 +01:00
Jehan
04d8a2eed6 app: fix removing a GimpSymmetry from an image. 2016-02-11 16:45:50 +01:00
Jehan
30e4826473 app, libgimpwidgets: update gimp_prop_foo_new() documentation comments.
Explains what happens when NULL labels are used.
2016-02-11 16:35:45 +01:00
Jehan
e6f4dad28c app: do not add both a GtkLabel and GtkImage child to a GtkCheckButton.
Since commit 9c4dd96, a NULL label to gimp_prop_check_button_new()
generates a label from the property nick. Trying to add a GtkImage in
the button outputs a warning because a GtkBin can have only one child.
Fixes the warning:
Gtk-WARNING **: Attempting to add a widget with type GtkImage to a
GtkCheckButton, but as a GtkBin subclass a GtkCheckButton can only contain one
widget at a time; it already contains a widget of type GtkLabel
2016-02-11 15:54:36 +01:00
klausstaedtler
bb4f42f151 icons: Changes in color-scalable & scalable
new in color-scalable:
gimp-convert-grayscale
gimp-convert-rgb
gimp-convert-indexed

changed in scalable (to be in sync with color):
gimp-convert-grayscale
gimp-convert-rgb
gimp-convert-indexed

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-10 22:30:41 +01:00
klausstaedtler
0a67797d60 icons: Changes in color-scalable
new as scalable:
gimp-color-triangle
gimp-floating-selection
gimp-list
gimp-cursor
gimp-tool-hue-saturation
gimp-scale
gimp-rescale

now only 30 icons missing as scalable

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-10 20:34:57 +01:00
Massimo Valentini
f44c77b4a2 Bug 761330: Gimp Drop Shadow window always opens...
...behind main window on windows

Windows requires that the process with the
foreground window explicitely allows long
lasting background processes showing their
windows as foreground/focused
2016-02-10 17:14:00 +01:00
Michael Natterer
18316c41a5 app: use the new GIMP_CONFIG_PROP_FOO()
instead of manual g_object_class_install_property().
2016-02-10 01:38:08 +01:00
Michael Natterer
33bb4f0b9b app: set the sensitivity of gegl:channel-mixer 2016-02-09 23:36:43 +01:00
Michael Natterer
9c4dd960a0 app, libgimpwidgets: allow NULL labels in some gimp_prop_foo_new() functions
and fall back to the GParamSpec's nick.
2016-02-09 23:35:06 +01:00
Michael Natterer
a3f127bf5f libgimpconfig: add a new set of macros to register serialitable properties
The old GIMP_CONFIG_INSTALL_PROP_FOO() have the problem of always
passing NULL as the GParamSpec's "nick". I have no clue what we were
thinking back then, but this has always been a major design flaw
because (among other problems) it makes it impossible to fully
auto-generate GUIs based on properties.

Added GIMP_CONFIG_PROP_FOO() macros which do have a "nick" parameter,
will deprecate the old macros as soon as everything is ported.
2016-02-09 23:25:44 +01:00
klausstaedtler
221b47978d icons: Changes in color-scalable
tweak gimp-transparency

new as scalable:
gimp-tool-posterize
gimp-images
gimp-paste-as-new
gimp-paste-into

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-09 22:06:49 +01:00
Ask Hjorth Larsen
ceabae5e4e Updated Danish translation
(cherry picked from commit 25ca13270f)
2016-02-09 13:57:11 +00:00
Ask Hjorth Larsen
c1ccac2586 Updated Danish translation
(cherry picked from commit 8d2cc6083a)
2016-02-09 13:44:11 +00:00
Ask Hjorth Larsen
034bf170ae Updated Danish translation
(cherry picked from commit dafe93c41b)
2016-02-09 13:34:35 +00:00
klausstaedtler
813b19b06f icons: Changes in color-scalable & scalable
tweak gimp-zoom-follow-window

Changes in color-scalable
change gimp-prefs-system-resources (to something more preferences and system alike)
gimp-tool-airbrush enlarge airbrush


new as scalable:
gimp-prefs-playground
gimp-tool-curves
gimp-curve-free
gimp-curve-smooth
gimp-invert
gimp-transparency
gimp-tool-desaturate

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-08 21:45:05 +01:00
Sveinn í Felli
97eb397c4e Updated Icelandic translation 2016-02-08 13:27:08 +00:00
Sveinn í Felli
e99d18dd87 Updated Icelandic translation 2016-02-08 13:21:25 +00:00
Sveinn í Felli
9f96077093 Updated Icelandic translation 2016-02-08 12:55:43 +00:00
Jordi Mas
95c9634361 Update Catalan translation 2016-02-07 22:46:35 +01:00
Massimo Valentini
b5546ac0ac Bug 678085 - Cage tool freezes GIMP
progress signal accepts 1 parameter not 0
it worked in linux, but not in win64
2016-02-07 18:50:11 +01:00
klausstaedtler
c59f3c7709 icons: Changes in color-scalable
new as scalable:
gimp-tool-align
gimp-tool-color-balance
gimp-tool-levels
gimp-tool-treshold
gimp-histogram
gimp-histogram-linear
gimp-histogram-logarithmic
gimp-portrait
gimp-landscape

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-07 16:47:02 +01:00
Jehan
c4a87e7a49 app: fix coordinates computation when tile-painting with x-shift. 2016-02-07 15:54:10 +01:00
Jehan
931752f353 app: minor space cleanup. 2016-02-07 15:33:12 +01:00
Jehan
a49e6d015a app: update tiling stroke coordinates when intervals change. 2016-02-07 15:17:20 +01:00
Piotr Drąg
65c6886544 Updated Polish translation 2016-02-07 12:18:54 +01:00
Michael Natterer
406e1819d0 app: move symmetry painting out of the playground
Also fixes bug #761617 because we don't unconditionally dereference
image_editor->context in gimp_symmetry_editor_set_image() any longer.
2016-02-06 23:33:04 +01:00
Michael Natterer
8bb00c639a app: simplify symmetry GUI generation
Remove GimpSymmetry::get_settings() and instead tag the properties that
should have a GUI with the GIMP_SYMMETRY_PARAM_GUI flag. Also use plain
g_object_class_install_property() because that allows for separate nick
and blurb. Finally, use gimp_prop_gui_new() to generate the GUI,
2016-02-06 23:20:44 +01:00
klausstaedtler
9fbeb8e656 icons: Changes in color-scalable & scalable
sync gimp-reset

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-06 23:14:29 +01:00
klausstaedtler
85cfadf176 icons: Changes in color-scalable,
gimp-menu-left, inversed for better visibility
gimp-menu right, inversed for better visibility
gimp-close, inversed for better visibility

new as scalable:
gimp-wilber-eek
gimp-gradient-shapeburst-angular
gimp-gradient-shapeburst-dimpled
gimp-gradient-shapeburst-sherical
gimp-print-resolution
gimp-device-status

down to 55 icons as scalable missing

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-06 22:24:44 +01:00
Piotr Drąg
ca50077493 Updated Polish translation 2016-02-06 19:02:50 +01:00
Jehan
710455b71c Revert "app: create pango font description of statusbar zoom field only once..."
This reverts commit 6878b49491.
I didn't take into consideration that different themes could apply
various fonts, font sizes or label-scale for the widget. So the font
description needs to be reinitialized at every theme change.
2016-02-06 15:53:43 +01:00
Jehan
a3185f8794 Bug 760906 - Fixing warning on new themes.
Both new themes were outputting the following warning for gap_left.png:
"Invalid borders specified for theme pixmap"
"borders don't fit within the image"
The problem was that the sum of the left and right gap borders cannot be
more than the gap file width (2 px in our case).
2016-02-06 02:00:06 +01:00
Jehan
6878b49491 app: create pango font description of statusbar zoom field only once...
... instead of recreating it all the time the same.
Small improvement of commit 3f2889e.
2016-02-06 01:19:43 +01:00
Michael Natterer
3ac3dcde48 app: add a GParamFlags parameter to gimp_prop_gui_new()
If non-0 flags are passed, create widgets only if the GParamSpec flags
have all the passed flags.
2016-02-06 01:04:40 +01:00
Michael Natterer
e630d6faa8 app: simplify GimpSymmetryEditor even more 2016-02-06 00:32:57 +01:00
klausstaedtler
419b64d7f9 icons: Changes in color-scalable,
gimp-channels, corrected order of rgb
gimp-tool-ink, tweak for visibilty
gimp-tool-blend, tweak for visibility

new as scalable:
gimp-tool-foreground-selection
gimp-tool-by-color-select
gimp-reset
gimp-tool-brightness-contrast
gimp-gradient-bilinear
gimp-gradient-linear
gimp-gradient-radial
gimp-gradient-conical-asymmetric
gimp-gradient-conical-symmetric
gimp-gradient-clockwise
gimp-gradient-anticlockwise
gimp-gradient-square
gimp-tool-fuzzy-select

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-05 21:56:32 +01:00
Michael Natterer
46da951b85 app: add an offset to GimpDisplayShell's mask
and set that offset in GimpRegionSelectTool when not in sample_merged
mode. Fixes live selection mask display for layers with a non-zero
offset.
2016-02-05 21:21:52 +01:00
Dimitris Spingos
c3eb5cf4c5 Updated Greek translation 2016-02-05 16:52:42 +02:00
klausstaedtler
3deb71240d icons: Changes in color-scalable,
new as scalable:
gimp-selection
gimp-selection-add
gimp-selection-all
gimp-selection-border
gimp-selection-grow
gimp-selection-intersect
gimp-selection-none
gimp-selection-replace
gimp-selection-shrink
gimp-selection-stroke
gimp-selection-subtract
gimp-selection-to-channel
gimp-selection-to-path

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-04 21:13:50 +01:00
Michael Natterer
8b7939d226 app: ref the symmetry in gimp_image_symmetry_add()
so we have proper ref/unref symmetry in symmetry_add/remove().
2016-02-04 20:58:00 +01:00
Jehan
66ead15f69 app: reparenting GimpSymmetryEditor to GimpImageEditor. 2016-02-04 17:05:27 +01:00
Jehan
6e38cd1bde app: cleaning out unused variable. 2016-02-04 12:15:28 +01:00
Jehan
f61b58ff38 app: class label is a translated string.
This will make the parasite name change with language, which isn't
what we want. Uses the GType name instead.
2016-02-04 01:20:27 +01:00
klausstaedtler
4cab276fb7 icons: Changes in color-scalable,
new as scalable:
gimp-cap-butt
gimp-cap-round
gimp-cap-square
gimp-anchor
gimp-question
gimp-info
gimp-prefs-folders-tool-plug-ins
gimp-tool-ellipse-select
gimp-tool-rect-select
gimp-tool-free-select

down to 87 icons missing at all

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-03 22:53:24 +01:00
Michael Natterer
02f76b4c7b app: rename GimpImage.selected_symmetry to .active_symmetry
because that's the usual naming. Also change the set/get API accordingly.
2016-02-03 21:25:17 +01:00
Michael Natterer
dfb6a496ef app: core-enums.c was regenerated 2016-02-03 21:11:04 +01:00
Jehan
ec98b57bc4 app: GimpGuideStyle is not in display-enums anymore. 2016-02-03 20:53:21 +01:00
Jehan
73389033d2 app: remove redundant "type" member of GimpSymmetry.
Use G_TYPE_FROM_INSTANCE() instead.
2016-02-03 20:11:31 +01:00
Jehan
e01d56969d app: move all guide styling to gimpcanvas-style. 2016-02-03 19:38:32 +01:00
Michael Natterer
3415d22e58 app: some cleanup in the new symmetry code, mostly harmless 2016-02-03 14:29:23 +01:00
Michael Natterer
9e5329df77 app: some cleanup in gimpdrawable-blend.c 2016-02-03 10:44:07 +01:00
Alexandre Prokoudine
17a612f743 Update Russian translation 2016-02-03 10:22:59 +03:00
Alexandre Prokoudine
7cc0a9d4ba Fix a typo in a user-visible message 2016-02-03 10:22:59 +03:00
Michael Natterer
023a732a3e app: simply call gimp_image_map_commit() in gimp_blend_tool_commit()
so the already computed result is used and not completely regenerated.
2016-02-03 00:22:15 +01:00
klausstaedtler
efae597a2d icons: icon-list.mk gimp-symmetry added
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-03 00:00:29 +01:00
klausstaedtler
b07c20c3f2 icons: use mypaint symmetry icons in scalable.svg & color-scalable.svg
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-02 22:43:34 +01:00
klausstaedtler
35568f86e7 Merge git://git.gnome.org/gimp 2016-02-02 22:12:07 +01:00
klausstaedtler
7c2494d41a icons: upload recent color-scalable.svg, move gimp-symmetry.xcf to /xcf foder
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-02 22:10:28 +01:00
Jehan
7c2491c235 themes: light theme should also use larger tool icons.
Now that we are back to separate gtkrc files, let's make the light theme
follow the same layout.
2016-02-02 22:09:07 +01:00
Jehan
3198d27787 Revert "themes: use a common gtkrc and correctly named colors."
This reverts commit 6e109052ca.
Let the theme designer work his own way. :-)
2016-02-02 22:09:07 +01:00
klausstaedtler
db89e1d7c4 icons: Changes in color-scalable,
gimp-tool-cage minor tweak for elegance
gimp-navigation, new (forgot to mention in last commmit)
gimp-linked, new
gimp-visible, new
gimp-char-picker, revert by tango char-picker, adwaita has too much glamour
gimp-hchain, new
gimp-hchain-broken, new
gimp-vchain, new
gimp-vchain-broken,new
gimp-controller, new
gimp-controller-keyboard, new
gimp-controller-wheel, new
gimp-controller-linux-input, new
gimp-controller-midi, new
gimp-prefs-tool-options, new

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-02 22:05:09 +01:00
Jehan
96b5e5345e libgimpwidgets: add new symbols in def file. 2016-02-02 21:54:30 +01:00
Jehan
1f4839288e Bug 648776 - fixes symmetry painting after Massimo and Mitch's reviews.
Use a GType for the PROP_SYMMETRY property of GimpImage, and create
a default "identity" symmetry for an image.
I still use a GimpIntComboBox but store the property value in the
user-data column because gpointer isn't a subset of gint.
Adds in libgimpwidgets:
- gimp_int_combo_box_set_active_by_user_data()
- gimp_int_combo_box_get_active_user_data()
- gimp_int_store_lookup_by_user_data()
- gimp_prop_pointer_combo_box_new() to create a GimpIntComboBox and
  attach it to a gpointer property.
Thanks Massimo and Mitch for reviewing my code.
2016-02-02 21:15:13 +01:00
Jehan
eb25d0cead po: add symmetries to POTFILES.in. 2016-02-02 21:15:13 +01:00
Jehan
1c0a0a47de app: add a "Mandala" symmetry.
This is basically a multiple rotation around a given center.
2016-02-02 21:15:13 +01:00
Jehan
b5811b05ad app: add a "Tiling" symmetry. 2016-02-02 21:15:13 +01:00
Jehan
76f573c981 Bug 648776 - mirror symmetries.
You can now set any paint tool to mirror painting relatively
horizontal/vertical axis or a central point (any combination of these 3
symmetries).
This has been implemented as a new multi-stroke core, where every stroke
is actually handled as a multi-stroke (default of size 1).
This is also the first usage of custom guides for symmetry guiding.
Current version has to be activated in the playground.
2016-02-02 21:15:13 +01:00
Jehan
b8fadf3ad7 app: add a "custom" guide concept.
With gimp_guide_custom_new(), you can create a custom guide with a different
style on canvas (other pattern/color/width). A custom guide won't be saved
and could be used, for instance, for specific GEGL op guiding.
2016-02-02 21:15:13 +01:00
Martin Srebotnjak
b6a756f284 Updated Slovenian translation 2016-02-02 21:01:43 +01:00
Martin Srebotnjak
d616d8b557 Updated Slovenian translation 2016-02-02 20:57:45 +01:00
Martin Srebotnjak
e26ae4c84b Updated Slovenian translation 2016-02-02 20:56:26 +01:00
Martin Srebotnjak
2729c71bb4 Updated Slovenian translation 2016-02-02 20:55:08 +01:00
Massimo Valentini
b9ba90589a Bug 678085 - Cage tool freezes GIMP
Use a proper "progress" signal instead of a property "notify" one
to update the on-canvas progress widget.

This way the graph is not invalidated while processing it
2016-02-02 12:21:15 +01:00
Michael Natterer
589dd3d485 app: rename gimp_blend_tool_update_preview_coords() to _update_graph() 2016-02-02 01:25:42 +01:00
Michael Natterer
49b4d6a220 app: clean up the blend-tool-fun branch to be usable on master
which essentially means some cleanup and no more regressions:

- add state POINT_BOTH for moving the entire line
- use the move cursor for moving the entire line
- reorder some functions
- set the tool to handle click events
- make clicks and no-motion releases behave properly
- #if 0 the code for "shapeburst handles", they don't work yet
- return to gimp:shapeburst until we have figured progress for GEGL ops
- indentation, stuff...
2016-02-02 00:46:42 +01:00
Michael Henning
d52bb9ca58 app: Remove dead code in gimpdrawable-blend 2016-02-01 21:20:19 +01:00
Michael Henning
a0a6d6139e app: Use gimp:blend in gimp_drawable_blend 2016-02-01 21:20:19 +01:00
Michael Henning
f545b7fe72 app: Place shapeburst buffers at the right offset. 2016-02-01 21:20:19 +01:00
Michael Henning
2cee41aabd app: Add shapeburst handles to the blend tool. 2016-02-01 21:20:19 +01:00
Michael Henning
ae84fe9ec8 app/core: Expose creating shapeburst distmaps in gimpdrawable-blend. 2016-02-01 21:18:51 +01:00
Michael Henning
54ab3047b3 core: Remove unused parameter. 2016-02-01 21:18:51 +01:00
Michael Henning
1efdae9654 operations: Use input for the shapeburst distance map in Blend. 2016-02-01 21:18:51 +01:00
Michael Henning
7a92ad7a07 operations: Make GimpOperationBlend a filter. 2016-02-01 21:18:51 +01:00
Michael Henning
892fec9512 Revert "app: use the new distance-transform operation in the blend tool"
While the tool should definitely use the new op, we want the code in
gimpdrawable-blend to use the old one for compat reasons. The new op
will be exposed via a separate pdb call in the future.

This reverts commit 8af3fec689.
2016-02-01 21:18:51 +01:00
klausstaedtler
e21311de9d icons: Changes in color-scalable,
gimp-tool-blend, new
gimp-prefs-controllers, new
gimp-close, new
gimp-menu-left, new
gimp-menu-right, new
gimp-quick-mask-off, new
gimp-quick-mask-on, new
gimp-swap-color, new
gimp-zoom-follow-window, new

delete 48/gimp-prefs-system-resorces, was a typo

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-02-01 20:40:36 +01:00
Michael Natterer
92bd0fb7e4 app: change minimum value of GimpBlendOptions::supersample-depth to 1
The old minimum of 0 resulted in a "subpixel" size of 1 which doesn't
make much sense.
2016-02-01 20:29:39 +01:00
Jonathan Tait
3f2889e030 Bug 761340 - on changing theme/icon theme, statusbar zoom field shrinks.
Apply label-scale once only.
2016-02-01 14:42:14 +01:00
Simon Budig
b3e4212dfe app/vectors: fix up the anchors types which I messed up with my last change. 2016-02-01 12:37:04 +01:00
klausstaedtler
5bcb71c81d icons: changes in scalable & color-scalable
scalable:
gimp-tool-crop minor tweak

color-scalable:
gimp-tool-iscissor, tweak for better visibility with dark themes
gimp-tool-blur, newv as svg
gimp-tool-dodge, new as svg


Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-31 21:12:42 +01:00
Piotr Drąg
57303e0548 Updated Polish translation 2016-01-31 16:59:29 +01:00
klausstaedtler
023d0041d4 icons: Changes in color-scalable, add missed 48x48 prefs-folders
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-31 15:06:17 +01:00
klausstaedtler
b870592038 icons:Changes in color-scalable.svg
all gimp-channel* removed highlights
all gimp-prefs-folders* are identical for all sizes and have folders in their symbolic
gimp-tool-crop synced with symbolic and krita
gimp-path* synced with symbolic
gimp-tool-ink now has a fountain-pen in its symbol (to better fit to inkscape and krita)
gimp-tool-airbrush new
gimp-tool-colorize synced with symbolic
gimp-icon-theme synced with symbolic
gimp-tool* new, gimp is for painters and artists and ..., not for brick-layers, lock-smiths ... (naturally they can paint with gimp too...), corrected metaphor.

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-31 14:50:19 +01:00
klausstaedtler
1d6ce54fcb icons: Changes in color-scalable
new additions. 120 vectorial icons are missing

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-30 21:46:06 +01:00
Michael Natterer
1cc6f5cf1d Bug 759316 - "Recently used" menu not updated with gegl filters
Default to the last used settings for "Reshow last" and "Recent filters"
GEGL procedures, just as plug-ins do.
2016-01-30 19:30:52 +01:00
Gábor Kelemen
7c779853ca Updated Hungarian translation 2016-01-30 10:05:20 +00:00
klausstaedtler
9e27398572 icons: Changes in color-scalable
lot's of  additions, currently 'only' 134 icons are missing. Work in progress...

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-29 22:57:20 +01:00
klausstaedtler
a16e41ae59 icons: scalable,svg correct paths in gimp-tool-path
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-29 22:41:40 +01:00
klausstaedtler
559ec73ec0 icons:Changes in scalable.svg, gimp-tool-path refined
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-29 22:34:17 +01:00
klausstaedtler
5e1a03287b icons:Changes in scalable.svg
gimp-tool-path redrawn to be in sync with new colored gimp-tool-path and with inkscape

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-29 22:08:17 +01:00
Simon Budig
1e47343b04 Bug 735810- performance shrinkage of Paths tool
Apply revised version of Mitchs patch that
changes the anchor list to a GQueue.
2016-01-29 01:00:03 +01:00
Jehan
b5ae3e738c icons: fix gimp-channel-indexed symbolic icon.
librsvg acts up very weirdly with strokes under 0.5 pixels (which is
anyway not a very meaningful value). Fix the icon by removing such
strokes and increasing the fill dimensions instead.
See https://bugzilla.gnome.org/show_bug.cgi?id=761264
2016-01-28 21:30:19 +01:00
Jehan
741fe7653c icons: fixing symbolic gimp-color-picker-white/black icons.
Pieces of the icons were not grouped with the rest of the icons.
2016-01-28 18:58:18 +01:00
Jehan
e897f61807 icons: both symbolic icon themes share the same folder tree. 2016-01-28 16:56:54 +01:00
Jehan
1fe6bfb351 icons: make every icon perfectly square. 2016-01-28 14:01:11 +01:00
Michael Natterer
2c48d55f75 app: add gimp_g_queue_get_memsize() and gimp_g_queue_get_memsize_foreach() 2016-01-27 23:04:31 +01:00
Michael Natterer
cd20669e09 app: don't leak the GList element in gimp_vectors_real_stroke_remove()
and some general cleanup in the file.
2016-01-27 22:50:56 +01:00
klausstaedtler
6565596ef9 icons:Changes in scalable.svg
minor tweaks to

gimp-prefs-default-grid
gimp-prefs-playground

delete false sizes in color

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-27 18:39:22 +01:00
Daniel Sabo
71e8ef6103 app: mypaint: Honor selection mask 2016-01-27 08:47:26 -08:00
klausstaedtler
83ec24d795 icons: Changes in color-scalable
all *.xcf moved to folder xcf and it's according subdirectories
all new-painted icons are without shadow
most to small icons (<16x16) fixed
free-floating vectors in both wilbur icons tied to the icon
some new svg icons
color for channel r/g/b mor pleasant

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-27 17:45:03 +01:00
Jehan
6c9718783a icons: remove XCF icon sources for gimp-tool-unified-transform icons.
Now there is a SVG source.
2016-01-27 01:56:48 +01:00
Aryeom Han
a2fd7d4e6c icons: gimp-tool-unified-transform icon updated with vectorial source. 2016-01-27 01:16:57 +01:00
Jehan
ecaae0788c app: minor fix of parameter alignment. 2016-01-26 00:11:51 +01:00
Michael Natterer
0dfeee1614 app: reorder select-commands.[ch] to be in the same order as -actions.c 2016-01-25 23:07:33 +01:00
Ell
b52da8a17e pdb: Add gimp-selection-flood 2016-01-25 23:01:53 +01:00
Ell
71119d41c0 app: Add "Flood" select action
and associated UI entries.

This action applies the "gimp:flood" operation to the selection.
2016-01-25 22:58:33 +01:00
Ell
3f04e349cf app: Add gimp_channel_flood() function
This function applies the "gimp:flood" operation to the channel.
2016-01-25 22:58:28 +01:00
Ell
c63bee3440 app: Add "gimp:flood" GEGL operation
This operation assigns to each pixel the minimum of the
maxima of all paths from it to the outside, as if the
input image represents a height map, and the operation
floods it with water.
2016-01-25 22:58:24 +01:00
klausstaedtler
101c9d4e88 Icons:
Changes in scalable.svg


revert
gimp-tool-unified-transform to the style contributed by Aryeom (colored revert will follow)

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-25 17:53:54 +01:00
Richard Hughes
cfa6f58d0e Add a missing tag to the AppData file 2016-01-25 16:22:23 +00:00
Michael Natterer
6aa6406416 app: clean up tool_manager_tool_changed() a bit 2016-01-25 12:18:44 +01:00
Mukund Sivaraman
4e05c07cd4 app: Copy to dest_vectors correctly 2016-01-25 15:29:46 +05:30
Mukund Sivaraman
e14c1a0156 Use GQueue for strokes list 2016-01-25 10:56:15 +05:30
Mukund Sivaraman
992c58fe4f Use an aux hashtable and avoid g_list_find() when searching for a GimpStroke* 2016-01-25 10:25:43 +05:30
Michael Natterer
d2d2920af6 app: fix changing tools to not prematurely change the old tool
Commit the old tool before even creating the new tool. Old and new
tool might be the same and share tool options, and we don't want
the new tool's initialization to mess up the old tool's state.

Fixes changing from one GEGL operation to another without explicitly
confirming the first operation. The bug only killed the cached filter
result, but that's bad enough.
2016-01-25 02:56:10 +01:00
Michael Natterer
6a2f200b34 app: rename more variables to "im_tool" in GimpImageMapTool 2016-01-25 02:56:10 +01:00
Alexandre Prokoudine
c94e87e6ac Update Russian translation 2016-01-25 03:25:37 +03:00
Alexandre Prokoudine
97561f4f01 Uncopypaste the help hint for filters-saturation 2016-01-25 02:56:02 +03:00
Alexandre Prokoudine
4ce063cf32 app: add gegl:high-pass as Filters > Enhance > High Pass 2016-01-25 02:54:05 +03:00
Alexandre Prokoudine
50daf44ef3 app: add gegl:saturation as Colors -> Saturation 2016-01-25 02:33:53 +03:00
klausstaedtler
6e8cd278fa Icons:Changes in color-scalable.svg
redraw new (if possible with usage of existing sources):
gimp-tool-clone
gimp-tool-heal
gimp-tool-perspective-clone
gimp-tool-n-point-deformation
gimp-tool-unified-transform
gimp-prefs-color-management
gimp-display-filter-proof
gimp-channel
gimp-channels
gimp-channel-red
gimp-channel-green
gimp-channel-blue
gimp-channel-gray
gimp-channel-indexed
gimp-prefs-folders-brushes
gimp-prefs-folders-dynamics
gimp-prefs-folders-plug-ins
gimp-layer


copied from inskcape or tango and adopted
gimp-tool-eraser
gimp-tool-shear
gimp-tool-rotate
gimp-tool-color-picker
gimp-tool-warp
gimp-color-picker-black
gimp-color-picker-white
gimp-color-picker-gray
gimp-tool-preset
gimp-prefs-folders
gimp-prefs-folders-palettes
gimp-prefs-folders-patterns

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-24 22:45:13 +01:00
Michael Natterer
56e032c1eb app: remove gimp_image_map_tool_dialog_get_label_group()
The "Settings:" label should never be aligned with a label in the UI
below, because that suggests that are related. Also consistently
rename all GimpImageMapTool parameters and variables to "im_tool".
2016-01-24 22:03:58 +01:00
Michael Natterer
a4f005ba22 app: change widget grouping in the curves dialog like in levels 2016-01-24 21:41:03 +01:00
Michael Natterer
27cf1e5e6f app: finish the levels dialog widget grouping
seems I didn't consistently group things in indented GimpFrame widgets
last time I cleaned up here. Should be better now. Also change the
"Auto" button to "Auto Input Levels" to make things clearer.
2016-01-24 21:39:31 +01:00
klausstaedtler
513e32ae1c Icons: color-scalable.svg
Contains all svg's from color theme, missing ones are
substituted by icons from sybolic theme (to get an visual impression what
is missing).


Gimp uses 221 different icons,


55 scalable icons are reused
10 missing scalable icons have been already been redone

but in this svg:

161 scalable color icons are missing at all
4 scalable color icons are to small (not exactly 16x16)
15 scalable color icons are to large (copied from 48x48)


Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-24 14:08:33 +01:00
Massimo Valentini
6cf8bda49b Bug 735810 - performance shrinkage of Paths tool
In gimp_display_shell_expose_region(), invalidate each rect rather
than rebuilding the cairo_region_t as GdkRegion and then invalidating
the entire GdkRegion. Improves performance for tools that invalidate
complex regions.
2016-01-24 00:59:33 +01:00
Michael Natterer
4920033c42 Bug 735810 - performance shrinkage of Paths tool
Use a GQueue instead of a GList in GimpCanvasGroup, so adding items
takes constant time instead of O(n). Also, removing items was
traversing the list twice. This should generally speed up tools with
lots of canvas items.

Also, add a private pointer to the instance struct instead of using a
GET_PRIVATE() macro.
2016-01-24 00:57:16 +01:00
Michael Natterer
c8ee9f951d app: fix crash in gimp_gegl_tool_get_operation()
actually chain up, instead of calling ourselves recursively...
2016-01-23 22:06:19 +01:00
klausstaedtler
239b752c1d Icons: Some low hanging fruits of my attempt to redraw missing *svg's 2016-01-23 20:02:02 +01:00
klausstaedtler
e8590eb37a Icons: some low-hangings fruits of my attempt to redraw
missing color *.svg icons.

gimp-channel was inconsistent
gimp-display-filter-proof was different than all other display filters
(and the privious line tester was only recognized with big enlargement,
 if at all ...)
gimp-prefs-theme now fits to gnome theme (and gimp symbolic theme)
gimp-tool-seamless-clone, only size reduced by stripping of useless exif etc.

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-23 19:43:51 +01:00
Gábor Kelemen
c381b9757c Updated Hungarian translation 2016-01-23 13:10:33 +00:00
Michael Natterer
bd9e59a9f0 app: add "title", "icon_name" and "help_id" to gimp_tool_gui_new()
so things are the same at the API and the inside, which makes
GimpImageMapTool's use of GimpToolGui a little more obvious.
2016-01-22 23:41:45 +01:00
Michael Natterer
cd47aac435 app: remove GimpThresholdConfig
The new more general GimpImageMapTool code handles this case
completely automatically now.
2016-01-22 22:37:23 +01:00
Michael Natterer
8c09210d7d app: move stuff from GimpOperationTool to GimpImageMapTool
Add new string members to GimpImageMapTool and use them instead of the
resp. fields of GimpToolInfo. Change ::get_operation() to return the
operation name and a lot of strings for the UI, and create both the
GeglNode and the config object in GimpOperationTool. Lots of various
cleanups in GimpImageMapTool subclasses. This is an intermediate state
on the way of making the whole filter applying mechanism more generic
and less depending on subclasses.
2016-01-22 21:28:33 +01:00
Michael Natterer
b72d73377a app: change the include guards of gegl/gimp-gegl-config.h
They can't be the same as in config/gimpgeglconfig.h.
2016-01-22 21:28:33 +01:00
Michael Natterer
1ef06fdbb2 app: add gimp_gegl_config_register()
which registers config classes for operations that don't want their
config objects to be auto-generated. Register all color tools' config
objects. Change gimp_gegl_config_sync_node() to correctly handle ops
that have an object property of the right config object type.
2016-01-22 21:28:33 +01:00
Jehan
8d79e2289a themes: default toolbox icon size should be GTK_ICON_SIZE_LARGE_TOOLBAR.
Just like the old "Default" theme has. This is an acceptable average for
various kind of devices, unlike small icons.
2016-01-22 16:35:53 +01:00
Dušan Kazik
7da352c69b Updated Slovak translation 2016-01-22 12:20:45 +00:00
Dušan Kazik
e942d31480 Updated Slovak translation 2016-01-22 12:07:02 +00:00
Dušan Kazik
8264ddd1a1 Updated Slovak translation 2016-01-22 11:43:42 +00:00
Dušan Kazik
dc616f53d9 Updated Slovak translation 2016-01-22 11:07:36 +00:00
Jehan
2cf381d211 app: fix typos in comment. 2016-01-20 21:30:55 +01:00
Michael Natterer
39cc3eccd5 app: rename gimp-gegl-config-proxy.[ch] to gimp-gegl-config.[ch]
and rename its functions to make more sense.
2016-01-20 12:18:35 +01:00
Jehan
ea13e816ab Bug 750105 - Migrating 2.8 themes to 2.9/2.10
Old themes should not be copied over to the GIMP 2.9/2.10 config at
first launch since they won't be compatible anyway. Let's go the less
painful way by dropping old themes rather than trying to salvage themes
which we know will be broken by design.
2016-01-19 22:36:27 +01:00
Øyvind Kolås
9b32253270 configure.ac: require GEGL 0.3.5 2016-01-19 00:23:07 +01:00
klausstaedtler
620d8ed5a6 Icons: hopefully I have now all *.svg moved arrgh.
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-18 20:59:04 +01:00
klausstaedtler
e6e5a2b462 Icons: even more to move to /color/scalable
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-18 20:48:13 +01:00
klausstaedtler
6fed40fa20 Icons: some *.svg files not moved to /color scalable corrected
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-18 20:34:11 +01:00
klausstaedtler
a4fc5b75c4 Icons: All *.svg files from Color and it's subdirectories are moved to
Color/scalable with according subdirectory. This is a first step to collect
all individual color *svg in one color-scalable.svg, like in symbolic.

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-18 20:25:04 +01:00
klausstaedtler
7164e8eaa2 Icons:
Changes in scalable.svg


Title in Metadata changed from 'Gnome Icon Theme' to 'Gimp Symbolic Icon Theme', added authors 'Barbara Muraus, Jakub Steiner, Klaus Staedtler' and description 'Images originally created as the "Art Libre" icon set. Extended and adopted for GIMP'

gimp-tool-blend reworked for better integration into 'Tools' instaed of 'Gradients'
gimp-prefs-icon-theme reworked (forgot to mention in last commit)
gimp-prefs-folders-icon-theme reworked (forgot to mention in last commit)
gimp-tool-by-color-select lowered transparency to 50% for better visibility
gimp-tool-desaturate lowered transparency to 50% for better visibility
gimp-tool-foreground-select lowered transparency to 50% for better visibility
gimp-tool-shear lowered transparency to 50% for better visibility
gimp-tool-unified-transform lowered transparency to 50% for better visibility
gimp-color-triangle lowered transparency to 50% for better visibility

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-18 15:57:18 +01:00
Michael Natterer
2e64e6b3e6 Bug 750893 - Channel Mixer: Monochrome option missing in new GEGL Version
Also add the mono mixer to Colors -> Components.
2016-01-18 02:37:03 +01:00
Michael Natterer
37dd1778ad pdb: clean up the channel mixel PDB compat proc
Fix indentation, remove unneeded casts.
2016-01-18 02:14:49 +01:00
Michael Natterer
0eeb741fae menus: move "Desaturate" to Colors -> Desaturate
and reorder the desaturate submenu alphabetically.
2016-01-18 02:13:39 +01:00
Jehan
37a482a096 icons: invert the symbolic icons with gegl:invert-gamma...
... instead of gegl:invert-linear.
2016-01-18 00:28:37 +01:00
Michael Natterer
06a5b2fa3f app: bring dialog titles and help IDs to GEGL filter dialogs
Add "title" and "help_id" parameters and members/properties to
GimpToolDialog, GimpToolGui, GimpOperationTool. Also make the order of
parameters more consistent.
2016-01-17 20:17:07 +01:00
Jehan
6e109052ca themes: use a common gtkrc and correctly named colors.
All our new themes should now use a common gtkrc base. Colors only
should be different, as included from a colorrc. This way we ensure a
consistent behavior throughout all themes.
Also we should use meaningful color names to make maintenance easy.
2016-01-17 19:53:04 +01:00
Michael Natterer
a940300525 libgimpwidgets: make GimpDialog's help_id settable after construction 2016-01-17 17:35:33 +01:00
Michael Natterer
7c0d7c6311 app: add new virtual function GimpProcedure::get_help_id()
Implement the new function in GimpPlugInProcedure and remove
gimp_plug_in_procedure_get_help_id().
2016-01-17 17:15:27 +01:00
Michael Natterer
d21ab943c1 app: make gimp_gegl_get_config_proxy() work without a passed icon_name
Keeps the GEGL tool from crashing.
2016-01-17 16:10:19 +01:00
Jehan
f522c1ad49 themes: update distributed theme images.
entry-border-fill-active-item is not used anymore (commit 2144a7c).
gimp-arrow-right-prelight seems as well for some time.
Adding menuitem-prelight (commit 127fdff and 2144a7c).
2016-01-17 15:34:23 +01:00
Piotr Drąg
f1487c27de Updated Polish translation 2016-01-17 15:05:02 +01:00
Michael Natterer
f948f275ea AUTHORS: regenerated 2016-01-17 14:47:14 +01:00
Alexandre Prokoudine
4cb9b754a9 Add Ell to the list of v2.10 contributors 2016-01-17 16:40:41 +03:00
Michael Natterer
bcf89ac27d libgimp: and a typo in gimp.def, hopefully finished now :) 2016-01-17 14:35:55 +01:00
Michael Natterer
80faa72617 libgimp: remove duplicate entries from gimp.def 2016-01-17 14:22:35 +01:00
Benoit Touchette
2144a7ceb9 themnes: Updated light theme menuitem prelight 2016-01-17 07:08:49 -05:00
Benoit Touchette
127fdff9c7 themes: Updated both dark and light themes menuitem prelight.
Updated both themes menuitem prelight to use same filename in gtkrc.
Added new ui/menuitem-prelight.png
2016-01-17 06:58:43 -05:00
Michael Natterer
bd5355221d libgimp: add the new functions to gimp.def 2016-01-17 00:46:54 +01:00
Ell
7b89fe6536 pdb: Use the diagonal-neighbors setting from GimpPDBContext...
...in gimp-image-select-contiguous-color()

This and the last 5 commits fix bug 760481.
2016-01-17 00:46:54 +01:00
Ell
7b3e5ba1e9 pdb: Add "diagonal-neighbors" as GimpPDBContext property
and add PDB API to get/set it.
2016-01-17 00:46:54 +01:00
Ell
e0b1aa1c26 app: Add diagonal_neighbors parameter to gimp_channel_select_fuzzy()
and propagate it to gimp_pickable_contiguous_region_by_seed(), in
preperation for adding a diagonal-neighbors setting to PDB.
2016-01-17 00:46:54 +01:00
Ell
350c7ca338 app: Add "Diagonal neighbors" option to the bucket fill tool
When checked, diagonally neighboring pixels are considered connected
when calculating the affected area.

This commit also adds a corresponding diagonal_neighbors parameter to
gimp_drawable_bucket_fill(), and modifies the callers, other than the
bucket fill tool, to pass FALSE for this parameter, to retain the
current behavior.
2016-01-17 00:46:54 +01:00
Ell
070007d891 app: Add "Diagonal neighbors" option to the fuzzy select tool
When checked, diagonally neighboring pixels are considered connected
when calculating the affected area.
2016-01-17 00:46:54 +01:00
Ell
93bf78b83e app: Add diagonal_neighbors parameter to...
...gimp_pickable_contiguous_region_by_seed(), in preperation
for adding a similar option to the relevant tools.

When this parameter is TRUE, all eight neighbors of each pixel
are considered when calculating the resulting region, instead
of just the four orthogonal ones.

This commit also modifies all callers to pass FALSE for this
parameter, to retain the current behavior.
2016-01-17 00:46:54 +01:00
Jehan
ca9ca906a7 themes: complete dark and light themes.
Missing style rules which have to be in both themes.
https://bugzilla.gnome.org/show_bug.cgi?id=759648#c26
2016-01-16 23:01:49 +01:00
Michael Natterer
38691ee03d app: register the newly changed ops' properties normally
not using GIMP_CONFIG_INSTALL_PROP_FOO() because they don't allow to
set the param spec's nick and blurb separately.
2016-01-16 22:50:15 +01:00
Michael Natterer
149d3f441f app: turn the desaturate tool into a normal GEGL filter 2016-01-16 22:38:12 +01:00
Michael Natterer
6f6922006c menus: remove posterize from Tools -> Colors 2016-01-16 22:10:38 +01:00
Michael Natterer
6541c6b80b app: add icons to the generated gimp-gegl-config-proxy classes 2016-01-16 22:01:07 +01:00
Michael Natterer
7b009c6900 app: turn the posterize tool into an ordinary GEGL filter
which means replacing the whole thing by a few lines.
2016-01-16 21:41:00 +01:00
Michael Natterer
2334cb41a7 Bug 760579 - Plug-in dialogs fail to use UI themes
Something must have changed in GTK+, probably a long time ago, because
this code definitely used to work in the past.

Anyway, change gimp_ui_init() in libgimpui to use gtk_rc_parse()
instead of gtk_rc_add_default_file() which fixes the plug-in's initial
theme, and install a GFileMonitor on themerc which calls
gtk_rc_reparse_all() when themerc changes.
2016-01-16 19:36:13 +01:00
Hartmut Kuhse
da35966162 some fixes after merge 2016-01-16 16:49:36 +01:00
Jehan
98ecd4a010 themes: matches widget styles on Dark and Light themes.
<classname> means the style applies on any child class.
In particular the rule "<GtkButton>" will apply on any object derived
from a GtkButton.
2016-01-16 15:58:23 +01:00
Michael Natterer
359c00a722 Bug 760658 - on rotated convas, marching ants are re-drawn incorrectly
selection_zoom_segs(): if the canvas is rotated, don't optimize
segment drawing by clamping it to the canvas widget boundaries.
2016-01-16 01:56:57 +01:00
Alexandre Prokoudine
ba39a5a523 Update plug-ins compatibility list 2016-01-16 00:44:02 +03:00
Alexandre Prokoudine
bf3ac54c46 Fix references to settings to match recent typo fixes in GEGL 2016-01-16 00:19:53 +03:00
Marco Ciampa
5555fb5191 Updated Italian translation 2016-01-15 09:37:17 +01:00
Michael Natterer
dd1809bc21 app: simplify gimp_display_shell_scale_get_zoom_focus()
The logic should be exactly as before, just less convoluted.
2016-01-14 23:57:40 +01:00
kolbjoern
e3f88fc4ef Updated Norwegian (nn) translation 2016-01-14 20:20:16 +01:00
Benoit Touchette
2e7ebde19d themes: add missing fixes for 'The Dark Side of Gimp' theme
Adds missing plugins fix, reverts part of previous commit to
remove duplicate styles.

https://bugzilla.gnome.org/show_bug.cgi?id=759649
2016-01-14 10:23:33 -05:00
klausstaedtler
6ba9acd81a Deleted gimp-preefs-icon-theme, was a false named double of gimp-prefs-icon-theme
Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-13 23:16:37 +01:00
klausstaedtler
c599582c51 Updated symbolic icon theme
attention due to default color changes in scalable.svg icon former
icon-theme symbolic-inversed is now symbolic

Changes in scalable.svg


set background color of svg to transparent otherwise exported png's have a tint.

ADDED MISSING

+ gimp-center (added, new)
+ gimp-color-triangle (added, new)
+ gimp-controller-linux-input (added, new)
+ gimp-convert-grayscale (added, new)
+ gimp-convert-indexed (added, new)
+ gimp-convert-rgb (added, new)
+ gimp-display-filter-colorblind (added, new)
+ gimp-display-filter-contrast (added was in art-libre, reworked to match with other display filter)
+ gimp-display-filter-gamma (added, new)
+ gimp-display-filter-proof (added, new)
+ gimp-display-filter-lcms (added, new)
+ gimp-gradient-shapeburst-angular (added, new)
+ gimp-gradient-shapeburst-dimpled (added, new)
+ gimp-gradient-shapeburst-spherical (added, new)
+ gimp-gradient-spiral-anticlockwise (added, new)
+ gimp-gradient-spiral-clockwise (added, new)
+ gimp-list (added, new)
+ gimp-gradient-square (added, new)
+ gimp-histogram-logarithmic (was missing from the missing list. added, new)
+ gimp-histogram (added, new)
+ gimp-images (added new)
+ gimp-layer-to-imagesize (was gimp-layer + arrow)
+ gimp-navigation (added, new)
+ gimp-path-stroke (added, new)
+ gimp-path (added, new)
+ gimp-resize (added, new)
+ gimp-scale (added, new)
+ gimp-selection-add (added, new)
+ gimp-selection-replace (added, new)
+ gimp-selection-to-channel (added, new)
+ gimp-selection-to-path (added, new)
+ gimp-toilet-paper (added, new, no inverse, colors b&w, gets wrong when inverted !)
+ gimp-tool-preset (added, =gimp-prefs-folders-tool-presets, double use)
+ gimp-warning'(added, from gnome 3.12 symbolic theme)
+ gimp-prefs-toolbox (added, from gnome 3.12 symbolic theme)
+ gimp-wilber-eek (added, new from gimp-wilber)

SEPERATED

- gimp-frame (always used as a fixed size for now)
- gimp-texture (used in 2 docks: navigation and selection editor, as background when there is no image)


CHANGES

# gimp-prefs-system-resources (moved, renamed, was in unused)
# g847 (renamed to gimp-grid)
# gimp-channels (reworked, no TV-metaphor)
# gimp-channel (reworked, no TV-metaphor)
# gimp-channel-red (reworked, no TV-metaphor)
# gimp-channel-green (reworked, no TV-metaphor)
# gimp-channel-blue (reworked, no TV-metaphor)
# gimp-channel-alpha (reworked, no TV-metaphor)
# gimp-channel-gray (reworked, no TV-metaphor)
# gimp-channel-indexed (reworked, no TV-metaphor)
# gimp-histogram-linear (renamed, was gimp-histogram)
# gimp-tools (renamed, was gimp-prefs-toolbox)
# gimp-layer (reworked, so it fits to layer)
# gimp-wilber-outlined (outligning changed to 'bebebeff 30%')
# gimp-floating-selection (reworked, so it fits to selection)
# gimp-prefs-folders-tool-plug-ins (reworked, so it fits to other prefs-folders)
# gimp-controller (reworked, no gears)
# gimp-tool-blend (reworked, doubled gimp-gradient-linear)
# gimp-default-color (reworked, no inverse, colors b&w, gets wrong when inverted !)
# gimp-color-picker-gray (grey quarter set to bebebeff 50%, so it stays grey when inverted)
# gimp-color-picker-white (lightgrey quarter set to white, gets wrong when inverted !)
# gimp-color-picker-black (darkgrey quarter set to black, gets wrong when inverted !)

NEW UNUSED

+ gimp-nonvisible
+ gimp-prefs-image-window-appearance (gimp-prefs-image-windows has double usage)
+ gimp-prefs-image-window-snapping (gimp-prefs-tool-options has double usage)

Signed-off-by: klausstaedtler <staedtler-przyborski@web.de>
2016-01-13 21:22:06 +01:00
draekko
079e113dd9 themes: update/fixes for 'The-Light-Side-of-Gimp' theme
Updated & fixed KDE plugins/filters not being skinned properly.
Fixed Ubuntu overlay scrollbars. Minor color tweak to UI menu
bar.

https://bugzilla.gnome.org/show_bug.cgi?id=759648
2016-01-13 10:02:16 -05:00
draekko
4dbc68be7f themes: update/fixes for 'The-Dark-Side-of-Gimp' theme
Updated & fixed KDE plugins/filters not being skinned properly.
Fixed Ubuntu overlay scrollbars.

https://bugzilla.gnome.org/show_bug.cgi?id=759649
2016-01-13 09:57:19 -05:00
Michael Schumacher
4050f5c628 Theme 'Default' has been renamed to 'Color' 2016-01-12 21:23:48 +01:00
Jehan
6263ac5de6 themes: clean out some duplicate style.
The style "combobox-entry-button-style" was defined twice (with the
exact same implementation).
2016-01-12 14:37:59 +01:00
Jehan
b0731f9aed app: remove unused variables (clean out build warnings).
There are still unused variables in gimp_mybrush_get_checksum() and
gimp_mybrush_get_memsize() but these seem to be because of pending
implementations. So I leave the warnings.
2016-01-12 10:34:43 +01:00
Michael Natterer
72d8bcd663 icons: create the directory in the rule to make 12/gimp-default-colors.png 2016-01-12 02:09:05 +01:00
Michael Natterer
97ea600623 app: s/Default/Color/ in the testing icon theme Makefile rules 2016-01-11 20:35:32 +01:00
Michael Natterer
3428a5c579 icons: use cp not LN_S to "create" the inverted 12/gimp-default-colors.png
Linking it apparently messed up something (identical timestamps?) so
sudo make install would fail.
2016-01-11 20:34:16 +01:00
Jehan
7f67b53264 themes: fix paths to "Color" icon theme in "Default" and "Small" themes.
There are still a few hardcoded paths in the Default/Small themes.
Update them to the new name of the "Default" icon theme, which became
"Color".
2016-01-11 17:56:39 +01:00
draekko
b3dc5db2a2 themes: adding The-Light-Side-of-Gimp theme
Adding light theme as per request:
https://bugzilla.gnome.org/show_bug.cgi?id=759648#c19
2016-01-11 09:53:41 -05:00
Benoit Touchette
1013cadc3d themes: add missing png reference to makefile 2016-01-11 09:07:54 -05:00
Benoit Touchette
fdb582b95c icons: fix compile errors
Fixed "gimpicons.c:30:45: fatal error: icons/Default/gimp-icon-pixbufs.c:
No such file or directory" after commits :
ee512b610d
fa9e5b8f98
Fixed "ln: failed to create symbolic link ‘12/gimp-default-colors.png’:
File exists" by forcing new symlinking on creating get-default-colors.png
for Symbolic-inverted to prevent error during make.
2016-01-11 08:48:14 -05:00
Jehan
c2b4d6c69e icons: original Symbolic gimp-default-colors was wrong.
It was using inverted colors. For now I copied the Color icon, since the
Symbolic one in the SVG source is using greyish colors, whereas this
icon actually has a very specific White/Black meaning.
SVG source will have to be changed.
2016-01-11 03:55:55 +01:00
Jehan
ee512b610d icons: "Default" icon theme renamed to "Color".
Conveys well the duality of Color vs. Symbolic icons, terms usually
used by designers in recent design texts.
2016-01-11 03:20:13 +01:00
Jehan
fa9e5b8f98 app: do not hardcode default theme and icon theme all over the code.
Create GIMP_CONFIG_DEFAULT_(ICON_)?THEME in gimpguiconfig.h to set
defaults in a single place, except for libgimpwidgets/ which cannot
include from app/.
2016-01-11 03:15:36 +01:00
Jehan
3275ea4a29 icons: do not invert "gimp-default-colors" icon for Symbolic-Inverted. 2016-01-11 02:43:20 +01:00
Michael Natterer
0c2797c22e Bug 760362 - gimp-swap-colors not changed 'on the fly' when icon-theme changes
GimpFgBgEditor: free the cached icons in GtkWidget::style_set().
2016-01-11 02:09:55 +01:00
Michael Natterer
2560ad60fa app: fix image position when entering/leaving fullscreen mode
Call the suspend()/resume() from the previous commit around
gimp_display_shell_appearance_update() so the cancas is not
repositioned for each individual widget configuration.
2016-01-11 01:55:14 +01:00
Michael Natterer
cbf2311134 app: make new images jump around much less
Implement a mechanism to suspend/resume GimpImageWindow's "keep canvas
pos" logic which is used to keep the image in place across widget
changed such as show/hide rulers.

gimp_display_shell_fill(): call suspend()/resume() around
gimp_display_shell_appearance_update(), and center the image after
calculating the initial scale factor, so the image jumping at least
starts at the approximately right position.
2016-01-11 01:50:29 +01:00
Michael Natterer
26ea7a3530 app: remove (hopefully) redundant calls to gimp_display_shell_scale_update()
because this should happen generically in the zoom model's "zoomed"
callback, and is done explicitly in a few special cases. The removed
calls should all be redundant.
2016-01-10 23:05:41 +01:00
Michael Natterer
86cbc2f7a7 Bug 760402 - Zoom in (with "Resize window on zoom") displays wrong...
...several different zooms tiled together

In gimp_display_shell_scale() don't shortcut things in the case where
we resize the window, but call gimp_display_shell_scale_resize() like
all other scaling functions do in the end.
2016-01-10 20:32:17 +01:00
Benoit Touchette
75f81d15b1 themes: updates & bug fixes for KDE, Gnome
Fixed display issues for The-Dark-Side-of-Gimp under KDE (QtCurves &
Oxygen-GTK) themes, and Gnome users (Ubuntu). Removed focus padding &
lines to bring look closer to the Default theme. Updated button look
to harmonize with possible future grey and light themes.
2016-01-10 14:22:34 -05:00
Michael Natterer
83fbd31f12 app: disable "Resize windows on zoom/resize" in single-window mode
They only make sense if the image is by itself in multi-window mode.
2016-01-10 20:09:28 +01:00
Michael Natterer
db9ba0c8f6 Bug 760212 - method edit-stroke fails in version 2.9
Need to keep GimpPDBContext's stroke options (which is a context too)
in sync with the PDB context itself, so setting any of the context's
properties properly affects subsquent strokes, and also avoids running
into inconsistent states like happened in this bug.
2016-01-10 19:31:14 +01:00
Daniel Sabo
d5a316253d app: Show custom preset icons in the tool options menus 2016-01-10 10:03:10 -08:00
Michael Natterer
26d1b93e0c app: also copy the parent PDB context's stroke options
so a push() will take over the current settings.
2016-01-10 19:01:26 +01:00
Piotr Drąg
f91406e7ca Updated Polish translation 2016-01-10 13:36:14 +01:00
Alexandre Prokoudine
2cd687a00e Update Russian translation 2016-01-10 06:19:57 +03:00
Alexandre Prokoudine
7c86209b54 Update Russian translation 2016-01-10 03:44:16 +03:00
Michael Natterer
51b7dd86e7 app: fix broken formatting in gimpcanvasprogress.c 2016-01-08 22:32:43 +01:00
Jehan
19faadc236 README: trailing space, typo fix and adding gimp-gui-list. 2016-01-08 20:58:25 +01:00
Jehan
d1939c63d4 app: remove trailing spaces. 2016-01-08 20:49:33 +01:00
Michael Natterer
3e18b3bbfb Bug 760306 - "Image header corrupt" error on start-up
gimp_plug_in_procedure_set_icon(): look at the passed icon_type,
not proc->icon_type. Introduced this when splitting the function
into set_icon() and take_icon() in d5255dc.
2016-01-08 13:55:59 +01:00
Michael Natterer
789e9f2cf4 app: remove /*< skip >*/ and /*< pdb-skip >*/ annotations from enums
where their headers are not even parsed by the affected scripts.
2016-01-07 17:44:46 +01:00
Michael Natterer
985cc3e1a3 app: remove includes from gimpfiledialog.c 2016-01-07 17:44:22 +01:00
kolbjoern
e93db4da43 Updated Norwegian (nn) translation 2016-01-07 15:35:25 +01:00
Michael Natterer
dc53501ce9 app: add gimp_plug_in_manager_get_file_procedures() for the file dialogs
Change GimpFileDialog's file-procs properties to enum
GimpFileProcedureGroup and get them via the newly added API. Set
properties common to all dialogs in the parent class.
2016-01-06 15:07:41 +01:00
Michael Natterer
eaa9230015 app: argh, fix last commit, the properties are WRITABLE not READABLE 2016-01-06 14:23:28 +01:00
Michael Natterer
eee29e6793 app: some formatting cleanup in the file dialog widgets
and remove "Gimp*" parameter from gimp_save,export_dialog_set_image(),
the dialog already knows its Gimp.
2016-01-06 14:10:36 +01:00
Michael Natterer
865bb627e0 app: set the name of the open dialog again in file_open_dialog_show()
so we get back the "Open Image as Layers" window title. Seems it was
gone since I broke it in 2008.
2016-01-06 05:12:03 +01:00
Michael Natterer
9480adc2d4 app: mention bug the # in the comment in the last commit 2016-01-06 02:45:08 +01:00
Michael Natterer
2cd6345c19 Bug 758685 - file-gbr-load/save, file-pat-load/save etc fail with...
..."Operation not supported"

Add argument validation in the GimpPlugInProcedure impls of
GimpProcedure::execute() and ::execute_async().

When a file procedure is executed and it handles URIs not filenames,
run the resp. arguments through file_utils_filename_to_file() which
turns both URIs and filenames into a valid GFile which we can ask for
its URI.
2016-01-06 02:35:54 +01:00
Michael Natterer
dd171bbf0c Bug 760175 - paintbrush size not applied in python scripts in version 2.9
Remove the code that links size, spacing etc. to brush defaults from
the GimpPaintOptions class impl and add it to gimppaintoptions-gui.c
as a callback instead.

It's not a core thing and that magic with side effects should only be
applied to the GimpPaintOptions behind the tool options GUI.
2016-01-06 01:24:56 +01:00
Michael Natterer
84030aaf95 app: tiny formatting issue in tool-preset-commands.c 2016-01-06 01:10:56 +01:00
Michael Natterer
73a9ac967c app: add gimp_display_shell_scrollbars_update_steppers()
for the code from gimp_display_shell_scroll_clamp_and_update() that
sets the scrollbar stepper sensitivity.
2016-01-05 20:53:34 +01:00
Michael Natterer
5521ce0883 app: fix gimp_display_shell_scroll() again to work right with rotation
Call gimp_display_shell_scrolled() before gimp_overlay_box_scroll()
so the rotate transform is updated before the actual scrolling.

The explicit call to gimp_display_shell_rotate_update_transform() got
lost during the last commits, but this solution is cleaner and less
redundant anyway.
2016-01-05 20:29:54 +01:00
Michael Natterer
117800063e app: pause/resume the shell in gimp_display_shell_scale_to()
around calls to scale() and scroll().
2016-01-05 20:24:18 +01:00
Michael Natterer
9391cd390f app: reorder an rename stuff in gimpdisplayshell-scale.[ch]
Rename gimp_display_shell_scale_handle_zoom_revert() to
gimp_display_shell_scale_save_revert_values() because the old name was
completely unclear.
2016-01-05 19:20:23 +01:00
Michael Natterer
c80f0136ba app: make gimp_display_shell_calculate_scale_x_and_y() private 2016-01-05 18:52:03 +01:00
Michael Natterer
095eea6532 app: move gimp_display_shell_scale_changed() to gimpdisplayshell-scale.[ch]
and rename it to gimp_display_shell_scale_update().
2016-01-05 18:48:22 +01:00
Michael Natterer
b0ce294f8f app: make gimp_display_shell_scale_get_image_size_for_scale() private 2016-01-05 18:36:37 +01:00
Michael Natterer
d64ca7222e app make gimp_display_shell_get_screen_resolution() private 2016-01-05 18:30:15 +01:00
Dimitris Spingos
d644113c3e Updated Greek translation 2016-01-05 21:16:22 +02:00
Michael Natterer
2f26016a47 app: move the code to update scrollbars and rulers to their own files
so they are gone from the "scale" and "scroll" namespaces because they
belong to neither and both. And because the files are way too large.
2016-01-05 18:05:38 +01:00
Klaus Staedtler
a27179de2a icons: corrected symbolic handle-transform for dark-themes. 2016-01-05 17:51:31 +01:00
Klaus Staedtler
059ebca538 icons: updating gimp-letter-spacing and gimp-line-spacing icons. 2016-01-05 17:40:56 +01:00
Michael Natterer
d228493320 app: remove gimp_display_shell_scroll_clamp_offsets()
and merge it into gimp_display_shell_scroll_clamp_and_update(), the
removed function is not any longer needed separately.
2016-01-05 17:38:56 +01:00
Michael Natterer
18bd9c39c3 app: clean up gimp_display_shell_scroll() a bit
and document the difference to gimp_display_shell_scroll_set_offset()
and why we need both.
2016-01-05 17:34:23 +01:00
Jehan
067755be4a icons: source for symbolic icons in one single SVG file.
The original file was from the Art Libre icon set:
https://github.com/gnome-design-team/gnome-icons/blob/master/art-libre-symbolic/src/art-libre.svg
Authors are Barbara Muraus and Jakub Steiner (last commit: a738099 from
2013-09-30).
I imported the icons by Klaus Staedtler, and reorganized the file:
- all icons have the proper id from GIMP icon sets.
- tools icons organized in subsections and ordered alphabetically.
- preference icons ordered alphabetically and folder prefs icons
separated.
- unused icons from the original set kept in their own section for
possible future use.
Unfortunately all icons previously provided in png format only are
not present and will have to be redone in vectorial format.

This should make it easier to create new icons by reusing objects and
colors, and keeping design style in-line with existing set.
It also predates the ongoing work on automatic generation of icons by a
script from this single file.
2016-01-05 16:21:25 +01:00
Michael Natterer
32104b116d app: some cleanup in gimpdisplayshell-scroll.[ch]
Use more proper transform functions, formatting, make stuff static and
shorten function names.
2016-01-05 15:50:09 +01:00
Michael Natterer
51d41b2d61 app: fix GimpNavigationView and GimpNavigationEditor for rotated canvases
by changing it to always deal with the center of the viewport instead of
its upper-left corner.

Fix gimp_display_shell_scroll_center_image_coordinate() to use the
proper transform functions like in the last commit.
2016-01-05 15:14:08 +01:00
Michael Natterer
211d05d1d7 Bug 759288 - Unfocused Zoom In/Out in Rotated Canvas View
gimp_display_shell_scale_to(): calculate the point that should not
move with GimpDisplayShell's untransform/transform functions before
and after scaling, then scroll to the right point. Just using the
scale functions doesn't work any longer when a rotation is
active. Other functions are affected too, but this most important
issue can be fixed by fixing just this function.
2016-01-05 14:01:57 +01:00
Michael Natterer
2a43ab240b app: don't access GimpSamplePoint members directly
Use the new accessors instead. Clean up guide and sample point code in
image crop and resize a bit.
2016-01-04 22:06:27 +01:00
Michael Natterer
d7bf9de526 Bug 759104 - Allow coordinates of sample points to be accessed from scripts
Add PDB sample point API similar to how the guide API works. Add core
API similar to the core guide API to make guide and sample point APIs
as similar as possible.
2016-01-04 21:24:44 +01:00
Michael Natterer
96339dd674 po: POTFILES.in it's gimpgeglprocedure.c not gimpgeglprocedure.h 2016-01-04 21:16:13 +01:00
Michael Natterer
37de341099 Bug 759194 - Unified Transform Tool fails when layer is hidden
For the lack of a proper transform preview, add a HACK that allows to
make the transformed layer invisible while the tool is active.
2016-01-04 19:37:14 +01:00
Michael Natterer
a0c1d72be6 Bug 759316 - "Recently used" menu not updated with gegl filters
Implement RUN_WITH_LAST_VALS in GimpGeglProcedure, using the first
item in the MRU list of the op's gimp-gegl-config-proxy container.
2016-01-04 17:28:48 +01:00
Michael Natterer
3831f62495 Bug 759316 - "Recently used" menu not updated with gegl filters
Add GimpGeglProceure to keep track of recently used GEGL operations in
the filter history. The new procedure also takes care of running the
op in the GEGL tool, so filters-commands.c is almost empty now.

Change gimp-filter-history.c to find procedures by name instead of
comparing pointers.

The only thing missing now is rerunning a GEGL op with the last
settings (not just showing its UI).
2016-01-04 15:07:30 +01:00
Massimo Valentini
32469d53b7 Bug 684295: wrong layer group structure in gimp 2.8.2...
... (read PSD file from PS CS3)

use a position of 0 when inserting normal layers
as they're always inserted on top of their group

-1 means inside the group when the active drawable is
a group or above it when it's not. This used to work
before layer groups or in simple cases.
2016-01-04 12:55:58 +01:00
Massimo Valentini
e79632728d Bug 760029: PSD loader fails to load files with...
... adjustment or fill layers

the length of the compressed channel data was truncated
for the wrong type used in read_channel_data signature
2016-01-04 12:55:58 +01:00
Michael Natterer
ccd6e31673 libgimpwidgets: use g_printerr() not g_warning() for wrong icon theme paths 2016-01-04 00:30:51 +01:00
Michael Natterer
31a15570eb app: use less weird paths for creating the test icon theme 2016-01-04 00:10:30 +01:00
Michael Natterer
5455b8bfd0 app: move some stuff out of app/file/
file-procedure.[ch] is gone and its functions moved to
GimpPlugInManager where they belong (the manager keeps around the
lists of load, save and export procedures).

Utility functions from file-utils.[ch] that have nothing to do with
image files moved to core/gimp-utils.[ch].
2016-01-03 23:38:08 +01:00
Piotr Drąg
87a668a4da Updated Polish translation 2016-01-03 09:12:16 +01:00
Daniel Sabo
17da79ef28 app: Allow myb files with missing icons 2016-01-02 18:30:02 -08:00
Daniel Sabo
e86362e6e4 plug-ins: Attempt to fix Jenkins error in pagecurl 2016-01-02 18:00:50 -08:00
Eugene Kuligin
8a0f403c68 po-plug-ins: fix typos. 2016-01-03 02:27:43 +01:00
Jehan
40dc9e94ff configure: perform configuration actions only when configure succeeds. 2016-01-02 16:12:03 +01:00
Mukund Sivaraman
6a6604871f windows: Add support for generating crash backtraces using Dr. MingW 2016-01-02 18:55:37 +05:30
Michael Natterer
80f713c9b8 pdb, libgimp: add gimp_context_set/get_mypaint_brush() 2016-01-02 13:40:38 +01:00
Michael Natterer
72f9bea765 app: create nicer object names from MyPaint brush filenames 2016-01-02 13:23:40 +01:00
Michael Natterer
784b37d115 app: allow plug-ins to register procedures in the <MyPaintBrushes> menu 2016-01-02 00:53:32 +01:00
Michael Natterer
dda06ac065 app: move some code in actions/ to new utility file procedure-commands.c 2016-01-02 00:39:20 +01:00
Michael Natterer
926dd1dffb app: add GimpProcedure::get_sensntive()
to replace gimp_plug_in_procedure_get_seisitive().
2016-01-01 23:24:53 +01:00
Michael Natterer
a998175289 app: use gimp_procedure_get_label() in file-save-dialog.c 2016-01-01 22:55:37 +01:00
Michael Natterer
78f5dbeac3 app: add GimpProcedure::get_menu_label()
which returns a procedure's *menu* label (not stripped of mnemonics
and ellipses). Use it to further reduce dependencies on
GimpPlugInProcedure.
2016-01-01 22:41:42 +01:00
Michael Natterer
1d3bf65934 app: turn get_label() and get_blurb() into virtual functions of GimpProcedure 2016-01-01 20:52:45 +01:00
Michael Natterer
4c3c69e145 app: set the sensitivity of the "filters-value-propagate" action 2016-01-01 20:12:56 +01:00
Michael Natterer
d5255dc133 app: derive GimpProcedure from GimpViewable
and remove redundant icon managing code from GimpPlugInProcedure
2016-01-01 20:05:32 +01:00
Michael Natterer
e0ab721361 app: rename GimpPlugInAction to GimpProcedureAction
and make the filter history keep around a list of GimpProcedures
instead of GimpPlugInProcedures. Still WIP and unfinished...
2016-01-01 20:05:32 +01:00
J.M. Ruetter
050229cb45 Updated German translation 2016-01-01 18:46:42 +00:00
Jehan
2c6a53351a build/windows: strengthen windres call. 2015-12-31 18:36:03 +01:00
Khaled Hosny
05267a9a98 Update Arabic translation 2015-12-31 11:06:39 +04:00
Alexia Death
511d6f5a5a data: new development splash 2015-12-30 21:42:19 +02:00
Michael Natterer
ac50da2ad4 Bug 759316 - "Recently used" menu not updated with gegl filters
This preparation commit only moves code around and renames it, the
history is still a list of plug-ins only:

- move app/core/gimp-filter-history.c
  to app/plug-in/gimppluginmanager-history.c and clean it up
- move the actions that create the submenus under "Filters"
  from the "plug-in" to the "filters" action group
- move the code that creates and updates the history actions
  to the "filters" action group
- add menu setup code for the "filters" menu
- move the "history-changed" signal from GimpPlugInManager to Gimp
2015-12-30 20:04:58 +01:00
Michael Natterer
8e08f7c06e app: emit "profile-changed" when undoing/redoing a gray image conversion
So the cached display profile transform is reliably recreated.
2015-12-30 19:07:19 +01:00
Daniel Sabo
78cdbdb794 app: mypaint: Remove inaccurate comment 2015-12-30 08:21:30 -08:00
Jehan
ca5003240c icons: set example icons to our themes.
This is not strictly necessary since "gimp-wilber" is already the default
icon name. But it is good form to show the example for theme makes.
2015-12-30 15:54:45 +01:00
Jehan
ad8716316e app: show example icon of icon themes in preferences. 2015-12-30 15:54:45 +01:00
Daniel Sabo
dd0b253fea app: mypaint: Add some hacky code to allow line drawing 2015-12-29 14:30:28 -08:00
Daniel Sabo
6d9aee3d73 app: mypaint: Remove another stray #if 0 2015-12-29 14:30:28 -08:00
Klaus Staedtler
836cce8389 icons: updated icon-theme icons.
Current icon uses stars for symbolizing an icon. Stars are used normally
for rating.
My suggestion uses yin/yang, why ?
It's difficult to make an icon which symbolizes an icon. So I decided to
use the world-wide most used symbol (non-religious, non-political...) as
a symbol for all symbols (this is quite similar to e.g. the usage of
mona-lisa as a symbol for all images).
2015-12-29 21:29:59 +01:00
Jehan
a750a2a775 icons: install the complete Symbolic icon sets. 2015-12-29 21:05:10 +01:00
Klaus Staedtler
3d1b9d2777 icons: complete Symbolic icon set. 2015-12-29 21:05:10 +01:00
Michael Natterer
74371401de Bug 759968 - Misleading README on GIT master branch
Update README with 2.9 unstable information.
2015-12-29 20:26:13 +01:00
Jehan
39e4f04a72 icons: realign icons from commit 9618cdd.
None of the icons from commit 9618cdd were well centered.
2015-12-29 19:48:32 +01:00
Daniel Sabo
ce3a87da38 plug-ins: Fix missing GEXIV2_LIBS for file-tiff 2015-12-29 10:12:36 -08:00
Jehan
1ed8ceeb1a build/windows: fix Windows build.
`windres` seems a very stupid tool and it breaks with double shlashes
in parameter paths. Strengthen the rule a little.
2015-12-29 18:58:34 +01:00
Daniel Sabo
ea66a7a974 app: mypaint: Include offset_by_random in the cursor calculation 2015-12-29 09:56:38 -08:00
Daniel Sabo
b48ac23690 app: mypaint: Remove #if 0'ed code for libmypaint-gegl 2015-12-29 09:56:38 -08:00
Massimo Valentini
63805dfcf2 Bug 758909: Gimp cannot open some tif files it exports
Clear TIFFTAG_MIN/MAXSAMPLEVALUE because exiv2 saves
them with the wrong type and the original values could
be invalid
2015-12-29 18:47:56 +01:00
Jehan
da1b4dac42 libgimpwidgets: missing link library for GetICMProfile() on Win32.
This function is available in gdi32 library.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd316948%28v=vs.85%29.aspx
2015-12-29 18:43:41 +01:00
Alexia Death
ee9e0da72d app: correct outline calculation to match mypaint and add fallback 2015-12-29 19:37:45 +02:00
Jehan
9fb93568c2 configure: improved configuration script.
The ./configure now finishes even when mandatory dependencies are
missing and fails at the end, listing all errors.
2015-12-29 18:06:03 +01:00
Michael Natterer
99b7fa851a app: no frames with borders, use GimpFrame instead in GimpSaveDialog 2015-12-29 17:23:14 +01:00
Michael Natterer
660a7aed16 app: formatting cleanup in the last commit 2015-12-29 17:08:51 +01:00
Alexia Death
53eb8677ea app: Allow for mypaint tool to differentiate extended and non-extended events
This adds a boolean to GimpCoords struct that is true for enabled
extended non-mouse devices and false for all the rest allowing
the mypaint brush to override the the pressure sent to the paint library.
2015-12-29 15:44:53 +02:00
Michael Natterer
e415b1cfab Bug 759939 - Ghost brush outline in FG Select tool
Undraw the outline when the pointer leaves the canvas.
2015-12-29 12:57:17 +01:00
Michael Natterer
2e40af5dcf app: remove virtual function GimpToolOptions::reset()
and use GimpConfig::reset() instead.
2015-12-29 12:47:04 +01:00
Daniel Sabo
eec556f614 app: mypaint: Use GimpConfig->reset instead of GimpToolOptions->reset 2015-12-28 17:07:45 -08:00
Daniel Sabo
d6b52b7f0c app: mypaint: Fix missing chain up in gimp_mybrush_options_reset 2015-12-28 16:47:45 -08:00
Daniel Sabo
cba2f07854 app: mypaint: Make the reset-to-defaults button reset to the current myb's defaults 2015-12-28 16:02:36 -08:00
Daniel Sabo
677b1f2d82 app: mypaint: Add a toggle to change between erase & paint mode 2015-12-28 15:25:47 -08:00
Alexandre Prokoudine
9493b51fa2 Update Russian translation 2015-12-29 02:18:27 +03:00
Michael Natterer
ed042c540a plug-ins: put the pagecurl icons into a resource 2015-12-28 23:54:30 +01:00
Michael Natterer
9e6f995488 app: gdk_pixbuf_new_from_inline() -> from_resource() 2015-12-28 23:20:21 +01:00
Daniel Sabo
e0fc362b12 app: mypaint: Add colorize mode 2015-12-28 13:58:38 -08:00
Daniel Sabo
315972fea8 app: mypaint: Get rid of mixbuf, fix transparent pixel color when masking is active 2015-12-28 13:42:04 -08:00
Michael Natterer
54a2f5feca themes: fix EXTRA_DIST in The-Dark-Side-of-Gimp/Makefile.am 2015-12-28 22:28:56 +01:00
Michael Natterer
b249de6187 po: add gimpmybrush-load.c to POTFILES.in 2015-12-28 22:06:31 +01:00
Alexia Death
fa46ef11f1 app: add the point of code removed in previous commit back in 2015-12-28 23:06:04 +02:00
Alexia Death
a5fbe2d33a app: remove some pointless code 2015-12-28 22:23:35 +02:00
Michael Natterer
ac8c130719 INSTALL.in: put libmypaint build instructions back 2015-12-28 21:18:52 +01:00
Michael Natterer
8fa6e261d0 app: add a brush selector to the MyPaint brush options 2015-12-28 20:04:29 +01:00
Daniel Sabo
35936f4992 INSTALL.in: Update libmypaint description. 2015-12-28 09:30:18 -08:00
Daniel Sabo
c97a529968 app: Change mypaint dependency from libmypaint-gegl to just libmypaint 2015-12-28 09:18:46 -08:00
Michael Natterer
6281d130e4 app: load the mypaint brushes on startup, and do much more error checking
Everything expects that a data object can simply be used, so make it
behave like all other data objects and reject broken files.
2015-12-28 18:09:37 +01:00
Michael Natterer
15183c210b app: move GimpMybrushPrivate to its own header, perparation for more hacking
Also, return the error message if the preview can't be loaded.
2015-12-28 16:48:50 +01:00
Michael Natterer
0ee649629e app: GimpDataFactory: get the data's mtime in the function where it's needed 2015-12-28 16:46:08 +01:00
Michael Natterer
925d3c1a71 AUTHORS: regenerated 2015-12-28 13:13:50 +01:00
Michael Natterer
0cabc21c77 app: remove some useless g_object_freeze/thaw_notify() from gimpcurve.c
We only need that when more than one property changes and we must
delay notification until the object is in a consistent state.
2015-12-28 13:12:25 +01:00
Michael Natterer
0c798520e6 icons: put the recipe for the generated icons into a variable
and use that variable instead of repeating the recipe for each icon size.
2015-12-28 02:51:36 +01:00
Michael Natterer
e9a38c320d app: fix the curves tool to not warn on layers without alpha
when adding control points to all channels with control-click. It was
looking up curve points based on a -1 alpha value.
2015-12-28 02:07:20 +01:00
Piotr Drąg
b9e290f362 Updated Polish translation 2015-12-28 01:16:41 +01:00
Thomas Manni
ca189b7a90 Bug 758769 - Smudge tool not working correctly...
...with alpha layers creates black edges

Fix the missing division in the pixels blending formula
2015-12-27 20:34:50 +01:00
Benoit Touchette
33a61c7f45 themes: fixes color issue with scrolled windows on dark theme. 2015-12-27 19:44:33 +01:00
Jehan
5c0f4b5b92 authors.xml: add Klaus Staedtler in the list of contributor artists. 2015-12-26 17:38:58 +01:00
Jehan
3d8b505616 icons: install the new icons by Klaus Staedtler. 2015-12-26 17:36:56 +01:00
Klaus Staedtler
9618cdde32 icons: new Symbolic icons.
Partly based off the art-libre source template:
https://github.com/gnome-design-team/gnome-icons/blob/master/art-libre-symbolic/src/art-libre.svg
Committed and verified by Jehan.
2015-12-26 17:17:23 +01:00
Jehan
7102d3d82b icons: fix generated Symbolic-Inverted icons dependency.
They need to be properly dependent on the image with the same name
in the Symbolic icon theme. Until now we could only make them dependent
on either nothing or all Symbolic icons.
2015-12-26 03:42:25 +01:00
Michael Natterer
51520278cd app, pdb: s/GRAY/grayscale/ in user-visible strings 2015-12-26 01:14:43 +01:00
Michael Natterer
32725df29d app: always emit GimpImage::profile-changed when converting from/to GRAY
so the display profile transform is properly updated.
2015-12-25 23:31:15 +01:00
Michael Natterer
b3dbb968c9 app: correctly deal with color profiles when converting from/to GRAY
Convert the layers to the new GimpImageBaseType's builtin color
profile because the converted image will have its color profile
removed.
2015-12-25 23:07:26 +01:00
Michael Natterer
3deab93b1a app: some long due cleanup in gimpimage-convert-type.c
Spacing, type names, formatting, still looks very ugly.
2015-12-25 19:51:10 +01:00
Michael Natterer
3daad6be09 INSTALL.in: update libmypaint information and move libtiff to required list 2015-12-25 19:16:28 +01:00
Khaled Hosny
33fafbae62 Update Arabic translation 2015-12-25 18:40:55 +04:00
Jehan
9eb5fbd2a2 Bug 759649 - new dark theme by Benoit Touchette.
Initial version of our dark theme.
Additional credits for some of the UI images to horst3180 (Ceti-2 theme)
and Medhi Abhollahi (new CS6 II theme). All under GPLv3, as the rest
of GIMP.
2015-12-23 19:27:18 +01:00
Jehan
4b6d4f1fd7 Bug 750546 - Include recently used colors in the Dockable Colors Dialog
New GimpColorHistory widget, replacing the code in GimpColorDialog, and
added to GimpColorEditor to have the color history accessible in the
color dock as well.
Thanks to Thomas Manni for the initial implementation attempt.
2015-12-23 13:25:26 +01:00
Alexandre Prokoudine
3bb69dbdbf Fix the fill of the Warp Transform tool's symbolic icons 2015-12-23 00:55:52 +03:00
Alexandre Prokoudine
3d44bef068 Add symbolic Warp tool icon by Barbara Muraus 2015-12-23 00:34:48 +03:00
Alexandre Prokoudine
b940ba098f Updated MyPaint brush icons from upstream MyPaint artwork 2015-12-23 00:09:42 +03:00
Michael Natterer
f8d760279c docs, etc: regenerate the default gimprc and the gimprc manpage 2015-12-22 21:28:06 +01:00
Michael Natterer
5df4b07b04 app: fix icon theme location in tests 2015-12-22 21:27:20 +01:00
Michael Natterer
0a15b76a9f devel-docs: fix icon locations in the libgimpwidgets docs 2015-12-22 21:26:46 +01:00
Michael Natterer
ab8f2c6d2b app: more s/mybrush/mypaint-brush/ in strings visible in config files 2015-12-22 19:39:11 +01:00
Michael Natterer
56a4166bff Bug 759556 - "incorrect gamma=(0/100000)" new with the new symbolic icons
Run the new icons through "mogrify -colorspace Gray".
2015-12-22 13:35:20 +01:00
Michael Natterer
9868e28df9 icons: add the generated Symbolic-Inverted icons to DISTCLEANFILES 2015-12-22 13:33:51 +01:00
Richard Hughes
1417e5e1a4 desktop: Bring the AppData up to date with the latest specification 2015-12-22 12:15:33 +00:00
Michael Natterer
71a02c62f0 icons: recreate Symbolic-Inverted icons when the original changes 2015-12-22 12:03:26 +01:00
Michael Natterer
d01ba07ed6 configure.ac, app: make libmypaint a hard dependency
and move the MyPaint brush tool out of the playground.
2015-12-21 21:39:48 +01:00
Michael Natterer
df05612d2a icons: re-export Default/16/gimp-prefs-folders-icon-themes.png
it was insanely large.
2015-12-21 19:35:40 +01:00
Michael Natterer
ccd8ec5dee app: connect the MyPaint brush core with the new brush container
and remove all hackish temp code that did the same. Remove quite
some #ifdefs around code that doesn't depend on libmypaint.
2015-12-21 12:28:46 +01:00
Daniel Sabo
bf161e7b14 app: MyBrush: Improve blend math 2015-12-20 17:04:18 -08:00
Michael Natterer
44d5e7adcd configure.ac, icons: check for the "gegl" binary
and use the found executable instead of hardcoding "gegl".
2015-12-21 00:21:17 +01:00
Michael Natterer
d4aa39a7cd app, libgimpwidgets, icons: rename mypaint brush icons and help ID
from "mybrush" to "mypaint brush".
2015-12-21 00:09:55 +01:00
Michael Natterer
f0c1619727 app: add "use MyPaint brush" to GimpToolPreset 2015-12-21 00:09:55 +01:00
Piotr Drąg
c6be8c60cc Updated POTFILES.in 2015-12-21 00:00:50 +01:00
Michael Natterer
a5eff27149 app: add new GimpData subclass GimpMybrush and infrastructure around it
- GimpContext API and property
- a GimpDataFactory
- List and grid views with GimpDataFactoryView
- actions and a context menu

None of this is connected to the actual tool yet, or depends on
libmypaint in any way.
2015-12-20 23:51:44 +01:00
Michael Natterer
4f8bc154cb app: move the MyPaint brush config options around in GimpCoreConfig
so they are after brush and dynamics.
2015-12-20 23:51:44 +01:00
Jehan
f1ea3c1f6e icons: adds a 16x16 gimp-prefs-icon-theme icon. 2015-12-20 22:33:24 +01:00
Jehan
4e86672997 icons: adding gimp-prefs-folders-icon-themes icons. 2015-12-20 19:57:18 +01:00
Jehan
38b6f16acc app: make the compat mode bubble tooltip into a label.
This way, what the compatibility mode does would not be overlooked as
easily as it is now.
2015-12-20 19:12:54 +01:00
Jehan
d444804e76 app: XCF version 6 should not block compatibility mode.
Metadata presence implies XCF version 6 or higher. Yet metadata are
stored in parasites which are perfecly supported in older GIMP versions
and are passed along through saving.
Therefore there is no need to keep XCF 6. We just add a warning telling
that metadata won't be visible in older GIMP when saving a file with
metadata and compatibility mode.
2015-12-20 18:17:15 +01:00
Jehan
94aec7cb6c icons: generate "negative" color symbolic icons.
The negative icons are generated from the Symbolic icon theme with
the GEGL operation 'gegl:invert-linear'.
2015-12-20 17:43:33 +01:00
Piotr Drąg
e4f877247c Updated Polish translation 2015-12-20 17:37:52 +01:00
Michael Natterer
c6586ec6e4 app: rename GimpMybrush to GimpMybrushCore
so GimpMybrush can be used for the actual brush object.
2015-12-20 01:03:56 +01:00
Daniel Sabo
812526f0f0 app: GimpMybrush: Don't treat time == 0 as a magic value 2015-12-19 15:27:44 -08:00
Jehan
dd7b9a5757 icons: 2 symbolic icons were not installed. 2015-12-19 18:34:47 +01:00
Pedro Albuquerque
570097e4f9 Updated Portuguese translation 2015-12-19 08:01:27 +00:00
Pedro Albuquerque
540a16188c Updated Portuguese translation 2015-12-19 07:58:27 +00:00
Michael Natterer
edff1d0647 app: move "Snap Distance" to the prefs dialog's "Snapping" page
also some indentation and a fix for wrong capitalization.
2015-12-16 12:41:37 +01:00
Dimitris Spingos
2226fd8f96 Updated Greek translation 2015-12-16 09:38:40 +02:00
Dimitris Spingos
efa9df3ea9 Updated Greek translation 2015-12-16 09:33:46 +02:00
Alexandre Prokoudine
418274d5dd Update Russian translation 2015-12-16 06:40:53 +03:00
Michael Natterer
3e5eba0774 modules: patch from Elle that fixes some forgotten profile_new name changes 2015-12-16 00:23:48 +01:00
Daniel Sabo
df21e07855 app: Fix MyPaint brush rendering, implement MyPaintSurface in a native format 2015-12-15 14:48:18 -08:00
Jehan
bcbc83dc5a app: replace some tabs with spaces in app/paint. 2015-12-15 23:45:18 +01:00
Michael Natterer
5e805c8b8b libgimpcolor: update gimpcolor.def 2015-12-15 20:49:46 +01:00
Michael Natterer
a33daf99fe libgimpcolor: rename RGB and GRAY gimp_color_profile_new_*() functions
to be more consistent, as discussed in bug #756389.
2015-12-15 20:42:21 +01:00
Michael Natterer
5098338470 Bug 756389 - Color-managing grayscale images
Allow to set profiles on grayscale images. Change profile validation
to check for image type and profile type. Actually the patch simply
makes some pieces of code less restrictive. Change user-visible
strings in the profile dialogs accordingly. Change PDB docs
accordingly.
2015-12-14 23:25:02 +01:00
Michael Natterer
50309bea12 app: invalidate GimpView's renderer in style_set() 2015-12-14 23:22:14 +01:00
Michael Natterer
1b786f6479 app: typo in debug output in gimp_display_shell_profile_update() 2015-12-14 23:19:58 +01:00
Michael Natterer
fc743bd426 libgimpcolor: add support for GRAY profiles in gimp_color_profile_get_format()
surprisinly seems to work just fine. Thanks to Roman Lebedev for
hinting that this is possible, and for constructing the #defines.
2015-12-14 23:16:38 +01:00
Michael Natterer
0ad8c786b5 app: use the image's projectable format for profile conversion
which is RGB for RGB and INDEXED images, and GRAY for GRAY images.
2015-12-14 23:02:31 +01:00
Michael Natterer
822bfabe21 Revert "libgimpcolor: use D50 for the gray profiles"
This reverts commit 169f436e75.

Turns out we should use the same whitepoint for RGB and GRAY.
2015-12-14 18:43:26 +01:00
Michael Natterer
40280c0862 app: add the preferred gray profile to the prefs dialog 2015-12-14 02:13:51 +01:00
Michael Natterer
5cbe6f2003 libgimpconfig: add a preferred gray profile to GimpColorConfig 2015-12-14 01:54:00 +01:00
Michael Natterer
169f436e75 libgimpcolor: use D50 for the gray profiles 2015-12-14 01:32:35 +01:00
Michael Natterer
11e8cacf7e Bug 756389 - Color-managing grayscale images
Support creating linear/sRGB-gamma variants of gray profiles and
rename gimp_color_profile_new_linear_rgb_from_color_profile() to
gimp_color_profile_new_linear_gamma_from_color_profile() because it's
not RGB-specific any longer.
2015-12-13 23:36:31 +01:00
Michael Natterer
bb482badf0 app: s/gimp_stock_init/gimp_icons_init/ in the user install dialog 2015-12-13 20:03:52 +01:00
Michael Natterer
b54a8d1939 Bug 756389 - Color-managing grayscale images
Add gimp_color_profile_new_srgb_gray() and
gimp_color_profile_new_linear_gray().

I know "srgb_gray" sounds odd but it's better than
"gray_with_srgb_trc"...

Please review, I have no clue if that code is right.
2015-12-13 19:43:02 +01:00
Piotr Drąg
c7bd7ba991 Updated Polish translation 2015-12-13 18:46:10 +01:00
Jehan
46b9c6927b icons: add vectorial icons by Benoit Touchette for prefs-icon-theme. 2015-12-13 15:45:48 +01:00
Michael Natterer
4780471c5f libgimpcolor: add gimp_color_profile_is_gray()
and improve gimp_color_profile_is_linear() to return TRUE for linear
gray matrix profiles.
2015-12-13 14:33:51 +01:00
Michael Natterer
8bdcc2f565 themes: fix icon paths in the "Small" theme 2015-12-13 13:39:08 +01:00
Michael Natterer
f7d33ac18f app: don't hardcode the prefs icon sizes n_categories times
Remove the parameters from gimp_prefs_box_add_page() and instead
hardcode them once in GimpPrefsBox. This way they can also easily be
made configurable in the future.
2015-12-13 13:33:55 +01:00
Michael Natterer
8619852a6c app, icons: rename the prefs' "environment" icons to "system-resources"
also rename the help ID.
2015-12-13 13:23:31 +01:00
Michael Natterer
7200ece117 app, icons: make the icon theme path configurable in prefs 2015-12-13 13:04:46 +01:00
Pedro Albuquerque
beefcd74ad Updated Portuguese translation 2015-12-13 07:37:02 +00:00
Alexandre Prokoudine
af00bb5ad5 Update Russian translation 2015-12-13 09:36:45 +03:00
Marco Ciampa
dcdd37fb0b Small fix in Italian translation 2015-12-13 01:22:46 +01:00
Piotr Drąg
e71a9304ce Updated Polish translation 2015-12-13 01:03:53 +01:00
Marco Ciampa
d5d2ae255b Small fix in Italian translation 2015-12-12 23:20:08 +01:00
Michael Natterer
2e43824062 app: reorder the prefs categories tree, and rename some pages 2015-12-12 22:54:00 +01:00
Ask Hjorth Larsen
81cb55221c Updated Danish translation by scootergrisen 2015-12-12 21:29:59 +01:00
Michael Natterer
71894bd787 libgimpwidgets: rename gimpstock.[ch] to gimpicons.[ch]
because stock is on its way out, so we better start renaming and
deprecating stuff sooner than later.
2015-12-12 20:44:46 +01:00
Michael Natterer
69f87bcc84 libgimpwidgets: be smarter when changing icon themes, and have fallbacks
Add gimp_stock_set_icon_theme() which can be called at any time, also
before gimp_stock_init(), in which case we avoid setting the configured
icon theme twice on startup. Call it from libgimp/gimpui.c and
from app/gui/icon-themes.c so the app and plug-ins use the same
icon theme.
2015-12-12 19:32:11 +01:00
Piotr Drąg
0af43e92b4 Updated Polish translation 2015-12-12 17:50:41 +01:00
Jehan
6906180238 icons: files missing from install list. 2015-12-12 02:48:57 +01:00
Michael Natterer
7926188df5 app: update GimpItemTreeView's eye and link cells on icon theme change 2015-12-11 22:55:01 +01:00
Michael Natterer
1125f4df0f app: make sure icons in GimpContainerTreeView follow icon theme changes 2015-12-11 22:46:37 +01:00
Michael Natterer
b79faa78b3 authors.xml: add Benoit Touchette 2015-12-11 22:20:16 +01:00
Benoit Touchette
55270366d7 Bug 759345 - Fix for prefs dialog to add icon theme support
Change GimpPrefsBox to use icon names instead of pixbufs, and change
preferences-dialog.c accordingly.
2015-12-11 22:15:22 +01:00
Michael Natterer
d1e5d719de app: fix the test that an icon theme folder actually contains a theme
and don't leak the GFile if it doesn't.
2015-12-11 21:30:44 +01:00
Jehan
b8a819c1e3 icons: symbolic icons for 'icon theme selection'...
... by Benoit Touchette.
2015-12-11 17:34:56 +01:00
Jehan
0d8938e4bf icons: the color icons are now under the Default/ folder. 2015-12-11 17:30:59 +01:00
Jehan
a646f64472 app: remove some trailing spaces. 2015-12-10 01:40:55 +01:00
Alexandre Prokoudine
e9dd77e072 Fix conflicting menu accelerators as per C R's request 2015-12-10 03:21:58 +03:00
Michael Natterer
c700d2993d Revert "app: prepend the selected icon theme path to the search path..."
Don't infinitely prepend search paths when changing themes.

This reverts commit 6fe8f75f5d.
2015-12-10 00:29:32 +01:00
Jehan
6fe8f75f5d app: prepend the selected icon theme path to the search path...
... instead of replacing the first path.
This allows to fallback to our complete default theme icons when the
selected icon theme has missing icons.
2015-12-09 23:51:40 +01:00
Michael Natterer
0ff7d3ba14 libgimp, PDB: add gimp_get_icon_theme_dir() 2015-12-09 23:22:05 +01:00
Jehan
8d2ededbf2 themes: fix icon paths in Default theme's gtkrc.
A few icons are still hardcoded in the Default theme. I am not sure why
they are not taken from the icon theme, but anyway let's fix the errors
for now.
2015-12-09 23:12:04 +01:00
Jehan
5beb69d009 icons: new symbolic icon theme for GIMP.
Images originally created by Jakub Steiner and Barbara Muraus as the
"Art Libre" icon set.
The contributor jEsuSdA later worked on it.
It will now be available in the new icon theme selection through
preferences.
Many icons/size are still missing but this first commit makes a start
for complementary work.
2015-12-09 23:00:14 +01:00
Michael Natterer
9c3944d63b Bug 759212 - Warp tool must be disabled on group layers
Disable the warp tool on invisible, locked and group layers, and show
the "forbidden" cursor.
2015-12-09 20:30:32 +01:00
Michael Natterer
0b3f1835d3 icons: add a 48x48 icon for the prefs icon theme page 2015-12-09 19:50:31 +01:00
Benoit Touchette
6762bf5b9b Bug 759105 - Patch to add icon theme selection
Add support for custom icon themes much like custom theme
support. There is still work to be done but this is the
basic functionality.
2015-12-09 12:50:15 +01:00
Jehan
01bdb712f9 app: do not request xcf compat mode when compat_toggle not sensitive.
In some cases, on could end up with photographs with metadata as XCF
version 6, which is useless since this is not compatible with GIMP 2.8
either.
2015-12-08 20:10:45 +01:00
Sveinn í Felli
0e460fee65 Updated Icelandic translation 2015-12-07 15:17:16 +00:00
Sveinn í Felli
08d5e8e609 Updated Icelandic translation 2015-12-07 14:37:24 +00:00
Daniel Mustieles
a1922f6c73 Updated Spanish translation 2015-12-07 14:25:56 +00:00
Sveinn í Felli
dad9d4d645 Updated Icelandic translation 2015-12-07 13:54:09 +00:00
Sveinn í Felli
4758ddca51 Updated Icelandic translation 2015-12-07 13:52:55 +00:00
Sveinn í Felli
011a2573c7 Updated Icelandic translation 2015-12-07 07:40:06 +00:00
Michael Natterer
56705bb36c libgimpbase: use GIO to figure if a file is hidden
instead of checking if it starts with '.'.
2015-12-07 01:07:30 +01:00
Michael Natterer
20a31fd760 app: cleanup in gimpviewable.c
Move variables to local scopes and simplify
gimp_viewable_deserialize_property().
2015-12-07 00:02:48 +01:00
Michael Natterer
09f72fed59 devel-docs: don't use deprecated API in doc-shooter 2015-12-06 23:46:11 +01:00
Necdet Yücel
32f5c58f72 Updated Turkish translation 2015-12-05 23:45:16 +00:00
Michael Natterer
c64a104155 plug-ins: merge the file-tiff-load and file-tiff-save plug-ins
so they can share duplicated code.
2015-12-05 08:53:09 +01:00
Pedro Albuquerque
52f4e993c0 Updated Portuguese translation 2015-12-05 07:01:14 +00:00
Piotr Drąg
ea264a1e9c Updated Polish translation 2015-12-03 20:36:00 +01:00
Khaled Hosny
f9ac408d3c More Arabic translation updates 2015-12-03 18:08:38 +04:00
Khaled Hosny
bb8f7f7649 Update Arabic translation 2015-12-02 20:56:31 +04:00
Piotr Drąg
bc775bc435 Updated POTFILES.skip 2015-12-02 14:55:05 +01:00
Michael Natterer
48046d258a configure.ac, plug-ins: make libtiff a hard dependency
so file-tiff-load and file-tiff-save are always built. Also move them
to their own folder plug-ins/file-tiff/ because they will soon share
some common GIO code.
2015-12-02 12:33:31 +01:00
Piotr Drąg
feaacaf681 app: remove space before a colon 2015-12-01 12:25:15 +01:00
Piotr Drąg
ee8f0fec5d app: remove double mnemonics in filters 2015-12-01 10:40:47 +01:00
Милош Поповић
da8685d7ac Updated Serbian translation 2015-11-30 23:17:01 +00:00
Милош Поповић
9536b27603 Updated Serbian translation 2015-11-30 23:10:24 +00:00
Jasper Krijgsman
0d2aebb347 Bug 732363 - wilber.ico doesn't contain 256x256 layer
Contributed by Jasper Krijgsman

(cherry picked from commit 5cbc0e8173)
2015-11-30 23:22:38 +01:00
Marco Ciampa
24de56b957 Updated Italian translation (thanks FirasHanife) 2015-11-30 21:25:33 +01:00
Michael Natterer
0c784559c8 app: improve the layout of GimpBufferSourceBox
and add a label with the selected pickable's name.
2015-11-30 02:46:22 +01:00
Michael Natterer
16a0421894 plug-ins, pdb: remove the blur-gauss-selective plug-in, add a PDB compat proc 2015-11-29 22:01:53 +01:00
Michael Natterer
baae27c786 app: note to self: don't push intermediate commits... 2015-11-29 19:56:32 +01:00
Michael Natterer
6040aa2b97 app: use GimpBufferSourceBox in GimpOperationTool
and support ops with an arbitrary number of aux inputs.
2015-11-29 19:30:58 +01:00
Michael Natterer
9fcb06b495 app: add new widget GimpBufferSourceBox
which lets the user select a buffer from all available drawables and
projections to be used in a gegl:buffer-source node. The widget's
appearance is scheduled for improvement.
2015-11-29 17:16:23 +01:00
Sebastian Rasmussen
4f9ec68cbd Updated Swedish translation 2015-11-28 22:50:06 +00:00
Christian Kirbach
a5ba340d5a Updated German translation 2015-11-28 12:20:49 +00:00
Pedro Albuquerque
054c3359ea Updated Portuguese translation 2015-11-28 10:08:05 +00:00
Pedro Albuquerque
f48de35158 Updated Portuguese translation 2015-11-28 10:05:03 +00:00
Hartmut Kuhse
4b9cd2ce43 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	app/core/gimpimage.c
	app/pdb/internal-procs.c
	plug-ins/common/file-png.c
	plug-ins/common/file-tiff-load.c
2015-11-28 09:00:42 +01:00
Piotr Drąg
d3482a0c55 Updated Polish translation 2015-11-27 21:48:56 +01:00
Michael Natterer
71e566fde7 app: add gegl:gaussian-blur-selective to Filters -> Blur 2015-11-26 11:20:44 +01:00
Michael Natterer
7213c18a1c devel-docs: updated after the latest release experience 2015-11-26 00:24:48 +01:00
Michael Natterer
1023e37656 configure.ac: post-release version bump to 2.8.3 2015-11-26 00:17:27 +01:00
Michael Natterer
92f2b00929 configure.ac: release GIMP 2.9.2 2015-11-25 23:30:49 +01:00
Michael Natterer
7ed2e5db18 app: disable the dock hiding/showing test
it fails for unknown reasons. The actual functionality (keeping the
canvas in place) works absolutely fine in a real GIMP session...
2015-11-25 21:29:56 +01:00
Michael Natterer
6c89ed96fd docs, etc: regenerate the default gimprc and its manpage 2015-11-25 18:58:14 +01:00
Michael Natterer
4c01965c42 configure.ac: require GEGL 0.3.4 2015-11-25 18:57:16 +01:00
Dimitris Spingos
e9c1f85cab Updated Greek translation 2015-11-25 12:24:42 +02:00
Michael Natterer
b3239f58df Bug 758597 - gimp-drawable-get-pixel fails, assertion error in BABL
The code that actually allocates the returned pixel got lost when
porting this to GEGL.
2015-11-25 00:00:44 +01:00
Michael Natterer
a69b68de40 plug-ins: formatting cleanup in compose/decompose 2015-11-24 23:56:54 +01:00
Elle Stone
f78dec232a Bug 755270 - Decompose/Compose LAB: scaling code produces odd L, a, and b values
Decompose/compose to/from LCH: remove unconditional CLAMP (only clamp
if the component really needs clamping), change LAB AB range.
2015-11-24 12:45:32 +01:00
Thomas Manni
127b3de54a Bug 756775 - UnifiedTransformTool: nan value in handle geometry computation
Do not compute angle between 2 vectors if at least one of them is a null vector.
Return 0.0 instead.
2015-11-24 10:31:47 +01:00
Michael Natterer
bc980cd73a Bug 757783 - When opening linear gamma pngs or tiffs...
...many operations give wrong results

Same fix for TIFF: get the color profile first, then create a linear
image if the profile says so.
2015-11-23 22:29:06 +01:00
Michael Natterer
3cc80b0a5c Bug 757783 - When opening linear gamma pngs or tiffs...
...many operations give wrong results

Fix PNG loading to get the embedded profile first, and create a
linear RGB image if the profile says so.
2015-11-23 18:44:17 +01:00
Michael Natterer
548e8bc4eb app: fix progress message for precision conversion 2015-11-23 18:41:16 +01:00
Alexandre Prokoudine
257814ce6d Updated Russian translation 2015-11-23 06:24:30 +03:00
Michael Natterer
0cf597d042 libgimpcolor: clean up gimp_color_profile_is_linear(), add it to gimpcolor.def 2015-11-23 01:29:17 +01:00
Piotr Drąg
e1af9a59c8 Updated Polish translation 2015-11-23 00:24:37 +01:00
Øyvind Kolås
d8f19f31ce libgimpcolor: add a function to check if a profile is linear RGB 2015-11-23 00:03:35 +01:00
Michael Natterer
ba14054a8e app: simplify the Image -> Precision menu
Keep only one menu item per precision, and have two separate radio
menu items for gamma/linear. Also add gamma/linear radio buttons to
the precision conversion dialog.
2015-11-22 23:19:49 +01:00
Michael Natterer
76e93072a9 NEWS: better structure for core changes, add some stuff 2015-11-22 22:09:16 +01:00
Michael Natterer
96de700b43 app: add gegl:sepia to Colors -> Desaturate 2015-11-22 21:32:36 +01:00
Michael Natterer
05e15678b3 NEWS: more fixes 2015-11-22 21:32:16 +01:00
Michael Natterer
81d6d7b74c NEWS: some fixes from drc 2015-11-22 21:12:35 +01:00
Michael Natterer
429e0baed1 NEWS: start updating for 2.9.2 2015-11-22 19:51:31 +01:00
Baurzhan Muftakhidinov
a647a9dcc1 Updated Kazakh translation
(cherry picked from commit e0b4383482)
2015-11-22 17:10:25 +00:00
Michael Natterer
b9e3793551 NEWS.pre-2-8: new file preserving the history that lead to 2.8 2015-11-22 17:30:15 +01:00
Alexandre Prokoudine
70dd9102a0 Don't use double space in Unified Transform options 2015-11-22 17:45:25 +03:00
Michael Natterer
d974fabb11 po: update for the action search dialog change 2015-11-22 15:30:39 +01:00
Michael Natterer
2b6a10b731 app: fix the action name of the action search dialog 2015-11-22 15:30:14 +01:00
Michael Natterer
8f6ddd2888 configure.ac: require GEGL 0.3.2 2015-11-22 01:11:08 +01:00
Øyvind Kolås
9cc634e838 app: add new required arguments to gegl_node_blit_buffers 2015-11-21 03:18:56 +01:00
Michael Natterer
909ecd4e79 Bug 757905 - using select tool on image in one tab causes user to lose...
...selection on image in another tab

Fixed for rectangle select, ellipse select and crop, they now all
confirm the previous display's tool interaction instead of aborting it
when the tool is used on another display.
2015-11-20 20:51:23 +01:00
Michael Natterer
9cde7572b4 Bug 757905 - using select tool on image in one tab causes user to lose...
...selection on image in another tab

Make the free select tool behave when switching between displays.
Also clean up the code a bit and reduce utility function
fragmentation.
2015-11-20 19:17:45 +01:00
Michael Natterer
ab1fa11eea configure.ac: require Babl 0.1.14 2015-11-20 16:40:12 +01:00
Jehan
69f1060720 app: s/"image-mising"/"image-missing"/. Wrong icon name. 2015-11-19 23:36:25 +01:00
Jehan
e12a520c99 Revert "app: item uniquefy algorithm allowing generic numbering schemes."
This reverts commit 56b6dbaa87.
It has been discussed and decided that the no-hash numbering scheme
would have unwanted side-effects for people using number-ending layer
names for other purposes than incrementation.
This revert has been modified to keep commit c402f10.
2015-11-19 19:12:58 +01:00
Pedro Albuquerque
e38e262ac1 Updated Portuguese translation 2015-11-14 08:49:00 +00:00
Pedro Albuquerque
82fd077ae1 Updated Portuguese translation 2015-11-14 08:45:23 +00:00
Pedro Albuquerque
08bf0263c2 Updated Portuguese translation 2015-11-14 08:33:31 +00:00
Alexandre Prokoudine
79316e26f7 Update Russian translation 2015-11-14 03:15:51 +03:00
Michael Natterer
4656ead4b3 app: make sure the image stays in place when showing/hiding docks
also when it's rotated or flipped.
2015-11-14 00:05:23 +01:00
Michael Natterer
c6b6031f31 Bug 758049 - Please add canvas flipping
Enable flipping in the canvas rotate transform matrix, and add some
menu items to control it. Rename the "Rotate" menu to "Flip & Rotate".
2015-11-13 18:51:32 +01:00
Michael Natterer
fd13b9a1f7 Bug 712584 - Gimp open file dialog should recognise file based on mimetype...
...not extension

Add the mime-type to GimpFileDialog's filters, in addition to the
extensions.
2015-11-12 12:08:10 +01:00
Jehan
eb7d634a45 app: replacing tabs with spaces in gimplayer.c. 2015-11-11 15:19:45 +01:00
Michael Natterer
7d1a47a554 Bug 314379 - Allow stroking as outline (not with a paint tool) via the PDB
Add PDB API to configure/query all aspects of line stroking.
2015-11-11 00:47:31 +01:00
Michael Natterer
3d19e4acfb app: add imp_dash_pattern_from,to_double_array()
which converts stroke dash pattern from/to arrays as used in the PDB.
2015-11-11 00:34:11 +01:00
Michael Natterer
dac5493132 app: implement GimpConfig::reset() in GimpPDBContext
and reset its paint and stroke options.
2015-11-09 03:20:45 +01:00
Michael Natterer
9bcbfb96b1 app, libgimpbase: move enums GimpCapStyle and GimpJoinStyle to libgimpbase 2015-11-09 02:16:03 +01:00
Michael Natterer
8fa7bc3622 Bug 314379 - Allow stroking as outline (not with a paint tool) via the PDB
Add new PDB procedures gimp-context-get/set-stroke-method and honor
the new setting in gimp-edit-stroke and gimp-edit-stroke-vectors.

Internally, keep a GimpStrokeOptions around in GimpPDBContext to keep
track of the newly added PDB state, and use it for the stroke
operations instead of creating a scratch GimpStrokeOptions.
2015-11-09 01:46:07 +01:00
Michael Natterer
701bc8f79b app: make gimp_context_parent_notify() more robust
Ignore notifications on properties that are not "context properties",
which is for example the parent context's "gimp" property.

A notification on "gimp" is recieved when creating the child context
before the parent context is fully constructed, for example in the
parent's constructed() implementation.
2015-11-09 01:38:37 +01:00
Jehan
3a7e20d2c6 app: replacing tabs with spaces in gimphelp.c. 2015-11-08 23:26:48 +01:00
Michael Natterer
e3ea383580 app, libgimpbase: move enum GimpStrokeMethod to libgimpbase
and rename its values.
2015-11-08 22:48:48 +01:00
Michael Natterer
76908b494b Bug 757772 - Filters->Animation->Blend... leaks GeglBuffers and contexts...
if invoked on a single layer image

In gimp_real_exit(), unref all stale images (which do not have a
display).
2015-11-08 19:18:36 +01:00
Michael Natterer
4446954e27 Bug 757773 - Filters->Edge Detect->Neon... crashes
As in e3b24af3d0, don't use a
GimpDrawablePreview's GimpDrawable if it was not created using the
deprecated GimpDrawabl-based API. Spotted by Massimo.
2015-11-08 14:15:44 +01:00
Michael Natterer
990c91f2a7 m4macros: make detectcflags.m4 more reliable
GIMP_DETECT_CFLAGS: pass -Werror to the compiler when checking for
flags, so the macro fails if passing a flag only warns but doesn't
cause the compiler to fail. Before, the compiler would warn about the
flag for each file compiled.
2015-11-08 01:04:16 +01:00
Michael Natterer
3f2efc5719 plug-ins: fix the build in screenshot-osx.c 2015-11-08 00:17:38 +01:00
Michael Natterer
e4ff6b40da Bug 757687 - Screenshot functionality broken under Wayland
Move OS X and X11 specific code to its own files, to prepare for more
shooting backends being added. Also remove unimplemented G_OS_WIN32
stubs, if anyone feels like implementing a Windows backend, by all
means go ahead.
2015-11-07 22:39:32 +01:00
Michael Natterer
10085b118a Bug 757739 - GIMP crashes closing undocked pointer dialog
Keep a reference to GimpCursorView's context around as long as the
widget is alive.
2015-11-07 21:14:40 +01:00
Sebastian Rasmussen
8212602939 Bug 757745 - selection-to-path: Fix whitespace typo in tooltip 2015-11-07 20:54:04 +01:00
Marco Ciampa
4997b1a047 Updated Italian translation 2015-11-07 17:21:39 +01:00
Piotr Drąg
8c8e419450 Updated POTFILES.in and POTFILES.skip 2015-11-07 17:04:41 +01:00
Michael Natterer
e1c4314a8e Bug 757687 - Screenshot functionality broken under Wayland
Move the screenshot plug-in to its own directory, it's about to be
split up into multiple files.
2015-11-07 15:52:44 +01:00
Jehan
011c6db39e app: enable GimpCurvesTool on construction.
The Curves tool is to be considered "enabled" as soon as it is selected,
not when it is initialized (usually at the first click on the image).
One of the main consequence of not being "enabled" was that the tool
cursor was wrong at selection.
2015-11-05 18:31:06 +01:00
Jehan
eeab960b78 libgimp: update function documentation.
Two deprecated functions were not following the same documentation
pattern as the others.
2015-11-02 17:43:38 +01:00
Jehan
2e40768ea5 pdb: update documentation for brush-related functions.
Blurbs use third person and need a final point.
Some description were wrong or inaccurate. Add also units where
needed (radius in pixels, angle in degrees).
Some returned values have to be freed.
2015-11-02 17:19:56 +01:00
Michael Natterer
1b2076cf69 app: save the "gimp-xcf-compatibility-mode" parasite in network byte order 2015-10-31 19:28:36 +01:00
Michael Natterer
feb0790cc4 plug-ins: file-xmc: use GeglRectangle instead of GimpParamRegion 2015-10-31 19:10:51 +01:00
Michael Natterer
2c19689518 app: clean up XCF compat code in file_save_cmd_callback()
Add local boolean "compat_possible" to make it more obvious what the
compat logic does.
2015-10-30 16:46:38 +01:00
Michael Natterer
1b99f57e47 app: fix GIMP_NEW_OVERLAY_MODE in gimp_image_get_xcf_version()
Don't abort the layer checking loop too early, and make sure to
iterate all layers, not just the toplevel. Spotted by Jonathan Tait.
2015-10-29 12:02:02 +01:00
Dimitris Spingos
a79af7d6aa Updated Greek translation 2015-10-28 11:49:56 +02:00
Michael Natterer
85a5c10620 icons: fix EXTRA_DIST so the new 96px wilber icons are in the tarball 2015-10-27 22:12:17 +01:00
Michael Natterer
ace40d125d Bug 735891 - color areas in the color picker info window are half transparent
Add code to GimpOverlayChild which can render arbitrary children of
the widget fully opaque, ignoring the configured opacity.

Add gimp_widget_get,set_fully_opaque() which gets/sets a per-widget
boolean flag to trigger that code.

Set the color picker's and the text tool style widget's color areas to
fully opaque.
2015-10-27 21:41:32 +01:00
Michael Natterer
6ad5530408 Bug 756895 - Floating panel translucency is annoying and unnecessary
Reduce the on-canvas dialog opacity by 50%, the goal is to get an idea
what part of the image os covered, not to actually see it.
2015-10-27 09:39:23 +01:00
Michael Natterer
964924ed47 icons: rename the unused scalable icons from stock-foo.svg to gimp-foo.svg
even if unused they should have the correct names.
2015-10-26 08:17:35 +01:00
Michael Natterer
e00c28ec71 app: use the new icons 2015-10-26 08:14:05 +01:00
Michael Natterer
078b210b3e icons: add gimp-wilber-outline.png in large sizes
for compositing the image window icon. By Guillermo Espertino.
2015-10-26 08:13:47 +01:00
Michael Natterer
917a63d189 app: move the image thumbnail bottom-left in the window icon
the wilber is already to-right, it just needs better images for this
purpose.
2015-10-26 02:13:22 +01:00
Michael Natterer
cece88ba95 app: fix call to gdk_pixbuf_composite() when rendering the window icon 2015-10-26 01:58:00 +01:00
Michael Natterer
37b20b08c9 icons: add 96, 128, 192 and 256 px wilber icons
so whatever desktop environment can use what they like best.
2015-10-26 01:32:50 +01:00
Michael Natterer
19b984e1df app: fix the image window's thumbnail size and shape
and render a wilber on top of it, yay! Step one, this can still be
nicer...
2015-10-26 01:09:08 +01:00
Michael Natterer
eb5094b9f7 plug-ins: decompose: move "run_mode" to a local scope
and some tiny cleanups.
2015-10-25 23:47:43 +01:00
Pedro Albuquerque
c8500cfa0e Updated Portuguese translation 2015-10-23 18:22:59 +00:00
Pedro Albuquerque
a9e2f5e635 Updated Portuguese translation 2015-10-23 18:20:30 +00:00
Michael Natterer
0cfd6d2d01 Bug 756701 - Decomposing to HSL produces HSV layers
Fix the name of the decomposed lightness layer to "lightness", it used
to be "value" due to a copy/paste error. Spotted by Massimo.
2015-10-22 20:16:25 +02:00
Michael Natterer
68a9835d56 Bug 756822 - Colors/Desaturate/Luminosity should operate on linear RGB
Add GIMP_DESATURATE_LUMINANCE to enum GimpDesaturateMode and rename
GIMP_DESATURATE_LUMINOSITY to GIMP_DESATURATE_LUMA.

Keep GIMP_DESATURATE_LUMINOSITY as deprecated compat value and add it
to the script-fo and pygimp compat constants.

Change GimpOperationDesaturate to process GIMP_DESATURATE_LUMINANCE
with linear "RGBA float".
2015-10-22 19:50:56 +02:00
Michael Natterer
f5f88b8134 plug-ins: fix some compiler warnings in file-xmc
and some minor formatting cleanup.
2015-10-22 19:29:35 +02:00
David Gowers
c6563b676f Bug 665187 - Fuzzy Select by Alpha
Implement 'Alpha' criterion for selection tools
2015-10-22 19:05:01 +02:00
Michael Natterer
ac1c6d7864 app: add progress reporting to gimp_drawable_convert_type()
so it doesn't sit there appearing to do nothing while converting an
image with profile to gamma/linear.
2015-10-21 22:22:30 +02:00
Michael Natterer
4e04e2ff30 Revert "Bug 751553 - Linear precision doesn't display the image correctly"
This reverts commit 61ae6b10de.

Re-enable color profile conversion on precision conversion, it's
fixed now.
2015-10-21 20:27:06 +02:00
Michael Natterer
e2f3a05d44 Bug 751553 - Linear precision doesn't display the image correctly
Fix copy/paste bug in gimp_color_profile_get_rgb_matrix_colorants()
which returned a broken XYZ triple for the blue component. Spotted by
Massimo.
2015-10-21 20:25:06 +02:00
Michael Natterer
b9305c7e67 app: make color profile conversions undoable again
which I broke in commit abe3ad37. Spotted by Massimo.
2015-10-21 20:23:55 +02:00
Michael Natterer
61ae6b10de Bug 751553 - Linear precision doesn't display the image correctly
Disable the new conversion code, something is broken...
2015-10-21 00:27:34 +02:00
Michael Natterer
ecd4752072 Bug 751553 - Linear precision doesn't display the image correctly
When converting and image with a color profileimage between linear and
gamma, create a new profile using the new API in GimpColorProfile,
convert the layers to that profile and tag the image with the new
profile.

If creating a new profile fails, convert to the right builtin profile
(linear rgb or sRGB from GimpColorProfile), but that code should be
considered a fallback that will be prevented from happening in the
convert dialog (at least the user will be informed).
2015-10-20 23:53:47 +02:00
Michael Natterer
6eb9f9d4aa libgimpcolor: add API to create profile variants with linear/sRGB gamma
and the original profile's RGB chromacities and whitepoint.
2015-10-20 20:13:40 +02:00
Pedro Albuquerque
5f7dc5fe3a Updated Portuguese translation 2015-10-19 06:12:08 +00:00
Pedro Albuquerque
f556bb3f8e Updated Portuguese translation 2015-10-19 06:09:18 +00:00
Michael Natterer
abe3ad3780 app: use gimp_gegl_convert_color_profile() to profile-convert images
instead of duplicating the almost identical code.
2015-10-19 01:51:35 +02:00
Michael Natterer
69abd4d972 app: add progress handling to gimp_gegl_convert_color_profile,transform() 2015-10-19 01:29:22 +02:00
Michael Natterer
13c2721cde libgimpcolor: clean up profile creation in GimpColorProfile
Use shorter and consistent local variable names, improve the unused
function that creates a linear/sRGB-gamma profile from another RGB
profile.
2015-10-19 01:14:35 +02:00
Michael Natterer
7521591061 app: fix typo: s/flip_result/clip_result/ in gimpitem.h 2015-10-18 21:00:21 +02:00
Hartmut Kuhse
029eae21bb metadata/attributes corrections after merge 2015-10-18 17:33:28 +02:00
Michael Natterer
91fbc3af01 Bug 734573 - Zoom to selection
Implement View -> Zoom -> Zoom to Selection using
gimp_display_shell_scale_to_rectangle()
2015-10-18 15:26:17 +02:00
Michael Natterer
5bc9ad947a app: fix gimp_display_shell_scale_to_rectangle() to also do only scrolling
which means: also scroll to the rectangle if the scale doesn't change.
2015-10-18 15:18:23 +02:00
Michael Natterer
ded7c8f585 app: add gimp_display_shell_scale_to_rectangle()
and move the magnify tool's rectangle zoom logic to the new function.
2015-10-18 14:59:30 +02:00
Michael Natterer
b7f471b1a3 app: change some integers in gimpdisplayshell-scale.c to gdouble
which does not have any effect by itself, but is needed for fixing
viewport calculation for rotated canvases.
2015-10-18 14:40:19 +02:00
Michael Natterer
7e62875d48 plug-ins: port file-xwd-save to GIO
and properly format all prototypes in the file.
2015-10-18 14:26:25 +02:00
Hartmut Kuhse
078a9b5028 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	libgimp/gimpimagemetadata.c
	libgimpbase/gimpbase.def
	libgimpbase/gimpmetadata.c
	libgimpbase/gimpmetadata.h
2015-10-18 10:51:23 +02:00
Michael Natterer
195d5c760b plug-ins: pedantic function reordering in file-header.c 2015-10-17 23:28:45 +02:00
Michael Natterer
10e07292ec configure.ac: add -Wlogical-op and -Wtype-limits 2015-10-17 20:16:18 +02:00
Michael Natterer
7ec04e4afe app: get rid of hardcoding GDK_SHIFT_MASK in tools/
gimp_suggest_modifiers(): change "shift_format" and "control_format"
parameters to "extend_selection_format" and "toggle_behavior_format",
which fixes the longstanding problem that the function did the right
thing only by accident.

tools: use gimp_get_extend_selection_mask() instead of GDK_SHIFT_MASK
which is not 100% semantically correct in all cases, but at least a
step in the right direction to make the tool modifiers easier to
improve.
2015-10-17 15:31:08 +02:00
Pedro Albuquerque
1318015adc Updated Portuguese translation 2015-10-17 06:57:38 +00:00
Michael Natterer
a2ad257711 Bug 756678 - Layer opacities change upon saving and reopening an xcf file
Add new XCF property FLOAT_OPACITY and always save both the old 8-bit
and the new float opacity of layers and channels. Float opacity is
saved after the 8-bit one so when loading, it overwrites the limited
8-bit value with the proper precision. Do not increase the XCF version
number because old GIMP versions will simply skip the unknown
FLOAT_OPACITY and keep using the 8-bit value.
2015-10-16 21:59:11 +02:00
Øyvind Kolås
8ca9bfc291 app: burn-mode, invert before blending 2015-10-15 13:52:20 +02:00
Øyvind Kolås
23f118632c app: clamp blended results for some compositing ops
Quite probably we shouldn't even clamp at the end, not doing that would speed
up compositing. See bug 744265.
2015-10-15 00:25:01 +02:00
Michael Natterer
940349c564 plug-ins: add the legacy difference of gaussians back to the menus
until we have sorted out the differences to the new GEGL op.
2015-10-14 23:10:03 +02:00
Michael Natterer
93fdaa0597 Bug 731279 - Tool Preset Editor not working correctly
This (doesn't quite) fix an obscure part of the tool preset bugs: when
changing the brush on a GimpPaintOptions instance, we might or might
not change the brush size, aspect etc. to the set brush's native
values, possibly overwriting the intended values from a tool preset.

Implement GimpConfig::copy() and copy the affected values again after
the entire object has been copied, so we actually use the value of
gimp_config_copy()'s "source" object.

This would fix that particular tool preset problem if there wasn't
another bug that is still unfixed, stay tuned...
2015-10-14 23:02:07 +02:00
Милош Поповић
9b07df3a5d Updated Serbian translation 2015-10-14 13:03:13 +00:00
Michael Natterer
92eed69f1b app: add new action to restore a tool preset from the list
In order to make things more obvious here. Before, a tool preset could
only be rstored from the list by selecting it, which only worked if
another preset was active before. Now the selected preset can easily
be restored again.
2015-10-14 12:32:47 +02:00
Elle Stone
e089095631 Bug 744265 - layer mode 'addition' makes wrong gray values
Move CLAMP code in addition blend mode (CLAMP the result, not an
intermediate value).
2015-10-13 22:47:31 +02:00
Michael Natterer
8a7665d4b7 app: fix a comment in gimpcontext.c 2015-10-13 01:06:41 +02:00
Dušan Kazik
c5f4a8ff0b Updated Slovak translation 2015-10-11 18:37:47 +00:00
Dušan Kazik
fa7fcd761c Updated Slovak translation 2015-10-11 18:28:15 +00:00
Jiri Grönroos
9d91c9b07b Updated Finnish translation 2015-10-11 14:22:31 +00:00
Michael Natterer
d9b3aaa9b8 Bug 756357 - Convert to Color Profile does not update the progress bar
Update the progress also while converting a layer, not only between
layers.
2015-10-10 22:43:19 +02:00
Andrew Worsley
cc9c7aa3b3 plug-ins: fix 2 bugs in fractal-trace
- crashes when computing % 0 when selection height < 100
- used y2 instead of x2 when computing width
- crash when selection in lower left corner
2015-10-10 21:43:03 +02:00
Andrew Worsley
24d844c9f1 Bug 155733 - need to check return values of gimp_drawable_mask_bounds()
Remove gimp_drawable_mask_bounds() from color-cube-analyze.c, also add
menu entry to access it.
2015-10-10 17:16:48 +02:00
Louis Benazet
e7715dca35 Bug 155733 - need to check return values of gimp_drawable_mask_bounds()
Mask intersect fix for photocopy plug-in.
2015-10-10 17:13:10 +02:00
Andrew Worsley
a3f2b1ab68 Bug 155733 - need to check return values of gimp_drawable_mask_bounds()
Remove gimp_drawable_mask_bounds() from border-average.c
2015-10-10 17:07:31 +02:00
Michael Natterer
494398e3b8 Bug 756019 - Color pickers UX inconsistencies
Switch the axes of the GimpColorSelect color area so that on the X
axis, we always modify the first of the two channels of RGB or HSV
that are edited here, and on the Y axis the second.
2015-10-08 23:47:16 +02:00
Michael Natterer
cda4ab7492 libgimpwidgets: argh... 2015-10-08 22:47:32 +02:00
Michael Natterer
560d481083 libgimpwidgets: some more cleanup in GimpColorSelect 2015-10-08 22:24:13 +02:00
Michael Natterer
494ec0ace5 libgimpwidgets: change GimpColorSelect's handle positions to double
so we can select more than 256 values on each color channel.
2015-10-08 21:10:33 +02:00
Jehan
662ade6911 Revert "app: save first and last color of the blend tool gradient..."
This reverts commit 2cef834198.
This feature is "undiscoverable" according to Mitch, and we are not sure
how much the endpoint colors are special to the user.
2015-10-08 19:33:11 +02:00
Jehan
c7adff4f6f Revert "app: save gradient first and last color with dynamics color output..."
This reverts commit 15b5b2c8b3.
This feature is "undiscoverable" according to Mitch, and we are not sure
how much the endpoint colors are special to the user.
2015-10-08 19:33:07 +02:00
Jonathan Tait
3c717ac483 Bug 756030 - file-pdf-save-multi PDB API is mis-specified
file-pdf-save-multi did not honor the PDB array passing standard.
2015-10-08 18:39:20 +02:00
Michael Natterer
e3b24af3d0 plug-ins: fix crash in blur-gauss-selective.c
Must not call the deprecated gimp_drawable_preview_get_drawable() on a
preview that was not also created using the deprecated
gimp_drawable_preview_new(). Instead, pass the GimpDrawable to
preview_update() using the signal's user_data.
2015-10-08 12:15:06 +02:00
Michael Natterer
30a86e38b8 libgimpwidgets: slightly redo how GimpPickButton calls its new backends
to make porting to GTK+ 3.x easier, for less diff to the gtk3-port
branch.
2015-10-06 23:44:36 +02:00
Michael Natterer
1debefb20f Bug 756019 - Color pickers UX inconsistencies
Increase spacing between the HSV and RGB slider groups in
GimpColorScales. Yes there was spacing before, but hardly visible.
2015-10-06 23:39:49 +02:00
Michael Natterer
a89e1d6d8c libgimpwidgets: fix signal emission in gimppickbutton-default.c
so color picking works again on != OS X ;)
2015-10-06 23:31:21 +02:00
Michael Natterer
6c20609f96 Bug 492048 - Detect color space in Exif 2.21/DCF 2.0 option files
Change the logic in gimp_metadata_get_colorspace() to be like in the
respective KExiv2 function, which looks pretty well done. No guarantee
of correctness, this just looks more logical than before :)
2015-10-06 21:32:12 +02:00
Kristian Rietveld
153b19ac56 Only build Quartz-specific color picking code on OS X/Quartz builds 2015-10-04 18:11:16 +02:00
Kristian Rietveld
e570eb0be4 Make gimp_pick_button_clicked properly private 2015-10-04 17:14:10 +02:00
Kristian Rietveld
0d88399eb8 Bug 753175 - color picker locks down the GUI
The common code relies on X11 pointer grabbing semantics, which does
not work well on OS X. An attempt using event taps also proved
problematic, in particular with regard to setting the mouse cursor.

This patch implements a fully separate code for use on OS X platforms.
It works by simply overlaying the desktop with big transparent windows
on which the mouse cursor is set and motion events are captured. Evil,
but it works.
2015-10-04 16:27:17 +02:00
Милош Поповић
c10d3e6df7 Updated Serbian translation 2015-10-02 16:07:41 +00:00
Милош Поповић
77d4102038 Updated Serbian translation 2015-10-02 09:49:57 +00:00
Милош Поповић
4192fceb06 Updated Serbian translation 2015-10-01 11:55:33 +00:00
Милош Поповић
2ba3dcb6a5 Updated Serbian translation 2015-10-01 11:44:52 +00:00
Michael Natterer
15b7b17b12 Bug 492048 - Detect color space in Exif 2.21/DCF 2.0 option files
Some refactoring: add gimp_metadata_get,set_colorspace() and a new
enum GimpMetadataColorspace which so far can be one of { UNSPECIFIED,
UNCALIBRATED, SRGB, ADOBERGB }. The setter is untested and I don't
know if it's doing the right thing, please review. Use the getter in
gimp_image_metadata_load_finish(), so complex metadata logic and
profile creation/setting are separated.
2015-09-30 20:51:40 +02:00
Jehan
15b5b2c8b3 app: save gradient first and last color with dynamics color output...
in the recently used colors palette.
2015-09-30 17:30:50 +02:00
Jehan
2cef834198 app: save first and last color of the blend tool gradient...
in the recently used colors palette.
2015-09-30 17:10:10 +02:00
Jehan
52f6a2aeb4 app: save color history when a color is used.
Now the history of recently used colors is not updated when selecting
in the color dialog anymore, but when a color is actually used.
Tools supported right now are: Ink, MyPaint brush, all PaintBrush tools,
bucket fill and eraser (background color on non-alpha drawables).
Moreover from now on, colors already saved are properly moved to first
position when reused.
2015-09-30 16:39:05 +02:00
Dimitris Spingos
c741e8ff44 Updated Greek translation 2015-09-30 10:01:44 +03:00
Michael Natterer
cb8e16aae8 app: move app/batch.[ch] to app/core/gimp-batch.[ch]
There is no reason batch processing should be considered "glue code".
2015-09-30 01:57:33 +02:00
Милош Поповић
2d0e223c21 Updated Serbian translation 2015-09-29 11:16:00 +00:00
Jehan
84360b1956 app: indentation fix. 2015-09-29 00:32:24 +02:00
Jehan
cd2b395194 app: batch commands won't run on existing instance. 2015-09-28 22:31:21 +02:00
Jonathan Tait
7167586919 Bug 754998 - Warp Transform Tool > Animation> Frames...
...spinbox does not step/page correctly

Correct the increments to be integers not floats.
2015-09-28 20:22:57 +02:00
Michael Natterer
7e9957851e Bug 492048 - Detect color space in Exif 2.21/DCF 2.0 option files
Copy a ton of logic from darktable and libkexiv2 and parse more
metadata tags which contain colorspace information, namely:

Exif.Photo.ColorSpace
Xmp.exif.ColorSpace
Exif.Nikon3.ColorSpace
Exif.Canon.ColorSpace
2015-09-28 19:54:18 +02:00
Michael Natterer
0bc3a82c77 Bug 755703 - new gaussian blur: default Abyss policy to Clamp
Fix operation name in last commit.
2015-09-28 17:40:47 +02:00
Michael Natterer
1aeeada2d8 Bug 755703 - new gaussian blur: default Abyss policy to Clamp
Default to CLAMP in the PDB compat wrappers that replace the old
plug-ins.
2015-09-28 17:27:29 +02:00
Michael Natterer
560841606c app: don't access GtkTargetList's members directly
It's an opaque struct in GTK+ 3.x, so let's fix it here instead of
adding another patch to the gtk3-port branch.
2015-09-28 15:28:57 +02:00
Michael Natterer
f6df750714 libgimpwidgets: minor formatting changes in gimpruler.c
to make rebasing this file in gtk3-port a little less painful.
2015-09-27 13:45:13 +02:00
Michael Natterer
b17f3fbfce app: fix if() logic in gimp_plug_in_procedure_handle_return_values()
if (! x > 0) is not the same as if (! (x > 0)) and beyond that it's
much less stupid to write if (x == 0)...
2015-09-27 13:40:57 +02:00
Michael Natterer
9e06ff428c cursors: fix the contents of the gimp-color-picker-cursors resource file
Due to a typo we included all cursors, not only the color picker
cursor. Use the right Makefile.am variable to fix this. Also include
the cursor's raw PNG file, which is needed for simplifying OS X
specific code, see bug #753175.
2015-09-27 12:47:13 +02:00
Piotr Drąg
7fd7c122c2 Fix Swedish translation of default:LTR 2015-09-26 17:33:47 +02:00
Piotr Drąg
0712adef69 Fix Slovenian translation of default:LTR 2015-09-26 17:33:23 +02:00
Piotr Drąg
d5fe21b712 Fix Spanish translation of default:LTR 2015-09-26 17:31:19 +02:00
Piotr Drąg
5b585bce5c Fix Greek translation of default:LTR 2015-09-26 17:30:47 +02:00
Daniel Mustieles
a043e8beff Updated Spanish translation 2015-09-25 09:43:39 +00:00
Michael Natterer
f0814dcf33 libgimp: rename gimpmetadata.[ch] to gimpimagemetadata.[ch]
so the filenames match the contained namespace. Sort includes in
gimpui.h alphabetically.
2015-09-25 00:40:57 +02:00
Michael Natterer
c76bd06887 app: cosmetic cleanup in gimp_image_parasite_attach() 2015-09-24 21:33:30 +02:00
Michael Natterer
e7dc21d795 libgimp: fix return values in g_return_val_if_fail() statements
GLib master fixed the missing warnings since whatever GCC version.
2015-09-24 21:32:33 +02:00
Michael Natterer
6fe0a42c5d Bug 755487 - redundant g_object_unref crashes GIMP
Remove redundant g_object_unref() from gimp_image_parasite_attach().
2015-09-23 21:53:29 +02:00
Jiri Grönroos
c7b5f9b9a7 Finnish translation update 2015-09-23 10:14:43 +03:00
Michael Natterer
526a3a6020 Bug 755363 - Non-void function should return a value
Use g_return_val_if_fail() in function returning non-void.
2015-09-21 20:37:29 +02:00
Michael Natterer
616c57b8cf Bug 478528 - Layer and Image previews are not color managed
Fix color managed layer previews when adding/removing alpha:

Implement GimpDrawable::alpha_changed() in GimpLayer and emit
GimpColorManaged::profile_changed() so all cached color transforms are
nuked.
2015-09-21 20:30:15 +02:00
Pedro Albuquerque
b2ec5b0f3e Updated Portuguese translation 2015-09-21 05:42:28 +00:00
Michael Natterer
b70ffb0c8b plug-ins: some cleanup in the new file-exr ICC profile code 2015-09-20 23:49:38 +02:00
Tobias Ellinghaus
d73cfa4a24 plug-ins: support color managed EXR loading
This generates an ICC profile from the embedded white point and
chromaticities on the fly, assuming linear gamma images.
2015-09-20 23:42:24 +02:00
Michael Natterer
9550fbff3c Bug 748749 - picked colors don't match image colors...
...when a color profile is active

This commit adds more (still unused) infrastructure to fix this bug:

Ee now keep around color transforms from layer pixels to "R'G'B'A
double" (which is GimpRGB's format) and back. Also add utility
function gimp_image_color_profile_pixel_to_srgb() which converts a
picked pixel to GimpRGB, using the cached color transform.
2015-09-20 21:17:54 +02:00
Michael Natterer
29fee56914 app: fix visibility of the color picker tools info window
Since commit 867b1f7e the window did always pop if it was set to
visible once, even if closed and "Use info window" disabled.

Fix this by adapting the show logic to the fact that we now keep the
widget alive across images/displays.
2015-09-20 00:37:05 +02:00
Matt Giuca
07dfe4a5eb plug-ins: Fix generation of the AND mask for 32-bit ICO images
Previously, the mask would be transparent if the alpha was <50%.
However, this causes pixels to become black in some places in Windows
(notably, the taskbar on Windows 10). Therefore, always set the mask
to opaque if a pixel is partially or fully opaque.
2015-09-18 18:58:12 +02:00
Michael Natterer
7f2d5ebbc5 plug-ins: use the new drawable_ID-based GimpAspectPreview API 2015-09-17 00:28:09 +02:00
Michael Natterer
bbe667f291 libgimp: deprecate GimpAspectPreview's GimpDrawable API
and add drawable_ID functions instead.
2015-09-17 00:24:03 +02:00
Michael Natterer
5d7710a8a5 app: fix comment in xcf_load_image() 2015-09-15 23:02:54 +02:00
Jonathan Tait
5b10339c5f Bug 751584 - parasite_list() methods fail if no parasites found
Correct parasite_list() methods.
2015-09-15 09:34:55 +02:00
Michael Natterer
e18aae18c2 plug-ins: use the new drawable_ID-based GimpDrawablePreview API 2015-09-15 00:50:16 +02:00
Michael Natterer
d9de706946 libgimp: deprecate GimpDrawablePreview's GimpDrawable API
and add drawable_ID functions instead.
2015-09-15 00:49:45 +02:00
Michael Natterer
6f33d8d86d libgimp: fix gimpui.def 2015-09-14 23:28:01 +02:00
Michael Natterer
9a8878ed6e plug-ins: use the new drawable_ID-based GimpZoomPreview API 2015-09-14 22:16:21 +02:00
Michael Natterer
d2d9cbc21a libgimp: deprecate GimpZoomPreview's GimpDrawable API
and add drawable_ID functions instead.
2015-09-14 22:14:24 +02:00
Michael Natterer
8ace6bf45d libgimp: start getting rid of using GimpDrawable in the drawable previews
Start with the internal APIs that need no deprecations.
2015-09-14 19:47:18 +02:00
Michael Natterer
02d1192753 pdb: return NULL for string arrays with zero elements
In e61b1f76 things were changed to return string arrays that can be
freed with g_strfreev(), but that returned a one-element array
containing a NULL pointer for zero-length arrays. Fix the code
to return NULL again for zero-length arrays. See bug #751584.
2015-09-14 01:12:57 +02:00
Michael Natterer
d7b2d1c372 plug-ins: fix file-tiff-load's load_rgb() which I broke two commits earlier 2015-09-13 20:20:35 +02:00
Michael Natterer
9a1f94e9b2 plug-ins: don't add alpha to all but the loaded tiff's background layer
That's not needed any longer.
2015-09-13 20:14:22 +02:00
Michael Natterer
701aff3c8a plug-ins: lots of cleanup in file-tiff-load
Move variables to local scopes, saner variable names, comment
formatting, indentation, whatnot...
2015-09-13 20:12:02 +02:00
Hartmut Kuhse
2bbd3f4567 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	plug-ins/common/file-tiff-load.c
2015-09-13 18:05:22 +02:00
Michael Natterer
1243e1f93b Bug 743034 - file-tiff-load crashes if I try to open a BigTIFF file
Use a Babl format that actually exists for extra channels. Makes the
plug-in load black pages from the mentioned "Rome" BigTIFF, so this
only fixes the plug-in crash but doesn't fix loading of BigTIFF
images, whatever they are...
2015-09-13 16:21:35 +02:00
Michael Natterer
b430a2d0f6 Bug 750867 - loading of CCiTT4 tiff images broken
Revive and partly reimplement the code that loads indexed and b/w
images. Seems to work on the fax attached to the bug, and on a random
indexed RGB image.
2015-09-13 00:12:42 +02:00
Michael Natterer
1833d292cc Bug 754927 - Non-void function should return a value
Fix return value glitch in last DND-related commit.
2015-09-12 20:26:56 +02:00
Julien Nabet
456d535232 Bug 69496 - Paint tools, Text tool: Click and drag font/brush/pattern/gradient...
...from tool options crashes GIMP

Applied a modified patch that actually removes the target list if it
became empty. This may or may not fix the bug; I can't tell because I
couldn't reproduce it any longer.
2015-09-10 23:48:00 +02:00
Michael Natterer
145a05ac9d Bug 754774 - Choosing "convert" upon import results in wrong colors...
...being displayed

Need to call gimp_image_flush() on all newly opened images so whatever
image states are properly updated:

Call file_open_sanitize_image() at the end of loading (after profile
import), and re-enable the flush() call in the function.

Also, don't fiddle with undo disabling and enabling in
gimp_image_import_color_profile(). Instead, disable undo before
calling the function.
2015-09-09 21:21:20 +02:00
Michael Natterer
396bc89e56 app: better temporary debug output in gimp_display_shell_profile_update() 2015-09-09 21:09:31 +02:00
Michael Natterer
7d04e89ccb app: proper precondition check in gimp_image_convert_color_profile()
Use GIMP_IS_COLOR_PROFILE(profile) instead of profile != NULL because
GimpColorProfile is a GObject now.
2015-09-09 21:08:07 +02:00
Michael Natterer
03e12184f5 app: reduce casts in file-save-dialog.c and file-open-dialog.c
also, name variables like their type, e.g. a GimpOpenDialog is always
called open_dialog now.
2015-09-09 21:04:18 +02:00
Michael Natterer
a9c7af8b70 app: fix image type check in gimp_image_color_managed_get_color_profile()
Return the builtin profile for all except GRAY images, not for all
except INDEXED images, the latter have an RGB colormap.
2015-09-09 20:46:28 +02:00
Michael Natterer
d370e9c135 Bug 754171 - cmd - missing modifier key to configure input controllers
Forgot to replace "control" with "primary" in the keyboard controller
event names.
2015-09-09 14:59:32 +02:00
Michael Natterer
fb92321d43 Bug 754171 - cmd - missing modifier key to configure input controllers
Need to call gdk_keymap_map_virtual_modifiers() on the parsed
modifiers in order to the the right ones on all platforms (OS X).
2015-09-09 12:11:43 +02:00
Jehan
7160e05349 configure: comment out -Wsystem-headers for now...
It outputs far too many warnings on some systems (like OSX apparently).
2015-09-09 03:21:49 +02:00
Jehan
5f5c3db3ca app: migration from "control" to "primary" in controllerrc.
Since commit e50103c, we use the more generic "primary", allowing better
support for OSX "cmd" instead of X11/Win "ctrl".
2015-09-09 02:17:31 +02:00
Jehan
5cc77960c0 app: file-export and file-export-to migration were broken...
since commit 23d0eb1.
2015-09-09 02:17:31 +02:00
Michael Natterer
867b1f7efa Bug 754713 - On-canvas dialog of color picker tool always displays...
...in initially active tab

We intend reuse the dialog across displays, so don't destroy the
dialog in GIMP_TOOL_CONTROL_HALT, only hide it. This way the dialog
keeps its detached state.
2015-09-09 01:24:19 +02:00
Michael Natterer
326ef2f7b2 app: put the GimpOverlayDialog detach tooltip on the with widget 2015-09-09 01:24:19 +02:00
Jehan
d62615293d configure: add warning for forgotten return value on non-void functions.
Adding -Wreturn-type for general case, but also -Wsystem-headers to warn
of g_return_if_fail() on non-void, since these are macros from system
headers directory, and -Wreturn-type would not warn for these.
2015-09-09 01:11:32 +02:00
Michael Natterer
bd9afce9e2 app: some cleanup in the new file dialog classes 2015-09-09 00:01:12 +02:00
Jehan
d1e2b2c162 app: gimp_file_dialog_get_default_folder() must return a value.
Oups!
2015-09-08 23:59:13 +02:00
Martin Srebotnjak
a2a5ed2997 Updated Slovenian translation 2015-09-08 23:41:26 +02:00
Martin Srebotnjak
d733538abe Updated Slovenian translation 2015-09-08 23:35:19 +02:00
Martin Srebotnjak
18f28ced91 Updated Slovenian translation 2015-09-08 23:30:02 +02:00
Jehan
3c9a4a24e1 app: reorder GimpFileDialog so that method implementations are together. 2015-09-08 23:29:01 +02:00
Michael Natterer
e50103ccda Bug 754171 - cmd - missing modifier key to configure input controllers
Don't hardcode modifier masks in the wheel and keyboard input
controllers. Instead, hardcode accelerator strings and get the right
modifier mask from gtk_accelerator_parse() at runtime.

This turns e.g. "<Shift><Primary>" into Shift+Cmd on OS X and into
Shift+Ctrl on X11 and Windows.

Also rename the events accordingly and change the event names in the
default controllerrc.

Unrelated: reorder the actions so the ones with less modifiers are
listed first, and change the order of action matching to match the
actions with most modifiers (the last ones) first.
2015-09-08 23:24:48 +02:00
Martin Srebotnjak
eba7066748 Updated Slovenian translation 2015-09-08 23:18:38 +02:00
Jehan
4441133a8b app: get_default_folder() is now a class method. 2015-09-08 23:13:03 +02:00
Michael Natterer
df2a485907 Bug 754713 - On-canvas dialog of color picker tool always displays...
...in initially active tab

gimp_tool_gui_update_shell(): implement the "overlay" case and hide the
gui on the previous shell, then show it on the new one.
2015-09-08 21:53:24 +02:00
Michael Natterer
22fc50c279 app: rename all values of enum GimpContextPropMask
from GIMP_CONTEXT_FOO_MASK to GIMP_CONTEXT_PROP_MASK_FOO.
Also rename the FIRST and LAST values of enum GimpContextPropType.
2015-09-08 21:18:49 +02:00
Michael Natterer
67597f42ad Bug 754727 - gimp 2.9.1 git compilation fails in file-psd
Fix some glitches in patches I recently applied blindly :)
2015-09-08 18:54:02 +02:00
Michael Natterer
2c8141d96d app: reorder functions in GimpSaveDialog so method impls are together
Also, "real" is in the name of a method's default impl, not its impl
in a subclass.
2015-09-08 10:51:05 +02:00
Michael Natterer
997314d4e9 Bug 754518 - gimp-drawable-curves-spline does not take the advertised...
...number of points

gimp_curves_config_new_spline(): set the GimpCurve's n_points, not
n_samples. The bug title describes exactly what was happening.
2015-09-07 21:43:18 +02:00
Marco Ciampa
f7a90f9a63 Updated Italian translation 2015-09-07 18:23:35 +02:00
Jehan
55f319de04 Bug 754652 - About dialog does not credit contributors for 2.10. 2015-09-07 17:04:23 +02:00
Dimitris Spingos
2967bccb4b Updated Greek translation 2015-09-07 14:06:52 +03:00
Michael Henning
dbe5982753 app: Always return a value from results_list_on_key_press_event 2015-09-06 19:44:33 -04:00
Michael Natterer
4479cedf13 app: rename mask enum values GIMP_COMPONENT_RED,GREEN,BLUE etc.
to GIMP_COMPONENT_MASK_RED,GREEN,BLUE etc.
2015-09-07 00:35:02 +02:00
Michael Henning
8c02b360fb libgimpwidgets: Disconnect ruler's idle handler in dispose
As discussed on irc, this is more appropriate than finalize because
we shouldn't be making any gtk calls after dispose.
2015-09-06 17:41:09 -04:00
Michael Henning
3233a70bae libgimpwidgets: Avoid updating the rulers too often.
Ever since 72617e42b, whenever the user generated a lot of mouse
input, we would constantly queue redraws to the rulers. These redraws
had a higher idle priority than updating the canvas, so we would
rarely get around to canvas updates, which made certain tools
(painting with dynamics, the blend tool) feel very unresponsive.

This fixes it by only redrawing the rulers if the mouse has moved
far from the last location, or if there are no idle handlers with
a priority above LOW.
2015-09-06 17:18:12 -04:00
Jehan
a7e7a0bcb9 app: fix Search Popup height saving...
and implement it as the size_allocate() class method rather than
"configure-event" signal handling.
2015-09-06 23:10:26 +02:00
Jehan
bead93fdb8 app: fix whitespaces.
Mitch wanted to kill me, I had no other choice than clean this quick!
2015-09-06 21:02:26 +02:00
Jehan
2b369f09b9 po: update POTFILES.in for gimpsearchpopup.c. 2015-09-06 20:57:25 +02:00
Jehan
cbef12d645 app: Action Search dialog now uses the new GimpSearchPopup widget...
... instead of making its own window. Inheriting from GimpPopup, it is
also friendlier to sloppy mouse, etc.
2015-09-06 20:48:05 +02:00
Jehan
6a9d449eac app: new GimpSearchPopup widget.
Based on GimpPopup as parent, this is a generic search popup widget,
which can display any list of action. The results construction logics
is not part of the widget, and is built through a callback instead,
which could allow to use it to create different dialogs.
2015-09-06 20:48:05 +02:00
Elle Stone
b8902a7d95 Bug 728610 - Code for retrieving the XYZ values of a matrix RGB profile
Add two private functions which are currently unused but will
become public once it's clear where exactly we need them:

gimp_color_profile_get_rgb_matrix_colorants(): returns a GimpMatrix2
with the RGB colorants.

gimp_color_profile_new_foobar(): takes an existing profile and creates
a new one with the same RGB colorants but a linear gamma TRC. To be
renamed and made more general.
2015-09-06 20:35:05 +02:00
Michael Natterer
e491bf8e09 Bug 754221 - Possible preview widget bug
gimp_drawable_get_sub_preview(): both the preview buffer's scale
factor and the src coordinates in the drawable were calculated
wrongly. Found by Massimo.
2015-09-06 17:23:55 +02:00
Julien Nabet
5a2757c6ec Bug 753986 - manage layer resource block lnsr
Layer name source (id on 4 characters encoded in MacRoman).
psd from PS>5 have "luni" (Layer Unicode)

See https://bugzilla.gnome.org/show_bug.cgi?id=753986#c4 for more details

Janitorial on lyvr:
move IFDBG at the beginning of the function
+change the content of it
2015-09-06 16:57:11 +02:00
Michael Natterer
f9da5cc6cc Bug 478528 - Layer and Image previews are not color managed
Fix gimp_color_profile_get_format() to return the right format for
"cairo-RGB24": simply check for the more special cairo formats first,
then check for the general RGB models. Found by Massimo.
2015-09-06 14:14:32 +02:00
Hartmut Kuhse
705643deba app: fix setting color profile to image after convert
While loading an image with color profile, gimp offers the possibility
to convert it to the builtin profile. Setting the new color profile
before converting, deletes the old one and results in a segmentation fault.
2015-09-06 11:35:12 +02:00
Hartmut Kuhse
e8c2acc35e internal correction of "internal-procs.c" 2015-09-06 11:32:45 +02:00
Hartmut Kuhse
a545a4b314 app: fix setting color profile to image after convert
While loading an image with color profile, gimp offers the possibility to convert it to the builtin profile. Setting the new color profile before converting, deletes the old one and results in a segmentation fault.
2015-09-06 11:01:20 +02:00
Jehan
316d94d800 app: s/0/GDK_GRAB_SUCCESS/.
Let's use semantic names rather than raw meaningless values.
2015-09-05 22:30:56 +02:00
Jehan
3f51d4eb48 app: use "map-event" if you want to make sure that a window is mapped.
The "map" signal does not mean a widget is mapped. It may be emitted
before. Yet pointer and keyboard grabs won't work on non viewable
widgets and will fail with GDK_GRAB_NOT_VIEWABLE.
For some reason, a GtkWindow with type GTK_WINDOW_POPUP was always
mapped when "map" is emitted but not yet with type GTK_WINDOW_TOPLEVEL
(at least in my tests). Thus switch to "map-event" to make sure the
widget is actually mapped.
2015-09-05 22:27:11 +02:00
Hartmut Kuhse
3294b3e809 periodically merge with master to stay up to date
Conflicts:
	app/xcf/xcf-save.c
	configure.ac
	libgimp/gimpmetadata.c
	plug-ins/Makefile.am
	po-plug-ins/POTFILES.in
2015-09-05 18:53:14 +02:00
Jehan
0593eaa7c3 plug-ins: GEGL buffers leaked when canceling gif export.
Delete the duplicated sanitized image when canceling in the gif options
dialog.
2015-09-04 18:26:35 +02:00
Jehan
6b33491ce4 plug-ins: returned value of gimp_image_get_layers() must be freed. 2015-09-04 18:24:21 +02:00
Pedro Albuquerque
e1dafd1b63 Updated Portuguese translation 2015-09-04 10:01:57 +00:00
Michael Natterer
a4a0ec9598 plug-ins, pdb: remove the maze plug-in and add a PDB compat proc 2015-09-04 00:34:38 +02:00
Michael Natterer
3f02b2aaf2 app: add gegl:maze to Filters -> Render -> Pattern 2015-09-03 22:12:23 +02:00
Jehan
765975dfd6 plug-ins: gif export should not carry on when sanity_check() fails.
This specific crash was only occuring when GIMP_INTERACTIVE_EXPORT=1
and canceling the first dialog. So that should not happen too often,
but well, now it's fixed…
2015-09-03 15:33:22 +02:00
Michael Natterer
09fed0a0e5 Bug 478528 - Layer and Image previews are not color managed
Implement color management in GimpViewRenderer: if the viewable is a
GimpColorManaged (true for images and layers), keep around a
GimpColorTransform and convert the preview image to display colors.
2015-09-03 02:25:51 +02:00
Michael Natterer
b45d31072b app, libgimpcolor: refactor GimpColorManaged::get_color_profile()
to not return a reference that has to be dropped. Also allow NULL to
be returned if the managed cannot have a profile. If it can have one,
get_color_profile() still always returns a profile (either the
assigned one, or a generated built-in one).
2015-09-03 01:36:02 +02:00
Michael Natterer
7c95676f88 app: implement the GimpColorManaged interface in GimpLayer
and change GimpImage and GimpItemStack to emit the "profile-changed"
signal when the image's profile changed. Also connect GimpViewRenderer
to "profile-changed" if the viewable is a GimpColorManaged and
invalidate the preview.
2015-09-03 00:21:40 +02:00
Michael Natterer
76ff1c1584 Revert "app: add ::get_color_profile() to GimpPickable and GimpProjectable"
This reverts commit 5c8ffdf6c5.

It was a bad idea, we have the GimpColorManaged interface for that.
2015-09-03 00:21:09 +02:00
Michael Natterer
f374377e9b app: pass the widget to all gimp_view_renderer_render_foo() functions
We will need the widget for color managing previews; it's also more
consistent to pass the widget to all render_foo() functions, not only
to render_icon().
2015-09-02 21:12:59 +02:00
Michael Natterer
9775b2083b app: simplify display update when the color management config changes
gimp_image_constructed(): connect to "notify" on GimpColorConfig
and call gimp_color_managed_profile_changed() on the image.

Remove the "notify" handler on GimpColorConfig from
gimpdisplayshell-handlers.c because it already connects to the
image's "profile-changed" signal.

Additionally, implement GimpColorManaged::profile_changed() in
GimpImage and invalidate the image and all layer previews. One step
closer to color managing image and layer previews.
2015-09-02 21:01:17 +02:00
Michael Natterer
fa584ef1c1 app: add gimp_gegl_convert_color_transform() to gimp-gegl-loops.[ch]
It's split out of gimp_gegl_convert_color_profile(), used from there,
and will also be used to color manage image and layer previews.
2015-09-02 20:46:02 +02:00
Piotr Drąg
7a53bcc72a Updated Polish translation 2015-09-02 20:43:20 +02:00
Michael Natterer
608f254b33 libgimpwidgets: support cairo formats in gimp_color_profile_get_format()
so color profile transforms can write directly to cairo-RGB24 and
cairo-ARGB32 surfaces.
2015-09-02 20:31:31 +02:00
Jehan
df24d3d025 po: update POTFILES.in for gimp(open|save|export)dialog.c. 2015-09-02 20:14:29 +02:00
Jehan
829f5ec3d6 app: GimpFileDialog state saving now implemented as a class method.
By default, it only saves the current file filter, but it allows a child
to implement its own state. It has been implemented by GimpSaveDialog to
save the preferred compatibility mode as well.
2015-09-02 20:05:11 +02:00
Jehan
b17e1b1cfc app: split GimpFileDialog into Gimp(Open|Save|Export)Dialog subclasses.
The code refactoring allows better readability which will allow in turn
to add more complex specific features making good use of the save/export
split concept.
2015-09-02 20:05:01 +02:00
Hartmut Kuhse
c6e5391de5 Periodically merge with master to stay up-to-date
Conflicts:
	app/pdb/internal-procs.c
2015-08-10 19:21:16 +02:00
Hartmut Kuhse
23ac3d2ec1 plug-in: file-png: correct indentation 2015-08-10 19:19:55 +02:00
Hartmut Kuhse
5ef90edfa0 merge: corrections after merge 2015-06-28 17:27:13 +02:00
Hartmut Kuhse
79a2cfe13b periodically merge with master to stay up to date
Conflicts:
	app/pdb/internal-procs.c
	libgimp/Makefile.am
	libgimp/gimp.h
	libgimp/gimpimage_pdb.h
	libgimpbase/gimpmetadata.c
2015-06-28 07:52:21 +02:00
Hartmut Kuhse
8f2ffb24b4 periodically merge with master to be up to date 2015-05-30 17:22:07 +02:00
Hartmut Kuhse
21b7f5317b Periodically merge with master to be up to date
Conflicts:
	plug-ins/common/metadata.c
	plug-ins/file-psd/psd-save.c
2015-05-30 17:17:34 +02:00
Hartmut Kuhse
314abc4fad Revert "app: increasing paint stroke speed"
This reverts commit e5569c653e.
2015-05-10 11:02:45 +02:00
Hartmut Kuhse
6798cacf22 merged to master: GExiv2 0.10.3 is out - working branch
t"

This reverts commit 0c931858ad.

Conflicts:
	configure.ac
2015-04-12 10:30:20 +02:00
Hartmut Kuhse
1d7e002b6f Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	configure.ac
2015-03-09 08:33:01 +01:00
Hartmut Kuhse
0c931858ad plug-in attributes: revert the useless xmp import
Importing xmp packet data is useless, because
setting the packet to the image will delete all
existing metadata, leaving those of the xmp packet
left. As xmp packet do not store all metadata, a lot
of metadata would be lost.
2015-02-22 17:39:35 +01:00
Hartmut Kuhse
b613084add app: unref attributes 2015-02-22 14:35:32 +01:00
Hartmut Kuhse
764708900d Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip 2015-02-07 14:20:18 +01:00
Hartmut Kuhse
bf9c4ceca0 libgimpbase/plug-ins: implement GPS show in Google Maps 2015-02-07 14:19:18 +01:00
Hartmut Kuhse
e5569c653e app: increasing paint stroke speed 2015-01-30 21:45:33 +01:00
Hartmut Kuhse
7c51a381b3 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	app/pdb/internal-procs.c
2015-01-25 12:16:58 +01:00
Hartmut Kuhse
e973b773ac Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	app/pdb/internal-procs.c
	plug-ins/common/Makefile.am
	plug-ins/common/gimprc.common
	plug-ins/common/plugin-defs.pl
2014-12-06 17:36:10 +01:00
Hartmut Kuhse
3ab7e955bb merge corrections 2014-11-14 21:14:53 +01:00
Hartmut Kuhse
ac9e872576 Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	app/pdb/internal-procs.c
	plug-ins/common/Makefile.am
	plug-ins/common/gimprc.common
2014-11-14 09:51:54 +01:00
Hartmut Kuhse
db980ff048 libgimpbase: rename constants to gexiv2 constants.
GExiv2 does rename the versions in a different manner, than gimp does.
If a new gexiv2 release is made, the version is altered and after that, the release is made.
So the git master is always the same version as the last release, until the next release is made.
This Gimp branch does compile with the current gexiv2 git master, but not with the current
gexiv2 release (0.10.2).
I expect the next release to be 0.10.3, so configure.ac needs version 0.10.3 of gexiv2.
2014-10-24 19:28:27 +02:00
Hartmut Kuhse
47af0fe62e Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
Conflicts:
	app/file/file-open.c
	app/pdb/internal-procs.c
2014-10-23 17:20:29 +02:00
Hartmut Kuhse
b58b605621 libgimpbase: fixing gimpattributes
If the iterator for sorted attributes is just initialized,
the iterator returns the first element, next otherwise.
2014-10-19 11:18:34 +02:00
Hartmut Kuhse
c324d6ff5f plug-ins: attributes: handle locale<->utf-8 2014-10-10 09:58:28 +02:00
Hartmut Kuhse
fe0df91639 plug-ins: metainfo: fixes 2014-10-10 09:57:54 +02:00
Hartmut Kuhse
ae8c30ef70 plug-ins: metainfo - revert some changes from last commit 2014-10-09 15:13:05 +02:00
Hartmut Kuhse
4552a31b70 plug-ins: metainfo: don't internationalize ui elements in code.
Better internationalize the ui
2014-10-09 14:50:20 +02:00
Hartmut Kuhse
3bb19203a5 plug-ins: metainfo, show number in expander label 2014-10-09 14:30:41 +02:00
Hartmut Kuhse
90fc4a52df libgimpbase: fix compiler warning 2014-10-09 09:28:41 +02:00
Hartmut Kuhse
562e97d7b8 plug-ins: attributes - enhance ui 2014-10-09 09:25:15 +02:00
Hartmut Kuhse
2ffd28e391 plug-ins: metainfo: unref attributes 2014-10-07 19:47:27 +02:00
Hartmut Kuhse
dea69ce540 eek: should have added the class 2014-10-07 19:47:00 +02:00
Hartmut Kuhse
acdaf6694a plug-ins: enhance metainfo. The handler for data is now a general class,
which can read all defined metadata without modification.
2014-10-07 19:32:01 +02:00
Hartmut Kuhse
0d428b5b38 libgimpbase: fix removing attribute 2014-10-07 19:30:40 +02:00
Hartmut Kuhse
584e141ea6 libgimpbase: GimpAttributes sorting; Plug-ins: attributes fixed for new sorting.
Since GHashTable does not sort keys, a GList was necessary for sorting purposes.
But plain string sorting is not enough for structured tags, when I got an image
with 176(!) xmpMM.History elements. In string sorting, after 10 comes 100, so an
enhanced sorting was necessary.
2014-10-06 17:43:45 +02:00
Hartmut Kuhse
1e9ec01d30 configure: needed not existing gexiv2 version 0.10.3
Unfortunately, the new gimpattribute feature needs new gexiv2
functions. One is accepted and pushed to git, one is still waiting
for review.
Without these new functions, compiling will fail.
2014-09-30 20:56:36 +02:00
Hartmut Kuhse
6c0f0ad5c3 introducing gimp-attributes
Instead of gexiv2-metadata, two new classes are introduced, GimpAttribute
and GimpAttributes, which stores GimpAttribute objects.
The aim is more internal flexibility for metadata/attributes.

GimpMetadata still exist as an interface between GExiv2, reading the metadata
from an image, and GimpAttribute, storing the metadata and more.

GimpAttributes are stored for GimpImage (as the older metadata object)
and GimpItem (GimpLayer / GimpChannel)

A new dialog for attributes as a plug-in for images(<Image>/Image/Image Attributes),
layers (<Layers>/Layer Attributes) and channels (<Channels>/Channel Attributes).

A dialog for editing IPTC Attributes for images, layers and channel (at the same places).
This dialog is older and will not be enhanced.

A dialog for editing image copyright and description whats o ever.
As IPTC is (or will be) dead and xmp shall be the common standard, with the relevant
IPTC tags mapped in xmp, i decided to take the tags from Adobe Lightroom 's "IPTC Extension"
tags for dealing with digital rights (<Image>/Image/Digital Rights).
I am very proud of this dialog, it was very hard work and is still in progress.
2014-09-30 20:50:44 +02:00
5267 changed files with 738244 additions and 282274 deletions

4
.dir-locals.el Normal file
View File

@@ -0,0 +1,4 @@
((c-mode . ((c-file-style . "GNU")
(c-basic-offset . 2)
(indent-tabs-mode . nil)
(show-trailing-whitespace . t))))

4
.kateconfig Normal file
View File

@@ -0,0 +1,4 @@
kate: indent-mode cstyle;
kate: indent-width 2; tab-width 8;
kate: tab-indents off; replace-tabs on;
kate: remove-trailing-spaces modified;

View File

@@ -70,6 +70,7 @@ The following people have contributed code to GIMP:
Daniel Eddeland Daniel Eddeland
Daniel Egger Daniel Egger
Ulf-D. Ehlert Ulf-D. Ehlert
Ell
Morton Eriksen Morton Eriksen
Larry Ewing Larry Ewing
Pedro Alonso Ferrer Pedro Alonso Ferrer
@@ -209,6 +210,7 @@ The following people have contributed code to GIMP:
Victor Oliveira Victor Oliveira
Thom van Os Thom van Os
Garry R. Osgood Garry R. Osgood
Nathan Osman
Benjamin Otte Benjamin Otte
Petr Ovtchenkov Petr Ovtchenkov
Alan Paeth Alan Paeth
@@ -275,6 +277,7 @@ The following people have contributed code to GIMP:
Ian Tester Ian Tester
Andy Thomas Andy Thomas
Mason Thomas Mason Thomas
Benoit Touchette
Patrice Tremblay Patrice Tremblay
Kevin Turner Kevin Turner
Andreas Turtschan Andreas Turtschan
@@ -315,6 +318,7 @@ The following people have contributed art to GIMP:
Ville Pätsi Ville Pätsi
Mike Schaeffer Mike Schaeffer
Carol Spears Carol Spears
Klaus Staedtler
Jakub Steiner Jakub Steiner
William Szilveszter William Szilveszter

View File

@@ -151,6 +151,12 @@ style is enforced. The GIMP coding style is defined as follows:
starting in the first column of the following line. All starting in the first column of the following line. All
parameters are prototyped and there's a new line for each. parameters are prototyped and there's a new line for each.
The source tree contains local config files which can be used to set the
right coding style in common editors: `.dir-locals.el` for Emacs,
`.kateconfig` for Kate, and `devel-docs/c.vim` for Vim (check the top
comments to see how to enable it automatically when opening a file in
the GIMP tree).
Try to make use of GLib's object system as much as possible. Do not Try to make use of GLib's object system as much as possible. Do not
create wrappers around functions of parent classes. If you end up create wrappers around functions of parent classes. If you end up
duplicating code, try to create a common parent class and implement duplicating code, try to create a common parent class and implement

View File

@@ -76,19 +76,18 @@ header files installed.
8. For metadata access GIMP requires the gexiv2 library. It is hosted 8. For metadata access GIMP requires the gexiv2 library. It is hosted
at https://wiki.gnome.org/Projects/gexiv2 . at https://wiki.gnome.org/Projects/gexiv2 .
9. libpng, libjpeg and lcms are hard dependencies that can not be 9. libpng, libjpeg, libtiff and lcms are hard dependencies that can
disabled. not be disabled.
10. For optional mypaint brushes, you should install brushlib (libmypaint) @LIBMYPAINT_REQUIRED_VERSION@, 10. For MyPaint brushes, brushlib (libmypaint) @LIBMYPAINT_REQUIRED_VERSION@ is used.
compiled with GEGL support: `scons enable_gegl=true install`. The libmypaint repository is hosted at:
Brushlib repository is hosted at:
https://github.com/mypaint/libmypaint https://github.com/mypaint/libmypaint
11. You may want to install other third party libraries or programs 11. You may want to install other third party libraries or programs
that are needed for some of the available plug-ins. We recommend that are needed for some of the available plug-ins. We recommend
to check that the following libraries are installed: libjasper, to check that the following libraries are installed: libjasper,
libpoppler-glib, libtiff, webkit, libmng, librsvg, libwmf, libaa libpoppler-glib, webkit, libmng, librsvg, libwmf, libaa
and libgs (Ghostscript). and libgs (Ghostscript).
Note that to be able to render CJK (Asian) and Cyrillic characters Note that to be able to render CJK (Asian) and Cyrillic characters
@@ -104,40 +103,49 @@ header files installed.
or newer) to be present. You will also need PyGTK and the or newer) to be present. You will also need PyGTK and the
respective development headers. respective development headers.
13. Configure GIMP by running the `configure' script. You may want 13. Windows builds can now generate backtrace logs upon a crash.
The logs will be available in: %APPDATA%\GIMP\@GIMP_APP_VERSION@\CrashLog\
The feature depends on Dr.MinGW's ExcHndl library:
https://github.com/jrfonseca/drmingw
14. Configure GIMP by running the `configure' script. You may want
to pass some options to it, see below. to pass some options to it, see below.
14. Build GIMP by running `make'. The use of GNU make is recommended. 15. Build GIMP by running `make'. The use of GNU make is recommended.
If you need to tweak the build to make it work with other flavours If you need to tweak the build to make it work with other flavours
of make, we'd appreciate if you'd send us a patch with the changes. of make, we'd appreciate if you'd send us a patch with the changes.
15. Install GIMP by running `make install'. In order to avoid clashes 16. Install GIMP by running `make install'. In order to avoid clashes
with other versions of GIMP, we install a binary called gimp-@GIMP_APP_VERSION@. with other versions of GIMP, we install a binary called gimp-@GIMP_APP_VERSION@.
By default there's also a link created so that you can type 'gimp' By default there's also a link created so that you can type 'gimp'
to start gimp-@GIMP_APP_VERSION@. to start gimp-@GIMP_APP_VERSION@.
16. Summary of required packages and what version you need: 17. Summary of required packages and what version you need:
ATK: @ATK_REQUIRED_VERSION@ Package Name Version
babl: @BABL_REQUIRED_VERSION@
libbzip2 ATK @ATK_REQUIRED_VERSION@
cairo: @CAIRO_REQUIRED_VERSION@ babl @BABL_REQUIRED_VERSION@
Fontconfig: @FONTCONFIG_REQUIRED_VERSION@ cairo @CAIRO_REQUIRED_VERSION@
freetype2: @FREETYPE2_REQUIRED_VERSION@ Fontconfig @FONTCONFIG_REQUIRED_VERSION@
GDK-PixBuf: @GDK_PIXBUF_REQUIRED_VERSION@ freetype2 @FREETYPE2_REQUIRED_VERSION@
GEGL: @GEGL_REQUIRED_VERSION@ GDK-PixBuf @GDK_PIXBUF_REQUIRED_VERSION@
GLib: @GLIB_REQUIRED_VERSION@ GEGL @GEGL_REQUIRED_VERSION@
GTK+: @GTK_REQUIRED_VERSION@ GLib @GLIB_REQUIRED_VERSION@
HarfBuzz: @HARFBUZZ_REQUIRED_VERSION@ GTK+ @GTK_REQUIRED_VERSION@
HarfBuzz @HARFBUZZ_REQUIRED_VERSION@
libbzip2 libbzip2
libjpeg libjpeg
libpng: @LIBPNG_REQUIRED_VERSION@ libpng @LIBPNG_REQUIRED_VERSION@
liblzma: @LIBLZMA_REQUIRED_VERSION@ liblzma @LIBLZMA_REQUIRED_VERSION@
Little CMS: @LCMS_REQUIRED_VERSION@ libmypaint @LIBMYPAINT_REQUIRED_VERSION@
pangocairo: @PANGOCAIRO_REQUIRED_VERSION@ libtiff
Little CMS @LCMS_REQUIRED_VERSION@
pangocairo @PANGOCAIRO_REQUIRED_VERSION@
zlib zlib
17. Summary of optional packages: 18. Summary of optional packages:
Package Name Version Feature Package Name Version Feature
@@ -152,12 +160,17 @@ header files installed.
cairo-pdf @CAIRO_PDF_REQUIRED_VERSION@ PDF export cairo-pdf @CAIRO_PDF_REQUIRED_VERSION@ PDF export
python 2 @PYTHON2_REQUIRED_VERSION@ Python plug-ins python 2 @PYTHON2_REQUIRED_VERSION@ Python plug-ins
librsvg @RSVG_REQUIRED_VERSION@ SVG librsvg @RSVG_REQUIRED_VERSION@ SVG
libtiff - TIFF
libwmf @WMF_REQUIRED_VERSION@ WMF libwmf @WMF_REQUIRED_VERSION@ WMF
libXcursor - X11 Mouse Cursor libXcursor - X11 Mouse Cursor
libxpm - XPM libxpm - XPM
libmypaint @LIBMYPAINT_REQUIRED_VERSION@ MyPaint brushes ExcHndl - Crash logs on Windows with Dr. MinGW
libwebp @WEBP_REQUIRED_VERSION@ WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
19. Summary of optional runtime dependencies:
darktable >= 1.7, with lua support enabled for raw loading
xdg-email for sending emails
sendmail for sending emails if --with-sendmail enabled
Please make sure you don't have any old GTK+-2.x, jpeg, etc. libraries Please make sure you don't have any old GTK+-2.x, jpeg, etc. libraries
lying around on your system, otherwise configure may fail to find the lying around on your system, otherwise configure may fail to find the
@@ -171,9 +184,9 @@ compilation and installation output is not shown.
% tar xvfz gimp-@GIMP_VERSION@.tar.gz # unpack the sources % tar xvfz gimp-@GIMP_VERSION@.tar.gz # unpack the sources
% cd gimp-@GIMP_VERSION@ # change to the toplevel directory % cd gimp-@GIMP_VERSION@ # change to the toplevel directory
% ./configure # run the `configure' script % ./configure # run the `configure' script
% make # build GIMP % make # build GIMP
% make install # install GIMP % make install # install GIMP
The `configure' script examines your system, and adapts GIMP to run on The `configure' script examines your system, and adapts GIMP to run on
@@ -183,6 +196,9 @@ options can be listed using the command `./configure --help'. There
are several special options the GIMP `configure' script recognizes. are several special options the GIMP `configure' script recognizes.
These are: These are:
--enable-vector-icons. This option installs vector icons instead of
raster icons.
--enable-shared and --disable-shared. This option affects whether --enable-shared and --disable-shared. This option affects whether
shared libraries will be built or not. Shared libraries provide shared libraries will be built or not. Shared libraries provide
for much smaller executables. The default is to enable shared for much smaller executables. The default is to enable shared
@@ -194,7 +210,7 @@ These are:
on. The default is for debugging to be disabled. NOTE: This on. The default is for debugging to be disabled. NOTE: This
option is intended primarily as a convenience for developers. option is intended primarily as a convenience for developers.
--enable-profile and --disable-profile. This options causes the build --enable-profile and --disable-profile. This option causes the build
process to compile with execution profiling enabled. The default is process to compile with execution profiling enabled. The default is
for profiling to be disabled. NOTE: This option is intended primarily for profiling to be disabled. NOTE: This option is intended primarily
as a convenience for developers. as a convenience for developers.
@@ -286,9 +302,10 @@ These are:
--disable-mp. This option allows you to disable support for multiple --disable-mp. This option allows you to disable support for multiple
processors. It is enabled by default. processors. It is enabled by default.
--with-sendmail=[PATH]. This option is used to tell GIMP where to find --with-sendmail[=PATH]. This option is used to tell GIMP to send email
the sendmail command. Normally this options don't have to be used through sendmail instead of xdg-email. You can optionally indicate
because configure tries to find it in the usual places. where to find the sendmail command. Otherwise sendmail will simply
be searched in your $PATH at runtime.
--with-desktop-dir=[PATH]. This option specifies where to install --with-desktop-dir=[PATH]. This option specifies where to install
desktop files. These files are used by desktop environments that desktop files. These files are used by desktop environments that

View File

@@ -5,7 +5,6 @@ ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
SUBDIRS = \ SUBDIRS = \
m4macros \ m4macros \
cursors \ cursors \
icons \
themes \ themes \
po \ po \
po-libgimp \ po-libgimp \
@@ -18,6 +17,7 @@ SUBDIRS = \
menus \ menus \
libgimpbase \ libgimpbase \
tools \ tools \
icons \
libgimpcolor \ libgimpcolor \
libgimpmath \ libgimpmath \
libgimpconfig \ libgimpconfig \
@@ -65,6 +65,7 @@ EXTRA_DIST = \
NEWS.pre-2-2 \ NEWS.pre-2-2 \
NEWS.pre-2-4 \ NEWS.pre-2-4 \
NEWS.pre-2-6 \ NEWS.pre-2-6 \
NEWS.pre-2-8 \
README \ README \
README.i18n \ README.i18n \
authors.dtd \ authors.dtd \

1082
NEWS

File diff suppressed because it is too large Load Diff

642
NEWS.pre-2-8 Normal file
View File

@@ -0,0 +1,642 @@
------------------------------
GNU Image Manipulation Program
Development Branch
------------------------------
This used to be the development branch that lead to GIMP 2.8.
Changes in GIMP 2.8.0
=====================
Core:
- Add our own GimpOperationBrightnessContrast because GEGL one is different
Plug-ins:
- Fix some GFig rendering issues
Source and build system:
- Depend on Babl 0.1.10, GEGL 0.2.0 and some other new library versions
General:
- Bug fixes
- Translation updates
Changes in GIMP 2.7.5
=====================
UI:
- Minor application menu fixes on the Mac
- Make the toolbox arbitrarily resizable again
- Add axis labels to the dynamics curves to make them more obvious
- Fix dockable showing to do the right thing in both MWM and SWM
- Fix some glitches in the tool preset UI, like proper sensitivity
Core:
- Restore autoshrink functionality in the rectangle tools
- Allow smudge to work with dynamic brushes
- Make sure tool presets and tool options are consistent after loading
- Add automatic tags for the folders a file lives in
- Make the default Quick Mask color configurable
- Fix Color Balance so the "range" setting actually makes a difference
Plug-ins:
- Proper toplevel item sorting in the help browser
- Use libraries instead of launching programs in file-compressor
- Use the Ghostscript library instead of launching ghostscript
- Allow to switch off antialiasing when importing from PDF
- Embed the page setup in the main print dialog
- Port Gfig to cairo
Libgimp:
- Add PDB API to modify a lot of paint and ink options
Data:
- Add a new set of default brushes and tool presets from Ramon Miranda
Developer documentation:
- Update everything including app/ so all functions appear again
Source and build system:
- Remove the unmaintained makefile.msc build system
- Explicitly link plug-ins to -lm when needed
- Also create .xz tarballs
General:
- Lots of bug fixes
- Tons and tons of translation updates
Changes in GIMP 2.7.4
=====================
UI:
- Add a close button to image tabs in single-window mode
- Improve the transform tools' undo strings to be more descriptive
- Render the layer's "eye" icon in inconsistent state if the layer is
visible, but one of its parents isn't
- Add proper stacking for canvas items, so things don't hide each other
- Make sure single-window-mode and multi-window-mode are always saved
consistently in sessionrc
Core:
- Fix "render_image_tile_fault: assertion `tile[4] != NULL' failed"
warnings that occurred for some image sizes
- Fix attachment of the floating selection when the gegl projection
is enabled
- Replace heal algorithm with a new one by Jean-Yves Couleaud that
works much better
- Make resource sub-folders show up in UI as tags, allowing users
to easily locate resource collections they may have installed
- Fix graphics tablet canvas interaction by moving from
gdk_pointer_grab() to gtk_grab_add() for most grabs
- Stop using motion hints, they are a concept from the dark ages
Libgimp:
- Add a basic paint dynamics PDB interface
Plug-ins:
- Make writing color space information to BMP files optional
- PSD loader now reads and imports working paths
Script-Fu:
- Lots and lots of undeprecations
Developer documentation:
- Add devel-docs/gegl-porting-plan.txt
Source and build system:
- Make git-version.h generation work in shallow git clones
- Modernize use of autotools a bit, maintainer-mode and pdbgen
are now enabled by default
General:
- Make gimptool install scripts in the correct system-wide directory
- Fix lots and lots of stuff found by static code analysis
Changes in GIMP 2.7.3
=====================
UI:
- Use GimpSpinScales instead of scale entries in all dockable widgets
- Allow the spin scale to control a range larger than its scale's range
- Implement RTL mode in GimpSpinScale
- Add lots of tooltips to tool options
- Allow to drop more things to the empty image window, and simply
create new images from them
- Cage tool: allow to add handle to the cage when clicking on an edge
- Cage tool: allow to remove selected handles from the cage by hitting delete
- Remember column widths in multi-column dock windows
- Support starting GIMP in single-window mode
- When the brush is shared among paint tools, also share all
brush-modifying paint options
- Use ALT+number and ALT+Tab shortcuts to navigate between images
in both single- and multi-window mode
- Make 'Export to' always activatable and fall back to 'Export...' if
no export target has been set yet
- In single-window mode, add new dockable dialogs to the image window
instead of in a new window
- When switching on single-window mode, put docks in the image window
depending on what side of the window they originally had
- When switching off single-window mode, distribute dock windows
better
- Add a canvas item for the transform grid, fixing a major speed
regression, and add the same guides options as in the rectangle tools
- Don't unmaximize the single-window mode image window when closing
images
- Resurrect the "You can drop dockable dialogs here" help string
below the toolbox
- Make pick-and-move with the Move Tool work for layers in a layer
group
Core:
- Add GimpMotionBuffer which abstracts away stroke smoothing behind
a simple API and takes it out of GimpDisplayShell
- Add a GimpIdTable utility class
- Add a GimpDockContainer interface
- Add a GimpSessionManaged interface
- Add GimpCanvasRectangleGuides which makes the rectangle tool's
guides draw properly
Libgimp:
- Make libgimp depend on GdkPixbuf
- Add API to create layers from cairo surfaces
- Make it impossible to include individual files from any GIMP
library. This was always forbidden and designed so it most
probably breaks, but now it reliably breaks using #error
- Deprecate the "set_sensitive" logic and use g_object_bind_property()
Plug-ins:
- Use poppler's cairo API to load PDFs, the pixbuf API is removed
- Port screenshot from GdkPixbuf to cairo
- Fix the annoying parser build warnings in imagemap
- Add a check-for-deprecated-procedures-in-script-fu make target
- Update libpng code to not use deprecated API (file-mng and file-png)
- Add an Item class to pygimp
- Correct/update some labels and defaults in the JPEG plug-in's save dialog UI
- Fix "Bug 596410 - gimp-image-get-filename returns NULL for imported files"
Developer documentation:
- Many updates
Source and build system:
- Make cairo a global dependency, starting at libgimpcolor
- Require poppler >= 0.12.4
- Remove gimp-remote for good, it has been disabled for years
General:
- Some more undeprecations now that we use GTK+ 2.24
- Fix lots of warnings that are new in -Wall in GCC 4.6
- Lots of bug fixes and cleanup
- Lots of translation updates
Changes in GIMP 2.7.2
=====================
UI:
- A lot of undeprecations due to GTK+ 2.22 and 2.24
- Lots and lots of cairo porting, calls to gdk_draw_* are gone
- Merge the cage transform tool from GSoC
- Remove the old bitmap cursors completely and always use RGBA cursors
also for compat cursors for old X servers
- Add new GimpCanvasItem infrastructure with subclasses for everything
that needs to be drawn on the canvas and port all tools to canvas items,
this is a huge change that touches all tools and almost all display
code, and which finally gets rid of XOR drawing altogether
- Switch from purely idle-rendering the display to something that ensures
a minimum framerate, so we don't fail to update under heavy load
- Make the text tool handle RTL mode better
- Change GimpColorMapEditor to use the newly added proxy GimpPalette
- Replace the brush scale control in tool options by a brush size
one that works in pixels, and does the right thing when the brush
changes
- Add new widget GimpSpinScale which is a scale with number entry,
and use it in all tool options
- Make the brush, pattern etc. selectors in tool options more
compact and allow to directly jump to the editor dialogs
- Make handle sizes in tools consistent
- Add an on-canvas progress and use it for tool progress instead of
the statusbar
- Add a new GimpToolPalette class with lots of code that was
in GimpToolBox
- Allow to properly drop into and after a layer group
- Refactor and clean up the dynamics editor widget, and add colors
for the curves
- Add support for F2 to rename items in lists
- Clean up GimpDeviceStatus internally and visually
- Allow to set GimpToolPreset's icon using the new GimpIconPicker widget
- Make the text tool's style overlay show default values from the
text object if there is no style active at the cursor position/selection
- Show the the text size's unit in the text style overlay
- Make tool dialogs transient to the image window again
- Consistently add a "gimp-" prefix to all window roles
- Make the preset buttons in tool options work on the global tool
presets instead of the removed per-tool preset lists
- Add GimpControllerMouse, which allows to bind extra mouse buttons to
arbitrary actions
Core:
- Add uniform API to turn any GimpItem's outline into a selection
- Add support for color tags in text layers
- Remove the selection_control() stuff from GimpImage and with it
maybe last piece of UI code still not properly separated
- Add more validation code for XCF loading
- Add accessors to GimpPalette and use them globally
- Keep a proxy GimpPalette around for the image's colormap
- Don't scale SVGs when pasting or importing them
- A lot of changes to the input device handling code, partly
merged from the gtk3-port branch, add GimpDeviceManager class
- Add smoothing of paint strokes
- Fix display filters to work on a cairo surface
- Fix and enhance GimpImage's URI/filename handling API
- Unset "removed" flag on items when they get added back to
the image from the undo stack
- Change item creation to properly use GObject properties and
remove item_configure() and drawable_configure()
- Refactor tool event handling and move lots of stuff into
utility functions
- Clean up GimpViewRenderer API
- Implement transforms on group layers
- Clean up the transform tool a lot, and refactor away old junk
- Tool and tool event cleanup: enforce tool activate/halt invariants,
consistently shutdown all tools in control(HALT), and many other
tool fixes
- Remove GimpToolPresets object, this functionality got merged into
the new GimpToolPreset system
- Rename GimpFilteredContainer to GimpTaggedContainer and add a new
GimpFilteredContainer parent class which is a generic filter
- Remove the concept of an "offset" from TileManager and instead
pass around the offsets explicitly when needed, like when
transforming
- Move GimpBezier desc from vectors/ to core/ and add API to create
one from sorted BoundSegs
- Change GimpBrush boundary API to return a GimpBezierDesc
- Add GimpBrushCache object and use it to cache a brush's transformed
pixels and its outline, remove the caching code from GimpBrushCore
- Add GimpBezierDesc based API to GimpScanConvert and use it
GEGL:
- Add operations and gegl infrastructure for the cage tool
- Disable View -> Use GEGL as we will not have time to finish the
GEGL projection code for GIMP 2.8
Libgimp:
- Introduce an "item" type in the PDB and libgimp and deprecate
lots of old API in favor of item API
- Add procedures to create, traverse and manipulate layer trees
- Add more state to the context API, and deprecate functions with
too many parameters in favor of simpler ones that use context states,
particularly the entire transform and selection API
- Move GimpUnitStore and GimpUnitComboBox to libgimpwidgets, and
use them in GimpSizeEntry, deprecate GimpUnitMenu.
- Deprecate gimp_min_colors() and gimp_install_cmap()
- Add API that enables GimpRuler to track motion events by itself
- Add new selection API and deprecate all old selection functions
- Move around and rename all parasite functions, deprecate the old ones
- Add a generated PDB file in the "gimp" namespace and get rid
of "gimpmisc"
- Add unit conversion functions to libgimpbase
- Add function to reset a plug-in's context to default values
Plug-ins:
- Make script-fu server IPv6 aware
- Follow libgimp deprecations in plug-ins and scripts
- Add PDF export plugin
- Lots of cairo porting here too
- UTF-8 fixes in script-fu
- Set the progress to 1.0 when done
- Merge a lot of upstream fixes into script-fu's Tinyscheme
- Add "New Layer" option to MapObject
- Support loading of 16-bit raw PPM files
- Add web-page, a new plug-in which renders images of web pages
- Fix some more plug-ins to not warn if applied on an empty region
Data:
- Remove "Untitled" from palette names entries
Developer documentation:
- Move libgimp documentation from templates to inline comments
- Generate standard deprecated sections
Source and build system:
- Add more code documentation
- Add more unit tests and refactor existing ones to use global
test utility functions
- Add a manifest to executables (app and plug-ins, Win32)
- Depend on GLib 2.28, GTK+ 2.24, Cairo 1.10
- Make WebKit available to all plug-ins, not just the help browser
- Run UI tests on Xvfb if available
- Check for GdkPixbuf separately because it's now a separate library
- Allow tests to use uninstalled plug-ins from the build dir
- Remove, comment out, or build for GIMP_UNSTABLE some stuff that
should not be in a stable release
General:
- Improve safety on Win32 by calling SetDllDirectory() and
SetProcessDEPPolicy()
- Switch from GtkObject::destroy() to GObject::dispose() all over
the place
- Various changes that make maintaining the gtk3-port branch easier,
such as s/GtkAnchorType/GimpHandleAnchor/ and s/GtkObject/GtkAdjustment/
- Don't use gtk_container_add() for adding to GtkBoxes
- Inherit from GtkBox directly, not from GtkHBox/GtkVBox
- Add namespace to the ink blob types and functions
- Remove all useless calls to gtk_range_set_update_policy()
- Use GObject::constructed() instead of GObject::constructor() all
over the place
- Move more members to private and add accessors for them
- Stop using GdkNativeWindow, use guint32 instead
- Plug memory leaks
- Remove ps-menurc, we are not a PS clone
- Use the new g_[s]list_free_full() instead of foreach() and free()
- Don't use newly deprecated GTK+ API
- Use the new GDK_KEY_foo key names
- Lots of bug fixes and cleanup
- Lots of translation updates
Changes in GIMP 2.7.1
=====================
UI:
- Add "lock content" button to the layers, channels and paths dialogs,
make the lock buttons more compact
- Refuse to edit locked items
- Add support for layer groups
- Improve internals and GUI of the save/export functionality
- Move the shortcut dialog's "clear" button into the entry
- Clean up UI code by introducing GimpDockWindow and GimpImageWindow
classes
- Support multi-column dock windows
- Get rid of docking bars, use highlights in existing widget hierarchy instead
- Remove toolbox-window-hint gimprc setting and use dock-window-hint
for both toolbox and docks instead
- Move GimpDock::default-height style property to GimpDockWindow
- Polish save+export path-part precedence rules
- Merge the GSoC 2009 Advanced GUI for Brush Dynamics project
- Default to non-fixed-aspect in Canvas Size dialog
- Add a still incomplete and Single-window mode
- Have an Export button, not Save, in export dialogs
- Improve Free Select Tool handle highlighting
- Support changing user interface language from preferences
- Update ps-menurc with PS CS4 keyboard shortcuts
- Reduce spacing around canvas and use it for the canvas itself
- Put name of active dockables in dock window titles
- Don't have Toolbox in list of Recently Closed Docks, handle that
directly in the Windows menu
- Support selecting and tagging multiple objects in resource lists
- Improve on-canvas text editing and text attribute setting
- Add GimpContainerTreeStore and use it in all GtkTreeStore based views
- Add a new default "automatic" tab style that makes sure dockable tabs
always show as much detail as possible
- Remove the dockable title bar and add the menu arrow button next to the
notebook tabs
- Add an icon for the desaturate tool
- Add 'Rule of fifths' crop guide overlay
- Make Alt+Click on layers not affect active layer
Core:
- Make all GimpItems lockable so their contents can't be changed
- Make more sense when naming imported layers
- Make group layers work except for layer masks and save them in
the XCF
- Change GimpProjectable::update to GimpProjectable:invalidate
- Make sure we don't mix font backends (and crash) by explicitly
asking for FT/Fontconfig backends
- Move members of GimpObject to a private struct
- gimp_object_get_name() takes a gconstpointer now, remove casts
from all callers
- Let drawables connect to their floating selection's "update" signal
instead of letting the image do this job
- Fix brush rotation artifacts at even 90 degree rotation
- Don't leak shared tile memory on Solaris
- Add a PDB procedure to access a text layer's markup
- Remove legacy cruft from pdbgen and make sure number ranges are correct
- Move all image creation functions to a common file
- Add translation context to all undo descriptions
GEGL:
- Make sure all nodes are added to their resp. graphs
- Use GEGL for layer scaling if use-gegl is TRUE
Plug-ins:
- Updated script-fu's scheme to latest upstream fixes
- Don't store image-specific print settings globally
- Add fundamental OpenRaster (.ora) import and export support
- Add RGB565 support to the csource plug-in
Data:
- Add texture/grunge brushes made by Johannes Engelhardt
Developer documentation:
- Explain GimpContext
- Add SVG graphic with GIMP application core module dependencies
- Add a schedule for 2.8 development
Source and build system:
- Add more code documentation
- Clean up subsystem linking dependencies in app/
- Add unit testing framework in app/tests/ and some basic tests,
including basic UI tests and XCF tests
- Tentatively introduce usage of using Glade + GtkBuilder
- Depend on GLib 2.24.0 and GTK+ 2.20.0
- Add git commit hash in --verbose --version output
- Don't version control gtk-doc.m4, get it from gtkdocize
- Add GimpObject tracking code
- Plug memory leaks
- Lots of bug fixes and cleanup
- Lots of translation updates
Changes in GIMP 2.7.0
=====================
UI:
- Change the Text Tool to perform text editing on-canvas (GSoC 2008)
and add the ability to mix different text styles in the same layer
- Add support for tagging GIMP resources such as brushes and allow
filtering based on these tags (GSoC 2008)
- Separate the activities of saving an image and exporting it, there is
now a 'File->Export...' for example
- Port file plug-ins to new export API which gets rid of many
annoying export dialogs
- Add a simple parser to size entry widgets, images can be scaled
to e.g. "50%" or "2 * 37px + 10in"
- Arrange layer modes into more logical and useful groups
- Added support for rotation of brushes
- Make the Pointer dockable show information about selection position
and size
- Get rid of the Tools dockable and move toolbox configuration to
Preferences
- Allow closing the toolbox without closing the whole application
- Add status bar feedback for keyboard changes to brush parameters
- Add diagonal guides to the Crop Tool
- New docks are created at the pointer position
- Add support for printing crop marks for images
- Move 'Text along path' from tool options to text context menu
- Change default shortcuts for "Shrink Wrap" and "Fit in Window" to
Ctrl+J and Ctrl+Shift+J respectively since the previous shortcuts
are now used for the save+export feature
- Make Alt+Click on layers in Layers dockable create a selection from
the layer
- Allow to specify written language in the Text Tool
- Support custom mapping curves for input device properties like "Pressure"
- New desktop launcher icon
- Add 'Windows→Hide docks' menu item that does what 'Tab' does and also displays
its state. Make the state persistent across sessions, too.
- Make dock window title separators translatable
Plug-ins:
- Map the 'Linear Dodge' layer mode in PSD files to the 'Addition'
layer mode in GIMP
- Add JPEG2000 load plug-in
- Add X11 mouse cursor plug-in
- Add support for loading 16bit (RGB565) raw data
- Add palette exporter for CSS, PHP, Python, txt and Java, accessed
through palette context menu
- Add plug-in API for getting image URI, for manipulating size of
text layers, for getting and setting text layer hint, and for
unified export dialog appearance
- Add an 'As Animation' toggle to the GIF export options
- Add 'active_vectors' getsetter to Python 'gimp.Image'
Data:
- Add large variants of round brushes and remove duplicate and
useless brushes
- Add "FG to BG (Hardedge)" gradient
GEGL:
- Port the projection code, the code that composes a single image
from a stack of layers, to GEGL
- Port layer modes to GEGL
- Port the floating selection code to GEGL
- Refactor the layer stack code to prepare for layer groups later
- Prepare better and more intuitive handling of the floating
selection
- Add File->Debug->Show Image Graph that show the GEGL graph of an
image
- Allow to benchmark projection performance with
File->Debug->Benchmark Projection
- When using GEGL for the projection, use CIELCH instead of HSV/HSL
for color based layer modes
Core:
- Make painting strokes Catmull-Rom Spline interpolated
- Add support for arbitrary affine transforms of brushes
- Add support for brush dynamics to depend on tilt
- Add aspect ratio to brush dynamics
- Add infrastructure to soon support vector layers (GSoC 2006)
- Rearrange legacy layer mode code to increase maintainability
- Drop support for the obsolete GnomeVFS file-uri backend
- Allow to dump keyboard shortcuts with File->Debug->Dump Keyboard
Shortcuts
- Prepare data structures for layer groups
- Remove gimprc setting "menu-mnemonics",
"GtkSettings:gtk-enable-mnemonics" shall be used instead
- Remove "transient-docks" gimprc setting, the 'Utility window' hint
and a sane window manager does a better job
- Remove "web-browser" gimprc setting and use gtk_show_uri() instead
General:
- Changed license to (L)GPLv3+
- Use the automake 1.11 feature 'silent build rules' by default
- Lots of bug fixes and cleanup

30
README
View File

@@ -1,13 +1,18 @@
------------------------------ ------------------------------
GNU Image Manipulation Program GNU Image Manipulation Program
2.8 Stable Branch 2.9 Development Branch
------------------------------ ------------------------------
GIMP 2.8 replaces earlier GIMP 2.x versions. It is advised that you This is an unstable development release, an intermediate state on the
uninstall them before installing GIMP 2.8. If you want to keep your way to the next stable release 2.10. GIMP 2.9 may or may not do what
older GIMP 2.x installation in parallel to GIMP 2.8, you have to you expect. Save your work early and often. If you want a stable
version, please use GIMP 2.8 instead.
GIMP 2.9 replaces earlier GIMP 2.x versions. It is advised that you
uninstall them before installing GIMP 2.9. If you want to keep your
older GIMP 2.x installation in parallel to GIMP 2.9, you have to
choose a separate prefix which is not in your default library search choose a separate prefix which is not in your default library search
path. Otherwise your prevoius GIMP installation will start to use the path. Otherwise your previous GIMP installation will start to use the
new libraries. You have been warned. new libraries. You have been warned.
If you think you found a bug in this version, please make sure that it If you think you found a bug in this version, please make sure that it
@@ -52,9 +57,12 @@ Links to several archives of the mailing lists are included in that page.
Gimp-user-list is a mailing list dedicated to user problems, hints and Gimp-user-list is a mailing list dedicated to user problems, hints and
tips, discussion of cool effects, etc. Gimp-developer-list is oriented tips, discussion of cool effects, etc. Gimp-developer-list is oriented
to GIMP core and plug-in developers. Most people will only want to be to GIMP core and plug-in developers. Gimp-gui-list is for discussing
subscribed to gimp-user-list. If you want to help develop GIMP, the about GIMP interface to improve user experience. Most people will only
gimp-developer mailing list is a good starting point. want to be subscribed to gimp-user-list. If you want to help develop
GIMP, the gimp-developer mailing list is a good starting point; if you
want to help with GUI design, the gimp-gui list is where you want to
subscribe.
3. IRC 3. IRC
@@ -77,12 +85,12 @@ The look of GIMP's interface can be customized like any other GTK app
by editing the ~/.gtkrc-2.0 file or by using "themes" (ready-made by editing the ~/.gtkrc-2.0 file or by using "themes" (ready-made
customizations). For downloadable themes and further details, see customizations). For downloadable themes and further details, see
http://art.gnome.org/themes/gtk2 . Additionally, GIMP reads the file http://art.gnome.org/themes/gtk2 . Additionally, GIMP reads the file
~/.config/GIMP/2.8/gtkrc so you can have settings that only apply to GIMP. ~/.config/GIMP/2.9/gtkrc so you can have settings that only apply to GIMP.
Included is a set of keybindings similar to those in Adobe Photoshop. Included is a set of keybindings similar to those in Adobe Photoshop.
You can find them in the ps-menurc file. To use them, copy this file You can find them in the ps-menurc file. To use them, copy this file
to ~/.config/GIMP/2.8/menurc. You can also manually change the keybindings to to ~/.config/GIMP/2.9/menurc. You can also manually change the keybindings to
any of your choice by editing ~/.config/GIMP/2.8/menurc. any of your choice by editing ~/.config/GIMP/2.9/menurc.
Have fun, Have fun,

View File

@@ -47,8 +47,6 @@ libapp_sources = \
about.h \ about.h \
app.c \ app.c \
app.h \ app.h \
batch.c \
batch.h \
errors.c \ errors.c \
errors.h \ errors.h \
language.c \ language.c \
@@ -61,8 +59,6 @@ libapp_sources = \
tests.h \ tests.h \
unique.c \ unique.c \
unique.h \ unique.h \
units.c \
units.h \
version.c \ version.c \
version.h \ version.h \
gimp-debug.c \ gimp-debug.c \
@@ -94,6 +90,11 @@ endif
if OS_WIN32 if OS_WIN32
win32_ldflags = -mwindows -Wl,--tsaware $(WIN32_LARGE_ADDRESS_AWARE) win32_ldflags = -mwindows -Wl,--tsaware $(WIN32_LARGE_ADDRESS_AWARE)
if HAVE_EXCHNDL
exchndl = -lexchndl
endif
else else
libm = -lm libm = -lm
endif endif
@@ -109,12 +110,15 @@ GIMPCONSOLERC = gimp-console-$(GIMP_APP_VERSION).rc.o
endif endif
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-DGIMPDIR=\""$(gimpdir)"\" \
-DGIMP_USER_VERSION=\"$(GIMP_USER_VERSION)\" \
-DG_LOG_DOMAIN=\"Gimp\" \ -DG_LOG_DOMAIN=\"Gimp\" \
-DGIMP_APP_GLUE_COMPILATION \ -DGIMP_APP_GLUE_COMPILATION \
-I$(top_srcdir) \ -I$(top_srcdir) \
$(GTK_CFLAGS) \ $(GTK_CFLAGS) \
$(PANGOCAIRO_CFLAGS) \ $(PANGOCAIRO_CFLAGS) \
$(GEGL_CFLAGS) \ $(GEGL_CFLAGS) \
$(LCMS_CFLAGS) \
$(GEXIV2_CFLAGS) \ $(GEXIV2_CFLAGS) \
-I$(includedir) \ -I$(includedir) \
-I$(builddir)/gui -I$(builddir)/gui
@@ -160,11 +164,11 @@ gimpconsoleldadd = \
$(GIO_WINDOWS_LIBS) \ $(GIO_WINDOWS_LIBS) \
$(GEGL_LIBS) \ $(GEGL_LIBS) \
$(GLIB_LIBS) \ $(GLIB_LIBS) \
$(GEXIV2_LIBS) \
$(LCMS_LIBS) \ $(LCMS_LIBS) \
$(GEXIV2_LIBS) \
$(Z_LIBS) \ $(Z_LIBS) \
$(JSON_C_LIBS) \ $(JSON_C_LIBS) \
$(LIBMYPAINTGEGL_LIBS) \ $(LIBMYPAINT_LIBS) \
$(INTLLIBS) \ $(INTLLIBS) \
$(RT_LIBS) \ $(RT_LIBS) \
$(libm) $(libm)
@@ -188,6 +192,7 @@ gimp_@GIMP_APP_VERSION@_LDADD = \
$(GTK_MAC_INTEGRATION_LIBS) \ $(GTK_MAC_INTEGRATION_LIBS) \
$(DBUS_GLIB_LIBS) \ $(DBUS_GLIB_LIBS) \
$(gimpconsoleldadd) \ $(gimpconsoleldadd) \
$(exchndl) \
$(GIMPRC) $(GIMPRC)

View File

@@ -30,6 +30,11 @@
_("Copyright © 1995-%s\n" \ _("Copyright © 1995-%s\n" \
"Spencer Kimball, Peter Mattis and the GIMP Development Team") "Spencer Kimball, Peter Mattis and the GIMP Development Team")
/* TRANSLATORS: do not end the license URL with a dot, because it would
* be in the link. Because of technical limitations, make sure the URL
* ends with a space, a newline or is end of text.
* Cf. bug 762282.
*/
#define GIMP_LICENSE \ #define GIMP_LICENSE \
_("GIMP is free software: you can redistribute it and/or modify it " \ _("GIMP is free software: you can redistribute it and/or modify it " \
"under the terms of the GNU General Public License as published by " \ "under the terms of the GNU General Public License as published by " \
@@ -42,7 +47,7 @@
"GNU General Public License for more details." \ "GNU General Public License for more details." \
"\n\n" \ "\n\n" \
"You should have received a copy of the GNU General Public License " \ "You should have received a copy of the GNU General Public License " \
"along with GIMP. If not, see http://www.gnu.org/licenses/.") "along with GIMP. If not, see: http://www.gnu.org/licenses/")
#endif /* __ABOUT_H__ */ #endif /* __ABOUT_H__ */

View File

@@ -17,6 +17,9 @@ libappactions_a_SOURCES = \
actions.c \ actions.c \
actions.h \ actions.h \
\ \
gimpgeglprocedure.c \
gimpgeglprocedure.h \
\
brush-editor-actions.c \ brush-editor-actions.c \
brush-editor-actions.h \ brush-editor-actions.h \
brushes-actions.c \ brushes-actions.c \
@@ -113,10 +116,16 @@ libappactions_a_SOURCES = \
images-actions.h \ images-actions.h \
images-commands.c \ images-commands.c \
images-commands.h \ images-commands.h \
items-commands.c \
items-commands.h \
items-actions.c \
items-actions.h \
layers-actions.c \ layers-actions.c \
layers-actions.h \ layers-actions.h \
layers-commands.c \ layers-commands.c \
layers-commands.h \ layers-commands.h \
mypaint-brushes-actions.c \
mypaint-brushes-actions.h \
palette-editor-actions.c \ palette-editor-actions.c \
palette-editor-actions.h \ palette-editor-actions.h \
palette-editor-commands.c \ palette-editor-commands.c \
@@ -131,6 +140,8 @@ libappactions_a_SOURCES = \
plug-in-actions.h \ plug-in-actions.h \
plug-in-commands.c \ plug-in-commands.c \
plug-in-commands.h \ plug-in-commands.h \
procedure-commands.c \
procedure-commands.h \
quick-mask-actions.c \ quick-mask-actions.c \
quick-mask-actions.h \ quick-mask-actions.h \
quick-mask-commands.c \ quick-mask-commands.c \
@@ -161,8 +172,12 @@ libappactions_a_SOURCES = \
tool-options-commands.h \ tool-options-commands.h \
tool-presets-actions.c \ tool-presets-actions.c \
tool-presets-actions.h \ tool-presets-actions.h \
tool-presets-commands.c \
tool-presets-commands.h \
tool-preset-editor-actions.c \ tool-preset-editor-actions.c \
tool-preset-editor-actions.h \ tool-preset-editor-actions.h \
tool-preset-editor-commands.c \
tool-preset-editor-commands.h \
tools-actions.c \ tools-actions.c \
tools-actions.h \ tools-actions.h \
tools-commands.c \ tools-commands.c \

View File

@@ -76,6 +76,7 @@
#include "image-actions.h" #include "image-actions.h"
#include "images-actions.h" #include "images-actions.h"
#include "layers-actions.h" #include "layers-actions.h"
#include "mypaint-brushes-actions.h"
#include "palette-editor-actions.h" #include "palette-editor-actions.h"
#include "palettes-actions.h" #include "palettes-actions.h"
#include "patterns-actions.h" #include "patterns-actions.h"
@@ -163,7 +164,7 @@ static const GimpActionFactoryEntry action_groups[] =
{ "filters", N_("Filters"), GIMP_STOCK_GEGL, { "filters", N_("Filters"), GIMP_STOCK_GEGL,
filters_actions_setup, filters_actions_setup,
filters_actions_update }, filters_actions_update },
{ "fonts", N_("Fonts"), GIMP_STOCK_FONT, { "fonts", N_("Fonts"), "gtk-select-font",
fonts_actions_setup, fonts_actions_setup,
fonts_actions_update }, fonts_actions_update },
{ "gradient-editor", N_("Gradient Editor"), GIMP_STOCK_GRADIENT, { "gradient-editor", N_("Gradient Editor"), GIMP_STOCK_GRADIENT,
@@ -190,6 +191,9 @@ static const GimpActionFactoryEntry action_groups[] =
{ "layers", N_("Layers"), GIMP_STOCK_LAYER, { "layers", N_("Layers"), GIMP_STOCK_LAYER,
layers_actions_setup, layers_actions_setup,
layers_actions_update }, layers_actions_update },
{ "mypaint-brushes", N_("MyPaint Brushes"), GIMP_STOCK_MYPAINT_BRUSH,
mypaint_brushes_actions_setup,
mypaint_brushes_actions_update },
{ "palette-editor", N_("Palette Editor"), GIMP_STOCK_PALETTE, { "palette-editor", N_("Palette Editor"), GIMP_STOCK_PALETTE,
palette_editor_actions_setup, palette_editor_actions_setup,
palette_editor_actions_update }, palette_editor_actions_update },
@@ -531,7 +535,7 @@ action_select_value (GimpActionSelectType select_type,
value = max - (min - value); value = max - (min - value);
while (value > max) while (value > max)
value = min + (max - value); value = min + (value - max);
} }
else else
{ {

View File

@@ -67,7 +67,7 @@ static const GimpActionEntry brushes_actions[] =
G_CALLBACK (data_copy_location_cmd_callback), G_CALLBACK (data_copy_location_cmd_callback),
GIMP_HELP_BRUSH_COPY_LOCATION }, GIMP_HELP_BRUSH_COPY_LOCATION },
{ "brushes-show-in-file-manager", "gtk-directory", { "brushes-show-in-file-manager", GIMP_STOCK_FILE_MANAGER,
NC_("brushes-action", "Show in _File Manager"), NULL, NC_("brushes-action", "Show in _File Manager"), NULL,
NC_("brushes-action", "Show brush file location in the file manager"), NC_("brushes-action", "Show brush file location in the file manager"),
G_CALLBACK (data_show_in_file_manager_cmd_callback), G_CALLBACK (data_show_in_file_manager_cmd_callback),

View File

@@ -54,11 +54,17 @@ static const GimpActionEntry buffers_actions[] =
G_CALLBACK (buffers_paste_into_cmd_callback), G_CALLBACK (buffers_paste_into_cmd_callback),
GIMP_HELP_BUFFER_PASTE_INTO }, GIMP_HELP_BUFFER_PASTE_INTO },
{ "buffers-paste-as-new", GIMP_STOCK_PASTE_AS_NEW, { "buffers-paste-as-new-layer", GIMP_STOCK_PASTE_AS_NEW,
NC_("buffers-action", "Paste Buffer as New _Layer"), NULL,
NC_("buffers-action", "Paste the selected buffer as a new layer"),
G_CALLBACK (buffers_paste_as_new_layer_cmd_callback),
GIMP_HELP_BUFFER_PASTE_AS_NEW_LAYER },
{ "buffers-paste-as-new-image", GIMP_STOCK_PASTE_AS_NEW,
NC_("buffers-action", "Paste Buffer as _New"), NULL, NC_("buffers-action", "Paste Buffer as _New"), NULL,
NC_("buffers-action", "Paste the selected buffer as a new image"), NC_("buffers-action", "Paste the selected buffer as a new image"),
G_CALLBACK (buffers_paste_as_new_cmd_callback), G_CALLBACK (buffers_paste_as_new_image_cmd_callback),
GIMP_HELP_BUFFER_PASTE_AS_NEW }, GIMP_HELP_BUFFER_PASTE_AS_NEW_IMAGE },
{ "buffers-delete", "edit-delete", { "buffers-delete", "edit-delete",
NC_("buffers-action", "_Delete Buffer"), NULL, NC_("buffers-action", "_Delete Buffer"), NULL,
@@ -89,10 +95,11 @@ buffers_actions_update (GimpActionGroup *group,
#define SET_SENSITIVE(action,condition) \ #define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0) gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
SET_SENSITIVE ("buffers-paste", buffer); SET_SENSITIVE ("buffers-paste", buffer);
SET_SENSITIVE ("buffers-paste-into", buffer); SET_SENSITIVE ("buffers-paste-into", buffer);
SET_SENSITIVE ("buffers-paste-as-new", buffer); SET_SENSITIVE ("buffers-paste-as-new-layer", buffer);
SET_SENSITIVE ("buffers-delete", buffer); SET_SENSITIVE ("buffers-paste-as-new-image", buffer);
SET_SENSITIVE ("buffers-delete", buffer);
#undef SET_SENSITIVE #undef SET_SENSITIVE
} }

View File

@@ -47,7 +47,7 @@
/* local function prototypes */ /* local function prototypes */
static void buffers_paste (GimpBufferView *view, static void buffers_paste (GimpBufferView *view,
gboolean paste_into); GimpPasteType paste_type);
/* public functionss */ /* public functionss */
@@ -56,19 +56,26 @@ void
buffers_paste_cmd_callback (GtkAction *action, buffers_paste_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
buffers_paste (GIMP_BUFFER_VIEW (data), FALSE); buffers_paste (GIMP_BUFFER_VIEW (data), GIMP_PASTE_TYPE_FLOATING);
} }
void void
buffers_paste_into_cmd_callback (GtkAction *action, buffers_paste_into_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
buffers_paste (GIMP_BUFFER_VIEW (data), TRUE); buffers_paste (GIMP_BUFFER_VIEW (data), GIMP_PASTE_TYPE_FLOATING_INTO);
} }
void void
buffers_paste_as_new_cmd_callback (GtkAction *action, buffers_paste_as_new_layer_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{
buffers_paste (GIMP_BUFFER_VIEW (data), GIMP_PASTE_TYPE_NEW_LAYER);
}
void
buffers_paste_as_new_image_cmd_callback (GtkAction *action,
gpointer data)
{ {
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data); GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container; GimpContainer *container;
@@ -108,7 +115,7 @@ buffers_delete_cmd_callback (GtkAction *action,
static void static void
buffers_paste (GimpBufferView *view, buffers_paste (GimpBufferView *view,
gboolean paste_into) GimpPasteType paste_type)
{ {
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (view); GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (view);
GimpContainer *container; GimpContainer *container;
@@ -146,7 +153,8 @@ buffers_paste (GimpBufferView *view,
if (image) if (image)
{ {
gimp_edit_paste (image, gimp_image_get_active_drawable (image), gimp_edit_paste (image, gimp_image_get_active_drawable (image),
buffer, paste_into, x, y, width, height); GIMP_OBJECT (buffer), paste_type,
x, y, width, height);
gimp_image_flush (image); gimp_image_flush (image);
} }

View File

@@ -19,14 +19,16 @@
#define __BUFFERS_COMMANDS_H__ #define __BUFFERS_COMMANDS_H__
void buffers_paste_cmd_callback (GtkAction *action, void buffers_paste_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void buffers_paste_into_cmd_callback (GtkAction *action, void buffers_paste_into_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void buffers_paste_as_new_cmd_callback (GtkAction *action, void buffers_paste_as_new_layer_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void buffers_delete_cmd_callback (GtkAction *action, void buffers_paste_as_new_image_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void buffers_delete_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __BUFFERS_COMMANDS_H__ */ #endif /* __BUFFERS_COMMANDS_H__ */

View File

@@ -34,6 +34,7 @@
#include "actions.h" #include "actions.h"
#include "channels-actions.h" #include "channels-actions.h"
#include "channels-commands.h" #include "channels-commands.h"
#include "items-actions.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@@ -44,6 +45,10 @@ static const GimpActionEntry channels_actions[] =
NC_("channels-action", "Channels Menu"), NULL, NULL, NULL, NC_("channels-action", "Channels Menu"), NULL, NULL, NULL,
GIMP_HELP_CHANNEL_DIALOG }, GIMP_HELP_CHANNEL_DIALOG },
{ "channels-color-tag-menu", GIMP_STOCK_CLOSE /* abused */,
NC_("channels-action", "Color Tag"), NULL, NULL, NULL,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-edit-attributes", "gtk-edit", { "channels-edit-attributes", "gtk-edit",
NC_("channels-action", "_Edit Channel Attributes..."), NULL, NC_("channels-action", "_Edit Channel Attributes..."), NULL,
NC_("channels-action", "Edit the channel's name, color and opacity"), NC_("channels-action", "Edit the channel's name, color and opacity"),
@@ -102,6 +107,90 @@ static const GimpActionEntry channels_actions[] =
GIMP_HELP_CHANNEL_LOWER_TO_BOTTOM } GIMP_HELP_CHANNEL_LOWER_TO_BOTTOM }
}; };
static const GimpToggleActionEntry channels_toggle_actions[] =
{
{ "channels-visible", GIMP_STOCK_VISIBLE,
NC_("channels-action", "_Visible"), NULL, NULL,
G_CALLBACK (channels_visible_cmd_callback),
FALSE,
GIMP_HELP_CHANNEL_VISIBLE },
{ "channels-linked", GIMP_STOCK_LINKED,
NC_("channels-action", "_Linked"), NULL, NULL,
G_CALLBACK (channels_linked_cmd_callback),
FALSE,
GIMP_HELP_CHANNEL_LINKED },
{ "channels-lock-content", NULL /* GIMP_STOCK_LOCK */,
NC_("channels-action", "L_ock pixels"), NULL, NULL,
G_CALLBACK (channels_lock_content_cmd_callback),
FALSE,
GIMP_HELP_CHANNEL_LOCK_PIXELS },
{ "channels-lock-position", GIMP_STOCK_TOOL_MOVE,
NC_("channels-action", "L_ock position"), NULL, NULL,
G_CALLBACK (channels_lock_position_cmd_callback),
FALSE,
GIMP_HELP_CHANNEL_LOCK_POSITION }
};
static const GimpEnumActionEntry channels_color_tag_actions[] =
{
{ "channels-color-tag-none", GIMP_STOCK_CLOSE /* abused */,
NC_("channels-action", "None"), NULL,
NC_("channels-action", "Clear color tag"),
GIMP_COLOR_TAG_NONE, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-blue", NULL,
NC_("channels-action", "Blue"), NULL,
NC_("channels-action", "Set color tag to blue"),
GIMP_COLOR_TAG_BLUE, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-green", NULL,
NC_("channels-action", "Green"), NULL,
NC_("channels-action", "Set color tag to green"),
GIMP_COLOR_TAG_GREEN, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-yellow", NULL,
NC_("channels-action", "Yellow"), NULL,
NC_("channels-action", "Set color tag to yellow"),
GIMP_COLOR_TAG_YELLOW, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-orange", NULL,
NC_("channels-action", "Orange"), NULL,
NC_("channels-action", "Set color tag to orange"),
GIMP_COLOR_TAG_ORANGE, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-brown", NULL,
NC_("channels-action", "Brown"), NULL,
NC_("channels-action", "Set color tag to brown"),
GIMP_COLOR_TAG_BROWN, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-red", NULL,
NC_("channels-action", "Red"), NULL,
NC_("channels-action", "Set color tag to red"),
GIMP_COLOR_TAG_RED, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-violet", NULL,
NC_("channels-action", "Violet"), NULL,
NC_("channels-action", "Set color tag to violet"),
GIMP_COLOR_TAG_VIOLET, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-gray", NULL,
NC_("channels-action", "Gray"), NULL,
NC_("channels-action", "Set color tag to gray"),
GIMP_COLOR_TAG_GRAY, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG }
};
static const GimpEnumActionEntry channels_to_selection_actions[] = static const GimpEnumActionEntry channels_to_selection_actions[] =
{ {
{ "channels-selection-replace", GIMP_STOCK_SELECTION_REPLACE, { "channels-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
@@ -137,10 +226,21 @@ channels_actions_setup (GimpActionGroup *group)
channels_actions, channels_actions,
G_N_ELEMENTS (channels_actions)); G_N_ELEMENTS (channels_actions));
gimp_action_group_add_toggle_actions (group, "channels-action",
channels_toggle_actions,
G_N_ELEMENTS (channels_toggle_actions));
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));
gimp_action_group_add_enum_actions (group, "channels-action", gimp_action_group_add_enum_actions (group, "channels-action",
channels_to_selection_actions, channels_to_selection_actions,
G_N_ELEMENTS (channels_to_selection_actions), G_N_ELEMENTS (channels_to_selection_actions),
G_CALLBACK (channels_to_selection_cmd_callback)); G_CALLBACK (channels_to_selection_cmd_callback));
items_actions_setup (group, "channels");
} }
void void
@@ -206,4 +306,6 @@ channels_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("channels-selection-intersect", !fs && (channel || component)); SET_SENSITIVE ("channels-selection-intersect", !fs && (channel || component));
#undef SET_SENSITIVE #undef SET_SENSITIVE
items_actions_update (group, "channels", GIMP_ITEM (channel));
} }

View File

@@ -28,9 +28,13 @@
#include "actions-types.h" #include "actions-types.h"
#include "config/gimpdialogconfig.h"
#include "core/gimp.h"
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "core/gimpchannel-select.h" #include "core/gimpchannel-select.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpdrawable-fill.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-undo.h" #include "core/gimpimage-undo.h"
@@ -40,28 +44,44 @@
#include "widgets/gimpdock.h" #include "widgets/gimpdock.h"
#include "widgets/gimphelp-ids.h" #include "widgets/gimphelp-ids.h"
#include "dialogs/dialogs.h"
#include "dialogs/channel-options-dialog.h" #include "dialogs/channel-options-dialog.h"
#include "actions.h" #include "actions.h"
#include "channels-commands.h" #include "channels-commands.h"
#include "items-commands.h"
#include "gimp-intl.h" #include "gimp-intl.h"
/* local function prototypes */ /* local function prototypes */
static void channels_new_channel_response (GtkWidget *widget, static void channels_new_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
ChannelOptionsDialog *options); GimpChannel *channel,
static void channels_edit_channel_response (GtkWidget *widget, GimpContext *context,
gint response_id, const gchar *channel_name,
ChannelOptionsDialog *options); const GimpRGB *channel_color,
gboolean save_selection,
gboolean channel_visible,
/* private variables */ gboolean channel_linked,
GimpColorTag channel_color_tag,
static gchar *channel_name = NULL; gboolean channel_lock_content,
static GimpRGB channel_color = { 0.0, 0.0, 0.0, 0.5 }; gboolean channel_lock_position,
gpointer user_data);
static void channels_edit_attributes_callback (GtkWidget *dialog,
GimpImage *image,
GimpChannel *channel,
GimpContext *context,
const gchar *channel_name,
const GimpRGB *channel_color,
gboolean save_selection,
gboolean channel_visible,
gboolean channel_linked,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gpointer user_data);
/* public functions */ /* public functions */
@@ -70,76 +90,106 @@ void
channels_edit_attributes_cmd_callback (GtkAction *action, channels_edit_attributes_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
ChannelOptionsDialog *options; GimpImage *image;
GimpImage *image; GimpChannel *channel;
GimpChannel *channel; GtkWidget *widget;
GtkWidget *widget; GtkWidget *dialog;
return_if_no_channel (image, channel, data); return_if_no_channel (image, channel, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
options = channel_options_dialog_new (image, channel, #define EDIT_DIALOG_KEY "gimp-channel-edit-attributes-dialog"
action_data_get_context (data),
widget,
&channel->color,
gimp_object_get_name (channel),
_("Channel Attributes"),
"gimp-channel-edit",
"gtk-edit",
_("Edit Channel Attributes"),
GIMP_HELP_CHANNEL_EDIT,
_("Edit Channel Color"),
_("_Fill opacity:"),
FALSE);
g_signal_connect (options->dialog, "response", dialog = dialogs_get_dialog (G_OBJECT (channel), EDIT_DIALOG_KEY);
G_CALLBACK (channels_edit_channel_response),
options);
gtk_widget_show (options->dialog); if (! dialog)
{
GimpItem *item = GIMP_ITEM (channel);
dialog = channel_options_dialog_new (image, channel,
action_data_get_context (data),
widget,
_("Channel Attributes"),
"gimp-channel-edit",
"gtk-edit",
_("Edit Channel Attributes"),
GIMP_HELP_CHANNEL_EDIT,
_("Edit Channel Color"),
_("_Fill opacity:"),
FALSE,
gimp_object_get_name (channel),
&channel->color,
gimp_item_get_visible (item),
gimp_item_get_linked (item),
gimp_item_get_color_tag (item),
gimp_item_get_lock_content (item),
gimp_item_get_lock_position (item),
channels_edit_attributes_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (channel), EDIT_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
channels_new_cmd_callback (GtkAction *action, channels_new_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
ChannelOptionsDialog *options; GimpImage *image;
GimpImage *image; GtkWidget *widget;
GtkWidget *widget; GtkWidget *dialog;
return_if_no_image (image, data); return_if_no_image (image, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
options = channel_options_dialog_new (image, NULL, #define NEW_DIALOG_KEY "gimp-channel-new-dialog"
action_data_get_context (data),
widget,
&channel_color,
channel_name ? channel_name :
_("Channel"),
_("New Channel"),
"gimp-channel-new",
GIMP_STOCK_CHANNEL,
_("New Channel Options"),
GIMP_HELP_CHANNEL_NEW,
_("New Channel Color"),
_("_Fill opacity:"),
TRUE);
g_signal_connect (options->dialog, "response", dialog = dialogs_get_dialog (G_OBJECT (image), NEW_DIALOG_KEY);
G_CALLBACK (channels_new_channel_response),
options);
gtk_widget_show (options->dialog); if (! dialog)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
dialog = channel_options_dialog_new (image, NULL,
action_data_get_context (data),
widget,
_("New Channel"),
"gimp-channel-new",
GIMP_STOCK_CHANNEL,
_("Create a New Channel"),
GIMP_HELP_CHANNEL_NEW,
_("New Channel Color"),
_("_Fill opacity:"),
TRUE,
config->channel_new_name,
&config->channel_new_color,
TRUE,
FALSE,
GIMP_COLOR_TAG_NONE,
FALSE,
FALSE,
channels_new_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (image), NEW_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
channels_new_last_vals_cmd_callback (GtkAction *action, channels_new_last_vals_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpImage *image;
GimpChannel *new_channel; GimpChannel *new_channel;
gint width, height; gint width, height;
GimpRGB color; GimpRGB color;
GimpDialogConfig *config;
return_if_no_image (image, data); return_if_no_image (image, data);
config = GIMP_DIALOG_CONFIG (image->gimp->config);
if (GIMP_IS_CHANNEL (GIMP_ACTION (action)->viewable)) if (GIMP_IS_CHANNEL (GIMP_ACTION (action)->viewable))
{ {
GimpChannel *template = GIMP_CHANNEL (GIMP_ACTION (action)->viewable); GimpChannel *template = GIMP_CHANNEL (GIMP_ACTION (action)->viewable);
@@ -152,14 +202,14 @@ channels_new_last_vals_cmd_callback (GtkAction *action,
{ {
width = gimp_image_get_width (image); width = gimp_image_get_width (image);
height = gimp_image_get_height (image); height = gimp_image_get_height (image);
color = channel_color; color = config->channel_new_color;
} }
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_EDIT_PASTE, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_EDIT_PASTE,
_("New Channel")); _("New Channel"));
new_channel = gimp_channel_new (image, width, height, new_channel = gimp_channel_new (image, width, height,
channel_name, &color); config->channel_new_name, &color);
gimp_drawable_fill (GIMP_DRAWABLE (new_channel), gimp_drawable_fill (GIMP_DRAWABLE (new_channel),
action_data_get_context (data), action_data_get_context (data),
@@ -270,7 +320,6 @@ channels_duplicate_cmd_callback (GtkAction *action,
} }
gimp_image_add_channel (image, new_channel, parent, -1, TRUE); gimp_image_add_channel (image, new_channel, parent, -1, TRUE);
gimp_image_flush (image); gimp_image_flush (image);
} }
@@ -318,101 +367,178 @@ channels_to_selection_cmd_callback (GtkAction *action,
gimp_image_flush (image); gimp_image_flush (image);
} }
void
channels_visible_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_visible_cmd_callback (action, image, GIMP_ITEM (channel));
}
void
channels_linked_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_linked_cmd_callback (action, image, GIMP_ITEM (channel));
}
void
channels_lock_content_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_lock_content_cmd_callback (action, image, GIMP_ITEM (channel));
}
void
channels_lock_position_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_lock_position_cmd_callback (action, image, GIMP_ITEM (channel));
}
void
channels_color_tag_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_color_tag_cmd_callback (action, image, GIMP_ITEM (channel),
(GimpColorTag) value);
}
/* private functions */ /* private functions */
static void static void
channels_new_channel_response (GtkWidget *widget, channels_new_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
ChannelOptionsDialog *options) GimpChannel *channel,
GimpContext *context,
const gchar *channel_name,
const GimpRGB *channel_color,
gboolean save_selection,
gboolean channel_visible,
gboolean channel_linked,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gpointer user_data)
{ {
if (response_id == GTK_RESPONSE_OK) GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
g_object_set (config,
"channel-new-name", channel_name,
"channel-new-color", channel_color,
NULL);
if (save_selection)
{ {
GimpChannel *new_channel; GimpChannel *selection = gimp_image_get_mask (image);
if (channel_name) channel = GIMP_CHANNEL (gimp_item_duplicate (GIMP_ITEM (selection),
g_free (channel_name); GIMP_TYPE_CHANNEL));
channel_name = gimp_object_set_name (GIMP_OBJECT (channel),
g_strdup (gtk_entry_get_text (GTK_ENTRY (options->name_entry))); config->channel_new_name);
gimp_channel_set_color (channel, &config->channel_new_color, FALSE);
}
else
{
channel = gimp_channel_new (image,
gimp_image_get_width (image),
gimp_image_get_height (image),
config->channel_new_name,
&config->channel_new_color);
gimp_color_button_get_color (GIMP_COLOR_BUTTON (options->color_panel), gimp_drawable_fill (GIMP_DRAWABLE (channel), context,
&channel_color); GIMP_FILL_TRANSPARENT);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (options->save_sel_checkbutton)))
{
GimpChannel *selection = gimp_image_get_mask (options->image);
new_channel =
GIMP_CHANNEL (gimp_item_duplicate (GIMP_ITEM (selection),
GIMP_TYPE_CHANNEL));
gimp_object_set_name (GIMP_OBJECT (new_channel), channel_name);
gimp_channel_set_color (new_channel, &channel_color, FALSE);
}
else
{
new_channel = gimp_channel_new (options->image,
gimp_image_get_width (options->image),
gimp_image_get_height (options->image),
channel_name,
&channel_color);
gimp_drawable_fill (GIMP_DRAWABLE (new_channel),
options->context,
GIMP_FILL_TRANSPARENT);
}
gimp_image_add_channel (options->image, new_channel,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (options->image);
} }
gtk_widget_destroy (options->dialog); gimp_item_set_visible (GIMP_ITEM (channel), channel_visible, FALSE);
gimp_item_set_linked (GIMP_ITEM (channel), channel_linked, FALSE);
gimp_item_set_color_tag (GIMP_ITEM (channel), channel_color_tag, FALSE);
gimp_item_set_lock_content (GIMP_ITEM (channel), channel_lock_content, FALSE);
gimp_item_set_lock_position (GIMP_ITEM (channel), channel_lock_position, FALSE);
gimp_image_add_channel (image, channel,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (image);
gtk_widget_destroy (dialog);
} }
static void static void
channels_edit_channel_response (GtkWidget *widget, channels_edit_attributes_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
ChannelOptionsDialog *options) GimpChannel *channel,
GimpContext *context,
const gchar *channel_name,
const GimpRGB *channel_color,
gboolean save_selection,
gboolean channel_visible,
gboolean channel_linked,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gpointer user_data)
{ {
if (response_id == GTK_RESPONSE_OK) GimpItem *item = GIMP_ITEM (channel);
if (strcmp (channel_name, gimp_object_get_name (channel)) ||
gimp_rgba_distance (channel_color, &channel->color) > 0.0001 ||
channel_visible != gimp_item_get_visible (item) ||
channel_linked != gimp_item_get_linked (item) ||
channel_color_tag != gimp_item_get_color_tag (item) ||
channel_lock_content != gimp_item_get_lock_content (item) ||
channel_lock_position != gimp_item_get_lock_position (item))
{ {
GimpChannel *channel = options->channel; gimp_image_undo_group_start (image,
const gchar *new_name; GIMP_UNDO_GROUP_ITEM_PROPERTIES,
GimpRGB color; _("Channel Attributes"));
gboolean name_changed = FALSE;
gboolean color_changed = FALSE;
new_name = gtk_entry_get_text (GTK_ENTRY (options->name_entry)); if (strcmp (channel_name, gimp_object_get_name (channel)))
gimp_item_rename (GIMP_ITEM (channel), channel_name, NULL);
gimp_color_button_get_color (GIMP_COLOR_BUTTON (options->color_panel), if (gimp_rgba_distance (channel_color, &channel->color) > 0.0001)
&color); gimp_channel_set_color (channel, channel_color, TRUE);
if (strcmp (new_name, gimp_object_get_name (channel))) if (channel_visible != gimp_item_get_visible (item))
name_changed = TRUE; gimp_item_set_visible (item, channel_visible, TRUE);
if (gimp_rgba_distance (&color, &channel->color) > 0.0001) if (channel_linked != gimp_item_get_linked (item))
color_changed = TRUE; gimp_item_set_linked (item, channel_linked, TRUE);
if (name_changed && color_changed) if (channel_color_tag != gimp_item_get_color_tag (item))
gimp_image_undo_group_start (options->image, gimp_item_set_color_tag (item, channel_color_tag, TRUE);
GIMP_UNDO_GROUP_ITEM_PROPERTIES,
_("Channel Attributes"));
if (name_changed) if (channel_lock_content != gimp_item_get_lock_content (item))
gimp_item_rename (GIMP_ITEM (channel), new_name, NULL); gimp_item_set_lock_content (item, channel_lock_content, TRUE);
if (color_changed) if (channel_lock_position != gimp_item_get_lock_position (item))
gimp_channel_set_color (channel, &color, TRUE); gimp_item_set_lock_position (item, channel_lock_position, TRUE);
if (name_changed && color_changed) gimp_image_undo_group_end (image);
gimp_image_undo_group_end (options->image);
if (name_changed || color_changed) gimp_image_flush (image);
gimp_image_flush (options->image);
} }
gtk_widget_destroy (options->dialog); gtk_widget_destroy (dialog);
} }

View File

@@ -43,5 +43,18 @@ void channels_to_selection_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); 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_color_tag_cmd_callback (GtkAction *action,
gint value,
gpointer data);
#endif /* __CHANNELS_COMMANDS_H__ */ #endif /* __CHANNELS_COMMANDS_H__ */

View File

@@ -61,7 +61,7 @@ static const GimpActionEntry context_actions[] =
"_Palette") }, "_Palette") },
{ "context-gradient-menu", GIMP_STOCK_GRADIENT, NC_("context-action", { "context-gradient-menu", GIMP_STOCK_GRADIENT, NC_("context-action",
"_Gradient") }, "_Gradient") },
{ "context-font-menu", GIMP_STOCK_FONT, NC_("context-action", { "context-font-menu", "gtk-select-font", NC_("context-action",
"_Font") }, "_Font") },
{ "context-brush-shape-menu", NULL, NC_("context-action", { "context-brush-shape-menu", NULL, NC_("context-action",
@@ -841,23 +841,23 @@ static const GimpEnumActionEntry context_gradient_select_actions[] =
static const GimpEnumActionEntry context_font_select_actions[] = static const GimpEnumActionEntry context_font_select_actions[] =
{ {
{ "context-font-select-set", GIMP_STOCK_FONT, { "context-font-select-set", "gtk-select-font",
"Select Font by Index", NULL, NULL, "Select Font by Index", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE, GIMP_ACTION_SELECT_SET, TRUE,
NULL }, NULL },
{ "context-font-select-first", GIMP_STOCK_FONT, { "context-font-select-first", "gtk-select-font",
"First Font", NULL, NULL, "First Font", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE, GIMP_ACTION_SELECT_FIRST, FALSE,
NULL }, NULL },
{ "context-font-select-last", GIMP_STOCK_FONT, { "context-font-select-last", "gtk-select-font",
"Last Font", NULL, NULL, "Last Font", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE, GIMP_ACTION_SELECT_LAST, FALSE,
NULL }, NULL },
{ "context-font-select-previous", GIMP_STOCK_FONT, { "context-font-select-previous", "gtk-select-font",
"Previous Font", NULL, NULL, "Previous Font", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE, GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL }, NULL },
{ "context-font-select-next", GIMP_STOCK_FONT, { "context-font-select-next", "gtk-select-font",
"Next Font", NULL, NULL, "Next Font", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE, GIMP_ACTION_SELECT_NEXT, FALSE,
NULL } NULL }
@@ -1243,6 +1243,7 @@ void
context_actions_update (GimpActionGroup *group, context_actions_update (GimpActionGroup *group,
gpointer data) gpointer data)
{ {
#if 0
GimpContext *context = action_data_get_context (data); GimpContext *context = action_data_get_context (data);
gboolean generated = FALSE; gboolean generated = FALSE;
gdouble radius = 0.0; gdouble radius = 0.0;
@@ -1272,7 +1273,6 @@ context_actions_update (GimpActionGroup *group,
#define SET_SENSITIVE(action,condition) \ #define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, "context-" action, (condition) != 0) gimp_action_group_set_action_sensitive (group, "context-" action, (condition) != 0)
#if 0
SET_SENSITIVE ("brush-radius-minimum", generated && radius > 1.0); SET_SENSITIVE ("brush-radius-minimum", generated && radius > 1.0);
SET_SENSITIVE ("brush-radius-decrease", generated && radius > 1.0); SET_SENSITIVE ("brush-radius-decrease", generated && radius > 1.0);
SET_SENSITIVE ("brush-radius-decrease-skip", generated && radius > 1.0); SET_SENSITIVE ("brush-radius-decrease-skip", generated && radius > 1.0);
@@ -1288,7 +1288,7 @@ context_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("brush-angle-maximum", generated); SET_SENSITIVE ("brush-angle-maximum", generated);
SET_SENSITIVE ("brush-angle-increase", generated); SET_SENSITIVE ("brush-angle-increase", generated);
SET_SENSITIVE ("brush-angle-increase-skip", generated); SET_SENSITIVE ("brush-angle-increase-skip", generated);
#endif
#undef SET_SENSITIVE #undef SET_SENSITIVE
#endif
} }

View File

@@ -17,23 +17,14 @@
#include "config.h" #include "config.h"
#include <gegl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h" #include "actions-types.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpcursorview.h" #include "display/gimpcursorview.h"
#include "cursor-info-commands.h" #include "cursor-info-commands.h"
#include "gimp-intl.h"
/* public functions */ /* public functions */

View File

@@ -71,7 +71,7 @@ data_open_as_image_cmd_callback (GtkAction *action,
if (data && gimp_data_get_file (data)) if (data && gimp_data_get_file (data))
{ {
GFile *file = gimp_data_get_file (data); GFile *file = gimp_data_get_file (data);
GtkWidget *widget = GTK_WIDGET (view); GtkWidget *widget = GTK_WIDGET (view);
GimpImage *image; GimpImage *image;
GimpPDBStatusType status; GimpPDBStatusType status;
@@ -138,8 +138,7 @@ data_duplicate_cmd_callback (GtkAction *action,
gimp_context_get_by_type (context, gimp_context_get_by_type (context,
gimp_data_factory_view_get_children_type (view)); gimp_data_factory_view_get_children_type (view));
if (data && gimp_data_factory_view_have (view, if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
GIMP_OBJECT (data)))
{ {
GimpData *new_data; GimpData *new_data;
@@ -235,8 +234,7 @@ data_delete_cmd_callback (GtkAction *action,
if (data && if (data &&
gimp_data_is_deletable (data) && gimp_data_is_deletable (data) &&
gimp_data_factory_view_have (view, gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
GIMP_OBJECT (data)))
{ {
GimpDataFactory *factory; GimpDataFactory *factory;
GtkWidget *dialog; GtkWidget *dialog;
@@ -278,8 +276,7 @@ data_edit_cmd_callback (GtkAction *action,
gimp_context_get_by_type (context, gimp_context_get_by_type (context,
gimp_data_factory_view_get_children_type (view)); gimp_data_factory_view_get_children_type (view));
if (data && gimp_data_factory_view_have (view, if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
GIMP_OBJECT (data)))
{ {
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view)); GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view));
gint monitor = gimp_widget_get_monitor (GTK_WIDGET (view)); gint monitor = gimp_widget_get_monitor (GTK_WIDGET (view));

View File

@@ -61,6 +61,12 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-device-status", "gimp-device-status",
GIMP_HELP_DEVICE_STATUS_DIALOG }, GIMP_HELP_DEVICE_STATUS_DIALOG },
{ "dialogs-symmetry", GIMP_STOCK_SYMMETRY,
NC_("dialogs-action", "_Symmetry Painting"), NULL,
NC_("dialogs-action", "Open the symmetry dialog"),
"gimp-symmetry-editor",
GIMP_HELP_SYMMETRY_DIALOG },
{ "dialogs-layers", GIMP_STOCK_LAYERS, { "dialogs-layers", GIMP_STOCK_LAYERS,
NC_("dialogs-action", "_Layers"), "<primary>L", NC_("dialogs-action", "_Layers"), "<primary>L",
NC_("dialogs-action", "Open the layers dialog"), NC_("dialogs-action", "Open the layers dialog"),
@@ -91,7 +97,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-histogram-editor", "gimp-histogram-editor",
GIMP_HELP_HISTOGRAM_DIALOG }, GIMP_HELP_HISTOGRAM_DIALOG },
{ "dialogs-selection-editor", GIMP_STOCK_TOOL_RECT_SELECT, { "dialogs-selection-editor", GIMP_STOCK_SELECTION,
NC_("dialogs-action", "_Selection Editor"), NULL, NC_("dialogs-action", "_Selection Editor"), NULL,
NC_("dialogs-action", "Open the selection editor"), NC_("dialogs-action", "Open the selection editor"),
"gimp-selection-editor", "gimp-selection-editor",
@@ -142,7 +148,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
{ "dialogs-dynamics", GIMP_STOCK_DYNAMICS, { "dialogs-dynamics", GIMP_STOCK_DYNAMICS,
NC_("dialogs-action", "Paint Dynamics"), NULL, NC_("dialogs-action", "Paint Dynamics"), NULL,
NC_("dialogs-action", "Open paint dynamics dialog"), NC_("dialogs-action", "Open paint dynamics dialog"),
"gimp-dynamics-list", "gimp-dynamics-list|gimp-dynamics-grid",
GIMP_HELP_DYNAMICS_DIALOG }, GIMP_HELP_DYNAMICS_DIALOG },
{ "dialogs-dynamics-editor", GIMP_STOCK_DYNAMICS, { "dialogs-dynamics-editor", GIMP_STOCK_DYNAMICS,
@@ -151,6 +157,12 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-dynamics-editor", "gimp-dynamics-editor",
GIMP_HELP_DYNAMICS_EDITOR_DIALOG }, GIMP_HELP_DYNAMICS_EDITOR_DIALOG },
{ "dialogs-mypaint-brushes", GIMP_STOCK_MYPAINT_BRUSH,
NC_("dialogs-action", "_MyPaint Brushes"), "<primary><shift>Y",
NC_("dialogs-action", "Open the mypaint brushes dialog"),
"gimp-mypaint-brush-grid|gimp-mapyint-brush-list",
GIMP_HELP_MYPAINT_BRUSH_DIALOG },
{ "dialogs-patterns", GIMP_STOCK_PATTERN, { "dialogs-patterns", GIMP_STOCK_PATTERN,
NC_("dialogs-action", "P_atterns"), "<primary><shift>P", NC_("dialogs-action", "P_atterns"), "<primary><shift>P",
NC_("dialogs-action", "Open the patterns dialog"), NC_("dialogs-action", "Open the patterns dialog"),
@@ -184,10 +196,10 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
{ "dialogs-tool-presets", GIMP_STOCK_TOOL_PRESET, { "dialogs-tool-presets", GIMP_STOCK_TOOL_PRESET,
NC_("dialogs-action", "Tool presets"), NULL, NC_("dialogs-action", "Tool presets"), NULL,
NC_("dialogs-action", "Open tool presets dialog"), NC_("dialogs-action", "Open tool presets dialog"),
"gimp-tool-preset-list", "gimp-tool-preset-list|gimp-tool-preset-grid",
GIMP_HELP_TOOL_PRESET_DIALOG }, GIMP_HELP_TOOL_PRESET_DIALOG },
{ "dialogs-fonts", GIMP_STOCK_FONT, { "dialogs-fonts", "gtk-select-font",
NC_("dialogs-action", "_Fonts"), NULL, NC_("dialogs-action", "_Fonts"), NULL,
NC_("dialogs-action", "Open the fonts dialog"), NC_("dialogs-action", "Open the fonts dialog"),
"gimp-font-list|gimp-font-grid", "gimp-font-list|gimp-font-grid",
@@ -271,9 +283,9 @@ static const GimpStringActionEntry dialogs_toplevel_actions[] =
"gimp-about-dialog", "gimp-about-dialog",
GIMP_HELP_ABOUT_DIALOG }, GIMP_HELP_ABOUT_DIALOG },
{ "help-action-search", "edit-find", { "dialogs-action-search", "edit-find",
NC_("help-action", "_Search and Run a Command"), "slash", NC_("dialogs-action", "_Search and Run a Command"), "slash",
NC_("help-action", "Search commands by keyword, and run them"), NC_("dialogs-action", "Search commands by keyword, and run them"),
"gimp-action-search-dialog", "gimp-action-search-dialog",
GIMP_HELP_ACTION_SEARCH_DIALOG } GIMP_HELP_ACTION_SEARCH_DIALOG }
}; };

View File

@@ -59,6 +59,7 @@ dock_toggle_image_menu_cmd_callback (GtkAction *action,
if (dock_window) if (dock_window)
{ {
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gimp_dock_window_set_show_image_menu (dock_window, active); gimp_dock_window_set_show_image_menu (dock_window, active);
} }
} }
@@ -76,6 +77,7 @@ dock_toggle_auto_cmd_callback (GtkAction *action,
if (dock_window) if (dock_window)
{ {
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gimp_dock_window_set_auto_follow_active (dock_window, active); gimp_dock_window_set_auto_follow_active (dock_window, active);
} }
} }

View File

@@ -49,7 +49,7 @@ static const GimpActionEntry dockable_actions[] =
NC_("dockable-action", "Dialogs Menu"), NULL, NULL, NULL, NC_("dockable-action", "Dialogs Menu"), NULL, NULL, NULL,
GIMP_HELP_DOCK }, GIMP_HELP_DOCK },
{ "dockable-menu", "image-mising", "" }, { "dockable-menu", "image-missing", "" },
{ "dockable-add-tab-menu", NULL, NC_("dockable-action", { "dockable-add-tab-menu", NULL, NC_("dockable-action",
"_Add Tab") }, "_Add Tab") },
{ "dockable-preview-size-menu", NULL, NC_("dockable-action", { "dockable-preview-size-menu", NULL, NC_("dockable-action",

View File

@@ -283,6 +283,9 @@ dockable_show_button_bar_cmd_callback (GtkAction *action,
} }
} }
/* private functions */
static GimpDockable * static GimpDockable *
dockable_get_current (GimpDockbook *dockbook) dockable_get_current (GimpDockbook *dockbook)
{ {

View File

@@ -66,7 +66,7 @@ static const GimpActionEntry documents_actions[] =
G_CALLBACK (documents_copy_location_cmd_callback), G_CALLBACK (documents_copy_location_cmd_callback),
GIMP_HELP_DOCUMENT_COPY_LOCATION }, GIMP_HELP_DOCUMENT_COPY_LOCATION },
{ "documents-show-in-file-manager", "gtk-directory", { "documents-show-in-file-manager", GIMP_STOCK_FILE_MANAGER,
NC_("documents-action", "Show in _File Manager"), NULL, NC_("documents-action", "Show in _File Manager"), NULL,
NC_("documents-action", "Show image location in the file manager"), NC_("documents-action", "Show image location in the file manager"),
G_CALLBACK (documents_show_in_file_manager_cmd_callback), G_CALLBACK (documents_show_in_file_manager_cmd_callback),
@@ -78,7 +78,7 @@ static const GimpActionEntry documents_actions[] =
G_CALLBACK (documents_remove_cmd_callback), G_CALLBACK (documents_remove_cmd_callback),
GIMP_HELP_DOCUMENT_REMOVE }, GIMP_HELP_DOCUMENT_REMOVE },
{ "documents-clear", "edit-clear", { "documents-clear", GIMP_STOCK_SHRED,
NC_("documents-action", "_Clear History"), NULL, NC_("documents-action", "_Clear History"), NULL,
NC_("documents-action", "Clear the entire document history"), NC_("documents-action", "Clear the entire document history"),
G_CALLBACK (documents_clear_cmd_callback), G_CALLBACK (documents_clear_cmd_callback),

View File

@@ -221,7 +221,7 @@ documents_clear_cmd_callback (GtkAction *action,
GtkWidget *dialog; GtkWidget *dialog;
dialog = gimp_message_dialog_new (_("Clear Document History"), dialog = gimp_message_dialog_new (_("Clear Document History"),
"edit-clear", GIMP_STOCK_SHRED,
GTK_WIDGET (editor), GTK_WIDGET (editor),
GTK_DIALOG_MODAL | GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_DESTROY_WITH_PARENT,

View File

@@ -27,6 +27,7 @@
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpdrawable-equalize.h" #include "core/gimpdrawable-equalize.h"
#include "core/gimpdrawable-levels.h" #include "core/gimpdrawable-levels.h"
#include "core/gimpdrawable-offset.h"
#include "core/gimpdrawable-operation.h" #include "core/gimpdrawable-operation.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-undo.h" #include "core/gimpimage-undo.h"
@@ -35,6 +36,7 @@
#include "core/gimplayermask.h" #include "core/gimplayermask.h"
#include "core/gimpprogress.h" #include "core/gimpprogress.h"
#include "dialogs/dialogs.h"
#include "dialogs/offset-dialog.h" #include "dialogs/offset-dialog.h"
#include "actions.h" #include "actions.h"
@@ -43,6 +45,17 @@
#include "gimp-intl.h" #include "gimp-intl.h"
/* local function prototypes */
static void drawable_offset_callback (GtkWidget *dialog,
GimpDrawable *drawable,
GimpContext *context,
gboolean wrap_around,
GimpOffsetType fill_type,
gint offset_x,
gint offset_y);
/* public functions */ /* public functions */
void void
@@ -106,7 +119,8 @@ drawable_levels_stretch_cmd_callback (GtkAction *action,
{ {
gimp_message_literal (image->gimp, gimp_message_literal (image->gimp,
G_OBJECT (widget), GIMP_MESSAGE_WARNING, G_OBJECT (widget), GIMP_MESSAGE_WARNING,
_("White Balance operates only on RGB color layers.")); _("White Balance operates only on RGB color "
"layers."));
return; return;
} }
@@ -189,11 +203,23 @@ drawable_offset_cmd_callback (GtkAction *action,
return_if_no_drawable (image, drawable, data); return_if_no_drawable (image, drawable, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
dialog = offset_dialog_new (drawable, action_data_get_context (data), #define OFFSET_DIALOG_KEY "gimp-offset-dialog"
widget);
gtk_widget_show (dialog);
}
dialog = dialogs_get_dialog (G_OBJECT (drawable), OFFSET_DIALOG_KEY);
if (! dialog)
{
dialog = offset_dialog_new (drawable, action_data_get_context (data),
widget,
drawable_offset_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (drawable),
OFFSET_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
}
void void
drawable_linked_cmd_callback (GtkAction *action, drawable_linked_cmd_callback (GtkAction *action,
@@ -407,3 +433,25 @@ drawable_rotate_cmd_callback (GtkAction *action,
gimp_image_flush (image); gimp_image_flush (image);
} }
/* private functions */
static void
drawable_offset_callback (GtkWidget *dialog,
GimpDrawable *drawable,
GimpContext *context,
gboolean wrap_around,
GimpOffsetType fill_type,
gint offset_x,
gint offset_y)
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
gimp_drawable_offset (drawable, context,
wrap_around, fill_type,
offset_x, offset_y);
gimp_image_flush (image);
gtk_widget_destroy (dialog);
}

View File

@@ -61,7 +61,7 @@ static const GimpActionEntry dynamics_actions[] =
G_CALLBACK (data_copy_location_cmd_callback), G_CALLBACK (data_copy_location_cmd_callback),
GIMP_HELP_DYNAMICS_COPY_LOCATION }, GIMP_HELP_DYNAMICS_COPY_LOCATION },
{ "dynamics-show-in-file-manager", "gtk-directory", { "dynamics-show-in-file-manager", GIMP_STOCK_FILE_MANAGER,
NC_("dynamics-action", "Show in _File Manager"), NULL, NC_("dynamics-action", "Show in _File Manager"), NULL,
NC_("dynamics-action", "Show dynamics file location in the file manager"), NC_("dynamics-action", "Show dynamics file location in the file manager"),
G_CALLBACK (data_show_in_file_manager_cmd_callback), G_CALLBACK (data_show_in_file_manager_cmd_callback),
@@ -84,7 +84,7 @@ static const GimpStringActionEntry dynamics_edit_actions[] =
{ {
{ "dynamics-edit", "gtk-edit", { "dynamics-edit", "gtk-edit",
NC_("dynamics-action", "_Edit Dynamics..."), NULL, NC_("dynamics-action", "_Edit Dynamics..."), NULL,
NC_("dynamics-action", "Edit dynamics"), NC_("dynamics-action", "Edit this dynamics"),
"gimp-dynamics-editor", "gimp-dynamics-editor",
GIMP_HELP_DYNAMICS_EDIT } GIMP_HELP_DYNAMICS_EDIT }
}; };

View File

@@ -95,7 +95,7 @@ static const GimpActionEntry edit_actions[] =
G_CALLBACK (edit_strong_redo_cmd_callback), G_CALLBACK (edit_strong_redo_cmd_callback),
GIMP_HELP_EDIT_STRONG_REDO }, GIMP_HELP_EDIT_STRONG_REDO },
{ "edit-undo-clear", "edit-clear", { "edit-undo-clear", GIMP_STOCK_SHRED,
NC_("edit-action", "_Clear Undo History"), NULL, NC_("edit-action", "_Clear Undo History"), NULL,
NC_("edit-action", "Remove all operations from the undo history"), NC_("edit-action", "Remove all operations from the undo history"),
G_CALLBACK (edit_undo_clear_cmd_callback), G_CALLBACK (edit_undo_clear_cmd_callback),
@@ -139,24 +139,24 @@ static const GimpActionEntry edit_actions[] =
G_CALLBACK (edit_paste_into_cmd_callback), G_CALLBACK (edit_paste_into_cmd_callback),
GIMP_HELP_EDIT_PASTE_INTO }, GIMP_HELP_EDIT_PASTE_INTO },
{ "edit-paste-as-new", GIMP_STOCK_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_cmd_callback),
GIMP_HELP_EDIT_PASTE_AS_NEW },
{ "edit-paste-as-new-short", GIMP_STOCK_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_cmd_callback),
GIMP_HELP_EDIT_PASTE_AS_NEW },
{ "edit-paste-as-new-layer", NULL, { "edit-paste-as-new-layer", NULL,
NC_("edit-action", "New _Layer"), NULL, NC_("edit-action", "New _Layer"), NULL,
NC_("edit-action", "Create a new layer from the content of the clipboard"), NC_("edit-action", "Create a new layer from the content of the clipboard"),
G_CALLBACK (edit_paste_as_new_layer_cmd_callback), G_CALLBACK (edit_paste_as_new_layer_cmd_callback),
GIMP_HELP_EDIT_PASTE_AS_NEW_LAYER }, GIMP_HELP_EDIT_PASTE_AS_NEW_LAYER },
{ "edit-paste-as-new-image", GIMP_STOCK_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),
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
{ "edit-paste-as-new-image-short", GIMP_STOCK_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),
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
{ "edit-named-cut", "edit-cut", { "edit-named-cut", "edit-cut",
NC_("edit-action", "Cu_t Named..."), NULL, NC_("edit-action", "Cu_t Named..."), NULL,
NC_("edit-action", "Move the selected pixels to a named buffer"), NC_("edit-action", "Move the selected pixels to a named buffer"),
@@ -203,7 +203,7 @@ static const GimpEnumActionEntry edit_fill_actions[] =
GIMP_FILL_BACKGROUND, FALSE, GIMP_FILL_BACKGROUND, FALSE,
GIMP_HELP_EDIT_FILL_BG }, GIMP_HELP_EDIT_FILL_BG },
{ "edit-fill-pattern", GIMP_STOCK_TOOL_BUCKET_FILL, { "edit-fill-pattern", GIMP_STOCK_PATTERN,
NC_("edit-action", "Fill _with Pattern"), "<primary>semicolon", NC_("edit-action", "Fill _with Pattern"), "<primary>semicolon",
NC_("edit-action", "Fill the selection using the active pattern"), NC_("edit-action", "Fill the selection using the active pattern"),
GIMP_FILL_PATTERN, FALSE, GIMP_FILL_PATTERN, FALSE,
@@ -229,12 +229,12 @@ edit_actions_setup (GimpActionGroup *group)
G_CALLBACK (edit_fill_cmd_callback)); G_CALLBACK (edit_fill_cmd_callback));
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
"edit-paste-as-new-short"); "edit-paste-as-new-image-short");
gtk_action_set_accel_path (action, "<Actions>/edit/edit-paste-as-new"); gtk_action_set_accel_path (action, "<Actions>/edit/edit-paste-as-new-image");
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), gimp_action_group_set_action_context (group, "edit-fill-fg", context);
"edit-fill-pattern"); gimp_action_group_set_action_context (group, "edit-fill-bg", context);
g_object_set (action, "context", context, NULL); gimp_action_group_set_action_context (group, "edit-fill-pattern", context);
g_signal_connect_object (context, "foreground-changed", g_signal_connect_object (context, "foreground-changed",
G_CALLBACK (edit_actions_foreground_changed), G_CALLBACK (edit_actions_foreground_changed),
@@ -364,16 +364,14 @@ edit_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("edit-cut", writable && !children); SET_SENSITIVE ("edit-cut", writable && !children);
SET_SENSITIVE ("edit-copy", drawable); SET_SENSITIVE ("edit-copy", drawable);
SET_SENSITIVE ("edit-copy-visible", image); SET_SENSITIVE ("edit-copy-visible", image);
SET_SENSITIVE ("edit-paste", !image || (!drawable || /* "edit-paste" is always active */
(writable && !children))); SET_SENSITIVE ("edit-paste-into", image);
SET_SENSITIVE ("edit-paste-as-new-layer", image); SET_SENSITIVE ("edit-paste-as-new-layer", image);
SET_SENSITIVE ("edit-paste-into", image && (!drawable ||
(writable && !children)));
SET_SENSITIVE ("edit-named-cut", writable && !children); SET_SENSITIVE ("edit-named-cut", writable && !children);
SET_SENSITIVE ("edit-named-copy", drawable); SET_SENSITIVE ("edit-named-copy", drawable);
SET_SENSITIVE ("edit-named-copy-visible", drawable); SET_SENSITIVE ("edit-named-copy-visible", drawable);
SET_SENSITIVE ("edit-named-paste", TRUE); /* "edit-named-paste" is always active */
SET_SENSITIVE ("edit-clear", writable && !children); SET_SENSITIVE ("edit-clear", writable && !children);
SET_SENSITIVE ("edit-fill-fg", writable && !children); SET_SENSITIVE ("edit-fill-fg", writable && !children);

View File

@@ -32,9 +32,11 @@
#include "core/gimpbuffer.h" #include "core/gimpbuffer.h"
#include "core/gimpcontainer.h" #include "core/gimpcontainer.h"
#include "core/gimpdrawable.h" #include "core/gimpdrawable.h"
#include "core/gimpfilloptions.h"
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "core/gimplayer-new.h" #include "core/gimplayer-new.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-duplicate.h"
#include "core/gimpimage-new.h" #include "core/gimpimage-new.h"
#include "core/gimpimage-undo.h" #include "core/gimpimage-undo.h"
@@ -64,17 +66,18 @@
/* local function prototypes */ /* local function prototypes */
static void edit_paste (GimpDisplay *display, static void edit_paste (GimpDisplay *display,
gboolean paste_into); GimpPasteType paste_into,
static void cut_named_buffer_callback (GtkWidget *widget, gboolean try_svg);
const gchar *name, static void cut_named_buffer_callback (GtkWidget *widget,
gpointer data); const gchar *name,
static void copy_named_buffer_callback (GtkWidget *widget, gpointer data);
const gchar *name, static void copy_named_buffer_callback (GtkWidget *widget,
gpointer data); const gchar *name,
static void copy_named_visible_buffer_callback (GtkWidget *widget, gpointer data);
const gchar *name, static void copy_named_visible_buffer_callback (GtkWidget *widget,
gpointer data); const gchar *name,
gpointer data);
/* public functions */ /* public functions */
@@ -201,23 +204,50 @@ edit_undo_clear_cmd_callback (GtkAction *action,
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
} }
void
edit_fade_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
GtkWidget *dialog;
return_if_no_image (image, data);
return_if_no_widget (widget, data);
dialog = fade_dialog_new (image, widget);
if (dialog)
{
g_signal_connect_object (image, "disconnect",
G_CALLBACK (gtk_widget_destroy),
dialog, G_CONNECT_SWAPPED);
gtk_widget_show (dialog);
}
}
void void
edit_cut_cmd_callback (GtkAction *action, edit_cut_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpImage *image;
GimpDrawable *drawable; GimpDrawable *drawable;
GimpObject *cut;
GError *error = NULL; GError *error = NULL;
return_if_no_drawable (image, drawable, data); return_if_no_drawable (image, drawable, data);
if (gimp_edit_cut (image, drawable, action_data_get_context (data), &error)) cut = gimp_edit_cut (image, drawable, action_data_get_context (data),
&error);
if (cut)
{ {
GimpDisplay *display = action_data_get_display (data); GimpDisplay *display = action_data_get_display (data);
if (display) if (display)
gimp_message_literal (image->gimp, gimp_message_literal (image->gimp,
G_OBJECT (display), GIMP_MESSAGE_INFO, G_OBJECT (display), GIMP_MESSAGE_INFO,
_("Cut pixels to the clipboard")); GIMP_IS_IMAGE (cut) ?
_("Cut layer to the clipboard.") :
_("Cut pixels to the clipboard."));
gimp_image_flush (image); gimp_image_flush (image);
} }
@@ -237,17 +267,23 @@ edit_copy_cmd_callback (GtkAction *action,
{ {
GimpImage *image; GimpImage *image;
GimpDrawable *drawable; GimpDrawable *drawable;
GimpObject *copy;
GError *error = NULL; GError *error = NULL;
return_if_no_drawable (image, drawable, data); return_if_no_drawable (image, drawable, data);
if (gimp_edit_copy (image, drawable, action_data_get_context (data), &error)) copy = gimp_edit_copy (image, drawable, action_data_get_context (data),
&error);
if (copy)
{ {
GimpDisplay *display = action_data_get_display (data); GimpDisplay *display = action_data_get_display (data);
if (display) if (display)
gimp_message_literal (image->gimp, gimp_message_literal (image->gimp,
G_OBJECT (display), GIMP_MESSAGE_INFO, G_OBJECT (display), GIMP_MESSAGE_INFO,
_("Copied pixels to the clipboard")); GIMP_IS_IMAGE (copy) ?
_("Copied layer to the clipboard.") :
_("Copied pixels to the clipboard."));
gimp_image_flush (image); gimp_image_flush (image);
} }
@@ -276,7 +312,7 @@ edit_copy_visible_cmd_callback (GtkAction *action,
if (display) if (display)
gimp_message_literal (image->gimp, gimp_message_literal (image->gimp,
G_OBJECT (display), GIMP_MESSAGE_INFO, G_OBJECT (display), GIMP_MESSAGE_INFO,
_("Copied pixels to the clipboard")); _("Copied pixels to the clipboard."));
gimp_image_flush (image); gimp_image_flush (image);
} }
@@ -297,9 +333,13 @@ edit_paste_cmd_callback (GtkAction *action,
GimpDisplay *display = action_data_get_display (data); GimpDisplay *display = action_data_get_display (data);
if (display && gimp_display_get_image (display)) if (display && gimp_display_get_image (display))
edit_paste (display, FALSE); {
edit_paste (display, GIMP_PASTE_TYPE_FLOATING, TRUE);
}
else else
edit_paste_as_new_cmd_callback (action, data); {
edit_paste_as_new_image_cmd_callback (action, data);
}
} }
void void
@@ -309,30 +349,51 @@ edit_paste_into_cmd_callback (GtkAction *action,
GimpDisplay *display; GimpDisplay *display;
return_if_no_display (display, data); return_if_no_display (display, data);
edit_paste (display, TRUE); edit_paste (display, GIMP_PASTE_TYPE_FLOATING_INTO, TRUE);
} }
void void
edit_paste_as_new_cmd_callback (GtkAction *action, edit_paste_as_new_layer_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{
GimpDisplay *display;
return_if_no_display (display, data);
edit_paste (display, GIMP_PASTE_TYPE_NEW_LAYER, FALSE);
}
void
edit_paste_as_new_image_cmd_callback (GtkAction *action,
gpointer data)
{ {
Gimp *gimp; Gimp *gimp;
GimpBuffer *buffer;
GtkWidget *widget; GtkWidget *widget;
GimpObject *paste;
GimpImage *image = NULL;
return_if_no_gimp (gimp, data); return_if_no_gimp (gimp, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
buffer = gimp_clipboard_get_buffer (gimp); paste = gimp_clipboard_get_object (gimp);
if (buffer) if (paste)
{ {
GimpImage *image; if (GIMP_IS_IMAGE (paste))
{
image = gimp_image_duplicate (GIMP_IMAGE (paste));
}
else if (GIMP_IS_BUFFER (paste))
{
image = gimp_image_new_from_buffer (gimp,
action_data_get_image (data),
GIMP_BUFFER (paste));
}
image = gimp_image_new_from_buffer (gimp, action_data_get_image (data), g_object_unref (paste);
buffer); }
g_object_unref (buffer);
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0, if (image)
{
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0,
G_OBJECT (gtk_widget_get_screen (widget)), G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget)); gimp_widget_get_monitor (widget));
g_object_unref (image); g_object_unref (image);
@@ -340,43 +401,8 @@ edit_paste_as_new_cmd_callback (GtkAction *action,
else else
{ {
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_WARNING, gimp_message_literal (gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no image data in the clipboard to paste.")); _("There is no image data in the clipboard "
} "to paste."));
}
void
edit_paste_as_new_layer_cmd_callback (GtkAction *action,
gpointer data)
{
Gimp *gimp;
GimpImage *image;
GimpBuffer *buffer;
return_if_no_gimp (gimp, data);
return_if_no_image (image, data);
buffer = gimp_clipboard_get_buffer (gimp);
if (buffer)
{
GimpLayer *layer;
layer = gimp_layer_new_from_buffer (buffer, image,
gimp_image_get_layer_format (image,
TRUE),
_("Clipboard"),
GIMP_OPACITY_OPAQUE,
GIMP_NORMAL_MODE);
g_object_unref (buffer);
gimp_image_add_layer (image, layer,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (image);
}
else
{
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no image data in the clipboard to paste."));
} }
} }
@@ -400,27 +426,6 @@ edit_named_cut_cmd_callback (GtkAction *action,
gtk_widget_show (dialog); gtk_widget_show (dialog);
} }
void
edit_fade_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
GtkWidget *dialog;
return_if_no_image (image, data);
return_if_no_widget (widget, data);
dialog = fade_dialog_new (image, widget);
if (dialog)
{
g_signal_connect_object (image, "disconnect",
G_CALLBACK (gtk_widget_destroy),
dialog, G_CONNECT_SWAPPED);
gtk_widget_show (dialog);
}
}
void void
edit_named_copy_cmd_callback (GtkAction *action, edit_named_copy_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
@@ -495,18 +500,22 @@ edit_fill_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpImage *image;
GimpDrawable *drawable; GimpDrawable *drawable;
GimpFillType fill_type; GimpFillType fill_type;
GError *error = NULL; GimpFillOptions *options;
GError *error = NULL;
return_if_no_drawable (image, drawable, data); return_if_no_drawable (image, drawable, data);
fill_type = (GimpFillType) value; fill_type = (GimpFillType) value;
if (gimp_edit_fill (image, drawable, action_data_get_context (data), options = gimp_fill_options_new (action_data_get_gimp (data), NULL, FALSE);
fill_type, GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE,
&error)) if (gimp_fill_options_set_by_fill_type (options,
action_data_get_context (data),
fill_type, &error))
{ {
gimp_edit_fill (image, drawable, options, NULL);
gimp_image_flush (image); gimp_image_flush (image);
} }
else else
@@ -515,63 +524,91 @@ edit_fill_cmd_callback (GtkAction *action,
error->message); error->message);
g_clear_error (&error); g_clear_error (&error);
} }
g_object_unref (options);
} }
/* private functions */ /* private functions */
static void static void
edit_paste (GimpDisplay *display, edit_paste (GimpDisplay *display,
gboolean paste_into) GimpPasteType paste_type,
gboolean try_svg)
{ {
GimpImage *image = gimp_display_get_image (display); GimpImage *image = gimp_display_get_image (display);
gchar *svg; GimpObject *paste;
gsize svg_size;
svg = gimp_clipboard_get_svg (display->gimp, &svg_size); if (try_svg)
if (svg)
{ {
if (gimp_vectors_import_buffer (image, svg, svg_size, gchar *svg;
TRUE, FALSE, gsize svg_size;
GIMP_IMAGE_ACTIVE_PARENT, -1,
NULL, NULL)) svg = gimp_clipboard_get_svg (display->gimp, &svg_size);
if (svg)
{ {
gimp_image_flush (image); if (gimp_vectors_import_buffer (image, svg, svg_size,
} TRUE, FALSE,
GIMP_IMAGE_ACTIVE_PARENT, -1,
g_free (svg); NULL, NULL))
}
else
{
GimpBuffer *buffer;
buffer = gimp_clipboard_get_buffer (display->gimp);
if (buffer)
{
GimpDisplayShell *shell = gimp_display_get_shell (display);
gint x, y;
gint width, height;
gimp_display_shell_untransform_viewport (shell,
&x, &y, &width, &height);
if (gimp_edit_paste (image,
gimp_image_get_active_drawable (image),
buffer, paste_into, x, y, width, height))
{ {
gimp_image_flush (image); gimp_image_flush (image);
} }
g_object_unref (buffer); g_free (svg);
return;
} }
else }
paste = gimp_clipboard_get_object (display->gimp);
if (paste)
{
GimpDisplayShell *shell = gimp_display_get_shell (display);
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
gint x, y;
gint width, height;
if (drawable)
{ {
gimp_message_literal (display->gimp, G_OBJECT (display), if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
GIMP_MESSAGE_WARNING, {
_("There is no image data in the clipboard to paste.")); gimp_message_literal (display->gimp, G_OBJECT (display),
GIMP_MESSAGE_INFO,
_("Pasted as new layer because the "
"target is a layer group."));
paste_type = GIMP_PASTE_TYPE_NEW_LAYER;
}
else if (gimp_item_is_content_locked (GIMP_ITEM (drawable)))
{
gimp_message_literal (display->gimp, G_OBJECT (display),
GIMP_MESSAGE_INFO,
_("Pasted as new layer because the "
"target's pixels are locked."));
paste_type = GIMP_PASTE_TYPE_NEW_LAYER;
}
} }
gimp_display_shell_untransform_viewport (shell, &x, &y, &width, &height);
if (gimp_edit_paste (image, drawable, paste,
paste_type, x, y, width, height))
{
gimp_image_flush (image);
}
g_object_unref (paste);
}
else
{
gimp_message_literal (display->gimp, G_OBJECT (display),
GIMP_MESSAGE_WARNING,
_("There is no image data in the clipboard "
"to paste."));
} }
} }

View File

@@ -29,22 +29,26 @@ void edit_strong_redo_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_undo_clear_cmd_callback (GtkAction *action, void edit_undo_clear_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_fade_cmd_callback (GtkAction *action, void edit_fade_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_cut_cmd_callback (GtkAction *action, void edit_cut_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_copy_cmd_callback (GtkAction *action, void edit_copy_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_copy_visible_cmd_callback (GtkAction *action, void edit_copy_visible_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_paste_cmd_callback (GtkAction *action, void edit_paste_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_paste_into_cmd_callback (GtkAction *action, void edit_paste_into_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_paste_as_new_cmd_callback (GtkAction *action,
gpointer data);
void edit_paste_as_new_layer_cmd_callback (GtkAction *action, void edit_paste_as_new_layer_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_paste_as_new_image_cmd_callback (GtkAction *action,
gpointer data);
void edit_named_cut_cmd_callback (GtkAction *action, void edit_named_cut_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_named_copy_cmd_callback (GtkAction *action, void edit_named_copy_cmd_callback (GtkAction *action,
@@ -53,6 +57,7 @@ void edit_named_copy_visible_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_named_paste_cmd_callback (GtkAction *action, void edit_named_paste_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_clear_cmd_callback (GtkAction *action, void edit_clear_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void edit_fill_cmd_callback (GtkAction *action, void edit_fill_cmd_callback (GtkAction *action,

View File

@@ -75,7 +75,6 @@ error_console_save_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data); GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
GtkFileChooser *chooser;
if (value && ! gtk_text_buffer_get_selection_bounds (console->text_buffer, if (value && ! gtk_text_buffer_get_selection_bounds (console->text_buffer,
NULL, NULL)) NULL, NULL))
@@ -86,53 +85,50 @@ error_console_save_cmd_callback (GtkAction *action,
return; return;
} }
if (console->file_dialog) if (! console->file_dialog)
{ {
gtk_window_present (GTK_WINDOW (console->file_dialog)); GtkWidget *dialog;
return;
dialog = console->file_dialog =
gtk_file_chooser_dialog_new (_("Save Error Log to File"), NULL,
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
console->save_selection = value;
g_object_add_weak_pointer (G_OBJECT (dialog),
(gpointer) &console->file_dialog);
gtk_window_set_screen (GTK_WINDOW (dialog),
gtk_widget_get_screen (GTK_WIDGET (console)));
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-save-errors");
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog),
TRUE);
g_signal_connect (dialog, "response",
G_CALLBACK (error_console_save_response),
console);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_true),
NULL);
gimp_help_connect (dialog, gimp_standard_help_func,
GIMP_HELP_ERRORS_DIALOG, NULL);
} }
console->file_dialog = gtk_window_present (GTK_WINDOW (console->file_dialog));
gtk_file_chooser_dialog_new (_("Save Error Log to File"), NULL,
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (console->file_dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
console->save_selection = value;
g_object_add_weak_pointer (G_OBJECT (console->file_dialog),
(gpointer) &console->file_dialog);
chooser = GTK_FILE_CHOOSER (console->file_dialog);
gtk_window_set_screen (GTK_WINDOW (chooser),
gtk_widget_get_screen (GTK_WIDGET (console)));
gtk_window_set_position (GTK_WINDOW (chooser), GTK_WIN_POS_MOUSE);
gtk_window_set_role (GTK_WINDOW (chooser), "gimp-save-errors");
gtk_dialog_set_default_response (GTK_DIALOG (chooser), GTK_RESPONSE_OK);
gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE);
g_signal_connect (chooser, "response",
G_CALLBACK (error_console_save_response),
console);
g_signal_connect (chooser, "delete-event",
G_CALLBACK (gtk_true),
NULL);
gimp_help_connect (GTK_WIDGET (chooser), gimp_standard_help_func,
GIMP_HELP_ERRORS_DIALOG, NULL);
gtk_widget_show (GTK_WIDGET (chooser));
} }
@@ -145,11 +141,9 @@ error_console_save_response (GtkWidget *dialog,
{ {
if (response_id == GTK_RESPONSE_OK) if (response_id == GTK_RESPONSE_OK)
{ {
GFile *file; GFile *file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
GError *error = NULL; GError *error = NULL;
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
if (! gimp_text_buffer_save (GIMP_TEXT_BUFFER (console->text_buffer), if (! gimp_text_buffer_save (GIMP_TEXT_BUFFER (console->text_buffer),
file, file,
console->save_selection, &error)) console->save_selection, &error))

View File

@@ -72,7 +72,7 @@ static const GimpActionEntry file_actions[] =
{ "file-create-menu", NULL, NC_("file-action", "Crea_te") }, { "file-create-menu", NULL, NC_("file-action", "Crea_te") },
{ "file-open-recent-menu", NULL, NC_("file-action", "Open _Recent") }, { "file-open-recent-menu", NULL, NC_("file-action", "Open _Recent") },
{ "file-open", "document-open", { "file-open", GIMP_STOCK_IMAGE_OPEN,
NC_("file-action", "_Open..."), "<primary>O", NC_("file-action", "_Open..."), "<primary>O",
NC_("file-action", "Open an image file"), NC_("file-action", "Open an image file"),
G_CALLBACK (file_open_cmd_callback), G_CALLBACK (file_open_cmd_callback),
@@ -96,13 +96,13 @@ static const GimpActionEntry file_actions[] =
G_CALLBACK (file_create_template_cmd_callback), G_CALLBACK (file_create_template_cmd_callback),
GIMP_HELP_FILE_CREATE_TEMPLATE }, GIMP_HELP_FILE_CREATE_TEMPLATE },
{ "file-revert", "document-revert", { "file-revert", GIMP_STOCK_IMAGE_RELOAD,
NC_("file-action", "Re_vert"), NULL, NC_("file-action", "Re_vert"), NULL,
NC_("file-action", "Reload the image file from disk"), NC_("file-action", "Reload the image file from disk"),
G_CALLBACK (file_revert_cmd_callback), G_CALLBACK (file_revert_cmd_callback),
GIMP_HELP_FILE_REVERT }, GIMP_HELP_FILE_REVERT },
{ "file-close-all", "window-close", { "file-close-all", GIMP_STOCK_CLOSE_ALL,
NC_("file-action", "Close all"), "<primary><shift>W", NC_("file-action", "Close all"), "<primary><shift>W",
NC_("file-action", "Close all opened images"), NC_("file-action", "Close all opened images"),
G_CALLBACK (file_close_all_cmd_callback), G_CALLBACK (file_close_all_cmd_callback),
@@ -114,7 +114,7 @@ static const GimpActionEntry file_actions[] =
G_CALLBACK (file_copy_location_cmd_callback), G_CALLBACK (file_copy_location_cmd_callback),
GIMP_HELP_FILE_COPY_LOCATION }, GIMP_HELP_FILE_COPY_LOCATION },
{ "file-show-in-file-manager", "gtk-directory", { "file-show-in-file-manager", GIMP_STOCK_FILE_MANAGER,
NC_("file-action", "Show in _File Manager"), "<primary><alt>F", NC_("file-action", "Show in _File Manager"), "<primary><alt>F",
NC_("file-action", "Show image file location in the file manager"), NC_("file-action", "Show image file location in the file manager"),
G_CALLBACK (file_show_in_file_manager_cmd_callback), G_CALLBACK (file_show_in_file_manager_cmd_callback),
@@ -156,8 +156,8 @@ static const GimpEnumActionEntry file_save_actions[] =
GIMP_HELP_FILE_SAVE }, GIMP_HELP_FILE_SAVE },
{ "file-export", NULL, { "file-export", NULL,
NC_("file-action", "Export"), "<primary>E", NC_("file-action", "Export..."), "<primary>E",
NC_("file-action", "Export the image again"), NC_("file-action", "Export the image"),
GIMP_SAVE_MODE_EXPORT, FALSE, GIMP_SAVE_MODE_EXPORT, FALSE,
GIMP_HELP_FILE_EXPORT }, GIMP_HELP_FILE_EXPORT },
@@ -217,17 +217,11 @@ file_actions_setup (GimpActionGroup *group)
for (i = 0; i < n_entries; i++) for (i = 0; i < n_entries; i++)
{ {
GtkAction *action;
gimp_action_group_set_action_visible (group, entries[i].name, FALSE); gimp_action_group_set_action_visible (group, entries[i].name, FALSE);
gimp_action_group_set_action_always_show_image (group, entries[i].name, gimp_action_group_set_action_always_show_image (group, entries[i].name,
TRUE); TRUE);
gimp_action_group_set_action_context (group, entries[i].name,
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), gimp_get_user_context (group->gimp));
entries[i].name);
g_object_set (action,
"context", gimp_get_user_context (group->gimp),
NULL);
g_free ((gchar *) entries[i].name); g_free ((gchar *) entries[i].name);
if (entries[i].accelerator) if (entries[i].accelerator)
@@ -284,8 +278,9 @@ file_actions_update (GimpActionGroup *group,
show_overwrite = show_overwrite =
(source && (source &&
gimp_plug_in_manager_file_has_exporter (gimp->plug_in_manager, gimp_plug_in_manager_file_procedure_find (gimp->plug_in_manager,
source)); GIMP_FILE_PROCEDURE_GROUP_EXPORT,
source, NULL));
#define SET_VISIBLE(action,condition) \ #define SET_VISIBLE(action,condition) \
gimp_action_group_set_action_visible (group, action, (condition) != 0) gimp_action_group_set_action_visible (group, action, (condition) != 0)
@@ -306,6 +301,19 @@ file_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("file-copy-location", file || source || export); SET_SENSITIVE ("file-copy-location", file || source || export);
SET_SENSITIVE ("file-show-in-file-manager", file || source || export); SET_SENSITIVE ("file-show-in-file-manager", file || source || export);
if (file)
{
gimp_action_group_set_action_label (group,
"file-save",
C_("file-action", "_Save"));
}
else
{
gimp_action_group_set_action_label (group,
"file-save",
C_("file-action", "_Save..."));
}
if (export) if (export)
{ {
gchar *label = file_actions_create_label (_("Export to %s"), export); gchar *label = file_actions_create_label (_("Export to %s"), export);
@@ -321,7 +329,8 @@ file_actions_update (GimpActionGroup *group,
else else
{ {
gimp_action_group_set_action_label (group, gimp_action_group_set_action_label (group,
"file-export", _("Export")); "file-export",
C_("file-action", "Export..."));
} }
/* needed for the empty display */ /* needed for the empty display */

View File

@@ -36,25 +36,28 @@
#include "core/gimpprogress.h" #include "core/gimpprogress.h"
#include "core/gimptemplate.h" #include "core/gimptemplate.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager-file.h"
#include "file/file-open.h" #include "file/file-open.h"
#include "file/file-procedure.h"
#include "file/file-save.h" #include "file/file-save.h"
#include "file/gimp-file.h" #include "file/gimp-file.h"
#include "widgets/gimpactiongroup.h" #include "widgets/gimpactiongroup.h"
#include "widgets/gimpclipboard.h" #include "widgets/gimpclipboard.h"
#include "widgets/gimpdialogfactory.h" #include "widgets/gimpdialogfactory.h"
#include "widgets/gimpexportdialog.h"
#include "widgets/gimpfiledialog.h" #include "widgets/gimpfiledialog.h"
#include "widgets/gimphelp-ids.h" #include "widgets/gimphelp-ids.h"
#include "widgets/gimpmessagebox.h" #include "widgets/gimpmessagebox.h"
#include "widgets/gimpmessagedialog.h" #include "widgets/gimpmessagedialog.h"
#include "widgets/gimpopendialog.h"
#include "widgets/gimpsavedialog.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h" #include "display/gimpdisplay-foreach.h"
#include "dialogs/dialogs.h"
#include "dialogs/file-save-dialog.h" #include "dialogs/file-save-dialog.h"
#include "actions.h" #include "actions.h"
@@ -63,9 +66,6 @@
#include "gimp-intl.h" #include "gimp-intl.h"
#define REVERT_DATA_KEY "revert-confirm-dialog"
/* local function prototypes */ /* local function prototypes */
static void file_open_dialog_show (Gimp *gimp, static void file_open_dialog_show (Gimp *gimp,
@@ -87,13 +87,9 @@ static GtkWidget * file_export_dialog_show (Gimp *gimp,
static void file_save_dialog_response (GtkWidget *dialog, static void file_save_dialog_response (GtkWidget *dialog,
gint response_id, gint response_id,
gpointer data); gpointer data);
static void file_save_dialog_destroyed (GtkWidget *dialog,
GimpImage *image);
static void file_export_dialog_response (GtkWidget *dialog, static void file_export_dialog_response (GtkWidget *dialog,
gint response_id, gint response_id,
gpointer data); gpointer data);
static void file_export_dialog_destroyed (GtkWidget *dialog,
GimpImage *image);
static void file_new_template_callback (GtkWidget *widget, static void file_new_template_callback (GtkWidget *widget,
const gchar *name, const gchar *name,
gpointer data); gpointer data);
@@ -255,8 +251,9 @@ file_save_cmd_callback (GtkAction *action,
if (file && ! save_proc) if (file && ! save_proc)
{ {
save_proc = save_proc =
file_procedure_find (image->gimp->plug_in_manager->save_procs, gimp_plug_in_manager_file_procedure_find (image->gimp->plug_in_manager,
file, NULL); GIMP_FILE_PROCEDURE_GROUP_SAVE,
file, NULL);
} }
if (file && save_proc) if (file && save_proc)
@@ -264,23 +261,34 @@ file_save_cmd_callback (GtkAction *action,
const gchar *version_string; const gchar *version_string;
gint rle_version; gint rle_version;
gint zlib_version; gint zlib_version;
gboolean compat_possible = FALSE;
gimp_image_get_xcf_version (image, FALSE, &rle_version, &version_string); gimp_image_get_xcf_version (image, FALSE,
gimp_image_get_xcf_version (image, TRUE, &zlib_version, NULL); &rle_version, &version_string);
gimp_image_get_xcf_version (image, TRUE,
&zlib_version, NULL);
if (rle_version != zlib_version)
compat_possible = TRUE;
if (gimp_image_get_xcf_compat_mode (image) &&
! compat_possible)
{
gimp_message (image->gimp, G_OBJECT (display),
GIMP_MESSAGE_WARNING,
_("The image uses features from %s and "
"cannot be saved for older GIMP "
"versions."),
version_string);
}
if (rle_version == zlib_version && gimp_image_get_xcf_compat_mode (image))
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_WARNING,
_("The image uses features from %s and "
"cannot be saved for older GIMP "
"versions."),
version_string);
saved = file_save_dialog_save_image (GIMP_PROGRESS (display), saved = file_save_dialog_save_image (GIMP_PROGRESS (display),
gimp, image, file, gimp, image, file,
save_proc, save_proc,
GIMP_RUN_WITH_LAST_VALS, GIMP_RUN_WITH_LAST_VALS,
TRUE, FALSE, FALSE, TRUE, FALSE, FALSE,
gimp_image_get_xcf_compat_mode (image) && gimp_image_get_xcf_compat_mode (image) &&
rle_version != zlib_version, compat_possible,
TRUE); TRUE);
break; break;
} }
@@ -343,8 +351,9 @@ file_save_cmd_callback (GtkAction *action,
if (file && ! export_proc) if (file && ! export_proc)
{ {
export_proc = export_proc =
file_procedure_find (image->gimp->plug_in_manager->export_procs, gimp_plug_in_manager_file_procedure_find (image->gimp->plug_in_manager,
file, NULL); GIMP_FILE_PROCEDURE_GROUP_EXPORT,
file, NULL);
} }
if (file && export_proc) if (file && export_proc)
@@ -408,20 +417,20 @@ file_revert_cmd_callback (GtkAction *action,
if (! file) if (! file)
file = gimp_image_get_imported_file (image); file = gimp_image_get_imported_file (image);
dialog = g_object_get_data (G_OBJECT (image), REVERT_DATA_KEY);
if (! file) if (! file)
{ {
gimp_message_literal (image->gimp, gimp_message_literal (image->gimp,
G_OBJECT (display), GIMP_MESSAGE_ERROR, G_OBJECT (display), GIMP_MESSAGE_ERROR,
_("Revert failed. " _("Revert failed. "
"No file name associated with this image.")); "No file name associated with this image."));
return;
} }
else if (dialog)
{ #define REVERT_DIALOG_KEY "gimp-revert-confirm-dialog"
gtk_window_present (GTK_WINDOW (dialog));
} dialog = dialogs_get_dialog (G_OBJECT (image), REVERT_DIALOG_KEY);
else
if (! dialog)
{ {
dialog = dialog =
gimp_message_dialog_new (_("Revert Image"), "document-revert", gimp_message_dialog_new (_("Revert Image"), "document-revert",
@@ -457,10 +466,10 @@ file_revert_cmd_callback (GtkAction *action,
"on disk, you will lose all changes, " "on disk, you will lose all changes, "
"including all undo information.")); "including all undo information."));
g_object_set_data (G_OBJECT (image), REVERT_DATA_KEY, dialog); dialogs_attach_dialog (G_OBJECT (image), REVERT_DIALOG_KEY, dialog);
gtk_widget_show (dialog);
} }
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
@@ -578,9 +587,6 @@ file_open_dialog_show (Gimp *gimp,
NULL /*ui_manager*/, NULL /*ui_manager*/,
"gimp-file-open-dialog", -1, FALSE); "gimp-file-open-dialog", -1, FALSE);
if (file)
g_object_ref (file);
if (dialog) if (dialog)
{ {
if (! file && image) if (! file && image)
@@ -591,13 +597,19 @@ file_open_dialog_show (Gimp *gimp,
GIMP_FILE_OPEN_LAST_FILE_KEY); GIMP_FILE_OPEN_LAST_FILE_KEY);
if (file) if (file)
gtk_file_chooser_set_file (GTK_FILE_CHOOSER (dialog), file, NULL); {
gtk_file_chooser_set_file (GTK_FILE_CHOOSER (dialog), file, NULL);
}
else if (gimp->default_folder) else if (gimp->default_folder)
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog), {
gimp->default_folder, NULL); gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog),
gimp->default_folder, NULL);
}
gimp_file_dialog_set_open_image (GIMP_FILE_DIALOG (dialog), gtk_window_set_title (GTK_WINDOW (dialog), title);
image, open_as_layers);
gimp_open_dialog_set_image (GIMP_OPEN_DIALOG (dialog),
image, open_as_layers);
gtk_window_set_transient_for (GTK_WINDOW (dialog), gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (gtk_widget_get_toplevel (parent))); GTK_WINDOW (gtk_widget_get_toplevel (parent)));
@@ -617,7 +629,9 @@ file_save_dialog_show (Gimp *gimp,
{ {
GtkWidget *dialog; GtkWidget *dialog;
dialog = g_object_get_data (G_OBJECT (image), "gimp-file-save-dialog"); #define SAVE_DIALOG_KEY "gimp-file-save-dialog"
dialog = dialogs_get_dialog (G_OBJECT (image), SAVE_DIALOG_KEY);
if (! dialog) if (! dialog)
{ {
@@ -633,15 +647,14 @@ file_save_dialog_show (Gimp *gimp,
gtk_window_set_transient_for (GTK_WINDOW (dialog), gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (gtk_widget_get_toplevel (parent))); GTK_WINDOW (gtk_widget_get_toplevel (parent)));
g_object_set_data_full (G_OBJECT (image), dialogs_attach_dialog (G_OBJECT (image), SAVE_DIALOG_KEY, dialog);
"gimp-file-save-dialog", dialog, g_signal_connect_object (image, "disconnect",
(GDestroyNotify) gtk_widget_destroy); G_CALLBACK (gtk_widget_destroy),
dialog, G_CONNECT_SWAPPED);
g_signal_connect (dialog, "response", g_signal_connect (dialog, "response",
G_CALLBACK (file_save_dialog_response), G_CALLBACK (file_save_dialog_response),
image); image);
g_signal_connect (dialog, "destroy",
G_CALLBACK (file_save_dialog_destroyed),
image);
} }
} }
@@ -649,9 +662,9 @@ file_save_dialog_show (Gimp *gimp,
{ {
gtk_window_set_title (GTK_WINDOW (dialog), title); gtk_window_set_title (GTK_WINDOW (dialog), title);
gimp_file_dialog_set_save_image (GIMP_FILE_DIALOG (dialog), gimp_save_dialog_set_image (GIMP_SAVE_DIALOG (dialog),
gimp, image, save_a_copy, FALSE, image, save_a_copy,
close_after_saving, GIMP_OBJECT (display)); close_after_saving, GIMP_OBJECT (display));
gtk_window_present (GTK_WINDOW (dialog)); gtk_window_present (GTK_WINDOW (dialog));
} }
@@ -679,8 +692,8 @@ file_save_dialog_response (GtkWidget *dialog,
basename = g_path_get_basename (gimp_file_get_utf8_name (file)); basename = g_path_get_basename (gimp_file_get_utf8_name (file));
g_object_unref (file); g_object_unref (file);
other = file_export_dialog_show (file_dialog->image->gimp, other = file_export_dialog_show (GIMP_FILE_DIALOG (file_dialog)->image->gimp,
file_dialog->image, GIMP_FILE_DIALOG (file_dialog)->image,
GTK_WIDGET (parent)); GTK_WIDGET (parent));
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (other), gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (other),
@@ -692,14 +705,6 @@ file_save_dialog_response (GtkWidget *dialog,
} }
} }
static void
file_save_dialog_destroyed (GtkWidget *dialog,
GimpImage *image)
{
if (GIMP_FILE_DIALOG (dialog)->image == image)
g_object_set_data (G_OBJECT (image), "gimp-file-save-dialog", NULL);
}
static GtkWidget * static GtkWidget *
file_export_dialog_show (Gimp *gimp, file_export_dialog_show (Gimp *gimp,
GimpImage *image, GimpImage *image,
@@ -707,7 +712,9 @@ file_export_dialog_show (Gimp *gimp,
{ {
GtkWidget *dialog; GtkWidget *dialog;
dialog = g_object_get_data (G_OBJECT (image), "gimp-file-export-dialog"); #define EXPORT_DIALOG_KEY "gimp-file-export-dialog"
dialog = dialogs_get_dialog (G_OBJECT (image), EXPORT_DIALOG_KEY);
if (! dialog) if (! dialog)
{ {
@@ -723,23 +730,20 @@ file_export_dialog_show (Gimp *gimp,
gtk_window_set_transient_for (GTK_WINDOW (dialog), gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (gtk_widget_get_toplevel (parent))); GTK_WINDOW (gtk_widget_get_toplevel (parent)));
g_object_set_data_full (G_OBJECT (image), dialogs_attach_dialog (G_OBJECT (image), EXPORT_DIALOG_KEY, dialog);
"gimp-file-export-dialog", dialog, g_signal_connect_object (image, "disconnect",
(GDestroyNotify) gtk_widget_destroy); G_CALLBACK (gtk_widget_destroy),
dialog, G_CONNECT_SWAPPED);
g_signal_connect (dialog, "response", g_signal_connect (dialog, "response",
G_CALLBACK (file_export_dialog_response), G_CALLBACK (file_export_dialog_response),
image); image);
g_signal_connect (dialog, "destroy",
G_CALLBACK (file_export_dialog_destroyed),
image);
} }
} }
if (dialog) if (dialog)
{ {
gimp_file_dialog_set_save_image (GIMP_FILE_DIALOG (dialog), gimp_export_dialog_set_image (GIMP_EXPORT_DIALOG (dialog), image);
gimp, image, FALSE, TRUE,
FALSE, NULL);
gtk_window_present (GTK_WINDOW (dialog)); gtk_window_present (GTK_WINDOW (dialog));
} }
@@ -767,8 +771,8 @@ file_export_dialog_response (GtkWidget *dialog,
basename = g_path_get_basename (gimp_file_get_utf8_name (file)); basename = g_path_get_basename (gimp_file_get_utf8_name (file));
g_object_unref (file); g_object_unref (file);
other = file_save_dialog_show (file_dialog->image->gimp, other = file_save_dialog_show (GIMP_FILE_DIALOG (file_dialog)->image->gimp,
file_dialog->image, GIMP_FILE_DIALOG (file_dialog)->image,
GTK_WIDGET (parent), GTK_WIDGET (parent),
_("Save Image"), _("Save Image"),
FALSE, FALSE, NULL); FALSE, FALSE, NULL);
@@ -782,14 +786,6 @@ file_export_dialog_response (GtkWidget *dialog,
} }
} }
static void
file_export_dialog_destroyed (GtkWidget *dialog,
GimpImage *image)
{
if (GIMP_FILE_DIALOG (dialog)->image == image)
g_object_set_data (G_OBJECT (image), "gimp-file-export-dialog", NULL);
}
static void static void
file_new_template_callback (GtkWidget *widget, file_new_template_callback (GtkWidget *widget,
const gchar *name, const gchar *name,
@@ -818,8 +814,6 @@ file_revert_confirm_response (GtkWidget *dialog,
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
g_object_set_data (G_OBJECT (old_image), REVERT_DATA_KEY, NULL);
if (response_id == GTK_RESPONSE_OK) if (response_id == GTK_RESPONSE_OK)
{ {
Gimp *gimp = old_image->gimp; Gimp *gimp = old_image->gimp;

View File

@@ -24,11 +24,15 @@
#include "actions-types.h" #include "actions-types.h"
#include "core/gimp-filter-history.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimplayermask.h" #include "core/gimplayermask.h"
#include "pdb/gimpprocedure.h"
#include "widgets/gimpactiongroup.h" #include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h" #include "widgets/gimphelp-ids.h"
#include "widgets/gimpuimanager.h"
#include "actions.h" #include "actions.h"
#include "filters-actions.h" #include "filters-actions.h"
@@ -37,6 +41,60 @@
#include "gimp-intl.h" #include "gimp-intl.h"
/* local function prototypes */
static void filters_actions_history_changed (Gimp *gimp,
GimpActionGroup *group);
/* private variables */
static const GimpActionEntry filters_menu_actions[] =
{
{ "filters-menu", NULL, NC_("filters-action",
"Filte_rs") },
{ "filters-recent-menu", NULL, NC_("filters-action",
"Recently Used") },
{ "filters-blur-menu", NULL, NC_("filters-action",
"_Blur") },
{ "filters-noise-menu", NULL, NC_("filters-action",
"_Noise") },
{ "filters-edge-detect-menu", NULL, NC_("filters-action",
"Edge-De_tect") },
{ "filters-enhance-menu", NULL, NC_("filters-action",
"En_hance") },
{ "filters-combine-menu", NULL, NC_("filters-action",
"C_ombine") },
{ "filters-generic-menu", NULL, NC_("filters-action",
"_Generic") },
{ "filters-light-shadow-menu", NULL, NC_("filters-action",
"_Light and Shadow") },
{ "filters-distorts-menu", NULL, NC_("filters-action",
"_Distorts") },
{ "filters-artistic-menu", NULL, NC_("filters-action",
"_Artistic") },
{ "filters-decor-menu", NULL, NC_("filters-action",
"_Decor") },
{ "filters-map-menu", NULL, NC_("filters-action",
"_Map") },
{ "filters-render-menu", NULL, NC_("filters-action",
"_Render") },
{ "filters-render-clouds-menu", NULL, NC_("filters-action",
"_Clouds") },
{ "filters-render-fractals-menu", NULL, NC_("filters-action",
"_Fractals") },
{ "filters-render-nature-menu", NULL, NC_("filters-action",
"_Nature") },
{ "filters-render-noise-menu", NULL, NC_("filters-action",
"N_oise") },
{ "filters-render-pattern-menu", NULL, NC_("filters-action",
"_Pattern") },
{ "filters-web-menu", NULL, NC_("filters-action",
"_Web") },
{ "filters-animation-menu", NULL, NC_("filters-action",
"An_imation") }
};
static const GimpStringActionEntry filters_actions[] = static const GimpStringActionEntry filters_actions[] =
{ {
{ "filters-alien-map", GIMP_STOCK_GEGL, { "filters-alien-map", GIMP_STOCK_GEGL,
@@ -65,7 +123,7 @@ static const GimpStringActionEntry filters_actions[] =
NULL /* FIXME GIMP_HELP_FILTER_BUMP_MAP */ }, NULL /* FIXME GIMP_HELP_FILTER_BUMP_MAP */ },
{ "filters-c2g", GIMP_STOCK_GEGL, { "filters-c2g", GIMP_STOCK_GEGL,
NC_("filters-action", "Color to Gray..."), NULL, NULL, NC_("filters-action", "_Color to Gray..."), NULL, NULL,
"gegl:c2g", "gegl:c2g",
NULL /* FIXME GIMP_HELP_FILTER_C2G */ }, NULL /* FIXME GIMP_HELP_FILTER_C2G */ },
@@ -129,6 +187,11 @@ static const GimpStringActionEntry filters_actions[] =
"gegl:deinterlace", "gegl:deinterlace",
NULL /* FIXME GIMP_HELP_FILTER_DEINTERLACE */ }, NULL /* FIXME GIMP_HELP_FILTER_DEINTERLACE */ },
{ "filters-desaturate", GIMP_STOCK_TOOL_DESATURATE,
NC_("filters-action", "_Desaturate..."), NULL, NULL,
"gimp:desaturate",
GIMP_HELP_TOOL_DESATURATE },
{ "filters-difference-of-gaussians", GIMP_STOCK_GEGL, { "filters-difference-of-gaussians", GIMP_STOCK_GEGL,
NC_("filters-action", "Difference of Gaussians..."), NULL, NULL, NC_("filters-action", "Difference of Gaussians..."), NULL, NULL,
"gegl:difference-of-gaussians", "gegl:difference-of-gaussians",
@@ -175,12 +238,12 @@ static const GimpStringActionEntry filters_actions[] =
NULL /* FIXME GIMP_HELP_FILTER_EMBOSS */ }, NULL /* FIXME GIMP_HELP_FILTER_EMBOSS */ },
{ "filters-engrave", GIMP_STOCK_GEGL, { "filters-engrave", GIMP_STOCK_GEGL,
NC_("filters-action", "_En_grave..."), NULL, NULL, NC_("filters-action", "En_grave..."), NULL, NULL,
"gegl:engrave", "gegl:engrave",
NULL /* FIXME GIMP_HELP_FILTER_ENGRAVE */ }, NULL /* FIXME GIMP_HELP_FILTER_ENGRAVE */ },
{ "filters-exposure", GIMP_STOCK_GEGL, { "filters-exposure", GIMP_STOCK_GEGL,
NC_("filters-action", "_E_xposure..."), NULL, NULL, NC_("filters-action", "E_xposure..."), NULL, NULL,
"gegl:exposure", "gegl:exposure",
NULL /* FIXME GIMP_HELP_FILTER_EXPOSURE */ }, NULL /* FIXME GIMP_HELP_FILTER_EXPOSURE */ },
@@ -194,11 +257,26 @@ static const GimpStringActionEntry filters_actions[] =
"gegl:gaussian-blur", "gegl:gaussian-blur",
NULL /* FIXME GIMP_HELP_FILTER_GAUSSIAN_BLUR */ }, NULL /* FIXME GIMP_HELP_FILTER_GAUSSIAN_BLUR */ },
{ "filters-gaussian-blur-selective", GIMP_STOCK_GEGL,
NC_("filters-action", "_Selective Gaussian Blur..."), NULL, NULL,
"gegl:gaussian-blur-selective",
NULL /* FIXME GIMP_HELP_FILTER_GAUSSIAN_BLUR_SELECTIVE */ },
{ "filters-gegl-graph", GIMP_STOCK_GEGL,
NC_("filters-action", "_GEGL graph..."), NULL, NULL,
"gegl:gegl",
NULL /* FIXME GIMP_HELP_FILTER_GEGL_GRAPH */ },
{ "filters-grid", GIMP_STOCK_GRID, { "filters-grid", GIMP_STOCK_GRID,
NC_("filters-action", "_Grid..."), NULL, NULL, NC_("filters-action", "_Grid..."), NULL, NULL,
"gegl:grid", "gegl:grid",
NULL /* FIXME GIMP_HELP_FILTER_GAUSSIAN_GRID */ }, NULL /* FIXME GIMP_HELP_FILTER_GAUSSIAN_GRID */ },
{ "filters-high-pass", GIMP_STOCK_GEGL,
NC_("filters-action", "_High Pass..."), NULL, NULL,
"gegl:high-pass",
NULL /* FIXME GIMP_HELP_FILTER_HIGH_PASS */ },
{ "filters-illusion", GIMP_STOCK_GEGL, { "filters-illusion", GIMP_STOCK_GEGL,
NC_("filters-action", "_Illusion..."), NULL, NULL, NC_("filters-action", "_Illusion..."), NULL, NULL,
"gegl:illusion", "gegl:illusion",
@@ -219,8 +297,13 @@ static const GimpStringActionEntry filters_actions[] =
"gegl:lens-flare", "gegl:lens-flare",
NULL /* FIXME GIMP_HELP_FILTER_LENS_FLARE */ }, NULL /* FIXME GIMP_HELP_FILTER_LENS_FLARE */ },
{ "filters-maze", GIMP_STOCK_GEGL,
NC_("filters-action", "_Maze..."), NULL, NULL,
"gegl:maze",
NULL /* FIXME GIMP_HELP_FILTER_MAZE */ },
{ "filters-mono-mixer", GIMP_STOCK_GEGL, { "filters-mono-mixer", GIMP_STOCK_GEGL,
NC_("filters-action", "Mono Mixer..."), NULL, NULL, NC_("filters-action", "_Mono Mixer..."), NULL, NULL,
"gegl:mono-mixer", "gegl:mono-mixer",
NULL /* FIXME GIMP_HELP_FILTER_MONO_MIXER */ }, NULL /* FIXME GIMP_HELP_FILTER_MONO_MIXER */ },
@@ -334,6 +417,11 @@ static const GimpStringActionEntry filters_actions[] =
"gegl:polar-coordinates", "gegl:polar-coordinates",
NULL /* FIXME GIMP_HELP_FILTER_POLAR_COORDINATES */ }, NULL /* FIXME GIMP_HELP_FILTER_POLAR_COORDINATES */ },
{ "filters-posterize", GIMP_STOCK_TOOL_POSTERIZE,
NC_("filters-action", "_Posterize..."), NULL, NULL,
"gimp:posterize",
GIMP_HELP_TOOL_POSTERIZE },
{ "filters-red-eye-removal", GIMP_STOCK_GEGL, { "filters-red-eye-removal", GIMP_STOCK_GEGL,
NC_("filters-action", "_Red Eye Removal..."), NULL, NULL, NC_("filters-action", "_Red Eye Removal..."), NULL, NULL,
"gegl:red-eye-removal", "gegl:red-eye-removal",
@@ -344,10 +432,20 @@ static const GimpStringActionEntry filters_actions[] =
"gegl:ripple", "gegl:ripple",
NULL /* FIXME GIMP_HELP_FILTER_RIPPLE */ }, NULL /* FIXME GIMP_HELP_FILTER_RIPPLE */ },
{ "filters-saturation", GIMP_STOCK_GEGL,
NC_("filters-action", "Sat_uration..."), NULL, NULL,
"gegl:saturation",
NULL /* FIXME GIMP_HELP_FILTER_SATURATION */ },
{ "filters-semi-flatten", GIMP_STOCK_GEGL, { "filters-semi-flatten", GIMP_STOCK_GEGL,
NC_("filters-action", "_Semi-Flatten..."), NULL, NULL, NC_("filters-action", "_Semi-Flatten..."), NULL, NULL,
"gimp:semi-flatten", "gimp:semi-flatten",
NULL /* FIXME GIMP_HELP_FILTER_POLAR_COORDINATES */ }, NULL /* FIXME GIMP_HELP_FILTER_SEMI_FLATTEN */ },
{ "filters-sepia", GIMP_STOCK_GEGL,
NC_("filters-action", "_Sepia..."), NULL, NULL,
"gegl:sepia",
NULL /* FIXME GIMP_HELP_FILTER_SEPIA */ },
{ "filters-shift", GIMP_STOCK_GEGL, { "filters-shift", GIMP_STOCK_GEGL,
NC_("filters-action", "_Shift..."), NULL, NULL, NC_("filters-action", "_Shift..."), NULL, NULL,
@@ -375,7 +473,7 @@ static const GimpStringActionEntry filters_actions[] =
NULL /* FIXME GIMP_HELP_FILTER_STRETCH_CONTRAST_HSV */ }, NULL /* FIXME GIMP_HELP_FILTER_STRETCH_CONTRAST_HSV */ },
{ "filters-supernova", GIMP_STOCK_GEGL, { "filters-supernova", GIMP_STOCK_GEGL,
NC_("filters-action", "_Super_nova..."), NULL, NULL, NC_("filters-action", "Super_nova..."), NULL, NULL,
"gegl:supernova", "gegl:supernova",
NULL /* FIXME GIMP_HELP_FILTER_SUPERNOVA */ }, NULL /* FIXME GIMP_HELP_FILTER_SUPERNOVA */ },
@@ -432,19 +530,47 @@ static const GimpStringActionEntry filters_actions[] =
{ "filters-wind", GIMP_STOCK_GEGL, { "filters-wind", GIMP_STOCK_GEGL,
NC_("filters-action", "W_ind..."), NULL, NULL, NC_("filters-action", "W_ind..."), NULL, NULL,
"gegl:wind", "gegl:wind",
NULL /* FIXME GIMP_HELP_FILTER_WIND */ }, NULL /* FIXME GIMP_HELP_FILTER_WIND */ }
}; };
static const GimpEnumActionEntry filters_repeat_actions[] =
{
{ "filters-repeat", "system-run",
NC_("filters-action", "Re_peat Last"), "<primary>F",
NC_("filters-action",
"Rerun the last used filter using the same settings"),
GIMP_RUN_WITH_LAST_VALS, FALSE,
GIMP_HELP_FILTER_REPEAT },
{ "filters-reshow", GIMP_STOCK_RESHOW_FILTER,
NC_("filters-action", "R_e-Show Last"), "<primary><shift>F",
NC_("filters-action", "Show the last used filter dialog again"),
GIMP_RUN_INTERACTIVE, FALSE,
GIMP_HELP_FILTER_RESHOW }
};
void void
filters_actions_setup (GimpActionGroup *group) filters_actions_setup (GimpActionGroup *group)
{ {
gint i; GimpProcedureActionEntry *entries;
gint n_entries;
gint i;
gimp_action_group_add_actions (group, "filters-action",
filters_menu_actions,
G_N_ELEMENTS (filters_menu_actions));
gimp_action_group_add_string_actions (group, "filters-action", gimp_action_group_add_string_actions (group, "filters-action",
filters_actions, filters_actions,
G_N_ELEMENTS (filters_actions), G_N_ELEMENTS (filters_actions),
G_CALLBACK (filters_filter_cmd_callback)); G_CALLBACK (filters_filter_cmd_callback));
gimp_action_group_add_enum_actions (group, "filters-action",
filters_repeat_actions,
G_N_ELEMENTS (filters_repeat_actions),
G_CALLBACK (filters_repeat_cmd_callback));
for (i = 0; i < G_N_ELEMENTS (filters_actions); i++) for (i = 0; i < G_N_ELEMENTS (filters_actions); i++)
{ {
const GimpStringActionEntry *entry = &filters_actions[i]; const GimpStringActionEntry *entry = &filters_actions[i];
@@ -456,6 +582,38 @@ filters_actions_setup (GimpActionGroup *group)
gimp_action_group_set_action_tooltip (group, entry->name, gimp_action_group_set_action_tooltip (group, entry->name,
description); description);
} }
n_entries = gimp_filter_history_size (group->gimp);
entries = g_new0 (GimpProcedureActionEntry, n_entries);
for (i = 0; i < n_entries; i++)
{
entries[i].name = g_strdup_printf ("filters-recent-%02d", i + 1);
entries[i].icon_name = NULL;
entries[i].label = "";
entries[i].accelerator = "";
entries[i].tooltip = NULL;
entries[i].procedure = NULL;
entries[i].help_id = GIMP_HELP_FILTER_RESHOW;
}
gimp_action_group_add_procedure_actions (group, entries, n_entries,
G_CALLBACK (filters_history_cmd_callback));
for (i = 0; i < n_entries; i++)
{
gimp_action_group_set_action_visible (group, entries[i].name, FALSE);
g_free ((gchar *) entries[i].name);
}
g_free (entries);
g_signal_connect_object (group->gimp, "filter-history-changed",
G_CALLBACK (filters_actions_history_changed),
group, 0);
filters_actions_history_changed (group->gimp, group);
} }
void void
@@ -503,6 +661,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-bump-map", writable); SET_SENSITIVE ("filters-bump-map", writable);
SET_SENSITIVE ("filters-c2g", writable && !gray); SET_SENSITIVE ("filters-c2g", writable && !gray);
SET_SENSITIVE ("filters-cartoon", writable); SET_SENSITIVE ("filters-cartoon", writable);
SET_SENSITIVE ("filters-channel-mixer", writable);
SET_SENSITIVE ("filters-checkerboard", writable); SET_SENSITIVE ("filters-checkerboard", writable);
SET_SENSITIVE ("filters-color-enhance", writable && !gray); SET_SENSITIVE ("filters-color-enhance", writable && !gray);
SET_SENSITIVE ("filters-color-exchange", writable); SET_SENSITIVE ("filters-color-exchange", writable);
@@ -513,6 +672,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-convolution-matrix", writable); SET_SENSITIVE ("filters-convolution-matrix", writable);
SET_SENSITIVE ("filters-cubism", writable); SET_SENSITIVE ("filters-cubism", writable);
SET_SENSITIVE ("filters-deinterlace", writable); SET_SENSITIVE ("filters-deinterlace", writable);
SET_SENSITIVE ("filters-desaturate", writable && !gray);
SET_SENSITIVE ("filters-difference-of-gaussians", writable); SET_SENSITIVE ("filters-difference-of-gaussians", writable);
SET_SENSITIVE ("filters-diffraction-patterns", writable); SET_SENSITIVE ("filters-diffraction-patterns", writable);
SET_SENSITIVE ("filters-displace", writable); SET_SENSITIVE ("filters-displace", writable);
@@ -526,11 +686,15 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-exposure", writable); SET_SENSITIVE ("filters-exposure", writable);
SET_SENSITIVE ("filters-fractal-trace", writable); SET_SENSITIVE ("filters-fractal-trace", writable);
SET_SENSITIVE ("filters-gaussian-blur", writable); SET_SENSITIVE ("filters-gaussian-blur", writable);
SET_SENSITIVE ("filters-gaussian-blur-selective", writable);
SET_SENSITIVE ("filters-gegl-graph", writable);
SET_SENSITIVE ("filters-grid", writable); SET_SENSITIVE ("filters-grid", writable);
SET_SENSITIVE ("filters-high-pass", writable);
SET_SENSITIVE ("filters-illusion", writable); SET_SENSITIVE ("filters-illusion", writable);
SET_SENSITIVE ("filters-kaleidoscope", writable); SET_SENSITIVE ("filters-kaleidoscope", writable);
SET_SENSITIVE ("filters-lens-distortion", writable); SET_SENSITIVE ("filters-lens-distortion", writable);
SET_SENSITIVE ("filters-lens-flare", writable); SET_SENSITIVE ("filters-lens-flare", writable);
SET_SENSITIVE ("filters-maze", writable);
SET_SENSITIVE ("filters-mono-mixer", writable && !gray); SET_SENSITIVE ("filters-mono-mixer", writable && !gray);
SET_SENSITIVE ("filters-mosaic", writable); SET_SENSITIVE ("filters-mosaic", writable);
SET_SENSITIVE ("filters-motion-blur-circular", writable); SET_SENSITIVE ("filters-motion-blur-circular", writable);
@@ -554,9 +718,12 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-pixelize", writable); SET_SENSITIVE ("filters-pixelize", writable);
SET_SENSITIVE ("filters-plasma", writable); SET_SENSITIVE ("filters-plasma", writable);
SET_SENSITIVE ("filters-polar-coordinates", writable); SET_SENSITIVE ("filters-polar-coordinates", writable);
SET_SENSITIVE ("filters-posterize", writable);
SET_SENSITIVE ("filters-red-eye-removal", writable && !gray); SET_SENSITIVE ("filters-red-eye-removal", writable && !gray);
SET_SENSITIVE ("filters-ripple", writable); SET_SENSITIVE ("filters-ripple", writable);
SET_SENSITIVE ("filters-saturation", writable && !gray);
SET_SENSITIVE ("filters-semi-flatten", writable && alpha); SET_SENSITIVE ("filters-semi-flatten", writable && alpha);
SET_SENSITIVE ("filters-sepia", writable && !gray);
SET_SENSITIVE ("filters-shift", writable); SET_SENSITIVE ("filters-shift", writable);
SET_SENSITIVE ("filters-sinus", writable); SET_SENSITIVE ("filters-sinus", writable);
SET_SENSITIVE ("filters-softglow", writable); SET_SENSITIVE ("filters-softglow", writable);
@@ -568,6 +735,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-tile-paper", writable); SET_SENSITIVE ("filters-tile-paper", writable);
SET_SENSITIVE ("filters-tile-seamless", writable); SET_SENSITIVE ("filters-tile-seamless", writable);
SET_SENSITIVE ("filters-unsharp-mask", writable); SET_SENSITIVE ("filters-unsharp-mask", writable);
SET_SENSITIVE ("filters-value-propagate", writable);
SET_SENSITIVE ("filters-video-degradation", writable); SET_SENSITIVE ("filters-video-degradation", writable);
SET_SENSITIVE ("filters-vignette", writable); SET_SENSITIVE ("filters-vignette", writable);
SET_SENSITIVE ("filters-waves", writable); SET_SENSITIVE ("filters-waves", writable);
@@ -575,4 +743,181 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-wind", writable); SET_SENSITIVE ("filters-wind", writable);
#undef SET_SENSITIVE #undef SET_SENSITIVE
{
GimpProcedure *proc = gimp_filter_history_nth (group->gimp, 0);
gint i;
if (proc && gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable)))
{
gimp_action_group_set_action_sensitive (group, "filters-repeat", TRUE);
gimp_action_group_set_action_sensitive (group, "filters-reshow", TRUE);
}
else
{
gimp_action_group_set_action_sensitive (group, "filters-repeat", FALSE);
gimp_action_group_set_action_sensitive (group, "filters-reshow", FALSE);
}
for (i = 0; i < gimp_filter_history_length (group->gimp); i++)
{
gchar *name = g_strdup_printf ("filters-recent-%02d", i + 1);
gboolean sensitive;
proc = gimp_filter_history_nth (group->gimp, i);
sensitive = gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable));
gimp_action_group_set_action_sensitive (group, name, sensitive);
g_free (name);
}
}
}
static GimpActionGroup *
filters_actions_get_plug_in_group (GimpActionGroup *group)
{
GList *list;
for (list = gimp_ui_managers_from_name ("<Image>");
list;
list = g_list_next (list))
{
GimpUIManager *manager = list->data;
/* if this is our UI manager */
if (gimp_ui_manager_get_action_group (manager, "filters") == group)
return gimp_ui_manager_get_action_group (manager, "plug-in");
}
/* this happens during initial UI manager construction */
return NULL;
}
static void
filters_actions_history_changed (Gimp *gimp,
GimpActionGroup *group)
{
GimpProcedure *proc;
GimpActionGroup *plug_in_group;
gint i;
plug_in_group = filters_actions_get_plug_in_group (group);
proc = gimp_filter_history_nth (gimp, 0);
if (proc)
{
GtkAction *actual_action = NULL;
const gchar *label;
gchar *repeat;
gchar *reshow;
gboolean sensitive = FALSE;
label = gimp_procedure_get_label (proc);
repeat = g_strdup_printf (_("Re_peat \"%s\""), label);
reshow = g_strdup_printf (_("R_e-Show \"%s\""), label);
gimp_action_group_set_action_label (group, "filters-repeat", repeat);
gimp_action_group_set_action_label (group, "filters-reshow", reshow);
g_free (repeat);
g_free (reshow);
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));
}
else if (plug_in_group)
{
/* copy the sensitivity of the plug-in procedure's actual
* action instead of calling filters_actions_update()
* because doing the latter would set the sensitivity of
* this image's action on all images' actions. See bug
* #517683.
*/
actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (plug_in_group),
gimp_object_get_name (proc));
}
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
gimp_action_group_set_action_sensitive (group, "filters-repeat",
sensitive);
gimp_action_group_set_action_sensitive (group, "filters-reshow",
sensitive);
}
else
{
gimp_action_group_set_action_label (group, "filters-repeat",
_("Repeat Last"));
gimp_action_group_set_action_label (group, "filters-reshow",
_("Re-Show Last"));
gimp_action_group_set_action_sensitive (group, "filters-repeat", FALSE);
gimp_action_group_set_action_sensitive (group, "filters-reshow", FALSE);
}
for (i = 0; i < gimp_filter_history_length (gimp); i++)
{
GtkAction *action;
GtkAction *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);
g_free (name);
proc = gimp_filter_history_nth (gimp, i);
label = gimp_procedure_get_menu_label (proc);
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));
}
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));
}
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
g_object_set (action,
"visible", TRUE,
"sensitive", sensitive,
"procedure", proc,
"label", label,
"icon-name", gimp_viewable_get_icon_name (GIMP_VIEWABLE (proc)),
"tooltip", gimp_procedure_get_blurb (proc),
NULL);
}
for (; i < gimp_filter_history_size (gimp); i++)
{
GtkAction *action;
gchar *name = g_strdup_printf ("filters-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
g_free (name);
g_object_set (action,
"visible", FALSE,
"procedure", NULL,
NULL);
}
} }

View File

@@ -21,21 +21,18 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h" #include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h" #include "actions-types.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpcontext.h" #include "core/gimp-filter-history.h"
#include "core/gimpimage.h" #include "core/gimpprogress.h"
#include "core/gimptoolinfo.h"
#include "tools/gimpoperationtool.h"
#include "tools/tool_manager.h"
#include "actions.h" #include "actions.h"
#include "filters-commands.h" #include "filters-commands.h"
#include "gimpgeglprocedure.h"
#include "gimp-intl.h" #include "procedure-commands.h"
/* public functions */ /* public functions */
@@ -45,51 +42,85 @@ filters_filter_cmd_callback (GtkAction *action,
const gchar *operation, const gchar *operation,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpDisplay *display;
GimpDrawable *drawable; GimpProcedure *procedure;
GimpDisplay *display;
GimpTool *active_tool;
return_if_no_drawable (image, drawable, data);
return_if_no_display (display, data); return_if_no_display (display, data);
active_tool = tool_manager_get_active (image->gimp); procedure = gimp_gegl_procedure_new (action_data_get_gimp (data),
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));
if (G_TYPE_FROM_INSTANCE (active_tool) != GIMP_TYPE_OPERATION_TOOL) gimp_filter_history_add (action_data_get_gimp (data), procedure);
filters_history_cmd_callback (NULL, procedure, data);
g_object_unref (procedure);
}
void
filters_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
Gimp *gimp;
GimpDisplay *display;
GimpRunMode run_mode;
GimpProcedure *procedure;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
run_mode = (GimpRunMode) value;
procedure = gimp_filter_history_nth (gimp, 0);
if (procedure)
{ {
GimpToolInfo *tool_info = gimp_get_tool_info (image->gimp, GimpValueArray *args;
"gimp-operation-tool");
if (GIMP_IS_TOOL_INFO (tool_info)) args = procedure_commands_get_display_args (procedure, display);
gimp_context_set_tool (action_data_get_context (data), tool_info);
}
else
{
gimp_context_tool_changed (action_data_get_context (data));
}
active_tool = tool_manager_get_active (image->gimp); if (args)
if (GIMP_IS_OPERATION_TOOL (active_tool))
{
gchar *label = gimp_strip_uline (gtk_action_get_label (action));
const gchar *ellipsis = _("...");
gint label_len;
gint ellipsis_len;
label_len = strlen (label);
ellipsis_len = strlen (ellipsis);
if (label_len > ellipsis_len &&
strcmp (label + label_len - ellipsis_len, ellipsis) == 0)
{ {
label[label_len - ellipsis_len] = '\0'; if (procedure_commands_run_procedure (procedure, gimp,
GIMP_PROGRESS (display),
run_mode, args,
display))
{
gimp_filter_history_add (gimp, procedure);
}
gimp_value_array_unref (args);
} }
}
gimp_operation_tool_set_operation (GIMP_OPERATION_TOOL (active_tool), }
operation, label,
gtk_action_get_icon_name (action)); void
tool_manager_initialize_active (image->gimp, display); filters_history_cmd_callback (GtkAction *action,
GimpProcedure *procedure,
g_free (label); gpointer data)
{
Gimp *gimp;
GimpDisplay *display;
GimpValueArray *args;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
args = procedure_commands_get_display_args (procedure, display);
if (args)
{
if (procedure_commands_run_procedure (procedure, gimp,
GIMP_PROGRESS (display),
GIMP_RUN_INTERACTIVE, args,
display))
{
gimp_filter_history_add (gimp, procedure);
}
gimp_value_array_unref (args);
} }
} }

View File

@@ -19,9 +19,16 @@
#define __FILTERS_COMMANDS_H__ #define __FILTERS_COMMANDS_H__
void filters_filter_cmd_callback (GtkAction *action, void filters_filter_cmd_callback (GtkAction *action,
const gchar *operation, const gchar *operation,
gpointer data); gpointer data);
void filters_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void filters_history_cmd_callback (GtkAction *action,
GimpProcedure *procedure,
gpointer data);
#endif /* __FILTERS_COMMANDS_H__ */ #endif /* __FILTERS_COMMANDS_H__ */

View File

@@ -40,7 +40,7 @@
static const GimpActionEntry fonts_actions[] = static const GimpActionEntry fonts_actions[] =
{ {
{ "fonts-popup", GIMP_STOCK_FONT, { "fonts-popup", "gtk-select-font",
NC_("fonts-action", "Fonts Menu"), NULL, NULL, NULL, NC_("fonts-action", "Fonts Menu"), NULL, NULL, NULL,
GIMP_HELP_FONT_DIALOG }, GIMP_HELP_FONT_DIALOG },

View File

@@ -26,13 +26,9 @@
#include "text/gimp-fonts.h" #include "text/gimp-fonts.h"
#include "widgets/gimpfontview.h"
#include "actions.h" #include "actions.h"
#include "fonts-commands.h" #include "fonts-commands.h"
#include "gimp-intl.h"
/* public functionss */ /* public functionss */
@@ -43,5 +39,5 @@ fonts_refresh_cmd_callback (GtkAction *action,
GimpContext *context = action_data_get_context (data); GimpContext *context = action_data_get_context (data);
if (context) if (context)
gimp_fonts_load (context->gimp); gimp_fonts_load (context->gimp, NULL);
} }

View File

@@ -0,0 +1,405 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpgeglprocedure.c
* Copyright (C) 2016 Michael Natterer <mitch@gimp.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpconfig/gimpconfig.h"
#include "actions-types.h"
#include "core/gimp.h"
#include "core/gimp-memsize.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable-operation.h"
#include "core/gimpimage.h"
#include "core/gimplayermask.h"
#include "core/gimpparamspecs.h"
#include "core/gimpsettings.h"
#include "core/gimptoolinfo.h"
#include "gegl/gimp-gegl-config.h"
#include "display/gimpdisplay.h"
#include "tools/gimpoperationtool.h"
#include "tools/tool_manager.h"
#include "gimpgeglprocedure.h"
#include "gimp-intl.h"
static void gimp_gegl_procedure_finalize (GObject *object);
static gint64 gimp_gegl_procedure_get_memsize (GimpObject *object,
gint64 *gui_size);
static gchar * gimp_gegl_procedure_get_description (GimpViewable *viewable,
gchar **tooltip);
static const gchar * gimp_gegl_procedure_get_label (GimpProcedure *procedure);
static const gchar * gimp_gegl_procedure_get_menu_label (GimpProcedure *procedure);
static const gchar * gimp_gegl_procedure_get_help_id (GimpProcedure *procedure);
static gboolean gimp_gegl_procedure_get_sensitive (GimpProcedure *procedure,
GimpObject *object);
static GimpValueArray * gimp_gegl_procedure_execute (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
GimpValueArray *args,
GError **error);
static void gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
GimpValueArray *args,
GimpObject *display);
G_DEFINE_TYPE (GimpGeglProcedure, gimp_gegl_procedure,
GIMP_TYPE_PROCEDURE)
#define parent_class gimp_gegl_procedure_parent_class
static void
gimp_gegl_procedure_class_init (GimpGeglProcedureClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
GimpProcedureClass *proc_class = GIMP_PROCEDURE_CLASS (klass);
object_class->finalize = gimp_gegl_procedure_finalize;
gimp_object_class->get_memsize = gimp_gegl_procedure_get_memsize;
viewable_class->default_icon_name = "gimp-gegl";
viewable_class->get_description = gimp_gegl_procedure_get_description;
proc_class->get_label = gimp_gegl_procedure_get_label;
proc_class->get_menu_label = gimp_gegl_procedure_get_menu_label;
proc_class->get_help_id = gimp_gegl_procedure_get_help_id;
proc_class->get_sensitive = gimp_gegl_procedure_get_sensitive;
proc_class->execute = gimp_gegl_procedure_execute;
proc_class->execute_async = gimp_gegl_procedure_execute_async;
}
static void
gimp_gegl_procedure_init (GimpGeglProcedure *proc)
{
}
static void
gimp_gegl_procedure_finalize (GObject *object)
{
GimpGeglProcedure *proc = GIMP_GEGL_PROCEDURE (object);
g_free (proc->menu_label);
g_free (proc->label);
g_free (proc->help_id);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gint64
gimp_gegl_procedure_get_memsize (GimpObject *object,
gint64 *gui_size)
{
GimpGeglProcedure *proc = GIMP_GEGL_PROCEDURE (object);
gint64 memsize = 0;
memsize += gimp_string_get_memsize (proc->menu_label);
memsize += gimp_string_get_memsize (proc->label);
return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
gui_size);
}
static gchar *
gimp_gegl_procedure_get_description (GimpViewable *viewable,
gchar **tooltip)
{
GimpProcedure *procedure = GIMP_PROCEDURE (viewable);
if (tooltip)
*tooltip = g_strdup (gimp_procedure_get_blurb (procedure));
return g_strdup (gimp_procedure_get_label (procedure));
}
static const gchar *
gimp_gegl_procedure_get_label (GimpProcedure *procedure)
{
GimpGeglProcedure *proc = GIMP_GEGL_PROCEDURE (procedure);
gchar *ellipsis;
gchar *label;
if (proc->label)
return proc->label;
label = gimp_strip_uline (gimp_procedure_get_menu_label (procedure));
ellipsis = strstr (label, "...");
if (! ellipsis)
ellipsis = strstr (label, "\342\200\246" /* U+2026 HORIZONTAL ELLIPSIS */);
if (ellipsis && ellipsis == (label + strlen (label) - 3))
*ellipsis = '\0';
proc->label = label;
return proc->label;
}
static const gchar *
gimp_gegl_procedure_get_menu_label (GimpProcedure *procedure)
{
GimpGeglProcedure *proc = GIMP_GEGL_PROCEDURE (procedure);
if (proc->menu_label)
return proc->menu_label;
return GIMP_PROCEDURE_CLASS (parent_class)->get_menu_label (procedure);
}
static const gchar *
gimp_gegl_procedure_get_help_id (GimpProcedure *procedure)
{
GimpGeglProcedure *proc = GIMP_GEGL_PROCEDURE (procedure);
return proc->help_id;
}
static gboolean
gimp_gegl_procedure_get_sensitive (GimpProcedure *procedure,
GimpObject *object)
{
GimpDrawable *drawable;
gboolean sensitive = FALSE;
g_return_val_if_fail (object == NULL || GIMP_IS_DRAWABLE (object), FALSE);
drawable = GIMP_DRAWABLE (object);
if (drawable)
{
GimpItem *item;
if (GIMP_IS_LAYER_MASK (drawable))
item = GIMP_ITEM (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
else
item = GIMP_ITEM (drawable);
sensitive = ! gimp_item_is_content_locked (item);
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
sensitive = FALSE;
}
return sensitive;
}
static GimpValueArray *
gimp_gegl_procedure_execute (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
GimpValueArray *args,
GError **error)
{
return GIMP_PROCEDURE_CLASS (parent_class)->execute (procedure, gimp,
context, progress,
args, error);
}
static void
gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
GimpValueArray *args,
GimpObject *display)
{
GimpRunMode run_mode = g_value_get_int (gimp_value_array_index (args, 0));
GimpObject *settings;
GimpContainer *container;
GimpTool *active_tool;
settings = gimp_gegl_config_new (procedure->original_name,
gimp_viewable_get_icon_name (GIMP_VIEWABLE (procedure)),
GIMP_TYPE_SETTINGS);
container = gimp_gegl_config_get_container (G_TYPE_FROM_INSTANCE (settings));
g_object_unref (settings);
/* the last used settings */
settings = gimp_container_get_child_by_index (container, 0);
/* only use the settings if they are automatically created "last used"
* values, not if they were saved explicitly and have a zero timestamp
*/
if (settings && GIMP_SETTINGS (settings)->time == 0)
settings = NULL;
if (run_mode == GIMP_RUN_WITH_LAST_VALS)
{
if (settings)
{
GimpImage *image;
GimpDrawable *drawable;
GeglNode *node;
node = gegl_node_new_child (NULL,
"operation", procedure->original_name,
NULL);
gimp_gegl_config_sync_node (settings, node);
image = gimp_value_get_image (gimp_value_array_index (args, 1),
gimp);
drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2),
gimp);
gimp_drawable_apply_operation (drawable, progress,
gimp_procedure_get_label (procedure),
node);
g_object_unref (node);
gimp_image_flush (image);
return;
}
gimp_message (gimp,
G_OBJECT (progress), GIMP_MESSAGE_WARNING,
_("There are no last settings for '%s', "
"showing the filter dialog instead."),
gimp_procedure_get_label (procedure));
}
active_tool = tool_manager_get_active (gimp);
/* do not use the passed context because we need to set the active
* tool on the global user context
*/
context = gimp_get_user_context (gimp);
if (G_TYPE_FROM_INSTANCE (active_tool) != GIMP_TYPE_OPERATION_TOOL)
{
GimpToolInfo *tool_info = gimp_get_tool_info (gimp,
"gimp-operation-tool");
if (GIMP_IS_TOOL_INFO (tool_info))
gimp_context_set_tool (context, tool_info);
}
else
{
gimp_context_tool_changed (context);
}
active_tool = tool_manager_get_active (gimp);
if (GIMP_IS_OPERATION_TOOL (active_tool))
{
gimp_operation_tool_set_operation (GIMP_OPERATION_TOOL (active_tool),
procedure->original_name,
gimp_procedure_get_label (procedure),
gimp_procedure_get_label (procedure),
gimp_procedure_get_label (procedure),
gimp_viewable_get_icon_name (GIMP_VIEWABLE (procedure)),
gimp_procedure_get_help_id (procedure));
tool_manager_initialize_active (gimp, GIMP_DISPLAY (display));
if (settings)
{
GObject *tool_config = GIMP_FILTER_TOOL (active_tool)->config;
gimp_config_copy (GIMP_CONFIG (settings),
GIMP_CONFIG (tool_config), 0);
/* see comment in gimp_settings_box_setting_selected() */
g_object_set (tool_config, "time", 0, NULL);
}
}
}
/* public functions */
GimpProcedure *
gimp_gegl_procedure_new (Gimp *gimp,
const gchar *operation,
const gchar *name,
const gchar *menu_label,
const gchar *tooltip,
const gchar *icon_name,
const gchar *help_id)
{
GimpProcedure *procedure;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (operation != NULL, NULL);
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (menu_label != NULL, NULL);
procedure = g_object_new (GIMP_TYPE_GEGL_PROCEDURE, NULL);
GIMP_GEGL_PROCEDURE (procedure)->menu_label = g_strdup (menu_label);
GIMP_GEGL_PROCEDURE (procedure)->help_id = g_strdup (help_id);
gimp_object_set_name (GIMP_OBJECT (procedure), name);
gimp_viewable_set_icon_name (GIMP_VIEWABLE (procedure), icon_name);
gimp_procedure_set_strings (procedure,
operation,
tooltip,
tooltip,
"author", "copyright", "date",
NULL);
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("dummy-param",
"Dummy Param",
"Dummy parameter",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"Input image",
gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"Input drawable",
gimp, TRUE,
GIMP_PARAM_READWRITE));
return procedure;
}

View File

@@ -0,0 +1,65 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpgeglprocedure.h
* Copyright (C) 2016 Michael Natterer <mitch@gimp.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_GEGL_PROCEDURE_H__
#define __GIMP_GEGL_PROCEDURE_H__
#include "pdb/gimpprocedure.h"
#define GIMP_TYPE_GEGL_PROCEDURE (gimp_gegl_procedure_get_type ())
#define GIMP_GEGL_PROCEDURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_GEGL_PROCEDURE, GimpGeglProcedure))
#define GIMP_GEGL_PROCEDURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_GEGL_PROCEDURE, GimpGeglProcedureClass))
#define GIMP_IS_GEGL_PROCEDURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_GEGL_PROCEDURE))
#define GIMP_IS_GEGL_PROCEDURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_GEGL_PROCEDURE))
#define GIMP_GEGL_PROCEDURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_GEGL_PROCEDURE, GimpGeglProcedureClass))
typedef struct _GimpGeglProcedure GimpGeglProcedure;
typedef struct _GimpGeglProcedureClass GimpGeglProcedureClass;
struct _GimpGeglProcedure
{
GimpProcedure parent_instance;
gchar *menu_label;
gchar *label;
gchar *help_id;
};
struct _GimpGeglProcedureClass
{
GimpProcedureClass parent_class;
};
GType gimp_gegl_procedure_get_type (void) G_GNUC_CONST;
GimpProcedure * gimp_gegl_procedure_new (Gimp *gimp,
const gchar *operation,
const gchar *name,
const gchar *menu_label,
const gchar *tooltip,
const gchar *icon_name,
const gchar *help_id);
#endif /* __GIMP_GEGL_PROCEDURE_H__ */

View File

@@ -62,7 +62,7 @@ static const GimpActionEntry gradients_actions[] =
G_CALLBACK (data_copy_location_cmd_callback), G_CALLBACK (data_copy_location_cmd_callback),
GIMP_HELP_GRADIENT_COPY_LOCATION }, GIMP_HELP_GRADIENT_COPY_LOCATION },
{ "gradients-show-in-file-manager", "gtk-directory", { "gradients-show-in-file-manager", GIMP_STOCK_FILE_MANAGER,
NC_("gradients-action", "Show in _File Manager"), NULL, NC_("gradients-action", "Show in _File Manager"), NULL,
NC_("gradients-action", "Show gradient file location in the file manager"), NC_("gradients-action", "Show gradient file location in the file manager"),
G_CALLBACK (data_show_in_file_manager_cmd_callback), G_CALLBACK (data_show_in_file_manager_cmd_callback),
@@ -91,7 +91,7 @@ static const GimpStringActionEntry gradients_edit_actions[] =
{ {
{ "gradients-edit", "gtk-edit", { "gradients-edit", "gtk-edit",
NC_("gradients-action", "_Edit Gradient..."), NULL, NC_("gradients-action", "_Edit Gradient..."), NULL,
NC_("gradients-action", "Edit gradient"), NC_("gradients-action", "Edit this gradient"),
"gimp-gradient-editor", "gimp-gradient-editor",
GIMP_HELP_GRADIENT_EDIT } GIMP_HELP_GRADIENT_EDIT }
}; };

View File

@@ -32,6 +32,8 @@
#include "widgets/gimpcontainerview.h" #include "widgets/gimpcontainerview.h"
#include "widgets/gimphelp-ids.h" #include "widgets/gimphelp-ids.h"
#include "dialogs/dialogs.h"
#include "gradients-commands.h" #include "gradients-commands.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@@ -53,64 +55,69 @@ gradients_save_as_pov_ray_cmd_callback (GtkAction *action,
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data); GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context; GimpContext *context;
GimpGradient *gradient; GimpGradient *gradient;
GtkFileChooser *chooser; GtkWidget *dialog;
gchar *title;
context = gimp_container_view_get_context (editor->view);
context = gimp_container_view_get_context (editor->view);
gradient = gimp_context_get_gradient (context); gradient = gimp_context_get_gradient (context);
if (! gradient) if (! gradient)
return; return;
title = g_strdup_printf (_("Save '%s' as POV-Ray"), #define SAVE_AS_POV_DIALOG_KEY "gimp-save-as-pov-ray-dialog"
gimp_object_get_name (gradient));
chooser = GTK_FILE_CHOOSER dialog = dialogs_get_dialog (G_OBJECT (gradient), SAVE_AS_POV_DIALOG_KEY);
(gtk_file_chooser_dialog_new (title, NULL,
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, if (! dialog)
GTK_STOCK_SAVE, GTK_RESPONSE_OK, {
gchar *title = g_strdup_printf (_("Save '%s' as POV-Ray"),
gimp_object_get_name (gradient));
NULL)); dialog = gtk_file_chooser_dialog_new (title, NULL,
GTK_FILE_CHOOSER_ACTION_SAVE,
gtk_dialog_set_alternative_button_order (GTK_DIALOG (chooser), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_RESPONSE_OK, GTK_STOCK_SAVE, GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_object_set_data (G_OBJECT (chooser), "gimp", context->gimp); NULL);
g_free (title); g_free (title);
gtk_window_set_screen (GTK_WINDOW (chooser), gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_widget_get_screen (GTK_WIDGET (editor))); gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_role (GTK_WINDOW (chooser), "gimp-gradient-save-pov"); g_object_set_data (G_OBJECT (dialog), "gimp", context->gimp);
gtk_window_set_position (GTK_WINDOW (chooser), GTK_WIN_POS_MOUSE);
gtk_dialog_set_default_response (GTK_DIALOG (chooser), GTK_RESPONSE_OK); gtk_window_set_screen (GTK_WINDOW (dialog),
gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE); gtk_widget_get_screen (GTK_WIDGET (editor)));
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-gradient-save-pov");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
g_signal_connect (chooser, "response", gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog),
G_CALLBACK (gradients_save_as_pov_ray_response), TRUE);
gradient);
g_signal_connect (chooser, "delete-event",
G_CALLBACK (gtk_true),
NULL);
g_object_ref (gradient); g_signal_connect (dialog, "response",
G_CALLBACK (gradients_save_as_pov_ray_response),
gradient);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_true),
NULL);
g_signal_connect_object (chooser, "destroy", g_signal_connect_object (dialog, "destroy",
G_CALLBACK (g_object_unref), G_CALLBACK (g_object_unref),
gradient, g_object_ref (gradient),
G_CONNECT_SWAPPED); G_CONNECT_SWAPPED);
gimp_help_connect (GTK_WIDGET (chooser), gimp_standard_help_func, gimp_help_connect (dialog, gimp_standard_help_func,
GIMP_HELP_GRADIENT_SAVE_AS_POV, NULL); GIMP_HELP_GRADIENT_SAVE_AS_POV, NULL);
gtk_widget_show (GTK_WIDGET (chooser)); dialogs_attach_dialog (G_OBJECT (gradient),
SAVE_AS_POV_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
@@ -123,11 +130,9 @@ gradients_save_as_pov_ray_response (GtkWidget *dialog,
{ {
if (response_id == GTK_RESPONSE_OK) if (response_id == GTK_RESPONSE_OK)
{ {
GFile *file; GFile *file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
GError *error = NULL; GError *error = NULL;
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
if (! gimp_gradient_save_pov (gradient, file, &error)) if (! gimp_gradient_save_pov (gradient, file, &error))
{ {
gimp_message_literal (g_object_get_data (G_OBJECT (dialog), "gimp"), gimp_message_literal (g_object_get_data (G_OBJECT (dialog), "gimp"),

View File

@@ -26,6 +26,8 @@
#include "config/gimpguiconfig.h" #include "config/gimpguiconfig.h"
#include "gegl/gimp-babl.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
@@ -55,9 +57,9 @@ static const GimpActionEntry image_actions[] =
{ "image-menu", NULL, NC_("image-action", "_Image") }, { "image-menu", NULL, NC_("image-action", "_Image") },
{ "image-mode-menu", NULL, NC_("image-action", "_Mode") }, { "image-mode-menu", NULL, NC_("image-action", "_Mode") },
{ "image-precision-menu", NULL, NC_("image-action", "_Precision") }, { "image-precision-menu", NULL, NC_("image-action", "Pr_ecision") },
{ "image-color-management-menu", NULL, NC_("image-action", { "image-color-management-menu", NULL, NC_("image-action",
"_Color Management") }, "Color Ma_nagement") },
{ "image-transform-menu", NULL, NC_("image-action", "_Transform") }, { "image-transform-menu", NULL, NC_("image-action", "_Transform") },
{ "image-guides-menu", NULL, NC_("image-action", "_Guides") }, { "image-guides-menu", NULL, NC_("image-action", "_Guides") },
@@ -74,6 +76,12 @@ static const GimpActionEntry image_actions[] =
G_CALLBACK (image_new_cmd_callback), G_CALLBACK (image_new_cmd_callback),
GIMP_HELP_FILE_NEW }, GIMP_HELP_FILE_NEW },
{ "image-duplicate", GIMP_STOCK_DUPLICATE,
NC_("image-action", "_Duplicate"), "<primary>D",
NC_("image-action", "Create a duplicate of this image"),
G_CALLBACK (image_duplicate_cmd_callback),
GIMP_HELP_IMAGE_DUPLICATE },
{ "image-color-profile-assign", NULL, { "image-color-profile-assign", NULL,
NC_("image-action", "_Assign Color Profile..."), NULL, NC_("image-action", "_Assign Color Profile..."), NULL,
NC_("image-action", "Set a color profile on the image"), NC_("image-action", "Set a color profile on the image"),
@@ -92,6 +100,12 @@ static const GimpActionEntry image_actions[] =
G_CALLBACK (image_color_profile_discard_cmd_callback), G_CALLBACK (image_color_profile_discard_cmd_callback),
GIMP_HELP_IMAGE_COLOR_PROFILE_DISCARD }, 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),
GIMP_HELP_IMAGE_COLOR_PROFILE_SAVE },
{ "image-resize", GIMP_STOCK_RESIZE, { "image-resize", GIMP_STOCK_RESIZE,
NC_("image-action", "Can_vas Size..."), NULL, NC_("image-action", "Can_vas Size..."), NULL,
NC_("image-action", "Adjust the image dimensions"), NC_("image-action", "Adjust the image dimensions"),
@@ -134,12 +148,6 @@ static const GimpActionEntry image_actions[] =
G_CALLBACK (image_crop_to_content_cmd_callback), G_CALLBACK (image_crop_to_content_cmd_callback),
GIMP_HELP_IMAGE_CROP }, GIMP_HELP_IMAGE_CROP },
{ "image-duplicate", GIMP_STOCK_DUPLICATE,
NC_("image-action", "_Duplicate"), "<primary>D",
NC_("image-action", "Create a duplicate of this image"),
G_CALLBACK (image_duplicate_cmd_callback),
GIMP_HELP_IMAGE_DUPLICATE },
{ "image-merge-layers", NULL, { "image-merge-layers", NULL,
NC_("image-action", "Merge Visible _Layers..."), "<primary>M", NC_("image-action", "Merge Visible _Layers..."), "<primary>M",
NC_("image-action", "Merge all visible layers into one layer"), NC_("image-action", "Merge all visible layers into one layer"),
@@ -165,6 +173,18 @@ static const GimpActionEntry image_actions[] =
GIMP_HELP_IMAGE_PROPERTIES } GIMP_HELP_IMAGE_PROPERTIES }
}; };
static const GimpToggleActionEntry image_toggle_actions[] =
{
{ "image-color-management-enabled", NULL,
NC_("image-action", "_Enable Color Management"), NULL,
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),
TRUE,
GIMP_HELP_IMAGE_COLOR_MANAGEMENT_ENABLED }
};
static const GimpRadioActionEntry image_convert_base_type_actions[] = static const GimpRadioActionEntry image_convert_base_type_actions[] =
{ {
{ "image-convert-rgb", GIMP_STOCK_CONVERT_RGB, { "image-convert-rgb", GIMP_STOCK_CONVERT_RGB,
@@ -185,77 +205,56 @@ static const GimpRadioActionEntry image_convert_base_type_actions[] =
static const GimpRadioActionEntry image_convert_precision_actions[] = static const GimpRadioActionEntry image_convert_precision_actions[] =
{ {
{ "image-convert-u8-linear", NULL, { "image-convert-u8", NULL,
NC_("image-convert-action", "8 bit integer (linear)"), NULL, NC_("image-convert-action", "8 bit integer"), NULL,
NC_("image-convert-action", NC_("image-convert-action",
"Convert the image to 8 bit linear integer"), "Convert the image to 8 bit integer"),
GIMP_PRECISION_U8_LINEAR, GIMP_HELP_IMAGE_CONVERT_U8 }, GIMP_COMPONENT_TYPE_U8, GIMP_HELP_IMAGE_CONVERT_U8 },
{ "image-convert-u8-gamma", NULL, { "image-convert-u16", NULL,
NC_("image-convert-action", "8 bit integer (gamma)"), NULL, NC_("image-convert-action", "16 bit integer"), NULL,
NC_("image-convert-action", NC_("image-convert-action",
"Convert the image to 8 bit gamma-corrected integer"), "Convert the image to 16 bit integer"),
GIMP_PRECISION_U8_GAMMA, GIMP_HELP_IMAGE_CONVERT_U8 }, GIMP_COMPONENT_TYPE_U16, GIMP_HELP_IMAGE_CONVERT_U16 },
{ "image-convert-u16-linear", NULL, { "image-convert-u32", NULL,
NC_("image-convert-action", "16 bit integer (linear)"), NULL, NC_("image-convert-action", "32 bit integer"), NULL,
NC_("image-convert-action", NC_("image-convert-action",
"Convert the image to 16 bit linear integer"), "Convert the image to 32 bit integer"),
GIMP_PRECISION_U16_LINEAR, GIMP_HELP_IMAGE_CONVERT_U16 }, GIMP_COMPONENT_TYPE_U32, GIMP_HELP_IMAGE_CONVERT_U32 },
{ "image-convert-u16-gamma", NULL, { "image-convert-half", NULL,
NC_("image-convert-action", "16 bit integer (gamma)"), NULL, NC_("image-convert-action", "16 bit floating point"), NULL,
NC_("image-convert-action", NC_("image-convert-action",
"Convert the image to 16 bit gamma-corrected integer"), "Convert the image to 16 bit floating point"),
GIMP_PRECISION_U16_GAMMA, GIMP_HELP_IMAGE_CONVERT_U16 }, GIMP_COMPONENT_TYPE_HALF, GIMP_HELP_IMAGE_CONVERT_HALF },
{ "image-convert-u32-linear", NULL, { "image-convert-float", NULL,
NC_("image-convert-action", "32 bit integer (linear)"), NULL, NC_("image-convert-action", "32 bit floating point"), NULL,
NC_("image-convert-action", NC_("image-convert-action",
"Convert the image to 32 bit linear integer"), "Convert the image to 32 bit floating point"),
GIMP_PRECISION_U32_LINEAR, GIMP_HELP_IMAGE_CONVERT_U32 }, GIMP_COMPONENT_TYPE_FLOAT, GIMP_HELP_IMAGE_CONVERT_FLOAT },
{ "image-convert-u32-gamma", NULL, { "image-convert-double", NULL,
NC_("image-convert-action", "32 bit integer (gamma)"), NULL, NC_("image-convert-action", "64 bit floating point"), NULL,
NC_("image-convert-action", NC_("image-convert-action",
"Convert the image to 32 bit gamma-corrected integer"), "Convert the image to 64 bit floating point"),
GIMP_PRECISION_U32_GAMMA, GIMP_HELP_IMAGE_CONVERT_U32 }, GIMP_COMPONENT_TYPE_DOUBLE, GIMP_HELP_IMAGE_CONVERT_DOUBLE }
};
{ "image-convert-half-linear", NULL, static const GimpRadioActionEntry image_convert_gamma_actions[] =
NC_("image-convert-action", "16 bit floating point (linear)"), NULL, {
{ "image-convert-gamma", NULL,
NC_("image-convert-action", "Perceptual gamma (sRGB)"), NULL,
NC_("image-convert-action", NC_("image-convert-action",
"Convert the image to 16 bit linear floating point"), "Convert the image to preceptual (sRGB) gamma"),
GIMP_PRECISION_HALF_LINEAR, GIMP_HELP_IMAGE_CONVERT_HALF }, FALSE, GIMP_HELP_IMAGE_CONVERT_GAMMA },
{ "image-convert-half-gamma", NULL, { "image-convert-linear", NULL,
NC_("image-convert-action", "16 bit floating point (gamma)"), NULL, NC_("image-convert-action", "Linear light"), NULL,
NC_("image-convert-action", NC_("image-convert-action",
"Convert the image to 16 bit gamma-corrected floating point"), "Convert the image to linear light"),
GIMP_PRECISION_HALF_GAMMA, GIMP_HELP_IMAGE_CONVERT_HALF }, TRUE, GIMP_HELP_IMAGE_CONVERT_GAMMA }
{ "image-convert-float-linear", NULL,
NC_("image-convert-action", "32 bit floating point (linear)"), NULL,
NC_("image-convert-action",
"Convert the image to 32 bit linear floating point"),
GIMP_PRECISION_FLOAT_LINEAR, GIMP_HELP_IMAGE_CONVERT_FLOAT },
{ "image-convert-float-gamma", NULL,
NC_("image-convert-action", "32 bit floating point (gamma)"), NULL,
NC_("image-convert-action",
"Convert the image to 32 bit gamma-corrected floating point"),
GIMP_PRECISION_FLOAT_GAMMA, GIMP_HELP_IMAGE_CONVERT_FLOAT },
{ "image-convert-double-linear", NULL,
NC_("image-convert-action", "64 bit floating point (linear)"), NULL,
NC_("image-convert-action",
"Convert the image to 64 bit linear floating point"),
GIMP_PRECISION_DOUBLE_LINEAR, GIMP_HELP_IMAGE_CONVERT_DOUBLE },
{ "image-convert-double-gamma", NULL,
NC_("image-convert-action", "64 bit floating point (gamma)"), NULL,
NC_("image-convert-action",
"Convert the image to 64 bit gamma-corrected floating point"),
GIMP_PRECISION_DOUBLE_GAMMA, GIMP_HELP_IMAGE_CONVERT_DOUBLE }
}; };
static const GimpEnumActionEntry image_flip_actions[] = static const GimpEnumActionEntry image_flip_actions[] =
@@ -302,6 +301,10 @@ image_actions_setup (GimpActionGroup *group)
image_actions, image_actions,
G_N_ELEMENTS (image_actions)); G_N_ELEMENTS (image_actions));
gimp_action_group_add_toggle_actions (group, "image-action",
image_toggle_actions,
G_N_ELEMENTS (image_toggle_actions));
gimp_action_group_add_radio_actions (group, "image-convert-action", gimp_action_group_add_radio_actions (group, "image-convert-action",
image_convert_base_type_actions, image_convert_base_type_actions,
G_N_ELEMENTS (image_convert_base_type_actions), G_N_ELEMENTS (image_convert_base_type_actions),
@@ -314,6 +317,12 @@ image_actions_setup (GimpActionGroup *group)
NULL, 0, NULL, 0,
G_CALLBACK (image_convert_precision_cmd_callback)); G_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));
gimp_action_group_add_enum_actions (group, "image-action", gimp_action_group_add_enum_actions (group, "image-action",
image_flip_actions, image_flip_actions,
G_N_ELEMENTS (image_flip_actions), G_N_ELEMENTS (image_flip_actions),
@@ -338,21 +347,27 @@ void
image_actions_update (GimpActionGroup *group, image_actions_update (GimpActionGroup *group,
gpointer data) gpointer data)
{ {
GimpImage *image = action_data_get_image (data); GimpImage *image = action_data_get_image (data);
gboolean is_indexed = FALSE; gboolean is_indexed = FALSE;
gboolean is_u8_gamma = FALSE; gboolean is_u8_gamma = FALSE;
gboolean aux = FALSE; gboolean aux = FALSE;
gboolean lp = FALSE; gboolean lp = FALSE;
gboolean sel = FALSE; gboolean sel = FALSE;
gboolean groups = FALSE; gboolean groups = FALSE;
gboolean profile = FALSE; gboolean color_managed = FALSE;
gboolean profile = FALSE;
if (image) if (image)
{ {
GimpContainer *layers; GimpContainer *layers;
const gchar *action = NULL; const gchar *action = NULL;
GimpImageBaseType base_type;
GimpPrecision precision;
switch (gimp_image_get_base_type (image)) base_type = gimp_image_get_base_type (image);
precision = gimp_image_get_precision (image);
switch (base_type)
{ {
case GIMP_RGB: action = "image-convert-rgb"; break; case GIMP_RGB: action = "image-convert-rgb"; break;
case GIMP_GRAY: action = "image-convert-grayscale"; break; case GIMP_GRAY: action = "image-convert-grayscale"; break;
@@ -361,51 +376,32 @@ image_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_active (group, action, TRUE); gimp_action_group_set_action_active (group, action, TRUE);
switch (gimp_image_get_precision (image)) switch (gimp_image_get_component_type (image))
{ {
case GIMP_PRECISION_U8_LINEAR: case GIMP_COMPONENT_TYPE_U8: action = "image-convert-u8"; break;
action = "image-convert-u8-linear"; case GIMP_COMPONENT_TYPE_U16: action = "image-convert-u16"; break;
break; case GIMP_COMPONENT_TYPE_U32: action = "image-convert-u32"; break;
case GIMP_PRECISION_U8_GAMMA: case GIMP_COMPONENT_TYPE_HALF: action = "image-convert-half"; break;
action = "image-convert-u8-gamma"; case GIMP_COMPONENT_TYPE_FLOAT: action = "image-convert-float"; break;
break; case GIMP_COMPONENT_TYPE_DOUBLE: action = "image-convert-double"; break;
case GIMP_PRECISION_U16_LINEAR:
action = "image-convert-u16-linear";
break;
case GIMP_PRECISION_U16_GAMMA:
action = "image-convert-u16-gamma";
break;
case GIMP_PRECISION_U32_LINEAR:
action = "image-convert-u32-linear";
break;
case GIMP_PRECISION_U32_GAMMA:
action = "image-convert-u32-gamma";
break;
case GIMP_PRECISION_HALF_LINEAR:
action = "image-convert-half-linear";
break;
case GIMP_PRECISION_HALF_GAMMA:
action = "image-convert-half-gamma";
break;
case GIMP_PRECISION_FLOAT_LINEAR:
action = "image-convert-float-linear";
break;
case GIMP_PRECISION_FLOAT_GAMMA:
action = "image-convert-float-gamma";
break;
case GIMP_PRECISION_DOUBLE_LINEAR:
action = "image-convert-double-linear";
break;
case GIMP_PRECISION_DOUBLE_GAMMA:
action = "image-convert-double-gamma";
break;
} }
gimp_action_group_set_action_active (group, action, TRUE); gimp_action_group_set_action_active (group, action, TRUE);
is_indexed = (gimp_image_get_base_type (image) == GIMP_INDEXED); if (gimp_babl_format_get_linear (gimp_image_get_layer_format (image,
is_u8_gamma = (gimp_image_get_precision (image) == FALSE)))
GIMP_PRECISION_U8_GAMMA); {
gimp_action_group_set_action_active (group, "image-convert-linear",
TRUE);
}
else
{
gimp_action_group_set_action_active (group, "image-convert-gamma",
TRUE);
}
is_indexed = (base_type == GIMP_INDEXED);
is_u8_gamma = (precision == GIMP_PRECISION_U8_GAMMA);
aux = (gimp_image_get_active_channel (image) != NULL); aux = (gimp_image_get_active_channel (image) != NULL);
lp = ! gimp_image_is_empty (image); lp = ! gimp_image_is_empty (image);
sel = ! gimp_channel_is_empty (gimp_image_get_mask (image)); sel = ! gimp_channel_is_empty (gimp_image_get_mask (image));
@@ -414,32 +410,55 @@ image_actions_update (GimpActionGroup *group,
groups = ! gimp_item_stack_is_flat (GIMP_ITEM_STACK (layers)); groups = ! gimp_item_stack_is_flat (GIMP_ITEM_STACK (layers));
profile = (gimp_image_get_color_profile (image) != NULL); color_managed = gimp_image_get_is_color_managed (image);
profile = (gimp_image_get_color_profile (image) != NULL);
} }
#define SET_LABEL(action,label) \
gimp_action_group_set_action_label (group, action, (label))
#define SET_SENSITIVE(action,condition) \ #define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0) gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
SET_SENSITIVE ("image-duplicate", image);
if (profile)
{
SET_LABEL ("image-convert-rgb",
C_("image-convert-action", "_RGB..."));
SET_LABEL ("image-convert-grayscale",
C_("image-convert-action", "_Grayscale..."));
}
else
{
SET_LABEL ("image-convert-rgb",
C_("image-convert-action", "_RGB"));
SET_LABEL ("image-convert-grayscale",
C_("image-convert-action", "_Grayscale"));
}
SET_SENSITIVE ("image-convert-rgb", image); SET_SENSITIVE ("image-convert-rgb", image);
SET_SENSITIVE ("image-convert-grayscale", image); SET_SENSITIVE ("image-convert-grayscale", image);
SET_SENSITIVE ("image-convert-indexed", image && !groups && is_u8_gamma); SET_SENSITIVE ("image-convert-indexed", image && !groups && is_u8_gamma);
SET_SENSITIVE ("image-convert-u8-gamma", image); SET_SENSITIVE ("image-convert-u8", image);
SET_SENSITIVE ("image-convert-u8-linear", image && !is_indexed); SET_SENSITIVE ("image-convert-u16", image && !is_indexed);
SET_SENSITIVE ("image-convert-u16-gamma", image && !is_indexed); SET_SENSITIVE ("image-convert-u32", image && !is_indexed);
SET_SENSITIVE ("image-convert-u16-linear", image && !is_indexed); SET_SENSITIVE ("image-convert-half", image && !is_indexed);
SET_SENSITIVE ("image-convert-u32-gamma", image && !is_indexed); SET_SENSITIVE ("image-convert-float", image && !is_indexed);
SET_SENSITIVE ("image-convert-u32-linear", image && !is_indexed); SET_SENSITIVE ("image-convert-double", image && !is_indexed);
SET_SENSITIVE ("image-convert-half-gamma", image && !is_indexed);
SET_SENSITIVE ("image-convert-half-linear", image && !is_indexed); SET_SENSITIVE ("image-convert-gamma", image);
SET_SENSITIVE ("image-convert-float-gamma", image && !is_indexed); SET_SENSITIVE ("image-convert-linear", image && !is_indexed);
SET_SENSITIVE ("image-convert-float-linear", image && !is_indexed);
SET_SENSITIVE ("image-convert-double-gamma", image && !is_indexed); SET_SENSITIVE ("image-color-management-enabled", image);
SET_SENSITIVE ("image-convert-double-linear", image && !is_indexed); SET_ACTIVE ("image-color-management-enabled", image && color_managed);
SET_SENSITIVE ("image-color-profile-assign", image); SET_SENSITIVE ("image-color-profile-assign", image);
SET_SENSITIVE ("image-color-profile-convert", image); SET_SENSITIVE ("image-color-profile-convert", image);
SET_SENSITIVE ("image-color-profile-discard", image && profile); SET_SENSITIVE ("image-color-profile-discard", image && profile);
SET_SENSITIVE ("image-color-profile-save", image);
SET_SENSITIVE ("image-flip-horizontal", image); SET_SENSITIVE ("image-flip-horizontal", image);
SET_SENSITIVE ("image-flip-vertical", image); SET_SENSITIVE ("image-flip-vertical", image);
@@ -454,11 +473,12 @@ image_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("image-scale", image); SET_SENSITIVE ("image-scale", image);
SET_SENSITIVE ("image-crop-to-selection", image && sel); SET_SENSITIVE ("image-crop-to-selection", image && sel);
SET_SENSITIVE ("image-crop-to-content", image); SET_SENSITIVE ("image-crop-to-content", image);
SET_SENSITIVE ("image-duplicate", image);
SET_SENSITIVE ("image-merge-layers", image && !aux && lp); SET_SENSITIVE ("image-merge-layers", image && !aux && lp);
SET_SENSITIVE ("image-flatten", image && !aux && lp); SET_SENSITIVE ("image-flatten", image && !aux && lp);
SET_SENSITIVE ("image-configure-grid", image); SET_SENSITIVE ("image-configure-grid", image);
SET_SENSITIVE ("image-properties", image); SET_SENSITIVE ("image-properties", image);
#undef SET_LABEL
#undef SET_SENSITIVE #undef SET_SENSITIVE
#undef SET_ACTIVE
} }

File diff suppressed because it is too large Load Diff

View File

@@ -19,56 +19,62 @@
#define __IMAGE_COMMANDS_H__ #define __IMAGE_COMMANDS_H__
void image_new_cmd_callback (GtkAction *action, void image_new_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_duplicate_cmd_callback (GtkAction *action,
gpointer data);
void image_convert_base_type_cmd_callback (GtkAction *action, void image_convert_base_type_cmd_callback (GtkAction *action,
GtkAction *current, GtkAction *current,
gpointer data); gpointer data);
void image_convert_precision_cmd_callback (GtkAction *action, void image_convert_precision_cmd_callback (GtkAction *action,
GtkAction *current, GtkAction *current,
gpointer data); gpointer data);
void image_convert_gamma_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void image_color_profile_assign_cmd_callback (GtkAction *action, void image_color_management_enabled_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_color_profile_convert_cmd_callback (GtkAction *action, void image_color_profile_assign_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_color_profile_discard_cmd_callback (GtkAction *action, void image_color_profile_convert_cmd_callback (GtkAction *action,
gpointer data); 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_resize_cmd_callback (GtkAction *action, void image_resize_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_resize_to_layers_cmd_callback (GtkAction *action, void image_resize_to_layers_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_resize_to_selection_cmd_callback (GtkAction *action, void image_resize_to_selection_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_print_size_cmd_callback (GtkAction *action, void image_print_size_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_scale_cmd_callback (GtkAction *action, void image_scale_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_flip_cmd_callback (GtkAction *action, void image_flip_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
void image_rotate_cmd_callback (GtkAction *action, void image_rotate_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
void image_crop_to_selection_cmd_callback (GtkAction *action, void image_crop_to_selection_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_crop_to_content_cmd_callback (GtkAction *action, void image_crop_to_content_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_duplicate_cmd_callback (GtkAction *action, void image_merge_layers_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_flatten_image_cmd_callback (GtkAction *action,
gpointer data);
void image_merge_layers_cmd_callback (GtkAction *action, void image_configure_grid_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_flatten_image_cmd_callback (GtkAction *action, void image_properties_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void image_configure_grid_cmd_callback (GtkAction *action,
gpointer data);
void image_properties_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __IMAGE_COMMANDS_H__ */ #endif /* __IMAGE_COMMANDS_H__ */

142
app/actions/items-actions.c Normal file
View File

@@ -0,0 +1,142 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimp.h"
#include "core/gimpitem.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpwidgets-utils.h"
#include "items-actions.h"
void
items_actions_setup (GimpActionGroup *group,
const gchar *prefix)
{
GEnumClass *enum_class;
GEnumValue *value;
enum_class = g_type_class_ref (GIMP_TYPE_COLOR_TAG);
for (value = enum_class->values; value->value_name; value++)
{
gchar action[32];
g_snprintf (action, sizeof (action),
"%s-color-tag-%s", prefix, value->value_nick);
if (value->value == GIMP_COLOR_TAG_NONE)
{
gimp_action_group_set_action_always_show_image (group, action, TRUE);
}
else
{
GimpRGB color;
gimp_action_group_set_action_context (group, action,
gimp_get_user_context (group->gimp));
gimp_get_color_tag_color (value->value, &color);
gimp_action_group_set_action_color (group, action, &color, FALSE);
}
}
g_type_class_unref (enum_class);
}
void
items_actions_update (GimpActionGroup *group,
const gchar *prefix,
GimpItem *item)
{
GEnumClass *enum_class;
GEnumValue *value;
gchar action[32];
gboolean visible = FALSE;
gboolean linked = FALSE;
gboolean has_color_tag = FALSE;
gboolean locked = FALSE;
gboolean can_lock = FALSE;
gboolean locked_pos = FALSE;
gboolean can_lock_pos = FALSE;
GimpRGB tag_color;
if (item)
{
visible = gimp_item_get_visible (item);
linked = gimp_item_get_linked (item);
locked = gimp_item_get_lock_content (item);
can_lock = gimp_item_can_lock_content (item);
locked_pos = gimp_item_get_lock_position (item);
can_lock_pos = gimp_item_can_lock_position (item);
has_color_tag = gimp_get_color_tag_color (gimp_item_get_color_tag (item),
&tag_color);
}
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, color, FALSE)
g_snprintf (action, sizeof (action), "%s-visible", prefix);
SET_SENSITIVE (action, item);
SET_ACTIVE (action, visible);
g_snprintf (action, sizeof (action), "%s-linked", prefix);
SET_SENSITIVE (action, item);
SET_ACTIVE (action, linked);
g_snprintf (action, sizeof (action), "%s-lock-content", prefix);
SET_SENSITIVE (action, can_lock);
SET_ACTIVE (action, locked);
g_snprintf (action, sizeof (action), "%s-lock-position", prefix);
SET_SENSITIVE (action, can_lock_pos);
SET_ACTIVE (action, locked_pos);
g_snprintf (action, sizeof (action), "%s-color-tag-menu", prefix);
SET_COLOR (action, has_color_tag ? &tag_color : NULL);
enum_class = g_type_class_ref (GIMP_TYPE_COLOR_TAG);
for (value = enum_class->values; value->value_name; value++)
{
g_snprintf (action, sizeof (action),
"%s-color-tag-%s", prefix, value->value_nick);
SET_SENSITIVE (action, item);
}
g_type_class_unref (enum_class);
#undef SET_SENSITIVE
#undef SET_ACTIVE
#undef SET_COLOR
}

View File

@@ -0,0 +1,29 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ITEMS_ACTIONS_H__
#define __ITEMS_ACTIONS_H__
void items_actions_setup (GimpActionGroup *group,
const gchar *prefix);
void items_actions_update (GimpActionGroup *group,
const gchar *prefix,
GimpItem *item);
#endif /* __ITEMS_ACTIONS_H__ */

View File

@@ -0,0 +1,423 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpconfig/gimpconfig.h"
#include "actions-types.h"
#include "config/gimpdialogconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "core/gimpitem.h"
#include "core/gimpitemundo.h"
#include "dialogs/dialogs.h"
#include "dialogs/fill-dialog.h"
#include "dialogs/stroke-dialog.h"
#include "actions.h"
#include "items-commands.h"
#include "gimp-intl.h"
/* local function prototypes */
static void items_fill_callback (GtkWidget *dialog,
GimpItem *item,
GimpDrawable *drawable,
GimpContext *context,
GimpFillOptions *options,
gpointer user_data);
static void items_stroke_callback (GtkWidget *dialog,
GimpItem *item,
GimpDrawable *drawable,
GimpContext *context,
GimpStrokeOptions *options,
gpointer user_data);
/* public functions */
void
items_visible_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item)
{
gboolean visible;
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (visible != gimp_item_get_visible (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_VISIBILITY);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_visible (item, visible, push_undo);
gimp_image_flush (image);
}
}
void
items_linked_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item)
{
gboolean linked;
linked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (linked != gimp_item_get_linked (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_LINKED);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_linked (item, linked, push_undo);
gimp_image_flush (image);
}
}
void
items_lock_content_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item)
{
gboolean locked;
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (locked != gimp_item_get_lock_content (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_LINKED);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_lock_content (item, locked, push_undo);
gimp_image_flush (image);
}
}
void
items_lock_position_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item)
{
gboolean locked;
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (locked != gimp_item_get_lock_position (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_LOCK_POSITION);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_lock_position (item, locked, push_undo);
gimp_image_flush (image);
}
}
void
items_color_tag_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
GimpColorTag color_tag)
{
if (color_tag != gimp_item_get_color_tag (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_COLOR_TAG);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_color_tag (item, color_tag, push_undo);
gimp_image_flush (image);
}
}
void
items_fill_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
const gchar *dialog_key,
const gchar *dialog_title,
const gchar *dialog_icon_name,
const gchar *dialog_help_id,
gpointer data)
{
GimpDrawable *drawable;
GtkWidget *dialog;
GtkWidget *widget;
return_if_no_widget (widget, data);
drawable = gimp_image_get_active_drawable (image);
if (! drawable)
{
gimp_message_literal (image->gimp,
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to fill."));
return;
}
dialog = dialogs_get_dialog (G_OBJECT (item), dialog_key);
if (! dialog)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
dialog = fill_dialog_new (item,
drawable,
action_data_get_context (data),
dialog_title,
dialog_icon_name,
dialog_help_id,
widget,
config->fill_options,
items_fill_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (item), dialog_key, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
items_fill_last_vals_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
gpointer data)
{
GimpDrawable *drawable;
GimpDialogConfig *config;
GtkWidget *widget;
GError *error = NULL;
return_if_no_widget (widget, data);
drawable = gimp_image_get_active_drawable (image);
if (! drawable)
{
gimp_message_literal (image->gimp,
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to fill."));
return;
}
config = GIMP_DIALOG_CONFIG (image->gimp->config);
if (! gimp_item_fill (item, drawable,
config->fill_options, TRUE, NULL, &error))
{
gimp_message_literal (image->gimp, G_OBJECT (widget),
GIMP_MESSAGE_WARNING, error->message);
g_clear_error (&error);
}
else
{
gimp_image_flush (image);
}
}
void
items_stroke_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
const gchar *dialog_key,
const gchar *dialog_title,
const gchar *dialog_icon_name,
const gchar *dialog_help_id,
gpointer data)
{
GimpDrawable *drawable;
GtkWidget *dialog;
GtkWidget *widget;
return_if_no_widget (widget, data);
drawable = gimp_image_get_active_drawable (image);
if (! drawable)
{
gimp_message_literal (image->gimp,
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to stroke to."));
return;
}
dialog = dialogs_get_dialog (G_OBJECT (item), dialog_key);
if (! dialog)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
dialog = stroke_dialog_new (item,
drawable,
action_data_get_context (data),
dialog_title,
dialog_icon_name,
dialog_help_id,
widget,
config->stroke_options,
items_stroke_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (item), dialog_key, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
items_stroke_last_vals_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
gpointer data)
{
GimpDrawable *drawable;
GimpDialogConfig *config;
GtkWidget *widget;
GError *error = NULL;
return_if_no_widget (widget, data);
drawable = gimp_image_get_active_drawable (image);
if (! drawable)
{
gimp_message_literal (image->gimp,
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to stroke to."));
return;
}
config = GIMP_DIALOG_CONFIG (image->gimp->config);
if (! gimp_item_stroke (item, drawable,
action_data_get_context (data),
config->stroke_options, NULL,
TRUE, NULL, &error))
{
gimp_message_literal (image->gimp, G_OBJECT (widget),
GIMP_MESSAGE_WARNING, error->message);
g_clear_error (&error);
}
else
{
gimp_image_flush (image);
}
}
/* private functions */
static void
items_fill_callback (GtkWidget *dialog,
GimpItem *item,
GimpDrawable *drawable,
GimpContext *context,
GimpFillOptions *options,
gpointer user_data)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (context->gimp->config);
GimpImage *image = gimp_item_get_image (item);
GError *error = NULL;
gimp_config_sync (G_OBJECT (options),
G_OBJECT (config->fill_options), 0);
if (! gimp_item_fill (item, drawable, options, TRUE, NULL, &error))
{
gimp_message_literal (context->gimp,
G_OBJECT (dialog),
GIMP_MESSAGE_WARNING,
error ? error->message : "NULL");
g_clear_error (&error);
return;
}
gimp_image_flush (image);
gtk_widget_destroy (dialog);
}
static void
items_stroke_callback (GtkWidget *dialog,
GimpItem *item,
GimpDrawable *drawable,
GimpContext *context,
GimpStrokeOptions *options,
gpointer data)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (context->gimp->config);
GimpImage *image = gimp_item_get_image (item);
GError *error = NULL;
gimp_config_sync (G_OBJECT (options),
G_OBJECT (config->stroke_options), 0);
if (! gimp_item_stroke (item, drawable, context, options, NULL,
TRUE, NULL, &error))
{
gimp_message_literal (context->gimp,
G_OBJECT (dialog),
GIMP_MESSAGE_WARNING,
error ? error->message : "NULL");
g_clear_error (&error);
return;
}
gimp_image_flush (image);
gtk_widget_destroy (dialog);
}

View File

@@ -0,0 +1,68 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ITEMS_COMMANDS_H__
#define __ITEMS_COMMANDS_H__
void items_visible_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item);
void items_linked_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item);
void items_lock_content_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item);
void items_lock_position_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item);
void items_color_tag_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
GimpColorTag color_tag);
void items_fill_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
const gchar *dialog_key,
const gchar *dialog_title,
const gchar *dialog_icon_name,
const gchar *dialog_help_id,
gpointer data);
void items_fill_last_vals_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
gpointer data);
void items_stroke_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
const gchar *dialog_key,
const gchar *dialog_title,
const gchar *dialog_icon_name,
const gchar *dialog_help_id,
gpointer data);
void items_stroke_last_vals_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
gpointer data);
#endif /* __ITEMS_COMMANDS_H__ */

View File

@@ -27,7 +27,7 @@
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "core/gimplayer-floating-sel.h" #include "core/gimplayer-floating-selection.h"
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
@@ -37,6 +37,7 @@
#include "actions.h" #include "actions.h"
#include "image-commands.h" #include "image-commands.h"
#include "items-actions.h"
#include "layers-actions.h" #include "layers-actions.h"
#include "layers-commands.h" #include "layers-commands.h"
@@ -49,6 +50,10 @@ static const GimpActionEntry layers_actions[] =
NC_("layers-action", "Layers Menu"), NULL, NULL, NULL, NC_("layers-action", "Layers Menu"), NULL, NULL, NULL,
GIMP_HELP_LAYER_DIALOG }, GIMP_HELP_LAYER_DIALOG },
{ "layers-color-tag-menu", GIMP_STOCK_CLOSE /* abused */,
NC_("layers-action", "Color Tag"), NULL, NULL, NULL,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-menu", NULL, { "layers-menu", NULL,
NC_("layers-action", "_Layer") }, NC_("layers-action", "_Layer") },
{ "layers-stack-menu", NULL, { "layers-stack-menu", NULL,
@@ -97,7 +102,7 @@ static const GimpActionEntry layers_actions[] =
G_CALLBACK (layers_new_from_visible_cmd_callback), G_CALLBACK (layers_new_from_visible_cmd_callback),
GIMP_HELP_LAYER_NEW_FROM_VISIBLE }, GIMP_HELP_LAYER_NEW_FROM_VISIBLE },
{ "layers-new-group", "folder", { "layers-new-group", "folder-new",
NC_("layers-action", "New Layer _Group"), NULL, NC_("layers-action", "New Layer _Group"), NULL,
NC_("layers-action", "Create a new layer group and add it to the image"), NC_("layers-action", "Create a new layer group and add it to the image"),
G_CALLBACK (layers_new_group_cmd_callback), G_CALLBACK (layers_new_group_cmd_callback),
@@ -225,6 +230,23 @@ static const GimpActionEntry layers_actions[] =
G_CALLBACK (layers_mask_add_cmd_callback), G_CALLBACK (layers_mask_add_cmd_callback),
GIMP_HELP_LAYER_MASK_ADD }, GIMP_HELP_LAYER_MASK_ADD },
/* this is the same as layers-mask-add, except it's sensitive even if
* there is a mask on the layer
*/
{ "layers-mask-add-button", GIMP_STOCK_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),
GIMP_HELP_LAYER_MASK_ADD },
{ "layers-mask-add-last-values", GIMP_STOCK_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),
GIMP_HELP_LAYER_MASK_ADD },
{ "layers-alpha-add", GIMP_STOCK_TRANSPARENCY, { "layers-alpha-add", GIMP_STOCK_TRANSPARENCY,
NC_("layers-action", "Add Alpha C_hannel"), NULL, NC_("layers-action", "Add Alpha C_hannel"), NULL,
NC_("layers-action", "Add transparency information to the layer"), NC_("layers-action", "Add transparency information to the layer"),
@@ -240,14 +262,6 @@ static const GimpActionEntry layers_actions[] =
static const GimpToggleActionEntry layers_toggle_actions[] = static const GimpToggleActionEntry layers_toggle_actions[] =
{ {
{ "layers-lock-alpha", GIMP_STOCK_TRANSPARENCY,
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),
FALSE,
GIMP_HELP_LAYER_LOCK_ALPHA },
{ "layers-mask-edit", "gtk-edit", { "layers-mask-edit", "gtk-edit",
NC_("layers-action", "_Edit Layer Mask"), NULL, NC_("layers-action", "_Edit Layer Mask"), NULL,
NC_("layers-action", "Work on the layer mask"), NC_("layers-action", "Work on the layer mask"),
@@ -266,7 +280,96 @@ static const GimpToggleActionEntry layers_toggle_actions[] =
NC_("layers-action", "Dismiss the effect of the layer mask"), NC_("layers-action", "Dismiss the effect of the layer mask"),
G_CALLBACK (layers_mask_disable_cmd_callback), G_CALLBACK (layers_mask_disable_cmd_callback),
FALSE, FALSE,
GIMP_HELP_LAYER_MASK_DISABLE } GIMP_HELP_LAYER_MASK_DISABLE },
{ "layers-visible", GIMP_STOCK_VISIBLE,
NC_("layers-action", "_Visible"), NULL, NULL,
G_CALLBACK (layers_visible_cmd_callback),
FALSE,
GIMP_HELP_LAYER_VISIBLE },
{ "layers-linked", GIMP_STOCK_LINKED,
NC_("layers-action", "_Linked"), NULL, NULL,
G_CALLBACK (layers_linked_cmd_callback),
FALSE,
GIMP_HELP_LAYER_LINKED },
{ "layers-lock-content", NULL /* GIMP_STOCK_LOCK */,
NC_("layers-action", "L_ock pixels"), NULL, NULL,
G_CALLBACK (layers_lock_content_cmd_callback),
FALSE,
GIMP_HELP_LAYER_LOCK_PIXELS },
{ "layers-lock-position", GIMP_STOCK_TOOL_MOVE,
NC_("layers-action", "L_ock position"), NULL, NULL,
G_CALLBACK (layers_lock_position_cmd_callback),
FALSE,
GIMP_HELP_LAYER_LOCK_POSITION },
{ "layers-lock-alpha", GIMP_STOCK_TRANSPARENCY,
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),
FALSE,
GIMP_HELP_LAYER_LOCK_ALPHA },
};
static const GimpEnumActionEntry layers_color_tag_actions[] =
{
{ "layers-color-tag-none", GIMP_STOCK_CLOSE /* abused */,
NC_("layers-action", "None"), NULL,
NC_("layers-action", "Clear color tag"),
GIMP_COLOR_TAG_NONE, FALSE,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-color-tag-blue", NULL,
NC_("layers-action", "Blue"), NULL,
NC_("layers-action", "Set color tag to blue"),
GIMP_COLOR_TAG_BLUE, FALSE,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-color-tag-green", NULL,
NC_("layers-action", "Green"), NULL,
NC_("layers-action", "Set color tag to green"),
GIMP_COLOR_TAG_GREEN, FALSE,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-color-tag-yellow", NULL,
NC_("layers-action", "Yellow"), NULL,
NC_("layers-action", "Set color tag to yellow"),
GIMP_COLOR_TAG_YELLOW, FALSE,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-color-tag-orange", NULL,
NC_("layers-action", "Orange"), NULL,
NC_("layers-action", "Set color tag to orange"),
GIMP_COLOR_TAG_ORANGE, FALSE,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-color-tag-brown", NULL,
NC_("layers-action", "Brown"), NULL,
NC_("layers-action", "Set color tag to brown"),
GIMP_COLOR_TAG_BROWN, FALSE,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-color-tag-red", NULL,
NC_("layers-action", "Red"), NULL,
NC_("layers-action", "Set color tag to red"),
GIMP_COLOR_TAG_RED, FALSE,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-color-tag-violet", NULL,
NC_("layers-action", "Violet"), NULL,
NC_("layers-action", "Set color tag to violet"),
GIMP_COLOR_TAG_VIOLET, FALSE,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-color-tag-gray", NULL,
NC_("layers-action", "Gray"), NULL,
NC_("layers-action", "Set color tag to gray"),
GIMP_COLOR_TAG_GRAY, FALSE,
GIMP_HELP_LAYER_COLOR_TAG }
}; };
static const GimpEnumActionEntry layers_mask_apply_actions[] = static const GimpEnumActionEntry layers_mask_apply_actions[] =
@@ -479,6 +582,11 @@ layers_actions_setup (GimpActionGroup *group)
layers_toggle_actions, layers_toggle_actions,
G_N_ELEMENTS (layers_toggle_actions)); G_N_ELEMENTS (layers_toggle_actions));
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));
gimp_action_group_add_enum_actions (group, "layers-action", gimp_action_group_add_enum_actions (group, "layers-action",
layers_mask_apply_actions, layers_mask_apply_actions,
G_N_ELEMENTS (layers_mask_apply_actions), G_N_ELEMENTS (layers_mask_apply_actions),
@@ -517,6 +625,8 @@ layers_actions_setup (GimpActionGroup *group)
layers_mode_actions, layers_mode_actions,
G_N_ELEMENTS (layers_mode_actions), G_N_ELEMENTS (layers_mode_actions),
G_CALLBACK (layers_mode_cmd_callback)); G_CALLBACK (layers_mode_cmd_callback));
items_actions_setup (group, "layers");
} }
void void
@@ -660,7 +770,10 @@ layers_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("layers-lock-alpha", can_lock_alpha); SET_SENSITIVE ("layers-lock-alpha", can_lock_alpha);
SET_ACTIVE ("layers-lock-alpha", lock_alpha); SET_ACTIVE ("layers-lock-alpha", lock_alpha);
SET_SENSITIVE ("layers-mask-add", layer && !fs && !ac && !mask && !children); SET_SENSITIVE ("layers-mask-add", layer && !fs && !ac && !mask && !children);
SET_SENSITIVE ("layers-mask-add-button", layer && !fs && !ac && !children);
SET_SENSITIVE ("layers-mask-add-last-values", layer && !fs && !ac && !mask && !children);
SET_SENSITIVE ("layers-mask-apply", writable && !fs && !ac && mask && !children); SET_SENSITIVE ("layers-mask-apply", writable && !fs && !ac && mask && !children);
SET_SENSITIVE ("layers-mask-delete", layer && !fs && !ac && mask); SET_SENSITIVE ("layers-mask-delete", layer && !fs && !ac && mask);
@@ -686,4 +799,6 @@ layers_actions_update (GimpActionGroup *group,
#undef SET_SENSITIVE #undef SET_SENSITIVE
#undef SET_ACTIVE #undef SET_ACTIVE
#undef SET_LABEL #undef SET_LABEL
items_actions_update (group, "layers", GIMP_ITEM (layer));
} }

File diff suppressed because it is too large Load Diff

View File

@@ -77,6 +77,8 @@ void layers_crop_to_content_cmd_callback (GtkAction *action,
void layers_mask_add_cmd_callback (GtkAction *action, void layers_mask_add_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void layers_mask_add_last_vals_cmd_callback (GtkAction *action,
gpointer data);
void layers_mask_apply_cmd_callback (GtkAction *action, void layers_mask_apply_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
@@ -105,8 +107,20 @@ void layers_mode_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); 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, void layers_lock_alpha_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void layers_color_tag_cmd_callback (GtkAction *action,
gint value,
gpointer data);
#endif /* __LAYERS_COMMANDS_H__ */ #endif /* __LAYERS_COMMANDS_H__ */

View File

@@ -0,0 +1,142 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimpcontext.h"
#include "core/gimpmybrush.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "actions.h"
#include "data-commands.h"
#include "mypaint-brushes-actions.h"
#include "gimp-intl.h"
static const GimpActionEntry mypaint_brushes_actions[] =
{
{ "mypaint-brushes-popup", GIMP_STOCK_MYPAINT_BRUSH,
NC_("mypaint-brushes-action", "MyPaint Brushes Menu"), NULL, NULL, NULL,
GIMP_HELP_MYPAINT_BRUSH_DIALOG },
{ "mypaint-brushes-new", "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),
GIMP_HELP_MYPAINT_BRUSH_NEW },
{ "mypaint-brushes-duplicate", GIMP_STOCK_DUPLICATE,
NC_("mypaint-brushes-action", "D_uplicate MyPaint Brush"), NULL,
NC_("mypaint-brushes-action", "Duplicate this MyPaint brush"),
G_CALLBACK (data_duplicate_cmd_callback),
GIMP_HELP_MYPAINT_BRUSH_DUPLICATE },
{ "mypaint-brushes-copy-location", "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),
GIMP_HELP_MYPAINT_BRUSH_COPY_LOCATION },
{ "mypaint-brushes-show-in-file-manager", GIMP_STOCK_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),
GIMP_HELP_MYPAINT_BRUSH_SHOW_IN_FILE_MANAGER },
{ "mypaint-brushes-delete", "edit-delete",
NC_("mypaint-brushes-action", "_Delete MyPaint Brush"), NULL,
NC_("mypaint-brushes-action", "Delete this MyPaint brush"),
G_CALLBACK (data_delete_cmd_callback),
GIMP_HELP_MYPAINT_BRUSH_DELETE },
{ "mypaint-brushes-refresh", "view-refresh",
NC_("mypaint-brushes-action", "_Refresh MyPaint Brushes"), NULL,
NC_("mypaint-brushes-action", "Refresh MyPaint brushes"),
G_CALLBACK (data_refresh_cmd_callback),
GIMP_HELP_MYPAINT_BRUSH_REFRESH }
};
static const GimpStringActionEntry mypaint_brushes_edit_actions[] =
{
{ "mypaint-brushes-edit", "gtk-edit",
NC_("mypaint-brushes-action", "_Edit MyPaint Brush..."), NULL,
NC_("mypaint-brushes-action", "Edit MyPaint brush"),
"gimp-mybrush-editor",
GIMP_HELP_MYPAINT_BRUSH_EDIT }
};
void
mypaint_brushes_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group, "mypaint-brushes-action",
mypaint_brushes_actions,
G_N_ELEMENTS (mypaint_brushes_actions));
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));
}
void
mypaint_brushes_actions_update (GimpActionGroup *group,
gpointer user_data)
{
GimpContext *context = action_data_get_context (user_data);
GimpMybrush *brush = NULL;
GimpData *data = NULL;
GFile *file = NULL;
if (context)
{
brush = gimp_context_get_mybrush (context);
if (action_data_sel_count (user_data) > 1)
{
brush = NULL;
}
if (brush)
{
data = GIMP_DATA (brush);
file = gimp_data_get_file (data);
}
}
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
SET_SENSITIVE ("mypaint-brushes-edit", brush && FALSE);
SET_SENSITIVE ("mypaint-brushes-duplicate", brush && GIMP_DATA_GET_CLASS (data)->duplicate);
SET_SENSITIVE ("mypaint-brushes-copy-location", file);
SET_SENSITIVE ("mypaint-brushes-show-in-file-manager", file);
SET_SENSITIVE ("mypaint-brushes-delete", brush && gimp_data_is_deletable (data));
#undef SET_SENSITIVE
}

View File

@@ -15,14 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef __CONVERT_TYPE_DIALOG_H__ #ifndef __MYPAINT_BRUSHES_ACTIONS_H__
#define __CONVERT_TYPE_DIALOG_H__ #define __MYPAINT_BRUSHES_ACTIONS_H__
GtkWidget * convert_type_dialog_new (GimpImage *image, void mypaint_brushes_actions_setup (GimpActionGroup *group);
GimpContext *context, void mypaint_brushes_actions_update (GimpActionGroup *group,
GtkWidget *parent, gpointer data);
GimpProgress *progress);
#endif /* __CONVERT_TYPE_DIALOG_H__ */ #endif /* __MYPAINT_BRUSHES_ACTIONS_H__ */

View File

@@ -74,7 +74,7 @@ static const GimpActionEntry palettes_actions[] =
G_CALLBACK (data_copy_location_cmd_callback), G_CALLBACK (data_copy_location_cmd_callback),
GIMP_HELP_PALETTE_COPY_LOCATION }, GIMP_HELP_PALETTE_COPY_LOCATION },
{ "palettes-show-in-file-manager", "gtk-directory", { "palettes-show-in-file-manager", GIMP_STOCK_FILE_MANAGER,
NC_("palettes-action", "Show in _File Manager"), NULL, NC_("palettes-action", "Show in _File Manager"), NULL,
NC_("palettes-action", "Show palette file location in the file manager"), NC_("palettes-action", "Show palette file location in the file manager"),
G_CALLBACK (data_show_in_file_manager_cmd_callback), G_CALLBACK (data_show_in_file_manager_cmd_callback),
@@ -97,7 +97,7 @@ static const GimpStringActionEntry palettes_edit_actions[] =
{ {
{ "palettes-edit", "gtk-edit", { "palettes-edit", "gtk-edit",
NC_("palettes-action", "_Edit Palette..."), NULL, NC_("palettes-action", "_Edit Palette..."), NULL,
NC_("palettes-action", "Edit palette"), NC_("palettes-action", "Edit this palette"),
"gimp-palette-editor", "gimp-palette-editor",
GIMP_HELP_PALETTE_EDIT } GIMP_HELP_PALETTE_EDIT }
}; };
@@ -120,16 +120,19 @@ void
palettes_actions_update (GimpActionGroup *group, palettes_actions_update (GimpActionGroup *group,
gpointer user_data) gpointer user_data)
{ {
GimpContext *context = action_data_get_context (user_data); GimpContext *context = action_data_get_context (user_data);
GimpPalette *palette = NULL; GimpPalette *palette = NULL;
GimpData *data = NULL; GimpData *data = NULL;
GFile *file = NULL; GFile *file = NULL;
gint sel_count = 0;
if (context) if (context)
{ {
palette = gimp_context_get_palette (context); palette = gimp_context_get_palette (context);
if (action_data_sel_count (user_data) > 1) sel_count = action_data_sel_count (user_data);
if (sel_count > 1)
{ {
palette = NULL; palette = NULL;
} }
@@ -147,7 +150,7 @@ palettes_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("palettes-edit", palette); SET_SENSITIVE ("palettes-edit", palette);
SET_SENSITIVE ("palettes-duplicate", palette && GIMP_DATA_GET_CLASS (data)->duplicate); SET_SENSITIVE ("palettes-duplicate", palette && GIMP_DATA_GET_CLASS (data)->duplicate);
SET_SENSITIVE ("palettes-merge", FALSE); /* FIXME palette && GIMP_IS_CONTAINER_LIST_VIEW (editor->view)); */ SET_SENSITIVE ("palettes-merge", sel_count > 1);
SET_SENSITIVE ("palettes-copy-location", file); SET_SENSITIVE ("palettes-copy-location", file);
SET_SENSITIVE ("palettes-show-in-file-manager", file); SET_SENSITIVE ("palettes-show-in-file-manager", file);
SET_SENSITIVE ("palettes-delete", palette && gimp_data_is_deletable (data)); SET_SENSITIVE ("palettes-delete", palette && gimp_data_is_deletable (data));

View File

@@ -24,11 +24,11 @@
#include "actions-types.h" #include "actions-types.h"
#include "core/gimppalette.h" #include "core/gimp.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "core/gimppalette.h"
#include "widgets/gimpcontainertreeview.h"
#include "widgets/gimpcontainerview.h" #include "widgets/gimpcontainerview.h"
#include "widgets/gimpdatafactoryview.h" #include "widgets/gimpdatafactoryview.h"
#include "widgets/gimpdialogfactory.h" #include "widgets/gimpdialogfactory.h"
@@ -36,6 +36,8 @@
#include "widgets/gimpview.h" #include "widgets/gimpview.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
#include "dialogs/dialogs.h"
#include "actions.h" #include "actions.h"
#include "palettes-commands.h" #include "palettes-commands.h"
@@ -72,16 +74,25 @@ palettes_merge_cmd_callback (GtkAction *action,
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data); GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GtkWidget *dialog; GtkWidget *dialog;
dialog = gimp_query_string_box (_("Merge Palette"), #define MERGE_DIALOG_KEY "gimp-palettes-merge-dialog"
GTK_WIDGET (editor),
gimp_standard_help_func, dialog = dialogs_get_dialog (G_OBJECT (editor), MERGE_DIALOG_KEY);
GIMP_HELP_PALETTE_MERGE,
_("Enter a name for the merged palette"), if (! dialog)
NULL, {
G_OBJECT (editor), "destroy", dialog = gimp_query_string_box (_("Merge Palettes"),
palettes_merge_callback, GTK_WIDGET (editor),
editor); gimp_standard_help_func,
gtk_widget_show (dialog); GIMP_HELP_PALETTE_MERGE,
_("Enter a name for the merged palette"),
NULL,
G_OBJECT (editor), "destroy",
palettes_merge_callback, editor);
dialogs_attach_dialog (G_OBJECT (editor), MERGE_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
@@ -92,56 +103,48 @@ palettes_merge_callback (GtkWidget *widget,
const gchar *palette_name, const gchar *palette_name,
gpointer data) gpointer data)
{ {
/* FIXME: reimplement palettes_merge_callback() */ GimpContainerEditor *editor = data;
#if 0 GimpDataFactoryView *view = data;
GimpContainerEditor *editor; GimpDataFactory *factory;
GimpPalette *palette; GimpContext *context;
GimpPalette *new_palette; GimpPalette *new_palette;
GList *sel_list; GList *selected = NULL;
GList *list;
editor = (GimpContainerEditor *) data; context = gimp_container_view_get_context (editor->view);
factory = gimp_data_factory_view_get_data_factory (view);
sel_list = GTK_LIST (GIMP_CONTAINER_LIST_VIEW (editor->view)->gtk_list)->selection; gimp_container_view_get_selected (editor->view, &selected);
if (! sel_list) if (g_list_length (selected) < 2)
{ {
gimp_message_literal (gimp, gimp_message_literal (context->gimp,
G_OBJECT (widget), GIMP_MESSAGE_WARNING, G_OBJECT (editor), GIMP_MESSAGE_WARNING,
"Can't merge palettes because " _("There must be at least two palettes selected "
"there are no palettes selected."); "to merge."));
g_list_free (selected);
return; return;
} }
new_palette = GIMP_PALETTE (gimp_palette_new (palette_name, FALSE)); new_palette = GIMP_PALETTE (gimp_data_factory_data_new (factory, context,
palette_name));
while (sel_list) for (list = selected; list; list = g_list_next (list))
{ {
GimpListItem *list_item; GimpPalette *palette = list->data;
GList *cols;
list_item = GIMP_LIST_ITEM (sel_list->data); for (cols = gimp_palette_get_colors (palette);
cols;
palette = (GimpPalette *) GIMP_VIEW (list_item->preview)->viewable; cols = g_list_next (cols))
if (palette)
{ {
GList *cols; GimpPaletteEntry *entry = cols->data;
for (cols = gimp_palette_get_colors (palette); gimp_palette_add_entry (new_palette, -1,
cols; entry->name,
cols = g_list_next (cols)) &entry->color);
{
GimpPaletteEntry *entry = cols->data;
gimp_palette_add_entry (new_palette,
entry->name,
&entry->color);
}
} }
sel_list = sel_list->next;
} }
gimp_container_add (editor->view->container, g_list_free (selected);
GIMP_OBJECT (new_palette));
#endif
} }

View File

@@ -67,7 +67,7 @@ static const GimpActionEntry patterns_actions[] =
G_CALLBACK (data_copy_location_cmd_callback), G_CALLBACK (data_copy_location_cmd_callback),
GIMP_HELP_PATTERN_COPY_LOCATION }, GIMP_HELP_PATTERN_COPY_LOCATION },
{ "patterns-show-in-file-manager", "gtk-directory", { "patterns-show-in-file-manager", GIMP_STOCK_FILE_MANAGER,
NC_("patterns-action", "Show in _File Manager"), NULL, NC_("patterns-action", "Show in _File Manager"), NULL,
NC_("patterns-action", "Show pattern file location in the file manager"), NC_("patterns-action", "Show pattern file location in the file manager"),
G_CALLBACK (data_show_in_file_manager_cmd_callback), G_CALLBACK (data_show_in_file_manager_cmd_callback),

View File

@@ -34,7 +34,6 @@
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/gimppluginmanager-help-domain.h" #include "plug-in/gimppluginmanager-help-domain.h"
#include "plug-in/gimppluginmanager-history.h"
#include "plug-in/gimppluginmanager-locale-domain.h" #include "plug-in/gimppluginmanager-locale-domain.h"
#include "plug-in/gimppluginmanager-menu-branch.h" #include "plug-in/gimppluginmanager-menu-branch.h"
#include "plug-in/gimppluginprocedure.h" #include "plug-in/gimppluginprocedure.h"
@@ -68,8 +67,6 @@ static void plug_in_actions_menu_path_added (GimpPlugInProcedure *proc,
static void plug_in_actions_add_proc (GimpActionGroup *group, static void plug_in_actions_add_proc (GimpActionGroup *group,
GimpPlugInProcedure *proc); GimpPlugInProcedure *proc);
static void plug_in_actions_history_changed (GimpPlugInManager *manager,
GimpActionGroup *group);
static gboolean plug_in_actions_check_translation (const gchar *original, static gboolean plug_in_actions_check_translation (const gchar *original,
const gchar *translated); const gchar *translated);
static void plug_in_actions_build_path (GimpActionGroup *group, static void plug_in_actions_build_path (GimpActionGroup *group,
@@ -81,49 +78,6 @@ static void plug_in_actions_build_path (GimpActionGroup *group
static const GimpActionEntry plug_in_actions[] = static const GimpActionEntry plug_in_actions[] =
{ {
{ "plug-in-menu", NULL, NC_("plug-in-action",
"Filte_rs") },
{ "plug-in-recent-menu", NULL, NC_("plug-in-action",
"Recently Used") },
{ "plug-in-blur-menu", NULL, NC_("plug-in-action",
"_Blur") },
{ "plug-in-noise-menu", NULL, NC_("plug-in-action",
"_Noise") },
{ "plug-in-edge-detect-menu", NULL, NC_("plug-in-action",
"Edge-De_tect") },
{ "plug-in-enhance-menu", NULL, NC_("plug-in-action",
"En_hance") },
{ "plug-in-combine-menu", NULL, NC_("plug-in-action",
"C_ombine") },
{ "plug-in-generic-menu", NULL, NC_("plug-in-action",
"_Generic") },
{ "plug-in-light-shadow-menu", NULL, NC_("plug-in-action",
"_Light and Shadow") },
{ "plug-in-distorts-menu", NULL, NC_("plug-in-action",
"_Distorts") },
{ "plug-in-artistic-menu", NULL, NC_("plug-in-action",
"_Artistic") },
{ "plug-in-decor-menu", NULL, NC_("plug-in-action",
"_Decor") },
{ "plug-in-map-menu", NULL, NC_("plug-in-action",
"_Map") },
{ "plug-in-render-menu", NULL, NC_("plug-in-action",
"_Render") },
{ "plug-in-render-clouds-menu", NULL, NC_("plug-in-action",
"_Clouds") },
{ "plug-in-render-fractals-menu", NULL, NC_("plug-in-action",
"_Fractals") },
{ "plug-in-render-nature-menu", NULL, NC_("plug-in-action",
"_Nature") },
{ "plug-in-render-noise-menu", NULL, NC_("plug-in-action",
"N_oise") },
{ "plug-in-render-pattern-menu", NULL, NC_("plug-in-action",
"_Pattern") },
{ "plug-in-web-menu", NULL, NC_("plug-in-action",
"_Web") },
{ "plug-in-animation-menu", NULL, NC_("plug-in-action",
"An_imation") },
{ "plug-in-reset-all", GIMP_STOCK_RESET, { "plug-in-reset-all", GIMP_STOCK_RESET,
NC_("plug-in-action", "Reset all _Filters"), NULL, NC_("plug-in-action", "Reset all _Filters"), NULL,
NC_("plug-in-action", "Reset all plug-ins to their default settings"), NC_("plug-in-action", "Reset all plug-ins to their default settings"),
@@ -131,43 +85,19 @@ static const GimpActionEntry plug_in_actions[] =
GIMP_HELP_FILTER_RESET_ALL } GIMP_HELP_FILTER_RESET_ALL }
}; };
static const GimpEnumActionEntry plug_in_repeat_actions[] =
{
{ "plug-in-repeat", "system-run",
NC_("plug-in-action", "Re_peat Last"), "<primary>F",
NC_("plug-in-action",
"Rerun the last used plug-in using the same settings"),
GIMP_RUN_WITH_LAST_VALS, FALSE,
GIMP_HELP_FILTER_REPEAT },
{ "plug-in-reshow", GIMP_STOCK_RESHOW_FILTER,
NC_("plug-in-action", "R_e-Show Last"), "<primary><shift>F",
NC_("plug-in-action", "Show the last used plug-in dialog again"),
GIMP_RUN_INTERACTIVE, FALSE,
GIMP_HELP_FILTER_RESHOW }
};
/* public functions */ /* public functions */
void void
plug_in_actions_setup (GimpActionGroup *group) plug_in_actions_setup (GimpActionGroup *group)
{ {
GimpPlugInManager *manager = group->gimp->plug_in_manager; GimpPlugInManager *manager = group->gimp->plug_in_manager;
GimpPlugInActionEntry *entries; GSList *list;
GSList *list;
gint n_entries;
gint i;
gimp_action_group_add_actions (group, "plug-in-action", gimp_action_group_add_actions (group, "plug-in-action",
plug_in_actions, plug_in_actions,
G_N_ELEMENTS (plug_in_actions)); G_N_ELEMENTS (plug_in_actions));
gimp_action_group_add_enum_actions (group, "plug-in-action",
plug_in_repeat_actions,
G_N_ELEMENTS (plug_in_repeat_actions),
G_CALLBACK (plug_in_repeat_cmd_callback));
for (list = gimp_plug_in_manager_get_menu_branches (manager); for (list = gimp_plug_in_manager_get_menu_branches (manager);
list; list;
list = g_slist_next (list)) list = g_slist_next (list))
@@ -204,38 +134,6 @@ plug_in_actions_setup (GimpActionGroup *group)
g_signal_connect_object (group->gimp->pdb, "unregister-procedure", g_signal_connect_object (group->gimp->pdb, "unregister-procedure",
G_CALLBACK (plug_in_actions_unregister_procedure), G_CALLBACK (plug_in_actions_unregister_procedure),
group, 0); group, 0);
n_entries = gimp_plug_in_manager_history_size (manager);
entries = g_new0 (GimpPlugInActionEntry, n_entries);
for (i = 0; i < n_entries; i++)
{
entries[i].name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
entries[i].icon_name = NULL;
entries[i].label = "";
entries[i].accelerator = "";
entries[i].tooltip = NULL;
entries[i].procedure = NULL;
entries[i].help_id = GIMP_HELP_FILTER_RESHOW;
}
gimp_action_group_add_plug_in_actions (group, entries, n_entries,
G_CALLBACK (plug_in_history_cmd_callback));
for (i = 0; i < n_entries; i++)
{
gimp_action_group_set_action_visible (group, entries[i].name, FALSE);
g_free ((gchar *) entries[i].name);
}
g_free (entries);
g_signal_connect_object (manager, "history-changed",
G_CALLBACK (plug_in_actions_history_changed),
group, 0);
plug_in_actions_history_changed (manager, group);
} }
void void
@@ -246,7 +144,6 @@ plug_in_actions_update (GimpActionGroup *group,
GimpPlugInManager *manager = group->gimp->plug_in_manager; GimpPlugInManager *manager = group->gimp->plug_in_manager;
GimpDrawable *drawable = NULL; GimpDrawable *drawable = NULL;
GSList *list; GSList *list;
gint i;
if (image) if (image)
drawable = gimp_image_get_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
@@ -259,40 +156,15 @@ plug_in_actions_update (GimpActionGroup *group,
! proc->file_proc && ! proc->file_proc &&
proc->image_types_val) proc->image_types_val)
{ {
gboolean sensitive = gimp_plug_in_procedure_get_sensitive (proc, gboolean sensitive =
drawable); gimp_procedure_get_sensitive (GIMP_PROCEDURE (proc),
GIMP_OBJECT (drawable));
gimp_action_group_set_action_sensitive (group, gimp_action_group_set_action_sensitive (group,
gimp_object_get_name (proc), gimp_object_get_name (proc),
sensitive); sensitive);
} }
} }
if (manager->history &&
gimp_plug_in_procedure_get_sensitive (manager->history->data, drawable))
{
gimp_action_group_set_action_sensitive (group, "plug-in-repeat", TRUE);
gimp_action_group_set_action_sensitive (group, "plug-in-reshow", TRUE);
}
else
{
gimp_action_group_set_action_sensitive (group, "plug-in-repeat", FALSE);
gimp_action_group_set_action_sensitive (group, "plug-in-reshow", FALSE);
}
for (list = manager->history, i = 0; list; list = list->next, i++)
{
GimpPlugInProcedure *proc = list->data;
gchar *name = g_strdup_printf ("plug-in-recent-%02d",
i + 1);
gboolean sensitive;
sensitive = gimp_plug_in_procedure_get_sensitive (proc, drawable);
gimp_action_group_set_action_sensitive (group, name, sensitive);
g_free (name);
}
} }
@@ -413,19 +285,14 @@ static void
plug_in_actions_add_proc (GimpActionGroup *group, plug_in_actions_add_proc (GimpActionGroup *group,
GimpPlugInProcedure *proc) GimpPlugInProcedure *proc)
{ {
GimpPlugInActionEntry entry; GimpProcedureActionEntry entry;
const gchar *locale_domain; const gchar *locale_domain;
const gchar *label; gchar *path_original = NULL;
gchar *path_original = NULL; gchar *path_translated = NULL;
gchar *path_translated = NULL;
locale_domain = gimp_plug_in_procedure_get_locale_domain (proc); locale_domain = gimp_plug_in_procedure_get_locale_domain (proc);
if (proc->menu_label) if (! proc->menu_label)
{
label = dgettext (locale_domain, proc->menu_label);
}
else
{ {
gchar *p1, *p2; gchar *p1, *p2;
@@ -446,8 +313,6 @@ plug_in_actions_add_proc (GimpActionGroup *group,
{ {
*p1 = '\0'; *p1 = '\0';
*p2 = '\0'; *p2 = '\0';
label = p2 + 1;
} }
else else
{ {
@@ -462,22 +327,15 @@ plug_in_actions_add_proc (GimpActionGroup *group,
} }
entry.name = gimp_object_get_name (proc); entry.name = gimp_object_get_name (proc);
entry.icon_name = gimp_plug_in_procedure_get_icon_name (proc); entry.icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (proc));
entry.label = label; entry.label = gimp_procedure_get_menu_label (GIMP_PROCEDURE (proc));
entry.accelerator = NULL; entry.accelerator = NULL;
entry.tooltip = gimp_plug_in_procedure_get_blurb (proc); entry.tooltip = gimp_procedure_get_blurb (GIMP_PROCEDURE (proc));
entry.procedure = proc; entry.procedure = GIMP_PROCEDURE (proc);
entry.help_id = gimp_plug_in_procedure_get_help_id (proc); entry.help_id = gimp_procedure_get_help_id (GIMP_PROCEDURE (proc));
#if 0 gimp_action_group_add_procedure_actions (group, &entry, 1,
g_print ("adding plug-in action '%s' (%s)\n", G_CALLBACK (plug_in_run_cmd_callback));
gimp_object_get_name (proc), label);
#endif
gimp_action_group_add_plug_in_actions (group, &entry, 1,
G_CALLBACK (plug_in_run_cmd_callback));
g_free ((gchar *) entry.help_id);
if (proc->menu_label) if (proc->menu_label)
{ {
@@ -514,7 +372,8 @@ plug_in_actions_add_proc (GimpActionGroup *group,
if (image) if (image)
drawable = gimp_image_get_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
sensitive = gimp_plug_in_procedure_get_sensitive (proc, drawable); sensitive = gimp_procedure_get_sensitive (GIMP_PROCEDURE (proc),
GIMP_OBJECT (drawable));
gimp_action_group_set_action_sensitive (group, gimp_action_group_set_action_sensitive (group,
gimp_object_get_name (proc), gimp_object_get_name (proc),
@@ -522,115 +381,6 @@ plug_in_actions_add_proc (GimpActionGroup *group,
} }
} }
static void
plug_in_actions_history_changed (GimpPlugInManager *manager,
GimpActionGroup *group)
{
GimpPlugInProcedure *proc;
gint i;
proc = gimp_plug_in_manager_history_nth (manager, 0);
if (proc)
{
GtkAction *actual_action;
const gchar *label;
gchar *repeat;
gchar *reshow;
gboolean sensitive = FALSE;
label = gimp_plug_in_procedure_get_label (proc);
/* copy the sensitivity of the plug-in procedure's actual action
* instead of calling plug_in_actions_update() because doing the
* latter would set the sensitivity of this image's action on
* all images' actions. See bug #517683.
*/
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
gimp_object_get_name (proc));
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
repeat = g_strdup_printf (_("Re_peat \"%s\""), label);
reshow = g_strdup_printf (_("R_e-Show \"%s\""), label);
gimp_action_group_set_action_label (group, "plug-in-repeat", repeat);
gimp_action_group_set_action_label (group, "plug-in-reshow", reshow);
gimp_action_group_set_action_sensitive (group,
"plug-in-repeat", sensitive);
gimp_action_group_set_action_sensitive (group,
"plug-in-reshow", sensitive);
g_free (repeat);
g_free (reshow);
}
else
{
gimp_action_group_set_action_label (group, "plug-in-repeat",
_("Repeat Last"));
gimp_action_group_set_action_label (group, "plug-in-reshow",
_("Re-Show Last"));
gimp_action_group_set_action_sensitive (group, "plug-in-repeat", FALSE);
gimp_action_group_set_action_sensitive (group, "plug-in-reshow", FALSE);
}
for (i = 0; i < gimp_plug_in_manager_history_length (manager); i++)
{
GtkAction *action;
GtkAction *actual_action;
const gchar *label;
gchar *name;
gboolean sensitive = FALSE;
name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
g_free (name);
proc = gimp_plug_in_manager_history_nth (manager, i);
if (proc->menu_label)
{
label = dgettext (gimp_plug_in_procedure_get_locale_domain (proc),
proc->menu_label);
}
else
{
label = gimp_plug_in_procedure_get_label (proc);
}
/* see comment above */
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
gimp_object_get_name (proc));
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
g_object_set (action,
"visible", TRUE,
"sensitive", sensitive,
"procedure", proc,
"label", label,
"icon-name", gimp_plug_in_procedure_get_icon_name (proc),
"tooltip", gimp_plug_in_procedure_get_blurb (proc),
NULL);
}
for (; i < gimp_plug_in_manager_history_size (manager); i++)
{
GtkAction *action;
gchar *name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
g_free (name);
g_object_set (action,
"visible", FALSE,
"procedure", NULL,
NULL);
}
}
static gboolean static gboolean
plug_in_actions_check_translation (const gchar *original, plug_in_actions_check_translation (const gchar *original,
const gchar *translated) const gchar *translated)

View File

@@ -17,8 +17,6 @@
#include "config.h" #include "config.h"
#include <string.h>
#include <gegl.h> #include <gegl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
@@ -28,20 +26,18 @@
#include "actions-types.h" #include "actions-types.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimp-utils.h" #include "core/gimp-filter-history.h"
#include "core/gimpcontainer.h" #include "core/gimpcontainer.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpitem.h" #include "core/gimpitem.h"
#include "core/gimpparamspecs.h" #include "core/gimpparamspecs.h"
#include "core/gimpprogress.h" #include "core/gimpprogress.h"
#include "pdb/gimpprocedure.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/gimppluginmanager-data.h" #include "plug-in/gimppluginmanager-data.h"
#include "plug-in/gimppluginmanager-history.h"
#include "pdb/gimpprocedure.h"
#include "widgets/gimpbufferview.h" #include "widgets/gimpbufferview.h"
#include "widgets/gimpcontainerview.h" #include "widgets/gimpcontainerview.h"
@@ -53,72 +49,38 @@
#include "widgets/gimpmessagebox.h" #include "widgets/gimpmessagebox.h"
#include "widgets/gimpmessagedialog.h" #include "widgets/gimpmessagedialog.h"
#include "display/gimpdisplay.h" #include "dialogs/dialogs.h"
#include "actions.h" #include "actions.h"
#include "plug-in-commands.h" #include "plug-in-commands.h"
#include "procedure-commands.h"
#include "gimp-intl.h" #include "gimp-intl.h"
/* local function prototypes */ /* local function prototypes */
static void plug_in_procedure_execute (GimpPlugInProcedure *procedure, static void plug_in_reset_all_response (GtkWidget *dialog,
Gimp *gimp, gint response_id,
GimpDisplay *display, Gimp *gimp);
GimpValueArray *args,
gint n_args);
static gint plug_in_collect_data_args (GtkAction *action,
GimpObject *object,
GParamSpec **pspecs,
GimpValueArray *args,
gint n_args);
static gint plug_in_collect_image_args (GtkAction *action,
GimpImage *image,
GParamSpec **pspecs,
GimpValueArray *args,
gint n_args);
static gint plug_in_collect_item_args (GtkAction *action,
GimpImage *image,
GimpItem *item,
GParamSpec **pspecs,
GimpValueArray *args,
gint n_args);
static gint plug_in_collect_display_args (GtkAction *action,
GimpDisplay *display,
GParamSpec **pspecs,
GimpValueArray *args,
gint n_args);
static void plug_in_reset_all_response (GtkWidget *dialog,
gint response_id,
Gimp *gimp);
/* public functions */ /* public functions */
void void
plug_in_run_cmd_callback (GtkAction *action, plug_in_run_cmd_callback (GtkAction *action,
GimpPlugInProcedure *proc, GimpProcedure *procedure,
gpointer data) gpointer data)
{ {
GimpProcedure *procedure = GIMP_PROCEDURE (proc);
Gimp *gimp; Gimp *gimp;
GimpValueArray *args; GimpValueArray *args = NULL;
gint n_args = 0; GimpDisplay *display = NULL;
GimpDisplay *display = NULL;
return_if_no_gimp (gimp, data); return_if_no_gimp (gimp, data);
args = gimp_procedure_get_arguments (procedure);
/* initialize the first argument */
g_value_set_int (gimp_value_array_index (args, n_args),
GIMP_RUN_INTERACTIVE);
n_args++;
switch (procedure->proc_type) switch (procedure->proc_type)
{ {
case GIMP_EXTENSION: case GIMP_EXTENSION:
args = procedure_commands_get_run_mode_arg (procedure);
break; break;
case GIMP_PLUGIN: case GIMP_PLUGIN:
@@ -138,9 +100,7 @@ plug_in_run_cmd_callback (GtkAction *action,
object = gimp_context_get_by_type (context, object = gimp_context_get_by_type (context,
gimp_container_get_children_type (container)); gimp_container_get_children_type (container));
n_args = plug_in_collect_data_args (action, object, args = procedure_commands_get_data_args (procedure, object);
procedure->args,
args, n_args);
} }
else if (GIMP_IS_IMAGE_EDITOR (data)) else if (GIMP_IS_IMAGE_EDITOR (data))
{ {
@@ -149,9 +109,7 @@ plug_in_run_cmd_callback (GtkAction *action,
image = gimp_image_editor_get_image (editor); image = gimp_image_editor_get_image (editor);
n_args = plug_in_collect_image_args (action, image, args = procedure_commands_get_image_args (procedure, image);
procedure->args,
args, n_args);
} }
else if (GIMP_IS_ITEM_TREE_VIEW (data)) else if (GIMP_IS_ITEM_TREE_VIEW (data))
{ {
@@ -166,93 +124,40 @@ plug_in_run_cmd_callback (GtkAction *action,
else else
item = NULL; item = NULL;
n_args = plug_in_collect_item_args (action, image, item, args = procedure_commands_get_item_args (procedure, image, item);
procedure->args,
args, n_args);
} }
else else
{ {
display = action_data_get_display (data); display = action_data_get_display (data);
n_args = plug_in_collect_display_args (action, args = procedure_commands_get_display_args (procedure, display);
display,
procedure->args,
args, n_args);
} }
break; break;
case GIMP_INTERNAL: case GIMP_INTERNAL:
g_warning ("Unhandled procedure type."); g_warning ("Unhandled procedure type.");
n_args = -1;
break; break;
} }
if (n_args >= 1) if (args)
plug_in_procedure_execute (proc, gimp, display, args, n_args);
gimp_value_array_unref (args);
}
void
plug_in_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpPlugInProcedure *procedure;
Gimp *gimp;
GimpDisplay *display;
GimpRunMode run_mode;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
run_mode = (GimpRunMode) value;
procedure = gimp_plug_in_manager_history_nth (gimp->plug_in_manager, 0);
if (procedure)
{ {
GimpValueArray *args; if (procedure_commands_run_procedure (procedure, gimp,
gint n_args; GIMP_PROGRESS (display),
GIMP_RUN_INTERACTIVE, args,
args = gimp_procedure_get_arguments (GIMP_PROCEDURE (procedure)); display))
{
g_value_set_int (gimp_value_array_index (args, 0), run_mode); /* remember only image plug-ins */
if (procedure->num_args >= 2 &&
n_args = plug_in_collect_display_args (action, display, GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]))
GIMP_PROCEDURE (procedure)->args, {
args, 1); gimp_filter_history_add (gimp, procedure);
}
plug_in_procedure_execute (procedure, gimp, display, args, n_args); }
gimp_value_array_unref (args); gimp_value_array_unref (args);
} }
} }
void
plug_in_history_cmd_callback (GtkAction *action,
GimpPlugInProcedure *procedure,
gpointer data)
{
Gimp *gimp;
GimpDisplay *display;
GimpValueArray *args;
gint n_args;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
args = gimp_procedure_get_arguments (GIMP_PROCEDURE (procedure));
g_value_set_int (gimp_value_array_index (args, 0), GIMP_RUN_INTERACTIVE);
n_args = plug_in_collect_display_args (action, display,
GIMP_PROCEDURE (procedure)->args,
args, 1);
plug_in_procedure_execute (procedure, gimp, display, args, n_args);
gimp_value_array_unref (args);
}
void void
plug_in_reset_all_cmd_callback (GtkAction *action, plug_in_reset_all_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
@@ -261,216 +166,44 @@ plug_in_reset_all_cmd_callback (GtkAction *action,
GtkWidget *dialog; GtkWidget *dialog;
return_if_no_gimp (gimp, data); return_if_no_gimp (gimp, data);
dialog = gimp_message_dialog_new (_("Reset all Filters"), GIMP_STOCK_QUESTION, #define RESET_FILTERS_DIALOG_KEY "gimp-reset-all-filters-dialog"
NULL, 0,
gimp_standard_help_func, NULL,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, dialog = dialogs_get_dialog (G_OBJECT (gimp), RESET_FILTERS_DIALOG_KEY);
GIMP_STOCK_RESET, GTK_RESPONSE_OK,
NULL); if (! dialog)
{
dialog = gimp_message_dialog_new (_("Reset all Filters"),
GIMP_STOCK_QUESTION,
NULL, 0,
gimp_standard_help_func, NULL,
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_RESPONSE_OK, GIMP_STOCK_RESET, GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect (dialog, "response", NULL);
G_CALLBACK (plug_in_reset_all_response),
gimp);
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box, gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
_("Do you really want to reset all " GTK_RESPONSE_OK,
"filters to default values?")); GTK_RESPONSE_CANCEL,
-1);
gtk_widget_show (dialog); g_signal_connect (dialog, "response",
G_CALLBACK (plug_in_reset_all_response),
gimp);
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
_("Do you really want to reset all "
"filters to default values?"));
dialogs_attach_dialog (G_OBJECT (gimp), RESET_FILTERS_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
/* private functions */ /* private functions */
static void
plug_in_procedure_execute (GimpPlugInProcedure *procedure,
Gimp *gimp,
GimpDisplay *display,
GimpValueArray *args,
gint n_args)
{
GError *error = NULL;
gimp_value_array_truncate (args, n_args);
/* run the plug-in procedure */
gimp_procedure_execute_async (GIMP_PROCEDURE (procedure), gimp,
gimp_get_user_context (gimp),
GIMP_PROGRESS (display), args,
GIMP_OBJECT (display), &error);
if (error)
{
gimp_message_literal (gimp,
G_OBJECT (display), GIMP_MESSAGE_ERROR,
error->message);
g_error_free (error);
}
else
{
/* remember only image plug-ins */
if (GIMP_PROCEDURE (procedure)->num_args >= 2 &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (GIMP_PROCEDURE (procedure)->args[1]))
{
gimp_plug_in_manager_history_add (gimp->plug_in_manager, procedure);
}
}
}
static gint
plug_in_collect_data_args (GtkAction *action,
GimpObject *object,
GParamSpec **pspecs,
GimpValueArray *args,
gint n_args)
{
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_STRING (pspecs[n_args]))
{
if (object)
{
g_value_set_string (gimp_value_array_index (args, n_args),
gimp_object_get_name (object));
n_args++;
}
else
{
g_warning ("Uh-oh, no active data object for the plug-in!");
return -1;
}
}
return n_args;
}
static gint
plug_in_collect_image_args (GtkAction *action,
GimpImage *image,
GParamSpec **pspecs,
GimpValueArray *args,
gint n_args)
{
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (pspecs[n_args]))
{
if (image)
{
gimp_value_set_image (gimp_value_array_index (args, n_args), image);
n_args++;
}
else
{
g_warning ("Uh-oh, no active image for the plug-in!");
return -1;
}
}
return n_args;
}
static gint
plug_in_collect_item_args (GtkAction *action,
GimpImage *image,
GimpItem *item,
GParamSpec **pspecs,
GimpValueArray *args,
gint n_args)
{
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (pspecs[n_args]))
{
if (image)
{
gimp_value_set_image (gimp_value_array_index (args, n_args), image);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_ITEM_ID (pspecs[n_args]))
{
if (item &&
g_type_is_a (G_TYPE_FROM_INSTANCE (item),
GIMP_PARAM_SPEC_ITEM_ID (pspecs[n_args])->item_type))
{
gimp_value_set_item (gimp_value_array_index (args, n_args),
item);
n_args++;
}
else
{
g_warning ("Uh-oh, no active item for the plug-in!");
return -1;
}
}
}
}
return n_args;
}
static gint
plug_in_collect_display_args (GtkAction *action,
GimpDisplay *display,
GParamSpec **pspecs,
GimpValueArray *args,
gint n_args)
{
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_DISPLAY_ID (pspecs[n_args]))
{
if (display)
{
gimp_value_set_display (gimp_value_array_index (args, n_args),
GIMP_OBJECT (display));
n_args++;
}
else
{
g_warning ("Uh-oh, no active display for the plug-in!");
return -1;
}
}
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (pspecs[n_args]))
{
GimpImage *image = display ? gimp_display_get_image (display) : NULL;
if (image)
{
gimp_value_set_image (gimp_value_array_index (args, n_args),
image);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_DRAWABLE_ID (pspecs[n_args]))
{
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (drawable)
{
gimp_value_set_drawable (gimp_value_array_index (args, n_args),
drawable);
n_args++;
}
else
{
g_warning ("Uh-oh, no active drawable for the plug-in!");
return -1;
}
}
}
}
return n_args;
}
static void static void
plug_in_reset_all_response (GtkWidget *dialog, plug_in_reset_all_response (GtkWidget *dialog,
gint response_id, gint response_id,

View File

@@ -19,18 +19,12 @@
#define __PLUG_IN_COMMANDS_H__ #define __PLUG_IN_COMMANDS_H__
void plug_in_run_cmd_callback (GtkAction *action, void plug_in_run_cmd_callback (GtkAction *action,
GimpPlugInProcedure *proc, GimpProcedure *proc,
gpointer data); gpointer data);
void plug_in_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void plug_in_history_cmd_callback (GtkAction *action,
GimpPlugInProcedure *proc,
gpointer data);
void plug_in_reset_all_cmd_callback (GtkAction *action, void plug_in_reset_all_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
#endif /* __PLUG_IN_COMMANDS_H__ */ #endif /* __PLUG_IN_COMMANDS_H__ */

View File

@@ -0,0 +1,283 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "actions-types.h"
#include "core/gimp.h"
#include "core/gimpimage.h"
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.h"
#include "pdb/gimpprocedure.h"
#include "display/gimpdisplay.h"
#include "procedure-commands.h"
GimpValueArray *
procedure_commands_get_run_mode_arg (GimpProcedure *procedure)
{
GimpValueArray *args;
gint n_args = 0;
args = gimp_procedure_get_arguments (procedure);
/* initialize the first argument */
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_INT32 (procedure->args[n_args]))
{
g_value_set_int (gimp_value_array_index (args, n_args),
GIMP_RUN_INTERACTIVE);
n_args++;
}
gimp_value_array_truncate (args, n_args);
return args;
}
GimpValueArray *
procedure_commands_get_data_args (GimpProcedure *procedure,
GimpObject *object)
{
GimpValueArray *args;
gint n_args = 0;
args = gimp_procedure_get_arguments (procedure);
/* initialize the first argument */
g_value_set_int (gimp_value_array_index (args, n_args),
GIMP_RUN_INTERACTIVE);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_STRING (procedure->args[n_args]))
{
if (object)
{
g_value_set_string (gimp_value_array_index (args, n_args),
gimp_object_get_name (object));
n_args++;
}
else
{
g_warning ("Uh-oh, no active data object for the plug-in!");
gimp_value_array_unref (args);
return NULL;
}
}
gimp_value_array_truncate (args, n_args);
return args;
}
GimpValueArray *
procedure_commands_get_image_args (GimpProcedure *procedure,
GimpImage *image)
{
GimpValueArray *args;
gint n_args = 0;
args = gimp_procedure_get_arguments (procedure);
/* initialize the first argument */
g_value_set_int (gimp_value_array_index (args, n_args),
GIMP_RUN_INTERACTIVE);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[n_args]))
{
if (image)
{
gimp_value_set_image (gimp_value_array_index (args, n_args), image);
n_args++;
}
else
{
g_warning ("Uh-oh, no active image for the plug-in!");
gimp_value_array_unref (args);
return NULL;
}
}
gimp_value_array_truncate (args, n_args);
return args;
}
GimpValueArray *
procedure_commands_get_item_args (GimpProcedure *procedure,
GimpImage *image,
GimpItem *item)
{
GimpValueArray *args;
gint n_args = 0;
args = gimp_procedure_get_arguments (procedure);
/* initialize the first argument */
g_value_set_int (gimp_value_array_index (args, n_args),
GIMP_RUN_INTERACTIVE);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[n_args]))
{
if (image)
{
gimp_value_set_image (gimp_value_array_index (args, n_args), image);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_ITEM_ID (procedure->args[n_args]))
{
if (item &&
g_type_is_a (G_TYPE_FROM_INSTANCE (item),
GIMP_PARAM_SPEC_ITEM_ID (procedure->args[n_args])->item_type))
{
gimp_value_set_item (gimp_value_array_index (args, n_args),
item);
n_args++;
}
else
{
g_warning ("Uh-oh, no active item for the plug-in!");
gimp_value_array_unref (args);
return NULL;
}
}
}
}
gimp_value_array_truncate (args, n_args);
return args;
}
GimpValueArray *
procedure_commands_get_display_args (GimpProcedure *procedure,
GimpDisplay *display)
{
GimpValueArray *args;
gint n_args = 0;
args = gimp_procedure_get_arguments (procedure);
/* initialize the first argument */
g_value_set_int (gimp_value_array_index (args, n_args),
GIMP_RUN_INTERACTIVE);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_DISPLAY_ID (procedure->args[n_args]))
{
if (display)
{
gimp_value_set_display (gimp_value_array_index (args, n_args),
GIMP_OBJECT (display));
n_args++;
}
else
{
g_warning ("Uh-oh, no active display for the plug-in!");
gimp_value_array_unref (args);
return NULL;
}
}
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[n_args]))
{
GimpImage *image = display ? gimp_display_get_image (display) : NULL;
if (image)
{
gimp_value_set_image (gimp_value_array_index (args, n_args),
image);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[n_args]))
{
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (drawable)
{
gimp_value_set_drawable (gimp_value_array_index (args, n_args),
drawable);
n_args++;
}
else
{
g_warning ("Uh-oh, no active drawable for the plug-in!");
gimp_value_array_unref (args);
return NULL;
}
}
}
}
gimp_value_array_truncate (args, n_args);
return args;
}
gboolean
procedure_commands_run_procedure (GimpProcedure *procedure,
Gimp *gimp,
GimpProgress *progress,
GimpRunMode run_mode,
GimpValueArray *args,
GimpDisplay *display)
{
GError *error = NULL;
g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure), FALSE);
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
g_return_val_if_fail (display == NULL || GIMP_IS_DISPLAY (display), FALSE);
g_return_val_if_fail (args != NULL, FALSE);
g_value_set_int (gimp_value_array_index (args, 0), run_mode);
gimp_procedure_execute_async (procedure, gimp,
gimp_get_user_context (gimp),
progress, args,
GIMP_OBJECT (display), &error);
if (error)
{
gimp_message_literal (gimp,
G_OBJECT (progress), GIMP_MESSAGE_ERROR,
error->message);
g_clear_error (&error);
return FALSE;
}
return TRUE;
}

View File

@@ -0,0 +1,41 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PROCEDURE_COMMANDS_H__
#define __PROCEDURE_COMMANDS_H__
GimpValueArray * procedure_commands_get_run_mode_arg (GimpProcedure *procedure);
GimpValueArray * procedure_commands_get_data_args (GimpProcedure *procedure,
GimpObject *object);
GimpValueArray * procedure_commands_get_image_args (GimpProcedure *procedure,
GimpImage *image);
GimpValueArray * procedure_commands_get_item_args (GimpProcedure *procedure,
GimpImage *image,
GimpItem *item);
GimpValueArray * procedure_commands_get_display_args (GimpProcedure *procedure,
GimpDisplay *display);
gboolean procedure_commands_run_procedure (GimpProcedure *procedure,
Gimp *gimp,
GimpProgress *progress,
GimpRunMode run_mode,
GimpValueArray *args,
GimpDisplay *display);
#endif /* __PROCEDURE_COMMANDS_H__ */

View File

@@ -32,7 +32,9 @@
#include "widgets/gimphelp-ids.h" #include "widgets/gimphelp-ids.h"
#include "dialogs/dialogs.h"
#include "dialogs/channel-options-dialog.h" #include "dialogs/channel-options-dialog.h"
#include "dialogs/item-options-dialog.h"
#include "actions.h" #include "actions.h"
#include "quick-mask-commands.h" #include "quick-mask-commands.h"
@@ -42,9 +44,19 @@
/* local function prototypes */ /* local function prototypes */
static void quick_mask_configure_response (GtkWidget *widget, static void quick_mask_configure_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
ChannelOptionsDialog *options); GimpChannel *channel,
GimpContext *context,
const gchar *channel_name,
const GimpRGB *channel_color,
gboolean save_selection,
gboolean channel_visible,
gboolean channel_linked,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gpointer user_data);
/* public functionss */ /* public functionss */
@@ -88,60 +100,78 @@ void
quick_mask_configure_cmd_callback (GtkAction *action, quick_mask_configure_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
ChannelOptionsDialog *options; GimpImage *image;
GimpImage *image; GtkWidget *widget;
GtkWidget *widget; GtkWidget *dialog;
GimpRGB color;
return_if_no_image (image, data); return_if_no_image (image, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
gimp_image_get_quick_mask_color (image, &color); #define CONFIGURE_DIALOG_KEY "gimp-image-quick-mask-configure-dialog"
options = channel_options_dialog_new (image, NULL, dialog = dialogs_get_dialog (G_OBJECT (image), CONFIGURE_DIALOG_KEY);
action_data_get_context (data),
widget,
&color,
NULL,
_("Quick Mask Attributes"),
"gimp-quick-mask-edit",
GIMP_STOCK_QUICK_MASK_ON,
_("Edit Quick Mask Attributes"),
GIMP_HELP_QUICK_MASK_EDIT,
_("Edit Quick Mask Color"),
_("_Mask opacity:"),
FALSE);
g_signal_connect (options->dialog, "response", if (! dialog)
G_CALLBACK (quick_mask_configure_response), {
options); GimpRGB color;
gtk_widget_show (options->dialog); gimp_image_get_quick_mask_color (image, &color);
dialog = channel_options_dialog_new (image, NULL,
action_data_get_context (data),
widget,
_("Quick Mask Attributes"),
"gimp-quick-mask-edit",
GIMP_STOCK_QUICK_MASK_ON,
_("Edit Quick Mask Attributes"),
GIMP_HELP_QUICK_MASK_EDIT,
_("Edit Quick Mask Color"),
_("_Mask opacity:"),
FALSE,
NULL,
&color,
FALSE,
FALSE,
GIMP_COLOR_TAG_NONE,
FALSE,
FALSE,
quick_mask_configure_callback,
NULL);
item_options_dialog_set_switches_visible (dialog, FALSE);
dialogs_attach_dialog (G_OBJECT (image), CONFIGURE_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
/* private functions */ /* private functions */
static void static void
quick_mask_configure_response (GtkWidget *widget, quick_mask_configure_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
ChannelOptionsDialog *options) GimpChannel *channel,
GimpContext *context,
const gchar *channel_name,
const GimpRGB *channel_color,
gboolean save_selection,
gboolean channel_visible,
gboolean channel_linked,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gpointer user_data)
{ {
if (response_id == GTK_RESPONSE_OK) GimpRGB old_color;
gimp_image_get_quick_mask_color (image, &old_color);
if (gimp_rgba_distance (&old_color, channel_color) > 0.0001)
{ {
GimpRGB old_color; gimp_image_set_quick_mask_color (image, channel_color);
GimpRGB new_color; gimp_image_flush (image);
gimp_image_get_quick_mask_color (options->image, &old_color);
gimp_color_button_get_color (GIMP_COLOR_BUTTON (options->color_panel),
&new_color);
if (gimp_rgba_distance (&old_color, &new_color) > 0.0001)
{
gimp_image_set_quick_mask_color (options->image, &new_color);
gimp_image_flush (options->image);
}
} }
gtk_widget_destroy (options->dialog); gtk_widget_destroy (dialog);
} }

View File

@@ -17,21 +17,14 @@
#include "config.h" #include "config.h"
#include <gegl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h" #include "actions-types.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpsamplepointeditor.h" #include "widgets/gimpsamplepointeditor.h"
#include "sample-points-commands.h" #include "sample-points-commands.h"
#include "gimp-intl.h"
/* public functions */ /* public functions */

View File

@@ -40,7 +40,7 @@
static const GimpActionEntry select_actions[] = static const GimpActionEntry select_actions[] =
{ {
{ "selection-popup", GIMP_STOCK_TOOL_RECT_SELECT, { "selection-popup", GIMP_STOCK_SELECTION,
NC_("select-action", "Selection Editor Menu"), NULL, NULL, NULL, NC_("select-action", "Selection Editor Menu"), NULL, NULL, NULL,
GIMP_HELP_SELECTION_DIALOG }, GIMP_HELP_SELECTION_DIALOG },
@@ -101,12 +101,30 @@ static const GimpActionEntry select_actions[] =
G_CALLBACK (select_border_cmd_callback), G_CALLBACK (select_border_cmd_callback),
GIMP_HELP_SELECTION_BORDER }, 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),
GIMP_HELP_SELECTION_FLOOD },
{ "select-save", GIMP_STOCK_SELECTION_TO_CHANNEL, { "select-save", GIMP_STOCK_SELECTION_TO_CHANNEL,
NC_("select-action", "Save to _Channel"), NULL, NC_("select-action", "Save to _Channel"), NULL,
NC_("select-action", "Save the selection to a channel"), NC_("select-action", "Save the selection to a channel"),
G_CALLBACK (select_save_cmd_callback), G_CALLBACK (select_save_cmd_callback),
GIMP_HELP_SELECTION_TO_CHANNEL }, GIMP_HELP_SELECTION_TO_CHANNEL },
{ "select-fill", GIMP_STOCK_TOOL_BUCKET_FILL,
NC_("select-action", "_Fill Selection Outline..."), NULL,
NC_("select-action", "Fill the selection outline"),
G_CALLBACK (select_fill_cmd_callback),
GIMP_HELP_SELECTION_FILL },
{ "select-fill-last-values", GIMP_STOCK_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),
GIMP_HELP_SELECTION_FILL },
{ "select-stroke", GIMP_STOCK_SELECTION_STROKE, { "select-stroke", GIMP_STOCK_SELECTION_STROKE,
NC_("select-action", "_Stroke Selection..."), NULL, NC_("select-action", "_Stroke Selection..."), NULL,
NC_("select-action", "Paint along the selection outline"), NC_("select-action", "Paint along the selection outline"),
@@ -169,8 +187,11 @@ select_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("select-shrink", drawable && sel); SET_SENSITIVE ("select-shrink", drawable && sel);
SET_SENSITIVE ("select-grow", drawable && sel); SET_SENSITIVE ("select-grow", drawable && sel);
SET_SENSITIVE ("select-border", drawable && sel); SET_SENSITIVE ("select-border", drawable && sel);
SET_SENSITIVE ("select-flood", drawable && sel);
SET_SENSITIVE ("select-save", drawable && !fs); SET_SENSITIVE ("select-save", drawable && !fs);
SET_SENSITIVE ("select-fill", writable && !children && sel);
SET_SENSITIVE ("select-fill-last-values", writable && !children && sel);
SET_SENSITIVE ("select-stroke", writable && !children && sel); SET_SENSITIVE ("select-stroke", writable && !children && sel);
SET_SENSITIVE ("select-stroke-last-values", writable && !children && sel); SET_SENSITIVE ("select-stroke-last-values", writable && !children && sel);

View File

@@ -25,11 +25,12 @@
#include "actions-types.h" #include "actions-types.h"
#include "config/gimpdialogconfig.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpselection.h" #include "core/gimpselection.h"
#include "core/gimpstrokeoptions.h"
#include "widgets/gimphelp-ids.h" #include "widgets/gimphelp-ids.h"
#include "widgets/gimpdialogfactory.h" #include "widgets/gimpdialogfactory.h"
@@ -39,9 +40,10 @@
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h" #include "display/gimpdisplayshell.h"
#include "dialogs/stroke-dialog.h" #include "dialogs/dialogs.h"
#include "actions.h" #include "actions.h"
#include "items-commands.h"
#include "select-commands.h" #include "select-commands.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@@ -67,30 +69,8 @@ static void select_shrink_callback (GtkWidget *widget,
gpointer data); gpointer data);
/* private variables */
static gdouble select_feather_radius = 5.0;
static gint select_grow_pixels = 1;
static gint select_shrink_pixels = 1;
static gboolean select_shrink_edge_lock = FALSE;
static gint select_border_radius = 5;
static gboolean select_border_feather = FALSE;
static gboolean select_border_edge_lock = FALSE;
/* public functions */ /* public functions */
void
select_invert_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
return_if_no_image (image, data);
gimp_channel_invert (gimp_image_get_mask (image), TRUE);
gimp_image_flush (image);
}
void void
select_all_cmd_callback (GtkAction *action, select_all_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
@@ -113,6 +93,17 @@ select_none_cmd_callback (GtkAction *action,
gimp_image_flush (image); gimp_image_flush (image);
} }
void
select_invert_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
return_if_no_image (image, data);
gimp_channel_invert (gimp_image_get_mask (image), TRUE);
gimp_image_flush (image);
}
void void
select_float_cmd_callback (GtkAction *action, select_float_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
@@ -146,26 +137,38 @@ select_feather_cmd_callback (GtkAction *action,
GimpDisplay *display; GimpDisplay *display;
GimpImage *image; GimpImage *image;
GtkWidget *dialog; GtkWidget *dialog;
gdouble xres;
gdouble yres;
return_if_no_display (display, data); return_if_no_display (display, data);
image = gimp_display_get_image (display); image = gimp_display_get_image (display);
gimp_image_get_resolution (image, &xres, &yres); #define FEATHER_DIALOG_KEY "gimp-selection-feather-dialog"
dialog = gimp_query_size_box (_("Feather Selection"), dialog = dialogs_get_dialog (G_OBJECT (image), FEATHER_DIALOG_KEY);
GTK_WIDGET (gimp_display_get_shell (display)),
gimp_standard_help_func, if (! dialog)
GIMP_HELP_SELECTION_FEATHER, {
_("Feather selection by"), GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
select_feather_radius, 0, 32767, 3, gdouble xres;
gimp_display_get_shell (display)->unit, gdouble yres;
MIN (xres, yres),
FALSE, gimp_image_get_resolution (image, &xres, &yres);
G_OBJECT (image), "disconnect",
select_feather_callback, image); dialog = gimp_query_size_box (_("Feather Selection"),
gtk_widget_show (dialog); GTK_WIDGET (gimp_display_get_shell (display)),
gimp_standard_help_func,
GIMP_HELP_SELECTION_FEATHER,
_("Feather selection by"),
config->selection_feather_radius, 0, 32767, 3,
gimp_display_get_shell (display)->unit,
MIN (xres, yres),
FALSE,
G_OBJECT (image), "disconnect",
select_feather_callback, image);
dialogs_attach_dialog (G_OBJECT (image), FEATHER_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
@@ -186,41 +189,52 @@ select_shrink_cmd_callback (GtkAction *action,
GimpDisplay *display; GimpDisplay *display;
GimpImage *image; GimpImage *image;
GtkWidget *dialog; GtkWidget *dialog;
GtkWidget *button;
gdouble xres;
gdouble yres;
return_if_no_display (display, data); return_if_no_display (display, data);
image = gimp_display_get_image (display); image = gimp_display_get_image (display);
gimp_image_get_resolution (image, &xres, &yres); #define SHRINK_DIALOG_KEY "gimp-selection-shrink-dialog"
dialog = gimp_query_size_box (_("Shrink Selection"), dialog = dialogs_get_dialog (G_OBJECT (image), SHRINK_DIALOG_KEY);
GTK_WIDGET (gimp_display_get_shell (display)),
gimp_standard_help_func,
GIMP_HELP_SELECTION_SHRINK,
_("Shrink selection by"),
select_shrink_pixels, 1, 32767, 0,
gimp_display_get_shell (display)->unit,
MIN (xres, yres),
FALSE,
G_OBJECT (image), "disconnect",
select_shrink_callback, image);
/* Edge lock button */ if (! dialog)
button = gtk_check_button_new_with_mnemonic (_("_Selected areas continue outside the image")); {
g_object_set_data (G_OBJECT (dialog), "edge-lock-toggle", button); GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
gimp_help_set_help_data (button, GtkWidget *button;
_("When shrinking, act as if selected areas " gdouble xres;
"continued outside the image."), gdouble yres;
NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
select_shrink_edge_lock);
gtk_box_pack_start (GTK_BOX (GIMP_QUERY_BOX_VBOX (dialog)), button,
FALSE, FALSE, 0);
gtk_widget_show (button);
gtk_widget_show (dialog); gimp_image_get_resolution (image, &xres, &yres);
dialog = gimp_query_size_box (_("Shrink Selection"),
GTK_WIDGET (gimp_display_get_shell (display)),
gimp_standard_help_func,
GIMP_HELP_SELECTION_SHRINK,
_("Shrink selection by"),
config->selection_shrink_radius, 1, 32767, 0,
gimp_display_get_shell (display)->unit,
MIN (xres, yres),
FALSE,
G_OBJECT (image), "disconnect",
select_shrink_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 shrinking, act as if selected areas "
"continued outside the image."),
NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
config->selection_shrink_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), SHRINK_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
@@ -230,26 +244,38 @@ select_grow_cmd_callback (GtkAction *action,
GimpDisplay *display; GimpDisplay *display;
GimpImage *image; GimpImage *image;
GtkWidget *dialog; GtkWidget *dialog;
gdouble xres;
gdouble yres;
return_if_no_display (display, data); return_if_no_display (display, data);
image = gimp_display_get_image (display); image = gimp_display_get_image (display);
gimp_image_get_resolution (image, &xres, &yres); #define GROW_DIALOG_KEY "gimp-selection-grow-dialog"
dialog = gimp_query_size_box (_("Grow Selection"), dialog = dialogs_get_dialog (G_OBJECT (image), GROW_DIALOG_KEY);
GTK_WIDGET (gimp_display_get_shell (display)),
gimp_standard_help_func, if (! dialog)
GIMP_HELP_SELECTION_GROW, {
_("Grow selection by"), GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
select_grow_pixels, 1, 32767, 0, gdouble xres;
gimp_display_get_shell (display)->unit, gdouble yres;
MIN (xres, yres),
FALSE, gimp_image_get_resolution (image, &xres, &yres);
G_OBJECT (image), "disconnect",
select_grow_callback, image); dialog = gimp_query_size_box (_("Grow Selection"),
gtk_widget_show (dialog); GTK_WIDGET (gimp_display_get_shell (display)),
gimp_standard_help_func,
GIMP_HELP_SELECTION_GROW,
_("Grow selection by"),
config->selection_grow_radius, 1, 32767, 0,
gimp_display_get_shell (display)->unit,
MIN (xres, yres),
FALSE,
G_OBJECT (image), "disconnect",
select_grow_callback, image);
dialogs_attach_dialog (G_OBJECT (image), GROW_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
@@ -259,52 +285,77 @@ select_border_cmd_callback (GtkAction *action,
GimpDisplay *display; GimpDisplay *display;
GimpImage *image; GimpImage *image;
GtkWidget *dialog; GtkWidget *dialog;
GtkWidget *button;
gdouble xres;
gdouble yres;
return_if_no_display (display, data); return_if_no_display (display, data);
image = gimp_display_get_image (display); image = gimp_display_get_image (display);
gimp_image_get_resolution (image, &xres, &yres); #define BORDER_DIALOG_KEY "gimp-selection-border-dialog"
dialog = gimp_query_size_box (_("Border Selection"), dialog = dialogs_get_dialog (G_OBJECT (image), BORDER_DIALOG_KEY);
GTK_WIDGET (gimp_display_get_shell (display)),
gimp_standard_help_func,
GIMP_HELP_SELECTION_BORDER,
_("Border selection by"),
select_border_radius, 1, 32767, 0,
gimp_display_get_shell (display)->unit,
MIN (xres, yres),
FALSE,
G_OBJECT (image), "disconnect",
select_border_callback, image);
/* Feather button */ if (! dialog)
button = gtk_check_button_new_with_mnemonic (_("_Feather border")); {
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
GtkWidget *combo;
GtkWidget *button;
gdouble xres;
gdouble yres;
gtk_box_pack_start (GTK_BOX (GIMP_QUERY_BOX_VBOX (dialog)), button, gimp_image_get_resolution (image, &xres, &yres);
FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (dialog), "border-feather-toggle", button); dialog = gimp_query_size_box (_("Border Selection"),
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), GTK_WIDGET (gimp_display_get_shell (display)),
select_border_feather); gimp_standard_help_func,
gtk_widget_show (button); GIMP_HELP_SELECTION_BORDER,
_("Border selection by"),
config->selection_border_radius, 1, 32767, 0,
gimp_display_get_shell (display)->unit,
MIN (xres, yres),
FALSE,
G_OBJECT (image), "disconnect",
select_border_callback, image);
/* Edge lock button */ /* Border style combo */
button = gtk_check_button_new_with_mnemonic (_("_Selected areas continue outside the image")); combo = gimp_enum_combo_box_new (GIMP_TYPE_CHANNEL_BORDER_STYLE);
g_object_set_data (G_OBJECT (dialog), "edge-lock-toggle", button); gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo),
gimp_help_set_help_data (button, _("Border style"));
_("When bordering, act as if selected areas "
"continued outside the image."),
NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
select_border_edge_lock);
gtk_box_pack_start (GTK_BOX (GIMP_QUERY_BOX_VBOX (dialog)), button,
FALSE, FALSE, 0);
gtk_widget_show (button);
gtk_widget_show (dialog); gtk_box_pack_start (GTK_BOX (GIMP_QUERY_BOX_VBOX (dialog)), combo,
FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (dialog), "border-style-combo", combo);
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo),
config->selection_border_style);
gtk_widget_show (combo);
/* 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 bordering, act as if selected areas "
"continued outside the image."),
NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
config->selection_border_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), BORDER_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
select_flood_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
return_if_no_image (image, data);
gimp_channel_flood (gimp_image_get_mask (image), TRUE);
gimp_image_flush (image);
} }
void void
@@ -327,82 +378,62 @@ select_save_cmd_callback (GtkAction *action,
"gimp-channel-list"); "gimp-channel-list");
} }
void
select_fill_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
return_if_no_image (image, data);
items_fill_cmd_callback (action,
image, GIMP_ITEM (gimp_image_get_mask (image)),
"gimp-selection-fill-dialog",
_("Fill Selection Outline"),
GIMP_STOCK_TOOL_BUCKET_FILL,
GIMP_HELP_SELECTION_FILL,
data);
}
void
select_fill_last_vals_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
return_if_no_image (image, data);
items_fill_last_vals_cmd_callback (action,
image,
GIMP_ITEM (gimp_image_get_mask (image)),
data);
}
void void
select_stroke_cmd_callback (GtkAction *action, select_stroke_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpImage *image;
GimpDrawable *drawable;
GtkWidget *widget;
GtkWidget *dialog;
return_if_no_image (image, data); return_if_no_image (image, data);
return_if_no_widget (widget, data);
drawable = gimp_image_get_active_drawable (image); items_stroke_cmd_callback (action,
image, GIMP_ITEM (gimp_image_get_mask (image)),
if (! drawable) "gimp-selection-stroke-dialog",
{ _("Stroke Selection"),
gimp_message_literal (image->gimp, GIMP_STOCK_SELECTION_STROKE,
G_OBJECT (widget), GIMP_MESSAGE_WARNING, GIMP_HELP_SELECTION_STROKE,
_("There is no active layer or channel to stroke to.")); data);
return;
}
dialog = stroke_dialog_new (GIMP_ITEM (gimp_image_get_mask (image)),
action_data_get_context (data),
_("Stroke Selection"),
GIMP_STOCK_SELECTION_STROKE,
GIMP_HELP_SELECTION_STROKE,
widget);
gtk_widget_show (dialog);
} }
void void
select_stroke_last_vals_cmd_callback (GtkAction *action, select_stroke_last_vals_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpImage *image;
GimpDrawable *drawable;
GimpContext *context;
GtkWidget *widget;
GimpStrokeOptions *options;
GError *error = NULL;
return_if_no_image (image, data); return_if_no_image (image, data);
return_if_no_context (context, data);
return_if_no_widget (widget, data);
drawable = gimp_image_get_active_drawable (image); items_stroke_last_vals_cmd_callback (action,
image,
if (! drawable) GIMP_ITEM (gimp_image_get_mask (image)),
{ data);
gimp_message_literal (image->gimp,
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to stroke to."));
return;
}
options = g_object_get_data (G_OBJECT (image->gimp), "saved-stroke-options");
if (options)
g_object_ref (options);
else
options = gimp_stroke_options_new (image->gimp, context, TRUE);
if (! gimp_item_stroke (GIMP_ITEM (gimp_image_get_mask (image)),
drawable, context, options, NULL,
TRUE, NULL, &error))
{
gimp_message_literal (image->gimp,
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
error->message);
g_clear_error (&error);
}
else
{
gimp_image_flush (image);
}
g_object_unref (options);
} }
@@ -414,11 +445,17 @@ select_feather_callback (GtkWidget *widget,
GimpUnit unit, GimpUnit unit,
gpointer data) gpointer data)
{ {
GimpImage *image = GIMP_IMAGE (data); GimpImage *image = GIMP_IMAGE (data);
gdouble radius_x; GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
gdouble radius_y; gdouble radius_x;
gdouble radius_y;
radius_x = radius_y = select_feather_radius = size; g_object_set (config,
"selection-feather-radius", size,
NULL);
radius_x = config->selection_feather_radius;
radius_y = config->selection_feather_radius;
if (unit != GIMP_UNIT_PIXEL) if (unit != GIMP_UNIT_PIXEL)
{ {
@@ -447,21 +484,28 @@ select_border_callback (GtkWidget *widget,
GimpUnit unit, GimpUnit unit,
gpointer data) gpointer data)
{ {
GimpImage *image = GIMP_IMAGE (data); GimpImage *image = GIMP_IMAGE (data);
GtkWidget *feather_button = g_object_get_data (G_OBJECT (widget), GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
"border-feather-toggle"); GtkWidget *combo;
GtkWidget *edge_lock_button = g_object_get_data (G_OBJECT (widget), GtkWidget *button;
"edge-lock-toggle"); gdouble radius_x;
gdouble radius_x; gdouble radius_y;
gdouble radius_y; gint border_style;
radius_x = radius_y = select_border_radius = ROUND (size); combo = g_object_get_data (G_OBJECT (widget), "border-style-combo");
button = g_object_get_data (G_OBJECT (widget), "edge-lock-toggle");
select_border_feather = gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (combo), &border_style);
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (feather_button));
select_border_edge_lock = g_object_set (config,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (edge_lock_button)); "selection-border-radius", size,
"selection-border-style", border_style,
"selection-border-edge-lock",
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)),
NULL);
radius_x = ROUND (config->selection_border_radius);
radius_y = ROUND (config->selection_border_radius);
if (unit != GIMP_UNIT_PIXEL) if (unit != GIMP_UNIT_PIXEL)
{ {
@@ -481,7 +525,9 @@ select_border_callback (GtkWidget *widget,
} }
gimp_channel_border (gimp_image_get_mask (image), radius_x, radius_y, gimp_channel_border (gimp_image_get_mask (image), radius_x, radius_y,
select_border_feather, select_border_edge_lock, TRUE); config->selection_border_style,
config->selection_border_edge_lock,
TRUE);
gimp_image_flush (image); gimp_image_flush (image);
} }
@@ -491,11 +537,17 @@ select_grow_callback (GtkWidget *widget,
GimpUnit unit, GimpUnit unit,
gpointer data) gpointer data)
{ {
GimpImage *image = GIMP_IMAGE (data); GimpImage *image = GIMP_IMAGE (data);
gdouble radius_x; GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
gdouble radius_y; gdouble radius_x;
gdouble radius_y;
radius_x = radius_y = select_grow_pixels = ROUND (size); g_object_set (config,
"selection-grow-radius", size,
NULL);
radius_x = ROUND (config->selection_grow_radius);
radius_y = ROUND (config->selection_grow_radius);
if (unit != GIMP_UNIT_PIXEL) if (unit != GIMP_UNIT_PIXEL)
{ {
@@ -524,15 +576,22 @@ select_shrink_callback (GtkWidget *widget,
GimpUnit unit, GimpUnit unit,
gpointer data) gpointer data)
{ {
GimpImage *image = GIMP_IMAGE (data); GimpImage *image = GIMP_IMAGE (data);
GtkWidget *button = g_object_get_data (G_OBJECT (widget), "edge-lock-toggle"); GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
gint radius_x; GtkWidget *button;
gint radius_y; gint radius_x;
gint radius_y;
radius_x = radius_y = select_shrink_pixels = ROUND (size); button = g_object_get_data (G_OBJECT (widget), "edge-lock-toggle");
select_shrink_edge_lock = g_object_set (config,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); "selection-shrink-radius", size,
"selection-shrink-edge-lock",
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)),
NULL);
radius_x = ROUND (config->selection_shrink_radius);
radius_y = ROUND (config->selection_shrink_radius);
if (unit != GIMP_UNIT_PIXEL) if (unit != GIMP_UNIT_PIXEL)
{ {
@@ -552,6 +611,7 @@ select_shrink_callback (GtkWidget *widget,
} }
gimp_channel_shrink (gimp_image_get_mask (image), radius_x, radius_y, gimp_channel_shrink (gimp_image_get_mask (image), radius_x, radius_y,
select_shrink_edge_lock, TRUE); config->selection_shrink_edge_lock,
TRUE);
gimp_image_flush (image); gimp_image_flush (image);
} }

View File

@@ -19,12 +19,12 @@
#define __SELECT_COMMANDS_H__ #define __SELECT_COMMANDS_H__
void select_invert_cmd_callback (GtkAction *action,
gpointer data);
void select_all_cmd_callback (GtkAction *action, void select_all_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void select_none_cmd_callback (GtkAction *action, void select_none_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void select_invert_cmd_callback (GtkAction *action,
gpointer data);
void select_float_cmd_callback (GtkAction *action, void select_float_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void select_feather_cmd_callback (GtkAction *action, void select_feather_cmd_callback (GtkAction *action,
@@ -33,12 +33,19 @@ void select_sharpen_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void select_shrink_cmd_callback (GtkAction *action, void select_shrink_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void select_border_cmd_callback (GtkAction *action,
gpointer data);
void select_grow_cmd_callback (GtkAction *action, void select_grow_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void select_border_cmd_callback (GtkAction *action,
gpointer data);
void select_flood_cmd_callback (GtkAction *action,
gpointer data);
void select_save_cmd_callback (GtkAction *action, void select_save_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void select_fill_cmd_callback (GtkAction *action,
gpointer data);
void select_fill_last_vals_cmd_callback (GtkAction *action,
gpointer data);
void select_stroke_cmd_callback (GtkAction *action, void select_stroke_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void select_stroke_last_vals_cmd_callback (GtkAction *action, void select_stroke_last_vals_cmd_callback (GtkAction *action,

View File

@@ -42,6 +42,7 @@
#include "widgets/gimptemplateview.h" #include "widgets/gimptemplateview.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
#include "dialogs/dialogs.h"
#include "dialogs/template-options-dialog.h" #include "dialogs/template-options-dialog.h"
#include "actions.h" #include "actions.h"
@@ -60,16 +61,20 @@ typedef struct
/* local function prototypes */ /* local function prototypes */
static void templates_new_response (GtkWidget *dialog, static void templates_new_callback (GtkWidget *dialog,
gint response_id, GimpTemplate *template,
TemplateOptionsDialog *options); GimpTemplate *edit_template,
static void templates_edit_response (GtkWidget *widget, GimpContext *context,
gint response_id, gpointer user_data);
TemplateOptionsDialog *options); static void templates_edit_callback (GtkWidget *dialog,
static void templates_delete_response (GtkWidget *dialog, GimpTemplate *template,
gint response_id, GimpTemplate *edit_template,
TemplateDeleteData *delete_data); GimpContext *context,
static void templates_delete_data_free (TemplateDeleteData *delete_data); gpointer user_data);
static void templates_delete_response (GtkWidget *dialog,
gint response_id,
TemplateDeleteData *delete_data);
static void templates_delete_data_free (TemplateDeleteData *delete_data);
/* public functions */ /* public functions */
@@ -109,25 +114,32 @@ void
templates_new_cmd_callback (GtkAction *action, templates_new_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data); GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context; GimpContext *context;
TemplateOptionsDialog *options; GtkWidget *dialog;
context = gimp_container_view_get_context (editor->view); context = gimp_container_view_get_context (editor->view);
options = template_options_dialog_new (NULL, context, #define NEW_DIALOG_KEY "gimp-template-new-dialog"
GTK_WIDGET (editor),
_("New Template"),
"gimp-template-new",
GIMP_STOCK_TEMPLATE,
_("Create a New Template"),
GIMP_HELP_TEMPLATE_NEW);
g_signal_connect (options->dialog, "response", dialog = dialogs_get_dialog (G_OBJECT (context->gimp), NEW_DIALOG_KEY);
G_CALLBACK (templates_new_response),
options);
gtk_widget_show (options->dialog); if (! dialog)
{
dialog = template_options_dialog_new (NULL, context,
GTK_WIDGET (editor),
_("New Template"),
"gimp-template-new",
GIMP_STOCK_TEMPLATE,
_("Create a New Template"),
GIMP_HELP_TEMPLATE_NEW,
templates_new_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (context->gimp), NEW_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
@@ -176,21 +188,28 @@ templates_edit_cmd_callback (GtkAction *action,
if (template && gimp_container_have (container, GIMP_OBJECT (template))) if (template && gimp_container_have (container, GIMP_OBJECT (template)))
{ {
TemplateOptionsDialog *options; GtkWidget *dialog;
options = template_options_dialog_new (template, context, #define EDIT_DIALOG_KEY "gimp-template-edit-dialog"
GTK_WIDGET (editor),
_("Edit Template"),
"gimp-template-edit",
"gtk-edit",
_("Edit Template"),
GIMP_HELP_TEMPLATE_EDIT);
g_signal_connect (options->dialog, "response", dialog = dialogs_get_dialog (G_OBJECT (template), EDIT_DIALOG_KEY);
G_CALLBACK (templates_edit_response),
options);
gtk_widget_show (options->dialog); if (! dialog)
{
dialog = template_options_dialog_new (template, context,
GTK_WIDGET (editor),
_("Edit Template"),
"gimp-template-edit",
"gtk-edit",
_("Edit Template"),
GIMP_HELP_TEMPLATE_EDIT,
templates_edit_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (template), EDIT_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
} }
@@ -256,40 +275,28 @@ templates_delete_cmd_callback (GtkAction *action,
/* private functions */ /* private functions */
static void static void
templates_new_response (GtkWidget *dialog, templates_new_callback (GtkWidget *dialog,
gint response_id, GimpTemplate *template,
TemplateOptionsDialog *options) GimpTemplate *edit_template,
GimpContext *context,
gpointer user_data)
{ {
if (response_id == GTK_RESPONSE_OK) gimp_container_add (context->gimp->templates, GIMP_OBJECT (edit_template));
{ gimp_context_set_template (gimp_get_user_context (context->gimp),
GimpTemplateEditor *editor = GIMP_TEMPLATE_EDITOR (options->editor); edit_template);
GimpTemplate *template;
template = gimp_template_editor_get_template (editor);
gimp_container_add (options->gimp->templates, GIMP_OBJECT (template));
gimp_context_set_template (gimp_get_user_context (options->gimp),
template);
}
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
} }
static void static void
templates_edit_response (GtkWidget *dialog, templates_edit_callback (GtkWidget *dialog,
gint response_id, GimpTemplate *template,
TemplateOptionsDialog *options) GimpTemplate *edit_template,
GimpContext *context,
gpointer user_data)
{ {
if (response_id == GTK_RESPONSE_OK) gimp_config_sync (G_OBJECT (edit_template),
{ G_OBJECT (template), 0);
GimpTemplateEditor *editor = GIMP_TEMPLATE_EDITOR (options->editor);
GimpTemplate *template;
template = gimp_template_editor_get_template (editor);
gimp_config_sync (G_OBJECT (template),
G_OBJECT (options->template), 0);
}
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
} }

View File

@@ -51,48 +51,43 @@ text_editor_load_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpTextEditor *editor = GIMP_TEXT_EDITOR (data); GimpTextEditor *editor = GIMP_TEXT_EDITOR (data);
GtkFileChooser *chooser;
if (editor->file_dialog) if (! editor->file_dialog)
{ {
gtk_window_present (GTK_WINDOW (editor->file_dialog)); GtkWidget *dialog;
return;
dialog = editor->file_dialog =
gtk_file_chooser_dialog_new (_("Open Text File (UTF-8)"),
GTK_WINDOW (editor),
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-text-load-file");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
g_object_add_weak_pointer (G_OBJECT (dialog),
(gpointer) &editor->file_dialog);
g_signal_connect (dialog, "response",
G_CALLBACK (text_editor_load_response),
editor);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_true),
NULL);
} }
editor->file_dialog = gtk_window_present (GTK_WINDOW (editor->file_dialog));
gtk_file_chooser_dialog_new (_("Open Text File (UTF-8)"),
GTK_WINDOW (editor),
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
NULL);
chooser = GTK_FILE_CHOOSER (editor->file_dialog);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (editor->file_dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_object_add_weak_pointer (G_OBJECT (chooser),
(gpointer) &editor->file_dialog);
gtk_window_set_role (GTK_WINDOW (chooser), "gimp-text-load-file");
gtk_window_set_position (GTK_WINDOW (chooser), GTK_WIN_POS_MOUSE);
gtk_window_set_destroy_with_parent (GTK_WINDOW (chooser), TRUE);
gtk_dialog_set_default_response (GTK_DIALOG (chooser), GTK_RESPONSE_OK);
g_signal_connect (chooser, "response",
G_CALLBACK (text_editor_load_response),
editor);
g_signal_connect (chooser, "delete-event",
G_CALLBACK (gtk_true),
NULL);
gtk_widget_show (GTK_WIDGET (chooser));
} }
void void

View File

@@ -37,6 +37,8 @@
#include "tools/gimptexttool.h" #include "tools/gimptexttool.h"
#include "dialogs/dialogs.h"
#include "text-tool-commands.h" #include "text-tool-commands.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@@ -44,11 +46,9 @@
/* local function prototypes */ /* local function prototypes */
static void text_tool_load_dialog_destroyed (GtkWidget *dialog, static void text_tool_load_dialog_response (GtkWidget *dialog,
GObject *tool); gint response_id,
static void text_tool_load_dialog_response (GtkWidget *dialog, GimpTextTool *tool);
gint response_id,
GimpTextTool *tool);
/* public functions */ /* public functions */
@@ -93,63 +93,54 @@ void
text_tool_load_cmd_callback (GtkAction *action, text_tool_load_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpTextTool *text_tool = GIMP_TEXT_TOOL (data); GimpTextTool *text_tool = GIMP_TEXT_TOOL (data);
GtkWidget *dialog; GtkWidget *dialog;
GtkWidget *parent = NULL;
GtkFileChooser *chooser;
dialog = g_object_get_data (G_OBJECT (text_tool), "gimp-text-file-dialog"); dialog = dialogs_get_dialog (G_OBJECT (text_tool), "gimp-text-file-dialog");
if (dialog) if (! dialog)
{ {
gtk_window_present (GTK_WINDOW (dialog)); GtkWidget *parent = NULL;
return;
if (GIMP_TOOL (text_tool)->display)
{
GimpDisplayShell *shell;
shell = gimp_display_get_shell (GIMP_TOOL (text_tool)->display);
parent = gtk_widget_get_toplevel (GTK_WIDGET (shell));
}
dialog = gtk_file_chooser_dialog_new (_("Open Text File (UTF-8)"),
parent ? GTK_WINDOW (parent) : NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-text-load-file");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
g_signal_connect (dialog, "response",
G_CALLBACK (text_tool_load_dialog_response),
text_tool);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_true),
NULL);
dialogs_attach_dialog (G_OBJECT (text_tool),
"gimp-text-file-dialog", dialog);
} }
if (GIMP_TOOL (text_tool)->display) gtk_window_present (GTK_WINDOW (dialog));
{
GimpDisplayShell *shell;
shell = gimp_display_get_shell (GIMP_TOOL (text_tool)->display);
parent = gtk_widget_get_toplevel (GTK_WIDGET (shell));
}
dialog = gtk_file_chooser_dialog_new (_("Open Text File (UTF-8)"),
parent ? GTK_WINDOW (parent) : NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
NULL);
chooser = GTK_FILE_CHOOSER (dialog);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_object_set_data (G_OBJECT (text_tool), "gimp-text-file-dialog", dialog);
g_signal_connect (dialog, "destroy",
G_CALLBACK (text_tool_load_dialog_destroyed),
text_tool);
gtk_window_set_role (GTK_WINDOW (chooser), "gimp-text-load-file");
gtk_window_set_position (GTK_WINDOW (chooser), GTK_WIN_POS_MOUSE);
gtk_dialog_set_default_response (GTK_DIALOG (chooser), GTK_RESPONSE_OK);
g_signal_connect (chooser, "response",
G_CALLBACK (text_tool_load_dialog_response),
text_tool);
g_signal_connect (chooser, "delete-event",
G_CALLBACK (gtk_true),
NULL);
gtk_widget_show (GTK_WIDGET (chooser));
} }
void void
@@ -201,13 +192,6 @@ text_tool_direction_cmd_callback (GtkAction *action,
/* private functions */ /* private functions */
static void
text_tool_load_dialog_destroyed (GtkWidget *dialog,
GObject *tool)
{
g_object_set_data (tool, "gimp-text-file-dialog", NULL);
}
static void static void
text_tool_load_dialog_response (GtkWidget *dialog, text_tool_load_dialog_response (GtkWidget *dialog,
gint response_id, gint response_id,
@@ -215,11 +199,9 @@ text_tool_load_dialog_response (GtkWidget *dialog,
{ {
if (response_id == GTK_RESPONSE_OK) if (response_id == GTK_RESPONSE_OK)
{ {
GFile *file; GFile *file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
GError *error = NULL; GError *error = NULL;
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
if (! gimp_text_buffer_load (tool->buffer, file, &error)) if (! gimp_text_buffer_load (tool->buffer, file, &error))
{ {
gimp_message (GIMP_TOOL (tool)->tool_info->gimp, G_OBJECT (dialog), gimp_message (GIMP_TOOL (tool)->tool_info->gimp, G_OBJECT (dialog),

View File

@@ -201,17 +201,20 @@ tool_options_actions_update_presets (GimpActionGroup *group,
entry.value_variable = FALSE; entry.value_variable = FALSE;
entry.help_id = help_id; entry.help_id = help_id;
for (list = GIMP_LIST (presets)->list, i = 0; for (list = GIMP_LIST (presets)->queue->head, i = 0;
list; list;
list = g_list_next (list), i++) list = g_list_next (list), i++)
{ {
GimpObject *preset = list->data; GimpObject *preset = list->data;
GdkPixbuf *pixbuf = NULL;
entry.name = g_strdup_printf ("%s-%03d", action_prefix, i); entry.name = g_strdup_printf ("%s-%03d", action_prefix, i);
entry.label = gimp_object_get_name (preset); entry.label = gimp_object_get_name (preset);
entry.icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (preset)); entry.icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (preset));
entry.value = i; entry.value = i;
g_object_get (preset, "icon-pixbuf", &pixbuf, NULL);
gimp_action_group_add_enum_actions (group, NULL, &entry, 1, callback); gimp_action_group_add_enum_actions (group, NULL, &entry, 1, callback);
if (need_writable) if (need_writable)
@@ -222,6 +225,9 @@ tool_options_actions_update_presets (GimpActionGroup *group,
SET_SENSITIVE (entry.name, SET_SENSITIVE (entry.name,
gimp_data_is_deletable (GIMP_DATA (preset))); gimp_data_is_deletable (GIMP_DATA (preset)));
if (pixbuf)
gimp_action_group_set_action_pixbuf (group, entry.name, pixbuf);
g_free ((gchar *) entry.name); g_free ((gchar *) entry.name);
} }
} }

View File

@@ -175,7 +175,7 @@ tool_options_reset_cmd_callback (GtkAction *action,
GimpContext *context = gimp_get_user_context (gimp_editor_get_ui_manager (editor)->gimp); GimpContext *context = gimp_get_user_context (gimp_editor_get_ui_manager (editor)->gimp);
GimpToolInfo *tool_info = gimp_context_get_tool (context); GimpToolInfo *tool_info = gimp_context_get_tool (context);
gimp_tool_options_reset (tool_info->tool_options); gimp_config_reset (GIMP_CONFIG (tool_info->tool_options));
} }
void void
@@ -222,7 +222,7 @@ tool_options_reset_all_cmd_callback (GtkAction *action,
{ {
GimpToolInfo *tool_info = list->data; GimpToolInfo *tool_info = list->data;
gimp_tool_options_reset (tool_info->tool_options); gimp_config_reset (GIMP_CONFIG (tool_info->tool_options));
} }
} }

View File

@@ -33,6 +33,7 @@
#include "data-editor-commands.h" #include "data-editor-commands.h"
#include "tool-preset-editor-actions.h" #include "tool-preset-editor-actions.h"
#include "tool-preset-editor-commands.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@@ -41,7 +42,20 @@ static const GimpActionEntry tool_preset_editor_actions[] =
{ {
{ "tool-preset-editor-popup", GIMP_STOCK_TOOL_PRESET, { "tool-preset-editor-popup", GIMP_STOCK_TOOL_PRESET,
NC_("tool-preset-editor-action", "Tool Preset Editor Menu"), NULL, NULL, NULL, NC_("tool-preset-editor-action", "Tool Preset Editor Menu"), NULL, NULL, NULL,
GIMP_HELP_BRUSH_EDITOR_DIALOG } GIMP_HELP_TOOL_PRESET_EDITOR_DIALOG },
{ "tool-preset-editor-save", "document-save",
NC_("tool-preset-editor-action", "_Save Tool Options to Preset"), NULL,
NC_("tool-preset-editor-action", "Save the active tool options to this "
"tool preset"),
G_CALLBACK (tool_preset_editor_save_cmd_callback),
GIMP_HELP_TOOL_PRESET_SAVE },
{ "tool-preset-editor-restore", "document-revert",
NC_("tool-preset-editor-action", "_Restore Tool Preset"), NULL,
NC_("tool-preset-editor-action", "Restore this tool preset"),
G_CALLBACK (tool_preset_editor_restore_cmd_callback),
GIMP_HELP_TOOL_PRESET_RESTORE }
}; };
@@ -51,7 +65,7 @@ static const GimpToggleActionEntry tool_preset_editor_toggle_actions[] =
NC_("tool-preset-editor-action", "Edit Active Tool Preset"), NULL, NULL, NC_("tool-preset-editor-action", "Edit Active Tool Preset"), NULL, NULL,
G_CALLBACK (data_editor_edit_active_cmd_callback), G_CALLBACK (data_editor_edit_active_cmd_callback),
FALSE, FALSE,
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE } GIMP_HELP_TOOL_PRESET_EDITOR_EDIT_ACTIVE }
}; };
@@ -82,7 +96,9 @@ tool_preset_editor_actions_update (GimpActionGroup *group,
#define SET_ACTIVE(action,condition) \ #define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0) gimp_action_group_set_action_active (group, action, (condition) != 0)
SET_ACTIVE ("tool-preset-editor-edit-active", edit_active); SET_SENSITIVE ("tool-preset-editor-save", data_editor->data);
SET_SENSITIVE ("tool-preset-editor-restore", data_editor->data);
SET_ACTIVE ("tool-preset-editor-edit-active", edit_active);
#undef SET_SENSITIVE #undef SET_SENSITIVE
#undef SET_ACTIVE #undef SET_ACTIVE

View File

@@ -0,0 +1,88 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimptoolinfo.h"
#include "core/gimptoolpreset.h"
#include "widgets/gimpdataeditor.h"
#include "tool-preset-editor-commands.h"
#include "gimp-intl.h"
/* public functions */
void
tool_preset_editor_save_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDataEditor *editor = GIMP_DATA_EDITOR (data);
GimpContext *context = editor->context;
GimpToolPreset *preset;
GimpToolInfo *tool_info;
preset = GIMP_TOOL_PRESET (gimp_data_editor_get_data (editor));
tool_info = gimp_context_get_tool (gimp_get_user_context (context->gimp));
if (tool_info && preset)
{
GimpToolInfo *preset_tool;
preset_tool = gimp_context_get_tool (GIMP_CONTEXT (preset->tool_options));
if (tool_info != preset_tool)
{
gimp_message (context->gimp,
G_OBJECT (editor), GIMP_MESSAGE_WARNING,
_("Can't save '%s' tool options to an "
"existing '%s' tool preset."),
tool_info->blurb,
preset_tool->blurb);
return;
}
gimp_config_sync (G_OBJECT (tool_info->tool_options),
G_OBJECT (preset->tool_options), 0);
}
}
void
tool_preset_editor_restore_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDataEditor *editor = GIMP_DATA_EDITOR (data);
GimpContext *context = editor->context;
GimpToolPreset *preset;
preset = GIMP_TOOL_PRESET (gimp_data_editor_get_data (editor));
if (preset)
gimp_context_tool_preset_changed (gimp_get_user_context (context->gimp));
}

View File

@@ -0,0 +1,28 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __TOOL_PRESET_EDITOR_COMMANDS_H__
#define __TOOL_PRESET_EDITOR_COMMANDS_H__
void tool_preset_editor_save_cmd_callback (GtkAction *action,
gpointer data);
void tool_preset_editor_restore_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __TOOL_PRESET_EDITOR_COMMANDS_H__ */

View File

@@ -35,6 +35,7 @@
#include "actions.h" #include "actions.h"
#include "data-commands.h" #include "data-commands.h"
#include "tool-presets-actions.h" #include "tool-presets-actions.h"
#include "tool-presets-commands.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@@ -63,12 +64,25 @@ static const GimpActionEntry tool_presets_actions[] =
G_CALLBACK (data_copy_location_cmd_callback), G_CALLBACK (data_copy_location_cmd_callback),
GIMP_HELP_TOOL_PRESET_COPY_LOCATION }, GIMP_HELP_TOOL_PRESET_COPY_LOCATION },
{ "tool-presets-show-in-file-manager", "gtk-directory", { "tool-presets-show-in-file-manager", GIMP_STOCK_FILE_MANAGER,
NC_("tool-presets-action", "Show in _File Manager"), NULL, NC_("tool-presets-action", "Show in _File Manager"), NULL,
NC_("tool-presets-action", "Show tool preset file location in the file manager"), NC_("tool-presets-action", "Show tool preset file location in the file manager"),
G_CALLBACK (data_show_in_file_manager_cmd_callback), G_CALLBACK (data_show_in_file_manager_cmd_callback),
GIMP_HELP_TOOL_PRESET_SHOW_IN_FILE_MANAGER }, GIMP_HELP_TOOL_PRESET_SHOW_IN_FILE_MANAGER },
{ "tool-presets-save", "document-save",
NC_("tool-presets-action", "_Save Tool Options to Preset"), NULL,
NC_("tool-presets-action", "Save the active tool options to this "
"tool preset"),
G_CALLBACK (tool_presets_save_cmd_callback),
GIMP_HELP_TOOL_PRESET_SAVE },
{ "tool-presets-restore", "document-revert",
NC_("tool-presets-action", "_Restore Tool Preset"), NULL,
NC_("tool-presets-action", "Restore this tool preset"),
G_CALLBACK (tool_presets_restore_cmd_callback),
GIMP_HELP_TOOL_PRESET_RESTORE },
{ "tool-presets-delete", "edit-delete", { "tool-presets-delete", "edit-delete",
NC_("tool-presets-action", "_Delete Tool Preset"), NULL, NC_("tool-presets-action", "_Delete Tool Preset"), NULL,
NC_("tool-presets-action", "Delete this tool preset"), NC_("tool-presets-action", "Delete this tool preset"),
@@ -133,6 +147,8 @@ tool_presets_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("tool-presets-duplicate", tool_preset && GIMP_DATA_GET_CLASS (data)->duplicate); SET_SENSITIVE ("tool-presets-duplicate", tool_preset && GIMP_DATA_GET_CLASS (data)->duplicate);
SET_SENSITIVE ("tool-presets-copy-location", file); SET_SENSITIVE ("tool-presets-copy-location", file);
SET_SENSITIVE ("tool-presets-show-in-file-manager", file); SET_SENSITIVE ("tool-presets-show-in-file-manager", file);
SET_SENSITIVE ("tool-presets-save", tool_preset);
SET_SENSITIVE ("tool-presets-restore", tool_preset);
SET_SENSITIVE ("tool-presets-delete", tool_preset && gimp_data_is_deletable (data)); SET_SENSITIVE ("tool-presets-delete", tool_preset && gimp_data_is_deletable (data));
#undef SET_SENSITIVE #undef SET_SENSITIVE

View File

@@ -0,0 +1,93 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimptoolinfo.h"
#include "core/gimptoolpreset.h"
#include "widgets/gimpcontainereditor.h"
#include "widgets/gimpcontainerview.h"
#include "tool-presets-commands.h"
#include "gimp-intl.h"
/* public functions */
void
tool_presets_save_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
GimpToolPreset *preset;
GimpToolInfo *tool_info;
context = gimp_container_view_get_context (editor->view);
preset = gimp_context_get_tool_preset (context);
tool_info = gimp_context_get_tool (gimp_get_user_context (context->gimp));
if (tool_info && preset)
{
GimpToolInfo *preset_tool;
preset_tool = gimp_context_get_tool (GIMP_CONTEXT (preset->tool_options));
if (tool_info != preset_tool)
{
gimp_message (context->gimp,
G_OBJECT (editor), GIMP_MESSAGE_WARNING,
_("Can't save '%s' tool options to an "
"existing '%s' tool preset."),
tool_info->blurb,
preset_tool->blurb);
return;
}
gimp_config_sync (G_OBJECT (tool_info->tool_options),
G_OBJECT (preset->tool_options), 0);
}
}
void
tool_presets_restore_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
GimpToolPreset *preset;
context = gimp_container_view_get_context (editor->view);
preset = gimp_context_get_tool_preset (context);
if (preset)
gimp_context_tool_preset_changed (gimp_get_user_context (context->gimp));
}

View File

@@ -0,0 +1,28 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __TOOL_PRESETS_COMMANDS_H__
#define __TOOL_PRESETS_COMMANDS_H__
void tool_presets_save_cmd_callback (GtkAction *action,
gpointer data);
void tool_presets_restore_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __TOOL_PRESETS_COMMANDS_H__ */

View File

@@ -26,8 +26,6 @@
#include "actions-types.h" #include "actions-types.h"
#include "config/gimpguiconfig.h" /* playground */
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpcontainer.h" #include "core/gimpcontainer.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
@@ -83,6 +81,14 @@ static const GimpEnumActionEntry tools_paintbrush_size_actions[] =
NULL } NULL }
}; };
static const GimpEnumActionEntry tools_paintbrush_aspect_ratio_actions[] =
{
{ "tools-paintbrush-aspect-ratio-set", GIMP_STOCK_TOOL_PAINTBRUSH,
"Set Brush Aspect Ratio", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE,
NULL }
};
static const GimpEnumActionEntry tools_paintbrush_angle_actions[] = static const GimpEnumActionEntry tools_paintbrush_angle_actions[] =
{ {
{ "tools-paintbrush-angle-set", GIMP_STOCK_TOOL_PAINTBRUSH, { "tools-paintbrush-angle-set", GIMP_STOCK_TOOL_PAINTBRUSH,
@@ -91,10 +97,26 @@ static const GimpEnumActionEntry tools_paintbrush_angle_actions[] =
NULL } NULL }
}; };
static const GimpEnumActionEntry tools_paintbrush_aspect_ratio_actions[] = static const GimpEnumActionEntry tools_paintbrush_spacing_actions[] =
{ {
{ "tools-paintbrush-aspect-ratio-set", GIMP_STOCK_TOOL_PAINTBRUSH, { "tools-paintbrush-spacing-set", GIMP_STOCK_TOOL_PAINTBRUSH,
"Set Brush Aspect Ratio", NULL, NULL, "Set Brush Spacing", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE,
NULL }
};
static const GimpEnumActionEntry tools_paintbrush_hardness_actions[] =
{
{ "tools-paintbrush-hardness-set", GIMP_STOCK_TOOL_PAINTBRUSH,
"Set Brush Hardness", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE,
NULL }
};
static const GimpEnumActionEntry tools_paintbrush_force_actions[] =
{
{ "tools-paintbrush-force-set", GIMP_STOCK_TOOL_PAINTBRUSH,
"Set Brush Force", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE, GIMP_ACTION_SELECT_SET, TRUE,
NULL } NULL }
}; };
@@ -187,15 +209,21 @@ static const GimpEnumActionEntry tools_airbrush_flow_actions[] =
NULL } NULL }
}; };
#ifdef HAVE_LIBMYPAINT
static const GimpEnumActionEntry tools_mybrush_radius_actions[] = static const GimpEnumActionEntry tools_mybrush_radius_actions[] =
{ {
{ "tools-mybrush-radius-set", GIMP_STOCK_TOOL_MYBRUSH, { "tools-mypaint-brush-radius-set", GIMP_STOCK_TOOL_MYPAINT_BRUSH,
"Set MyPaint Brush Radius", NULL, NULL, "Set MyPaint Brush Radius", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE, GIMP_ACTION_SELECT_SET, TRUE,
NULL } NULL }
}; };
#endif
static const GimpEnumActionEntry tools_mybrush_hardness_actions[] =
{
{ "tools-mypaint-brush-hardness-set", GIMP_STOCK_TOOL_MYPAINT_BRUSH,
"Set MyPaint Brush Hardness", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE,
NULL }
};
static const GimpEnumActionEntry tools_foreground_select_brush_size_actions[] = static const GimpEnumActionEntry tools_foreground_select_brush_size_actions[] =
{ {
@@ -223,6 +251,15 @@ static const GimpEnumActionEntry tools_warp_effect_size_actions[] =
NULL } NULL }
}; };
static const GimpEnumActionEntry tools_warp_effect_hardness_actions[] =
{
{ "tools-warp-effect-hardness-set",
GIMP_STOCK_TOOL_WARP,
"Set Warp Effect Hardness", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE,
NULL }
};
static const GimpEnumActionEntry tools_opacity_actions[] = static const GimpEnumActionEntry tools_opacity_actions[] =
{ {
{ "tools-opacity-set", GIMP_STOCK_TOOL_OPTIONS, { "tools-opacity-set", GIMP_STOCK_TOOL_OPTIONS,
@@ -399,6 +436,138 @@ static const GimpEnumActionEntry tools_angle_actions[] =
NULL }, NULL },
}; };
static const GimpEnumActionEntry tools_spacing_actions[] =
{
{ "tools-spacing-set", GIMP_STOCK_TOOL_OPTIONS,
"Set Spacing", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE,
NULL },
{ "tools-spacing-set-to-default", GIMP_STOCK_TOOL_OPTIONS,
"Set Spacing To Default Value", NULL, NULL,
GIMP_ACTION_SELECT_SET_TO_DEFAULT, FALSE,
NULL },
{ "tools-spacing-minimum", GIMP_STOCK_TOOL_OPTIONS,
"Minimize Spacing", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "tools-spacing-maximum", GIMP_STOCK_TOOL_OPTIONS,
"Maximize Spacing", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "tools-spacing-decrease", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Spacing", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "tools-spacing-increase", GIMP_STOCK_TOOL_OPTIONS,
"Increase Spacing", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "tools-spacing-decrease-skip", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Spacing More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "tools-spacing-increase-skip", GIMP_STOCK_TOOL_OPTIONS,
"Increase Spacing More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL },
{ "tools-spacing-decrease-percent", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Spacing Relative", NULL, NULL,
GIMP_ACTION_SELECT_PERCENT_PREVIOUS, FALSE,
NULL },
{ "tools-spacing-increase-percent", GIMP_STOCK_TOOL_OPTIONS,
"Increase Spacing Relative", NULL, NULL,
GIMP_ACTION_SELECT_PERCENT_NEXT, FALSE,
NULL },
};
static const GimpEnumActionEntry tools_hardness_actions[] =
{
{ "tools-hardness-set", GIMP_STOCK_TOOL_OPTIONS,
"Set Hardness", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE,
NULL },
{ "tools-hardness-set-to-default", GIMP_STOCK_TOOL_OPTIONS,
"Set Hardness To Default Value", NULL, NULL,
GIMP_ACTION_SELECT_SET_TO_DEFAULT, FALSE,
NULL },
{ "tools-hardness-minimum", GIMP_STOCK_TOOL_OPTIONS,
"Minimize Hardness", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "tools-hardness-maximum", GIMP_STOCK_TOOL_OPTIONS,
"Maximize Hardness", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "tools-hardness-decrease", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Hardness", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "tools-hardness-increase", GIMP_STOCK_TOOL_OPTIONS,
"Increase Hardness", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "tools-hardness-decrease-skip", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Hardness More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "tools-hardness-increase-skip", GIMP_STOCK_TOOL_OPTIONS,
"Increase Hardness More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL },
{ "tools-hardness-decrease-percent", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Hardness Relative", NULL, NULL,
GIMP_ACTION_SELECT_PERCENT_PREVIOUS, FALSE,
NULL },
{ "tools-hardness-increase-percent", GIMP_STOCK_TOOL_OPTIONS,
"Increase Hardness Relative", NULL, NULL,
GIMP_ACTION_SELECT_PERCENT_NEXT, FALSE,
NULL },
};
static const GimpEnumActionEntry tools_force_actions[] =
{
{ "tools-force-set", GIMP_STOCK_TOOL_OPTIONS,
"Set Force", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE,
NULL },
{ "tools-force-set-to-default", GIMP_STOCK_TOOL_OPTIONS,
"Set Force To Default Value", NULL, NULL,
GIMP_ACTION_SELECT_SET_TO_DEFAULT, FALSE,
NULL },
{ "tools-force-minimum", GIMP_STOCK_TOOL_OPTIONS,
"Minimize Force", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "tools-force-maximum", GIMP_STOCK_TOOL_OPTIONS,
"Maximize Force", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "tools-force-decrease", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Force", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "tools-force-increase", GIMP_STOCK_TOOL_OPTIONS,
"Increase Force", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "tools-force-decrease-skip", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Force More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "tools-force-increase-skip", GIMP_STOCK_TOOL_OPTIONS,
"Increase Force More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL },
{ "tools-force-decrease-percent", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Force Relative", NULL, NULL,
GIMP_ACTION_SELECT_PERCENT_PREVIOUS, FALSE,
NULL },
{ "tools-force-increase-percent", GIMP_STOCK_TOOL_OPTIONS,
"Increase Force Relative", NULL, NULL,
GIMP_ACTION_SELECT_PERCENT_NEXT, FALSE,
NULL },
};
static const GimpEnumActionEntry tools_object_1_actions[] = static const GimpEnumActionEntry tools_object_1_actions[] =
{ {
{ "tools-object-1-set", GIMP_STOCK_TOOL_OPTIONS, { "tools-object-1-set", GIMP_STOCK_TOOL_OPTIONS,
@@ -476,16 +645,26 @@ tools_actions_setup (GimpActionGroup *group)
tools_paintbrush_size_actions, tools_paintbrush_size_actions,
G_N_ELEMENTS (tools_paintbrush_size_actions), G_N_ELEMENTS (tools_paintbrush_size_actions),
G_CALLBACK (tools_paintbrush_size_cmd_callback)); G_CALLBACK (tools_paintbrush_size_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_paintbrush_angle_actions,
G_N_ELEMENTS (tools_paintbrush_angle_actions),
G_CALLBACK (tools_paintbrush_angle_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL, gimp_action_group_add_enum_actions (group, NULL,
tools_paintbrush_aspect_ratio_actions, tools_paintbrush_aspect_ratio_actions,
G_N_ELEMENTS (tools_paintbrush_aspect_ratio_actions), G_N_ELEMENTS (tools_paintbrush_aspect_ratio_actions),
G_CALLBACK (tools_paintbrush_aspect_ratio_cmd_callback)); G_CALLBACK (tools_paintbrush_aspect_ratio_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_paintbrush_angle_actions,
G_N_ELEMENTS (tools_paintbrush_angle_actions),
G_CALLBACK (tools_paintbrush_angle_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_paintbrush_spacing_actions,
G_N_ELEMENTS (tools_paintbrush_spacing_actions),
G_CALLBACK (tools_paintbrush_spacing_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_paintbrush_hardness_actions,
G_N_ELEMENTS (tools_paintbrush_hardness_actions),
G_CALLBACK (tools_paintbrush_hardness_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_paintbrush_force_actions,
G_N_ELEMENTS (tools_paintbrush_force_actions),
G_CALLBACK (tools_paintbrush_force_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL, gimp_action_group_add_enum_actions (group, NULL,
tools_ink_blob_size_actions, tools_ink_blob_size_actions,
@@ -509,13 +688,14 @@ tools_actions_setup (GimpActionGroup *group)
G_N_ELEMENTS (tools_airbrush_flow_actions), G_N_ELEMENTS (tools_airbrush_flow_actions),
G_CALLBACK (tools_airbrush_flow_cmd_callback)); G_CALLBACK (tools_airbrush_flow_cmd_callback));
#ifdef HAVE_LIBMYPAINT gimp_action_group_add_enum_actions (group, NULL,
if (GIMP_GUI_CONFIG (group->gimp->config)->playground_mybrush_tool) tools_mybrush_radius_actions,
gimp_action_group_add_enum_actions (group, NULL, G_N_ELEMENTS (tools_mybrush_radius_actions),
tools_mybrush_radius_actions, G_CALLBACK (tools_mybrush_radius_cmd_callback));
G_N_ELEMENTS (tools_mybrush_radius_actions), gimp_action_group_add_enum_actions (group, NULL,
G_CALLBACK (tools_mybrush_radius_cmd_callback)); tools_mybrush_hardness_actions,
#endif G_N_ELEMENTS (tools_mybrush_hardness_actions),
G_CALLBACK (tools_mybrush_hardness_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL, gimp_action_group_add_enum_actions (group, NULL,
tools_foreground_select_brush_size_actions, tools_foreground_select_brush_size_actions,
@@ -531,6 +711,10 @@ tools_actions_setup (GimpActionGroup *group)
tools_warp_effect_size_actions, tools_warp_effect_size_actions,
G_N_ELEMENTS (tools_warp_effect_size_actions), G_N_ELEMENTS (tools_warp_effect_size_actions),
G_CALLBACK (tools_warp_effect_size_cmd_callback)); G_CALLBACK (tools_warp_effect_size_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_warp_effect_hardness_actions,
G_N_ELEMENTS (tools_warp_effect_hardness_actions),
G_CALLBACK (tools_warp_effect_hardness_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL, gimp_action_group_add_enum_actions (group, NULL,
tools_opacity_actions, tools_opacity_actions,
@@ -548,6 +732,18 @@ tools_actions_setup (GimpActionGroup *group)
tools_angle_actions, tools_angle_actions,
G_N_ELEMENTS (tools_angle_actions), G_N_ELEMENTS (tools_angle_actions),
G_CALLBACK (tools_angle_cmd_callback)); G_CALLBACK (tools_angle_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_spacing_actions,
G_N_ELEMENTS (tools_spacing_actions),
G_CALLBACK (tools_spacing_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_hardness_actions,
G_N_ELEMENTS (tools_hardness_actions),
G_CALLBACK (tools_hardness_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_force_actions,
G_N_ELEMENTS (tools_force_actions),
G_CALLBACK (tools_force_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL, gimp_action_group_add_enum_actions (group, NULL,
tools_object_1_actions, tools_object_1_actions,

View File

@@ -22,6 +22,8 @@
#include <gegl.h> #include <gegl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "actions-types.h" #include "actions-types.h"
#include "core/gimp.h" #include "core/gimp.h"
@@ -42,7 +44,7 @@
#include "tools/gimpcoloroptions.h" #include "tools/gimpcoloroptions.h"
#include "tools/gimpforegroundselectoptions.h" #include "tools/gimpforegroundselectoptions.h"
#include "tools/gimprectangleoptions.h" #include "tools/gimprectangleoptions.h"
#include "tools/gimpimagemaptool.h" #include "tools/gimptool.h"
#include "tools/gimptoolcontrol.h" #include "tools/gimptoolcontrol.h"
#include "tools/gimptransformoptions.h" #include "tools/gimptransformoptions.h"
#include "tools/gimpwarpoptions.h" #include "tools/gimpwarpoptions.h"
@@ -189,6 +191,69 @@ tools_paintbrush_aspect_ratio_cmd_callback (GtkAction *action,
} }
} }
void
tools_paintbrush_spacing_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpToolInfo *tool_info;
return_if_no_context (context, data);
tool_info = gimp_context_get_tool (context);
if (tool_info && GIMP_IS_PAINT_OPTIONS (tool_info->tool_options))
{
action_select_property ((GimpActionSelectType) value,
action_data_get_display (data),
G_OBJECT (tool_info->tool_options),
"brush-spacing",
0.001, 0.01, 0.1, 0.1, FALSE);
}
}
void
tools_paintbrush_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpToolInfo *tool_info;
return_if_no_context (context, data);
tool_info = gimp_context_get_tool (context);
if (tool_info && GIMP_IS_PAINT_OPTIONS (tool_info->tool_options))
{
action_select_property ((GimpActionSelectType) value,
action_data_get_display (data),
G_OBJECT (tool_info->tool_options),
"brush-hardness",
0.001, 0.01, 0.1, 0.1, FALSE);
}
}
void
tools_paintbrush_force_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpToolInfo *tool_info;
return_if_no_context (context, data);
tool_info = gimp_context_get_tool (context);
if (tool_info && GIMP_IS_PAINT_OPTIONS (tool_info->tool_options))
{
action_select_property ((GimpActionSelectType) value,
action_data_get_display (data),
G_OBJECT (tool_info->tool_options),
"brush-force",
0.001, 0.01, 0.1, 0.1, FALSE);
}
}
void void
tools_ink_blob_size_cmd_callback (GtkAction *action, tools_ink_blob_size_cmd_callback (GtkAction *action,
gint value, gint value,
@@ -206,7 +271,7 @@ tools_ink_blob_size_cmd_callback (GtkAction *action,
action_data_get_display (data), action_data_get_display (data),
G_OBJECT (tool_info->tool_options), G_OBJECT (tool_info->tool_options),
"size", "size",
1.0, 1.0, 10.0, 0.1, FALSE); 0.1, 1.0, 10.0, 0.1, FALSE);
} }
} }
@@ -248,7 +313,10 @@ tools_ink_blob_angle_cmd_callback (GtkAction *action,
action_data_get_display (data), action_data_get_display (data),
G_OBJECT (tool_info->tool_options), G_OBJECT (tool_info->tool_options),
"blob-angle", "blob-angle",
1.0, 1.0, 15.0, 0.1, TRUE); gimp_deg_to_rad (0.1),
gimp_deg_to_rad (1.0),
gimp_deg_to_rad (15.0),
0.1, TRUE);
} }
} }
@@ -269,7 +337,7 @@ tools_airbrush_rate_cmd_callback (GtkAction *action,
action_data_get_display (data), action_data_get_display (data),
G_OBJECT (tool_info->tool_options), G_OBJECT (tool_info->tool_options),
"rate", "rate",
0.1, 1.0, 15.0, 0.1, FALSE); 0.1, 1.0, 10.0, 0.1, FALSE);
} }
} }
@@ -294,7 +362,6 @@ tools_airbrush_flow_cmd_callback (GtkAction *action,
} }
} }
#ifdef HAVE_LIBMYPAINT
void void
tools_mybrush_radius_cmd_callback (GtkAction *action, tools_mybrush_radius_cmd_callback (GtkAction *action,
gint value, gint value,
@@ -315,7 +382,27 @@ tools_mybrush_radius_cmd_callback (GtkAction *action,
0.1, 0.1, 0.5, 1.0, FALSE); 0.1, 0.1, 0.5, 1.0, FALSE);
} }
} }
#endif
void
tools_mybrush_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpToolInfo *tool_info;
return_if_no_context (context, data);
tool_info = gimp_context_get_tool (context);
if (tool_info && GIMP_IS_MYBRUSH_OPTIONS (tool_info->tool_options))
{
action_select_property ((GimpActionSelectType) value,
action_data_get_display (data),
G_OBJECT (tool_info->tool_options),
"hardness",
0.001, 0.01, 0.1, 1.0, FALSE);
}
}
void void
tools_fg_select_brush_size_cmd_callback (GtkAction *action, tools_fg_select_brush_size_cmd_callback (GtkAction *action,
@@ -380,6 +467,27 @@ tools_warp_effect_size_cmd_callback (GtkAction *action,
} }
} }
void
tools_warp_effect_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpToolInfo *tool_info;
return_if_no_context (context, data);
tool_info = gimp_context_get_tool (context);
if (tool_info && GIMP_IS_WARP_OPTIONS (tool_info->tool_options))
{
action_select_property ((GimpActionSelectType) value,
action_data_get_display (data),
G_OBJECT (tool_info->tool_options),
"effect-hardness",
0.001, 0.01, 0.1, 0.1, FALSE);
}
}
void void
tools_opacity_cmd_callback (GtkAction *action, tools_opacity_cmd_callback (GtkAction *action,
gint value, gint value,
@@ -468,6 +576,72 @@ tools_angle_cmd_callback (GtkAction *action,
} }
} }
void
tools_spacing_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpTool *tool;
return_if_no_context (context, data);
tool = tool_manager_get_active (context->gimp);
if (tool)
{
const gchar *action_desc;
action_desc = gimp_tool_control_get_action_spacing (tool->control);
if (action_desc)
tools_activate_enum_action (action_desc, value);
}
}
void
tools_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpTool *tool;
return_if_no_context (context, data);
tool = tool_manager_get_active (context->gimp);
if (tool)
{
const gchar *action_desc;
action_desc = gimp_tool_control_get_action_hardness (tool->control);
if (action_desc)
tools_activate_enum_action (action_desc, value);
}
}
void
tools_force_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpTool *tool;
return_if_no_context (context, data);
tool = tool_manager_get_active (context->gimp);
if (tool)
{
const gchar *action_desc;
action_desc = gimp_tool_control_get_action_force (tool->control);
if (action_desc)
tools_activate_enum_action (action_desc, value);
}
}
void void
tools_object_1_cmd_callback (GtkAction *action, tools_object_1_cmd_callback (GtkAction *action,
gint value, gint value,

View File

@@ -36,6 +36,15 @@ void tools_paintbrush_angle_cmd_callback (GtkAction *action,
void tools_paintbrush_aspect_ratio_cmd_callback (GtkAction *action, void tools_paintbrush_aspect_ratio_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
void tools_paintbrush_spacing_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_paintbrush_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_paintbrush_force_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_ink_blob_size_cmd_callback (GtkAction *action, void tools_ink_blob_size_cmd_callback (GtkAction *action,
gint value, gint value,
@@ -54,11 +63,12 @@ void tools_airbrush_flow_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
#ifdef HAVE_LIBMYPAINT
void tools_mybrush_radius_cmd_callback (GtkAction *action, void tools_mybrush_radius_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
#endif void tools_mybrush_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_fg_select_brush_size_cmd_callback (GtkAction *action, void tools_fg_select_brush_size_cmd_callback (GtkAction *action,
gint value, gint value,
@@ -71,6 +81,9 @@ void tools_transform_preview_opacity_cmd_callback (GtkAction *action,
void tools_warp_effect_size_cmd_callback (GtkAction *action, void tools_warp_effect_size_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
void tools_warp_effect_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_opacity_cmd_callback (GtkAction *action, void tools_opacity_cmd_callback (GtkAction *action,
gint value, gint value,
@@ -84,6 +97,15 @@ void tools_aspect_cmd_callback (GtkAction *action,
void tools_angle_cmd_callback (GtkAction *action, void tools_angle_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
void tools_spacing_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_force_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_object_1_cmd_callback (GtkAction *action, void tools_object_1_cmd_callback (GtkAction *action,
gint value, gint value,

View File

@@ -30,8 +30,10 @@
#include "widgets/gimpactiongroup.h" #include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h" #include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
#include "actions.h" #include "actions.h"
#include "items-actions.h"
#include "vectors-actions.h" #include "vectors-actions.h"
#include "vectors-commands.h" #include "vectors-commands.h"
@@ -44,6 +46,10 @@ static const GimpActionEntry vectors_actions[] =
NC_("vectors-action", "Paths Menu"), NULL, NULL, NULL, NC_("vectors-action", "Paths Menu"), NULL, NULL, NULL,
GIMP_HELP_PATH_DIALOG }, GIMP_HELP_PATH_DIALOG },
{ "vectors-color-tag-menu", GIMP_STOCK_CLOSE /* abused */,
NC_("vectors-action", "Color Tag"), NULL, NULL, NULL,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-path-tool", GIMP_STOCK_TOOL_PATH, { "vectors-path-tool", GIMP_STOCK_TOOL_PATH,
NC_("vectors-action", "Path _Tool"), NULL, NULL, NC_("vectors-action", "Path _Tool"), NULL, NULL,
G_CALLBACK (vectors_vectors_tool_cmd_callback), G_CALLBACK (vectors_vectors_tool_cmd_callback),
@@ -108,6 +114,18 @@ static const GimpActionEntry vectors_actions[] =
G_CALLBACK (vectors_lower_to_bottom_cmd_callback), G_CALLBACK (vectors_lower_to_bottom_cmd_callback),
GIMP_HELP_PATH_LOWER_TO_BOTTOM }, GIMP_HELP_PATH_LOWER_TO_BOTTOM },
{ "vectors-fill", GIMP_STOCK_TOOL_BUCKET_FILL,
NC_("vectors-action", "Fill Path..."), NULL,
NC_("vectors-action", "Fill the path"),
G_CALLBACK (vectors_fill_cmd_callback),
GIMP_HELP_PATH_FILL },
{ "vectors-fill-last-values", GIMP_STOCK_TOOL_BUCKET_FILL,
NC_("vectors-action", "Fill Path"), NULL,
NC_("vectors-action", "Fill the path with last values"),
G_CALLBACK (vectors_fill_last_vals_cmd_callback),
GIMP_HELP_PATH_FILL },
{ "vectors-stroke", GIMP_STOCK_PATH_STROKE, { "vectors-stroke", GIMP_STOCK_PATH_STROKE,
NC_("vectors-action", "Stro_ke Path..."), NULL, NC_("vectors-action", "Stro_ke Path..."), NULL,
NC_("vectors-action", "Paint along the path"), NC_("vectors-action", "Paint along the path"),
@@ -168,6 +186,63 @@ static const GimpToggleActionEntry vectors_toggle_actions[] =
GIMP_HELP_PATH_LOCK_POSITION } GIMP_HELP_PATH_LOCK_POSITION }
}; };
static const GimpEnumActionEntry vectors_color_tag_actions[] =
{
{ "vectors-color-tag-none", GIMP_STOCK_CLOSE /* abused */,
NC_("vectors-action", "None"), NULL,
NC_("vectors-action", "Clear color tag"),
GIMP_COLOR_TAG_NONE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-blue", NULL,
NC_("vectors-action", "Blue"), NULL,
NC_("vectors-action", "Set color tag to blue"),
GIMP_COLOR_TAG_BLUE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-green", NULL,
NC_("vectors-action", "Green"), NULL,
NC_("vectors-action", "Set color tag to green"),
GIMP_COLOR_TAG_GREEN, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-yellow", NULL,
NC_("vectors-action", "Yellow"), NULL,
NC_("vectors-action", "Set color tag to yellow"),
GIMP_COLOR_TAG_YELLOW, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-orange", NULL,
NC_("vectors-action", "Orange"), NULL,
NC_("vectors-action", "Set color tag to orange"),
GIMP_COLOR_TAG_ORANGE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-brown", NULL,
NC_("vectors-action", "Brown"), NULL,
NC_("vectors-action", "Set color tag to brown"),
GIMP_COLOR_TAG_BROWN, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-red", NULL,
NC_("vectors-action", "Red"), NULL,
NC_("vectors-action", "Set color tag to red"),
GIMP_COLOR_TAG_RED, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-violet", NULL,
NC_("vectors-action", "Violet"), NULL,
NC_("vectors-action", "Set color tag to violet"),
GIMP_COLOR_TAG_VIOLET, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-gray", NULL,
NC_("vectors-action", "Gray"), NULL,
NC_("vectors-action", "Set color tag to gray"),
GIMP_COLOR_TAG_GRAY, FALSE,
GIMP_HELP_PATH_COLOR_TAG }
};
static const GimpEnumActionEntry vectors_to_selection_actions[] = static const GimpEnumActionEntry vectors_to_selection_actions[] =
{ {
{ "vectors-selection-replace", GIMP_STOCK_SELECTION_REPLACE, { "vectors-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
@@ -234,6 +309,11 @@ vectors_actions_setup (GimpActionGroup *group)
vectors_toggle_actions, vectors_toggle_actions,
G_N_ELEMENTS (vectors_toggle_actions)); G_N_ELEMENTS (vectors_toggle_actions));
gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_color_tag_actions,
G_N_ELEMENTS (vectors_color_tag_actions),
G_CALLBACK (vectors_color_tag_cmd_callback));
gimp_action_group_add_enum_actions (group, "vectors-action", gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_to_selection_actions, vectors_to_selection_actions,
G_N_ELEMENTS (vectors_to_selection_actions), G_N_ELEMENTS (vectors_to_selection_actions),
@@ -243,27 +323,23 @@ vectors_actions_setup (GimpActionGroup *group)
vectors_selection_to_vectors_actions, vectors_selection_to_vectors_actions,
G_N_ELEMENTS (vectors_selection_to_vectors_actions), G_N_ELEMENTS (vectors_selection_to_vectors_actions),
G_CALLBACK (vectors_selection_to_vectors_cmd_callback)); G_CALLBACK (vectors_selection_to_vectors_cmd_callback));
items_actions_setup (group, "vectors");
} }
void void
vectors_actions_update (GimpActionGroup *group, vectors_actions_update (GimpActionGroup *group,
gpointer data) gpointer data)
{ {
GimpImage *image = action_data_get_image (data); GimpImage *image = action_data_get_image (data);
GimpVectors *vectors = NULL; GimpVectors *vectors = NULL;
GimpDrawable *drawable = NULL; GimpDrawable *drawable = NULL;
gint n_vectors = 0; gint n_vectors = 0;
gboolean mask_empty = TRUE; gboolean mask_empty = TRUE;
gboolean visible = FALSE; gboolean dr_writable = FALSE;
gboolean linked = FALSE; gboolean dr_children = FALSE;
gboolean locked = FALSE; GList *next = NULL;
gboolean can_lock = FALSE; GList *prev = NULL;
gboolean locked_pos = FALSE;
gboolean can_lock_pos = FALSE;
gboolean dr_writable = FALSE;
gboolean dr_children = FALSE;
GList *next = NULL;
GList *prev = NULL;
if (image) if (image)
{ {
@@ -274,17 +350,10 @@ vectors_actions_update (GimpActionGroup *group,
if (vectors) if (vectors)
{ {
GimpItem *item = GIMP_ITEM (vectors); GList *vectors_list;
GList *vectors_list; GList *list;
GList *list;
visible = gimp_item_get_visible (item); vectors_list = gimp_item_get_container_iter (GIMP_ITEM (vectors));
linked = gimp_item_get_linked (item);
locked = gimp_item_get_lock_content (item);
can_lock = gimp_item_can_lock_content (item);
locked_pos = gimp_item_get_lock_position (item);
can_lock_pos = gimp_item_can_lock_position (item);
vectors_list = gimp_item_get_container_iter (item);
list = g_list_find (vectors_list, vectors); list = g_list_find (vectors_list, vectors);
@@ -299,11 +368,9 @@ vectors_actions_update (GimpActionGroup *group,
if (drawable) if (drawable)
{ {
GimpItem *item = GIMP_ITEM (drawable); dr_writable = ! gimp_item_is_content_locked (GIMP_ITEM (drawable));
dr_writable = ! gimp_item_is_content_locked (item); if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
dr_children = TRUE; dr_children = TRUE;
} }
} }
@@ -332,19 +399,15 @@ vectors_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("vectors-export", vectors); SET_SENSITIVE ("vectors-export", vectors);
SET_SENSITIVE ("vectors-import", image); SET_SENSITIVE ("vectors-import", image);
SET_SENSITIVE ("vectors-visible", vectors);
SET_SENSITIVE ("vectors-linked", vectors);
SET_SENSITIVE ("vectors-lock-content", can_lock);
SET_SENSITIVE ("vectors-lock-position", can_lock_pos);
SET_ACTIVE ("vectors-visible", visible);
SET_ACTIVE ("vectors-linked", linked);
SET_ACTIVE ("vectors-lock-content", locked);
SET_ACTIVE ("vectors-lock-position", locked_pos);
SET_SENSITIVE ("vectors-selection-to-vectors", image && !mask_empty); SET_SENSITIVE ("vectors-selection-to-vectors", image && !mask_empty);
SET_SENSITIVE ("vectors-selection-to-vectors-short", image && !mask_empty); SET_SENSITIVE ("vectors-selection-to-vectors-short", image && !mask_empty);
SET_SENSITIVE ("vectors-selection-to-vectors-advanced", image && !mask_empty); SET_SENSITIVE ("vectors-selection-to-vectors-advanced", image && !mask_empty);
SET_SENSITIVE ("vectors-fill", vectors &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-fill-last-values", vectors &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-stroke", vectors && SET_SENSITIVE ("vectors-stroke", vectors &&
dr_writable && dr_writable &&
!dr_children); !dr_children);
@@ -360,4 +423,6 @@ vectors_actions_update (GimpActionGroup *group,
#undef SET_SENSITIVE #undef SET_SENSITIVE
#undef SET_ACTIVE #undef SET_ACTIVE
items_actions_update (group, "vectors", GIMP_ITEM (vectors));
} }

View File

@@ -23,10 +23,13 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h" #include "libgimpbase/gimpbase.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h" #include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h" #include "actions-types.h"
#include "config/gimpdialogconfig.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimp-utils.h" #include "core/gimp-utils.h"
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
@@ -34,10 +37,8 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-merge.h" #include "core/gimpimage-merge.h"
#include "core/gimpimage-undo.h" #include "core/gimpimage-undo.h"
#include "core/gimpitemundo.h"
#include "core/gimpparamspecs.h" #include "core/gimpparamspecs.h"
#include "core/gimpprogress.h" #include "core/gimpprogress.h"
#include "core/gimpstrokeoptions.h"
#include "core/gimptoolinfo.h" #include "core/gimptoolinfo.h"
#include "pdb/gimppdb.h" #include "pdb/gimppdb.h"
@@ -56,12 +57,13 @@
#include "tools/gimpvectortool.h" #include "tools/gimpvectortool.h"
#include "tools/tool_manager.h" #include "tools/tool_manager.h"
#include "dialogs/stroke-dialog.h" #include "dialogs/dialogs.h"
#include "dialogs/vectors-export-dialog.h" #include "dialogs/vectors-export-dialog.h"
#include "dialogs/vectors-import-dialog.h" #include "dialogs/vectors-import-dialog.h"
#include "dialogs/vectors-options-dialog.h" #include "dialogs/vectors-options-dialog.h"
#include "actions.h" #include "actions.h"
#include "items-commands.h"
#include "vectors-commands.h" #include "vectors-commands.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@@ -69,26 +71,41 @@
/* local function prototypes */ /* local function prototypes */
static void vectors_new_vectors_response (GtkWidget *widget, static void vectors_new_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
VectorsOptionsDialog *options); GimpVectors *vectors,
static void vectors_edit_vectors_response (GtkWidget *widget, GimpContext *context,
gint response_id, const gchar *vectors_name,
VectorsOptionsDialog *options); gboolean vectors_visible,
static void vectors_import_response (GtkWidget *widget, gboolean vectors_linked,
gint response_id, GimpColorTag vectors_color_tag,
VectorsImportDialog *dialog); gboolean vectors_lock_content,
static void vectors_export_response (GtkWidget *widget, gboolean vectors_lock_position,
gint response_id, gpointer user_data);
VectorsExportDialog *dialog); static void vectors_edit_attributes_callback (GtkWidget *dialog,
GimpImage *image,
GimpVectors *vectors,
/* private variables */ GimpContext *context,
const gchar *vectors_name,
static gchar *vectors_name = NULL; gboolean vectors_visible,
static gboolean vectors_import_merge = FALSE; gboolean vectors_linked,
static gboolean vectors_import_scale = FALSE; GimpColorTag vectors_color_tag,
static gboolean vectors_export_active_only = TRUE; gboolean vectors_lock_content,
gboolean vectors_lock_position,
gpointer user_data);
static void vectors_import_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *import_folder,
gboolean merge_vectors,
gboolean scale_vectors,
gpointer user_data);
static void vectors_export_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *export_folder,
gboolean active_only,
gpointer user_data);
/* public functions */ /* public functions */
@@ -124,71 +141,99 @@ void
vectors_edit_attributes_cmd_callback (GtkAction *action, vectors_edit_attributes_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
VectorsOptionsDialog *options; GimpImage *image;
GimpImage *image; GimpVectors *vectors;
GimpVectors *vectors; GtkWidget *widget;
GtkWidget *widget; GtkWidget *dialog;
return_if_no_vectors (image, vectors, data); return_if_no_vectors (image, vectors, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
options = vectors_options_dialog_new (image, vectors, #define EDIT_DIALOG_KEY "gimp-vectors-edit-attributes-dialog"
action_data_get_context (data),
widget,
gimp_object_get_name (vectors),
_("Path Attributes"),
"gimp-vectors-edit",
"gtk-edit",
_("Edit Path Attributes"),
GIMP_HELP_PATH_EDIT);
g_signal_connect (options->dialog, "response", dialog = dialogs_get_dialog (G_OBJECT (vectors), EDIT_DIALOG_KEY);
G_CALLBACK (vectors_edit_vectors_response),
options);
gtk_widget_show (options->dialog); if (! dialog)
{
GimpItem *item = GIMP_ITEM (vectors);
dialog = vectors_options_dialog_new (image, vectors,
action_data_get_context (data),
widget,
_("Path Attributes"),
"gimp-vectors-edit",
"gtk-edit",
_("Edit Path Attributes"),
GIMP_HELP_PATH_EDIT,
gimp_object_get_name (vectors),
gimp_item_get_visible (item),
gimp_item_get_linked (item),
gimp_item_get_color_tag (item),
gimp_item_get_lock_content (item),
gimp_item_get_lock_position (item),
vectors_edit_attributes_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (vectors), EDIT_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
vectors_new_cmd_callback (GtkAction *action, vectors_new_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
VectorsOptionsDialog *options; GimpImage *image;
GimpImage *image; GtkWidget *widget;
GtkWidget *widget; GtkWidget *dialog;
return_if_no_image (image, data); return_if_no_image (image, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
options = vectors_options_dialog_new (image, NULL, #define NEW_DIALOG_KEY "gimp-vectors-new-dialog"
action_data_get_context (data),
widget,
vectors_name ? vectors_name :
_("Path"),
_("New Path"),
"gimp-vectors-new",
GIMP_STOCK_PATH,
_("New Path Options"),
GIMP_HELP_PATH_NEW);
g_signal_connect (options->dialog, "response", dialog = dialogs_get_dialog (G_OBJECT (image), NEW_DIALOG_KEY);
G_CALLBACK (vectors_new_vectors_response),
options);
gtk_widget_show (options->dialog); if (! dialog)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
dialog = vectors_options_dialog_new (image, NULL,
action_data_get_context (data),
widget,
_("New Path"),
"gimp-vectors-new",
GIMP_STOCK_PATH,
_("Create a New Path"),
GIMP_HELP_PATH_NEW,
config->vectors_new_name,
FALSE,
FALSE,
GIMP_COLOR_TAG_NONE,
FALSE,
FALSE,
vectors_new_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (image), NEW_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
vectors_new_last_vals_cmd_callback (GtkAction *action, vectors_new_last_vals_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpImage *image;
GimpVectors *new_vectors; GimpVectors *vectors;
GimpDialogConfig *config;
return_if_no_image (image, data); return_if_no_image (image, data);
new_vectors = gimp_vectors_new (image, vectors_name); config = GIMP_DIALOG_CONFIG (image->gimp->config);
gimp_image_add_vectors (image, new_vectors, vectors = gimp_vectors_new (image, config->vectors_new_name);
gimp_image_add_vectors (image, vectors,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE); GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (image); gimp_image_flush (image);
} }
@@ -251,7 +296,6 @@ vectors_duplicate_cmd_callback (GtkAction *action,
new_vectors = GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors), new_vectors = GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors),
G_TYPE_FROM_INSTANCE (vectors))); G_TYPE_FROM_INSTANCE (vectors)));
/* use the actual parent here, not GIMP_IMAGE_ACTIVE_PARENT because /* use the actual parent here, not GIMP_IMAGE_ACTIVE_PARENT because
* the latter would add a duplicated group inside itself instead of * the latter would add a duplicated group inside itself instead of
* above it * above it
@@ -259,7 +303,6 @@ vectors_duplicate_cmd_callback (GtkAction *action,
gimp_image_add_vectors (image, new_vectors, gimp_image_add_vectors (image, new_vectors,
gimp_vectors_get_parent (vectors), -1, gimp_vectors_get_parent (vectors), -1,
TRUE); TRUE);
gimp_image_flush (image); gimp_image_flush (image);
} }
@@ -368,84 +411,64 @@ vectors_selection_to_vectors_cmd_callback (GtkAction *action,
} }
} }
void
vectors_fill_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpVectors *vectors;
return_if_no_vectors (image, vectors, data);
items_fill_cmd_callback (action,
image, GIMP_ITEM (vectors),
"gimp-vectors-fill-dialog",
_("Fill Path"),
GIMP_STOCK_TOOL_BUCKET_FILL,
GIMP_HELP_PATH_FILL,
data);
}
void
vectors_fill_last_vals_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpVectors *vectors;
return_if_no_vectors (image, vectors, data);
items_fill_last_vals_cmd_callback (action,
image, GIMP_ITEM (vectors),
data);
}
void void
vectors_stroke_cmd_callback (GtkAction *action, vectors_stroke_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpImage *image;
GimpVectors *vectors; GimpVectors *vectors;
GimpDrawable *drawable;
GtkWidget *widget;
GtkWidget *dialog;
return_if_no_vectors (image, vectors, data); return_if_no_vectors (image, vectors, data);
return_if_no_widget (widget, data);
drawable = gimp_image_get_active_drawable (image); items_stroke_cmd_callback (action,
image, GIMP_ITEM (vectors),
if (! drawable) "gimp-vectors-stroke-dialog",
{ _("Stroke Path"),
gimp_message_literal (image->gimp, GIMP_STOCK_PATH_STROKE,
G_OBJECT (widget), GIMP_MESSAGE_WARNING, GIMP_HELP_PATH_STROKE,
_("There is no active layer or channel to stroke to.")); data);
return;
}
dialog = stroke_dialog_new (GIMP_ITEM (vectors),
action_data_get_context (data),
_("Stroke Path"),
GIMP_STOCK_PATH_STROKE,
GIMP_HELP_PATH_STROKE,
widget);
gtk_widget_show (dialog);
} }
void void
vectors_stroke_last_vals_cmd_callback (GtkAction *action, vectors_stroke_last_vals_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpImage *image;
GimpVectors *vectors; GimpVectors *vectors;
GimpDrawable *drawable;
GimpContext *context;
GtkWidget *widget;
GimpStrokeOptions *options;
GError *error = NULL;
return_if_no_vectors (image, vectors, data); return_if_no_vectors (image, vectors, data);
return_if_no_context (context, data);
return_if_no_widget (widget, data);
drawable = gimp_image_get_active_drawable (image); items_stroke_last_vals_cmd_callback (action,
image, GIMP_ITEM (vectors),
if (! drawable) data);
{
gimp_message_literal (image->gimp,
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to stroke to."));
return;
}
options = g_object_get_data (G_OBJECT (image->gimp), "saved-stroke-options");
if (options)
g_object_ref (options);
else
options = gimp_stroke_options_new (image->gimp, context, TRUE);
if (! gimp_item_stroke (GIMP_ITEM (vectors),
drawable, context, options, NULL,
TRUE, NULL, &error))
{
gimp_message_literal (image->gimp, G_OBJECT (widget),
GIMP_MESSAGE_WARNING, error->message);
g_clear_error (&error);
}
else
{
gimp_image_flush (image);
}
g_object_unref (options);
} }
void void
@@ -505,56 +528,75 @@ void
vectors_export_cmd_callback (GtkAction *action, vectors_export_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
VectorsExportDialog *dialog; GimpImage *image;
GimpImage *image; GimpVectors *vectors;
GimpVectors *vectors; GtkWidget *widget;
GtkWidget *widget; GtkWidget *dialog;
const gchar *folder;
return_if_no_vectors (image, vectors, data); return_if_no_vectors (image, vectors, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
dialog = vectors_export_dialog_new (image, widget, #define EXPORT_DIALOG_KEY "gimp-vectors-export-dialog"
vectors_export_active_only);
folder = g_object_get_data (G_OBJECT (image->gimp), dialog = dialogs_get_dialog (G_OBJECT (image), EXPORT_DIALOG_KEY);
"gimp-vectors-export-folder");
if (folder)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog->dialog),
folder);
g_signal_connect (dialog->dialog, "response", if (! dialog)
G_CALLBACK (vectors_export_response), {
dialog); GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
GFile *folder = NULL;
gtk_widget_show (dialog->dialog); if (config->vectors_export_path)
folder = gimp_file_new_for_config_path (config->vectors_export_path,
NULL);
dialog = vectors_export_dialog_new (image, widget,
folder,
config->vectors_export_active_only,
vectors_export_callback,
NULL);
if (folder)
g_object_unref (folder);
dialogs_attach_dialog (G_OBJECT (image), EXPORT_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
vectors_import_cmd_callback (GtkAction *action, vectors_import_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
VectorsImportDialog *dialog; GimpImage *image;
GimpImage *image; GtkWidget *widget;
GtkWidget *widget; GtkWidget *dialog;
const gchar *folder;
return_if_no_image (image, data); return_if_no_image (image, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
dialog = vectors_import_dialog_new (image, widget, #define IMPORT_DIALOG_KEY "gimp-vectors-import-dialog"
vectors_import_merge,
vectors_import_scale);
folder = g_object_get_data (G_OBJECT (image->gimp), dialog = dialogs_get_dialog (G_OBJECT (image), IMPORT_DIALOG_KEY);
"gimp-vectors-import-folder");
if (folder)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog->dialog),
folder);
g_signal_connect (dialog->dialog, "response", if (! dialog)
G_CALLBACK (vectors_import_response), {
dialog); GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
GFile *folder = NULL;
gtk_widget_show (dialog->dialog); if (config->vectors_import_path)
folder = gimp_file_new_for_config_path (config->vectors_import_path,
NULL);
dialog = vectors_import_dialog_new (image, widget,
folder,
config->vectors_import_merge,
config->vectors_import_scale,
vectors_import_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (image), IMPORT_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
} }
void void
@@ -563,25 +605,9 @@ vectors_visible_cmd_callback (GtkAction *action,
{ {
GimpImage *image; GimpImage *image;
GimpVectors *vectors; GimpVectors *vectors;
gboolean visible;
return_if_no_vectors (image, vectors, data); return_if_no_vectors (image, vectors, data);
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); items_visible_cmd_callback (action, image, GIMP_ITEM (vectors));
if (visible != gimp_item_get_visible (GIMP_ITEM (vectors)))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_VISIBILITY);
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (vectors))
push_undo = FALSE;
gimp_item_set_visible (GIMP_ITEM (vectors), visible, push_undo);
gimp_image_flush (image);
}
} }
void void
@@ -590,25 +616,9 @@ vectors_linked_cmd_callback (GtkAction *action,
{ {
GimpImage *image; GimpImage *image;
GimpVectors *vectors; GimpVectors *vectors;
gboolean linked;
return_if_no_vectors (image, vectors, data); return_if_no_vectors (image, vectors, data);
linked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); items_linked_cmd_callback (action, image, GIMP_ITEM (vectors));
if (linked != gimp_item_get_linked (GIMP_ITEM (vectors)))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_LINKED);
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (vectors))
push_undo = FALSE;
gimp_item_set_linked (GIMP_ITEM (vectors), linked, push_undo);
gimp_image_flush (image);
}
} }
void void
@@ -617,29 +627,9 @@ vectors_lock_content_cmd_callback (GtkAction *action,
{ {
GimpImage *image; GimpImage *image;
GimpVectors *vectors; GimpVectors *vectors;
gboolean locked;
return_if_no_vectors (image, vectors, data); return_if_no_vectors (image, vectors, data);
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); items_lock_content_cmd_callback (action, image, GIMP_ITEM (vectors));
if (locked != gimp_item_get_lock_content (GIMP_ITEM (vectors)))
{
#if 0
GimpUndo *undo;
#endif
gboolean push_undo = TRUE;
#if 0
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_LINKED);
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (vectors))
push_undo = FALSE;
#endif
gimp_item_set_lock_content (GIMP_ITEM (vectors), locked, push_undo);
gimp_image_flush (image);
}
} }
void void
@@ -648,156 +638,192 @@ vectors_lock_position_cmd_callback (GtkAction *action,
{ {
GimpImage *image; GimpImage *image;
GimpVectors *vectors; GimpVectors *vectors;
gboolean locked;
return_if_no_vectors (image, vectors, data); return_if_no_vectors (image, vectors, data);
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); items_lock_position_cmd_callback (action, image, GIMP_ITEM (vectors));
if (locked != gimp_item_get_lock_position (GIMP_ITEM (vectors)))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_LOCK_POSITION);
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (vectors))
push_undo = FALSE;
gimp_item_set_lock_position (GIMP_ITEM (vectors), locked, push_undo);
gimp_image_flush (image);
}
} }
void
vectors_color_tag_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpImage *image;
GimpVectors *vectors;
return_if_no_vectors (image, vectors, data);
items_color_tag_cmd_callback (action, image, GIMP_ITEM (vectors),
(GimpColorTag) value);
}
/* private functions */ /* private functions */
static void static void
vectors_new_vectors_response (GtkWidget *widget, vectors_new_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
VectorsOptionsDialog *options) GimpVectors *vectors,
GimpContext *context,
const gchar *vectors_name,
gboolean vectors_visible,
gboolean vectors_linked,
GimpColorTag vectors_color_tag,
gboolean vectors_lock_content,
gboolean vectors_lock_position,
gpointer user_data)
{ {
if (response_id == GTK_RESPONSE_OK) GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
{
GimpVectors *new_vectors;
if (vectors_name) g_object_set (config,
g_free (vectors_name); "path-new-name", vectors_name,
NULL);
vectors_name = vectors = gimp_vectors_new (image, config->vectors_new_name);
g_strdup (gtk_entry_get_text (GTK_ENTRY (options->name_entry))); gimp_item_set_visible (GIMP_ITEM (vectors), vectors_visible, FALSE);
gimp_item_set_linked (GIMP_ITEM (vectors), vectors_linked, FALSE);
gimp_item_set_color_tag (GIMP_ITEM (vectors), vectors_color_tag, FALSE);
gimp_item_set_lock_content (GIMP_ITEM (vectors), vectors_lock_content, FALSE);
gimp_item_set_lock_position (GIMP_ITEM (vectors), vectors_lock_position, FALSE);
new_vectors = gimp_vectors_new (options->image, vectors_name); gimp_image_add_vectors (image, vectors,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (image);
gimp_image_add_vectors (options->image, new_vectors, gtk_widget_destroy (dialog);
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (options->image);
}
gtk_widget_destroy (options->dialog);
} }
static void static void
vectors_edit_vectors_response (GtkWidget *widget, vectors_edit_attributes_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
VectorsOptionsDialog *options) GimpVectors *vectors,
GimpContext *context,
const gchar *vectors_name,
gboolean vectors_visible,
gboolean vectors_linked,
GimpColorTag vectors_color_tag,
gboolean vectors_lock_content,
gboolean vectors_lock_position,
gpointer user_data)
{ {
if (response_id == GTK_RESPONSE_OK) GimpItem *item = GIMP_ITEM (vectors);
if (strcmp (vectors_name, gimp_object_get_name (vectors)) ||
vectors_visible != gimp_item_get_visible (item) ||
vectors_linked != gimp_item_get_linked (item) ||
vectors_color_tag != gimp_item_get_color_tag (item) ||
vectors_lock_content != gimp_item_get_lock_content (item) ||
vectors_lock_position != gimp_item_get_lock_position (item))
{ {
GimpVectors *vectors = options->vectors; gimp_image_undo_group_start (image,
const gchar *new_name; GIMP_UNDO_GROUP_ITEM_PROPERTIES,
_("Path Attributes"));
new_name = gtk_entry_get_text (GTK_ENTRY (options->name_entry)); if (strcmp (vectors_name, gimp_object_get_name (vectors)))
gimp_item_rename (GIMP_ITEM (vectors), vectors_name, NULL);
if (strcmp (new_name, gimp_object_get_name (vectors))) if (vectors_visible != gimp_item_get_visible (item))
{ gimp_item_set_visible (item, vectors_visible, TRUE);
gimp_item_rename (GIMP_ITEM (vectors), new_name, NULL);
gimp_image_flush (options->image); if (vectors_linked != gimp_item_get_linked (item))
} gimp_item_set_linked (item, vectors_linked, TRUE);
if (vectors_color_tag != gimp_item_get_color_tag (item))
gimp_item_set_color_tag (item, vectors_color_tag, TRUE);
if (vectors_lock_content != gimp_item_get_lock_content (item))
gimp_item_set_lock_content (item, vectors_lock_content, TRUE);
if (vectors_lock_position != gimp_item_get_lock_position (item))
gimp_item_set_lock_position (item, vectors_lock_position, TRUE);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
} }
gtk_widget_destroy (options->dialog); gtk_widget_destroy (dialog);
} }
static void static void
vectors_import_response (GtkWidget *widget, vectors_import_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
VectorsImportDialog *dialog) GFile *file,
GFile *import_folder,
gboolean merge_vectors,
gboolean scale_vectors,
gpointer user_data)
{ {
if (response_id == GTK_RESPONSE_OK) GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
gchar *path = NULL;
GError *error = NULL;
if (import_folder)
path = gimp_file_get_config_path (import_folder, NULL);
g_object_set (config,
"path-import-path", path,
"path-import-merge", merge_vectors,
"path-import-scale", scale_vectors,
NULL);
if (path)
g_free (path);
if (gimp_vectors_import_file (image, file,
config->vectors_import_merge,
config->vectors_import_scale,
GIMP_IMAGE_ACTIVE_PARENT, -1,
NULL, &error))
{ {
GtkFileChooser *chooser = GTK_FILE_CHOOSER (widget); gimp_image_flush (image);
GFile *file; }
GError *error = NULL; else
{
vectors_import_merge = dialog->merge_vectors; gimp_message (image->gimp, G_OBJECT (dialog),
vectors_import_scale = dialog->scale_vectors; GIMP_MESSAGE_ERROR,
"%s", error->message);
file = gtk_file_chooser_get_file (chooser); g_error_free (error);
return;
if (gimp_vectors_import_file (dialog->image, file,
vectors_import_merge, vectors_import_scale,
GIMP_IMAGE_ACTIVE_PARENT, -1,
NULL, &error))
{
gimp_image_flush (dialog->image);
}
else
{
gimp_message (dialog->image->gimp, G_OBJECT (widget),
GIMP_MESSAGE_ERROR,
"%s", error->message);
g_error_free (error);
return;
}
g_object_unref (file);
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
"gimp-vectors-import-folder",
gtk_file_chooser_get_current_folder (chooser),
(GDestroyNotify) g_free);
} }
gtk_widget_destroy (widget); gtk_widget_destroy (dialog);
} }
static void static void
vectors_export_response (GtkWidget *widget, vectors_export_callback (GtkWidget *dialog,
gint response_id, GimpImage *image,
VectorsExportDialog *dialog) GFile *file,
GFile *export_folder,
gboolean active_only,
gpointer user_data)
{ {
if (response_id == GTK_RESPONSE_OK) GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
GimpVectors *vectors = NULL;
gchar *path = NULL;
GError *error = NULL;
if (export_folder)
path = gimp_file_get_config_path (export_folder, NULL);
g_object_set (config,
"path-export-path", path,
"path-export-active-only", active_only,
NULL);
if (path)
g_free (path);
if (config->vectors_export_active_only)
vectors = gimp_image_get_active_vectors (image);
if (! gimp_vectors_export_file (image, vectors, file, &error))
{ {
GtkFileChooser *chooser = GTK_FILE_CHOOSER (widget); gimp_message (image->gimp, G_OBJECT (dialog),
GimpVectors *vectors = NULL; GIMP_MESSAGE_ERROR,
GFile *file; "%s", error->message);
GError *error = NULL; g_clear_error (&error);
return;
vectors_export_active_only = dialog->active_only;
file = gtk_file_chooser_get_file (chooser);
if (vectors_export_active_only)
vectors = gimp_image_get_active_vectors (dialog->image);
if (! gimp_vectors_export_file (dialog->image, vectors, file, &error))
{
gimp_message (dialog->image->gimp, G_OBJECT (widget),
GIMP_MESSAGE_ERROR,
"%s", error->message);
g_error_free (error);
return;
}
g_object_unref (file);
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
"gimp-vectors-export-folder",
gtk_file_chooser_get_current_folder (chooser),
(GDestroyNotify) g_free);
} }
gtk_widget_destroy (widget); gtk_widget_destroy (dialog);
} }

View File

@@ -49,6 +49,11 @@ void vectors_to_selection_cmd_callback (GtkAction *action,
void vectors_selection_to_vectors_cmd_callback (GtkAction *action, void vectors_selection_to_vectors_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
void vectors_fill_cmd_callback (GtkAction *action,
gpointer data);
void vectors_fill_last_vals_cmd_callback (GtkAction *action,
gpointer data);
void vectors_stroke_cmd_callback (GtkAction *action, void vectors_stroke_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void vectors_stroke_last_vals_cmd_callback (GtkAction *action, void vectors_stroke_last_vals_cmd_callback (GtkAction *action,
@@ -72,5 +77,9 @@ void vectors_lock_content_cmd_callback (GtkAction *action,
void vectors_lock_position_cmd_callback (GtkAction *action, void vectors_lock_position_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void vectors_color_tag_cmd_callback (GtkAction *action,
gint value,
gpointer data);
#endif /* __VECTORS_COMMANDS_H__ */ #endif /* __VECTORS_COMMANDS_H__ */

View File

@@ -22,6 +22,7 @@
#include "libgimpmath/gimpmath.h" #include "libgimpmath/gimpmath.h"
#include "libgimpcolor/gimpcolor.h" #include "libgimpcolor/gimpcolor.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h" #include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h" #include "actions-types.h"
@@ -68,8 +69,18 @@ static const GimpActionEntry view_actions[] =
{ {
{ "view-menu", NULL, NC_("view-action", "_View") }, { "view-menu", NULL, NC_("view-action", "_View") },
{ "view-zoom-menu", NULL, NC_("view-action", "_Zoom") }, { "view-zoom-menu", NULL, NC_("view-action", "_Zoom") },
{ "view-rotate-menu", NULL, NC_("view-action", "_Rotate") }, { "view-rotate-menu", NULL, NC_("view-action", "_Flip & Rotate") },
{ "view-padding-color-menu", NULL, NC_("view-action", "_Padding Color") }, { "view-padding-color-menu", NULL, NC_("view-action", "_Padding Color") },
{ "view-color-management-menu", NULL,
NC_("view-action", "_Color Management") },
{ "view-display-intent-menu", NULL,
NC_("view-action", "Display _Rendering Intent") },
{ "view-softproof-intent-menu", NULL,
NC_("view-action", "Soft-Proofing Re_ndering Intent") },
{ "view-move-to-screen-menu", GIMP_STOCK_MOVE_TO_SCREEN, { "view-move-to-screen-menu", GIMP_STOCK_MOVE_TO_SCREEN,
NC_("view-action", "Move to Screen"), NULL, NULL, NULL, NC_("view-action", "Move to Screen"), NULL, NULL, NULL,
GIMP_HELP_VIEW_CHANGE_SCREEN }, GIMP_HELP_VIEW_CHANGE_SCREEN },
@@ -98,6 +109,12 @@ static const GimpActionEntry view_actions[] =
G_CALLBACK (view_zoom_fill_cmd_callback), G_CALLBACK (view_zoom_fill_cmd_callback),
GIMP_HELP_VIEW_ZOOM_FILL }, GIMP_HELP_VIEW_ZOOM_FILL },
{ "view-zoom-selection", "gimp-selection",
NC_("view-action", "Zoom to _Selection"), NULL,
NC_("view-action", "Adjust the zoom ratio so that the selection fills the window"),
G_CALLBACK (view_zoom_selection_cmd_callback),
GIMP_HELP_VIEW_ZOOM_SELECTION },
{ "view-zoom-revert", NULL, { "view-zoom-revert", NULL,
NC_("view-action", "Re_vert Zoom"), "grave", NC_("view-action", "Re_vert Zoom"), "grave",
NC_("view-action", "Restore the previous zoom level"), NC_("view-action", "Restore the previous zoom level"),
@@ -122,6 +139,19 @@ static const GimpActionEntry view_actions[] =
G_CALLBACK (view_display_filters_cmd_callback), G_CALLBACK (view_display_filters_cmd_callback),
GIMP_HELP_DISPLAY_FILTER_DIALOG }, GIMP_HELP_DISPLAY_FILTER_DIALOG },
{ "view-color-management-reset", GIMP_STOCK_RESET,
NC_("view-action", "As in _Preferences"), NULL,
NC_("view-action",
"Reset color management to what's configured in preferences"),
G_CALLBACK (view_color_management_reset_cmd_callback),
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-softproof-profile", NULL,
NC_("view-action", "Soft-_Proofing Profile..."), NULL,
NC_("view-action", "Set the soft-proofing profile"),
G_CALLBACK (view_softproof_profile_cmd_callback),
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-shrink-wrap", "zoom-fit-best", { "view-shrink-wrap", "zoom-fit-best",
NC_("view-action", "Shrink _Wrap"), "<primary>J", NC_("view-action", "Shrink _Wrap"), "<primary>J",
NC_("view-action", "Reduce the image window to the size of the image display"), NC_("view-action", "Reduce the image window to the size of the image display"),
@@ -144,6 +174,42 @@ static const GimpToggleActionEntry view_toggle_actions[] =
TRUE, TRUE,
GIMP_HELP_VIEW_DOT_FOR_DOT }, GIMP_HELP_VIEW_DOT_FOR_DOT },
{ "view-color-management-enable", NULL,
NC_("view-action", "_Color-Manage this View"), NULL,
NC_("view-action", "Use color management for this view"),
G_CALLBACK (view_color_management_enable_cmd_callback),
TRUE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-color-management-softproof", NULL,
NC_("view-action", "_Proof Colors"), NULL,
NC_("view-action", "Use this view for soft-proofing"),
G_CALLBACK (view_color_management_softproof_cmd_callback),
FALSE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-display-black-point-compensation", NULL,
NC_("view-action", "_Black Point Compensation"), NULL,
NC_("view-action", "Use black point compensation for image display"),
G_CALLBACK (view_display_bpc_cmd_callback),
TRUE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-softproof-black-point-compensation", NULL,
NC_("view-action", "_Black Point Compensation"), NULL,
NC_("view-action", "Use black point compensation for soft-proofing"),
G_CALLBACK (view_softproof_bpc_cmd_callback),
TRUE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-softproof-gamut-check", NULL,
NC_("view-action", "_Mark Out Of Gamut Colors"), NULL,
NC_("view-action", "When soft-proofing, mark colors which cannot "
"be represented in the target color space"),
G_CALLBACK (view_softproof_gamut_check_cmd_callback),
FALSE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-show-selection", NULL, { "view-show-selection", NULL,
NC_("view-action", "Show _Selection"), "<primary>T", NC_("view-action", "Show _Selection"), "<primary>T",
NC_("view-action", "Display the selection outline"), NC_("view-action", "Display the selection outline"),
@@ -388,6 +454,21 @@ static const GimpRadioActionEntry view_zoom_explicit_actions[] =
GIMP_HELP_VIEW_ZOOM_OTHER } GIMP_HELP_VIEW_ZOOM_OTHER }
}; };
static const GimpToggleActionEntry view_flip_actions[] =
{
{ "view-flip-horizontally", GIMP_STOCK_FLIP_HORIZONTAL,
NC_("view-action", "Flip Horizontally"), NULL, NULL,
G_CALLBACK (view_flip_horizontally_cmd_callback),
FALSE,
GIMP_HELP_VIEW_FLIP },
{ "view-flip-vertically", GIMP_STOCK_FLIP_VERTICAL,
NC_("view-action", "Flip Vertically"), NULL, NULL,
G_CALLBACK (view_flip_vertically_cmd_callback),
FALSE,
GIMP_HELP_VIEW_FLIP }
};
static const GimpEnumActionEntry view_rotate_absolute_actions[] = static const GimpEnumActionEntry view_rotate_absolute_actions[] =
{ {
{ "view-rotate-set-absolute", NULL, { "view-rotate-set-absolute", NULL,
@@ -396,8 +477,9 @@ static const GimpEnumActionEntry view_rotate_absolute_actions[] =
NULL }, NULL },
{ "view-rotate-reset", GIMP_STOCK_RESET, { "view-rotate-reset", GIMP_STOCK_RESET,
NC_("view-action", "_Reset to 0°"), "exclam", NC_("view-action", "_Reset Flip & Rotate"), "exclam",
NC_("view-action", "Reset the angle of rotation to 0°"), NC_("view-action",
"Reset flipping to unflipped and the angle of rotation to 0°"),
GIMP_ACTION_SELECT_SET_TO_DEFAULT, FALSE, GIMP_ACTION_SELECT_SET_TO_DEFAULT, FALSE,
GIMP_HELP_VIEW_ROTATE_RESET }, GIMP_HELP_VIEW_ROTATE_RESET },
}; };
@@ -435,6 +517,60 @@ static const GimpEnumActionEntry view_rotate_relative_actions[] =
GIMP_HELP_VIEW_ROTATE_345 } GIMP_HELP_VIEW_ROTATE_345 }
}; };
static const GimpRadioActionEntry view_display_intent_actions[] =
{
{ "view-display-intent-perceptual", NULL,
NC_("view-action", "_Perceptual"), NULL,
NC_("view-action", "Display rendering intent is perceptual"),
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-display-intent-relative-colorimetric", NULL,
NC_("view-action", "_Relative Colorimetric"), NULL,
NC_("view-action", "Display rendering intent is relative colorimetric"),
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-display-intent-saturation", NULL,
NC_("view-action", "_Saturation"), NULL,
NC_("view-action", "Display rendering intent is saturation"),
GIMP_COLOR_RENDERING_INTENT_SATURATION,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-display-intent-absolute-colorimetric", NULL,
NC_("view-action", "_Absolute Colorimetric"), NULL,
NC_("view-action", "Display rendering intent is absolute colorimetric"),
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
};
static const GimpRadioActionEntry view_softproof_intent_actions[] =
{
{ "view-softproof-intent-perceptual", NULL,
NC_("view-action", "_Perceptual"), NULL,
NC_("view-action", "Soft-proofing rendering intent is perceptual"),
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-softproof-intent-relative-colorimetric", NULL,
NC_("view-action", "_Relative Colorimetric"), NULL,
NC_("view-action", "Soft-proofing rendering intent is relative colorimetric"),
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-softproof-intent-saturation", NULL,
NC_("view-action", "_Saturation"), NULL,
NC_("view-action", "Soft-proofing rendering intent is saturation"),
GIMP_COLOR_RENDERING_INTENT_SATURATION,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
{ "view-softproof-intent-absolute-colorimetric", NULL,
NC_("view-action", "_Absolute Colorimetric"), NULL,
NC_("view-action", "Soft-proofing rendering intent is absolute colorimetric"),
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
};
static const GimpEnumActionEntry view_padding_color_actions[] = static const GimpEnumActionEntry view_padding_color_actions[] =
{ {
{ "view-padding-color-theme", NULL, { "view-padding-color-theme", NULL,
@@ -456,7 +592,7 @@ static const GimpEnumActionEntry view_padding_color_actions[] =
GIMP_HELP_VIEW_PADDING_COLOR }, GIMP_HELP_VIEW_PADDING_COLOR },
{ "view-padding-color-custom", "gtk-select-color", { "view-padding-color-custom", "gtk-select-color",
NC_("view-padding-color", "Select _Custom Color..."), NULL, NC_("view-padding-color", "_Custom Color..."), NULL,
NC_("view-padding-color", "Use an arbitrary color"), NC_("view-padding-color", "Use an arbitrary color"),
GIMP_CANVAS_PADDING_MODE_CUSTOM, FALSE, GIMP_CANVAS_PADDING_MODE_CUSTOM, FALSE,
GIMP_HELP_VIEW_PADDING_COLOR }, GIMP_HELP_VIEW_PADDING_COLOR },
@@ -571,6 +707,10 @@ view_actions_setup (GimpActionGroup *group)
10000, 10000,
G_CALLBACK (view_zoom_explicit_cmd_callback)); G_CALLBACK (view_zoom_explicit_cmd_callback));
gimp_action_group_add_toggle_actions (group, "view-action",
view_flip_actions,
G_N_ELEMENTS (view_flip_actions));
gimp_action_group_add_enum_actions (group, "view-action", gimp_action_group_add_enum_actions (group, "view-action",
view_rotate_absolute_actions, view_rotate_absolute_actions,
G_N_ELEMENTS (view_rotate_absolute_actions), G_N_ELEMENTS (view_rotate_absolute_actions),
@@ -581,6 +721,20 @@ view_actions_setup (GimpActionGroup *group)
G_N_ELEMENTS (view_rotate_relative_actions), G_N_ELEMENTS (view_rotate_relative_actions),
G_CALLBACK (view_rotate_relative_cmd_callback)); G_CALLBACK (view_rotate_relative_cmd_callback));
gimp_action_group_add_radio_actions (group, "view-action",
view_display_intent_actions,
G_N_ELEMENTS (view_display_intent_actions),
NULL,
GIMP_COLOR_MANAGEMENT_DISPLAY,
G_CALLBACK (view_display_intent_cmd_callback));
gimp_action_group_add_radio_actions (group, "view-action",
view_softproof_intent_actions,
G_N_ELEMENTS (view_softproof_intent_actions),
NULL,
GIMP_COLOR_MANAGEMENT_DISPLAY,
G_CALLBACK (view_softproof_intent_cmd_callback));
gimp_action_group_add_enum_actions (group, "view-padding-color", gimp_action_group_add_enum_actions (group, "view-padding-color",
view_padding_color_actions, view_padding_color_actions,
G_N_ELEMENTS (view_padding_color_actions), G_N_ELEMENTS (view_padding_color_actions),
@@ -627,17 +781,26 @@ void
view_actions_update (GimpActionGroup *group, view_actions_update (GimpActionGroup *group,
gpointer data) gpointer data)
{ {
GimpDisplay *display = action_data_get_display (data); GimpDisplay *display = action_data_get_display (data);
GimpImage *image = NULL; GimpImage *image = NULL;
GimpDisplayShell *shell = NULL; GimpDisplayShell *shell = NULL;
GimpDisplayOptions *options = NULL; GimpDisplayOptions *options = NULL;
gchar *label = NULL; GimpColorConfig *color_config = NULL;
gboolean fullscreen = FALSE; gchar *label = NULL;
gboolean revert_enabled = FALSE; /* able to revert zoom? */ gboolean fullscreen = FALSE;
gboolean revert_enabled = FALSE; /* able to revert zoom? */
gboolean flip_horizontally = FALSE;
gboolean flip_vertically = FALSE;
gboolean cm = FALSE;
gboolean sp = FALSE;
gboolean d_bpc = FALSE;
gboolean s_bpc = FALSE;
gboolean gammut = FALSE;
if (display) if (display)
{ {
GimpImageWindow *window; GimpImageWindow *window;
const gchar *action = NULL;
image = gimp_display_get_image (display); image = gimp_display_get_image (display);
shell = gimp_display_get_shell (display); shell = gimp_display_get_shell (display);
@@ -651,6 +814,72 @@ view_actions_update (GimpActionGroup *group,
shell->no_image_options); shell->no_image_options);
revert_enabled = gimp_display_shell_scale_can_revert (shell); revert_enabled = gimp_display_shell_scale_can_revert (shell);
flip_horizontally = shell->flip_horizontally;
flip_vertically = shell->flip_vertically;
color_config = gimp_display_shell_get_color_config (shell);
switch (gimp_color_config_get_mode (color_config))
{
case GIMP_COLOR_MANAGEMENT_OFF:
break;
case GIMP_COLOR_MANAGEMENT_DISPLAY:
cm = (image != NULL);
break;
case GIMP_COLOR_MANAGEMENT_SOFTPROOF:
cm = (image != NULL);
sp = (image != NULL);
break;
}
switch (gimp_color_config_get_display_intent (color_config))
{
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
action = "view-display-intent-perceptual";
break;
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
action = "view-display-intent-relative-colorimetric";
break;
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
action = "view-display-intent-saturation";
break;
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
action = "view-display-intent-absolute-colorimetric";
break;
}
gimp_action_group_set_action_active (group, action, TRUE);
switch (gimp_color_config_get_simulation_intent (color_config))
{
case GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL:
action = "view-softproof-intent-perceptual";
break;
case GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC:
action = "view-softproof-intent-relative-colorimetric";
break;
case GIMP_COLOR_RENDERING_INTENT_SATURATION:
action = "view-softproof-intent-saturation";
break;
case GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
action = "view-softproof-intent-absolute-colorimetric";
break;
}
gimp_action_group_set_action_active (group, action, TRUE);
d_bpc = gimp_color_config_get_display_bpc (color_config);
s_bpc = gimp_color_config_get_simulation_bpc (color_config);
gammut = gimp_color_config_get_simulation_gamut_check (color_config);
} }
#define SET_ACTIVE(action,condition) \ #define SET_ACTIVE(action,condition) \
@@ -680,43 +909,50 @@ view_actions_update (GimpActionGroup *group,
_("Re_vert Zoom")); _("Re_vert Zoom"));
} }
SET_SENSITIVE ("view-zoom", image); SET_SENSITIVE ("view-zoom", image);
SET_SENSITIVE ("view-zoom-minimum", image); SET_SENSITIVE ("view-zoom-minimum", image);
SET_SENSITIVE ("view-zoom-maximum", image); SET_SENSITIVE ("view-zoom-maximum", image);
SET_SENSITIVE ("view-zoom-in", image); SET_SENSITIVE ("view-zoom-in", image);
SET_SENSITIVE ("view-zoom-in-accel", image); SET_SENSITIVE ("view-zoom-in-accel", image);
SET_SENSITIVE ("view-zoom-in-skip", image); SET_SENSITIVE ("view-zoom-in-skip", image);
SET_SENSITIVE ("view-zoom-out", image); SET_SENSITIVE ("view-zoom-out", image);
SET_SENSITIVE ("view-zoom-out-accel", image); SET_SENSITIVE ("view-zoom-out-accel", image);
SET_SENSITIVE ("view-zoom-out-skip", image); SET_SENSITIVE ("view-zoom-out-skip", image);
SET_SENSITIVE ("view-zoom-fit-in", image); SET_SENSITIVE ("view-zoom-fit-in", image);
SET_SENSITIVE ("view-zoom-fill", image); SET_SENSITIVE ("view-zoom-fill", image);
SET_SENSITIVE ("view-zoom-revert", image); SET_SENSITIVE ("view-zoom-selection", image);
SET_SENSITIVE ("view-zoom-revert", image);
SET_SENSITIVE ("view-zoom-16-1", image); SET_SENSITIVE ("view-zoom-16-1", image);
SET_SENSITIVE ("view-zoom-16-1-accel", image); SET_SENSITIVE ("view-zoom-16-1-accel", image);
SET_SENSITIVE ("view-zoom-8-1", image); SET_SENSITIVE ("view-zoom-8-1", image);
SET_SENSITIVE ("view-zoom-8-1-accel", image); SET_SENSITIVE ("view-zoom-8-1-accel", image);
SET_SENSITIVE ("view-zoom-4-1", image); SET_SENSITIVE ("view-zoom-4-1", image);
SET_SENSITIVE ("view-zoom-4-1-accel", image); SET_SENSITIVE ("view-zoom-4-1-accel", image);
SET_SENSITIVE ("view-zoom-2-1", image); SET_SENSITIVE ("view-zoom-2-1", image);
SET_SENSITIVE ("view-zoom-2-1-accel", image); SET_SENSITIVE ("view-zoom-2-1-accel", image);
SET_SENSITIVE ("view-zoom-1-1", image); SET_SENSITIVE ("view-zoom-1-1", image);
SET_SENSITIVE ("view-zoom-1-1-accel", image); SET_SENSITIVE ("view-zoom-1-1-accel", image);
SET_SENSITIVE ("view-zoom-1-2", image); SET_SENSITIVE ("view-zoom-1-2", image);
SET_SENSITIVE ("view-zoom-1-4", image); SET_SENSITIVE ("view-zoom-1-4", image);
SET_SENSITIVE ("view-zoom-1-8", image); SET_SENSITIVE ("view-zoom-1-8", image);
SET_SENSITIVE ("view-zoom-1-16", image); SET_SENSITIVE ("view-zoom-1-16", image);
SET_SENSITIVE ("view-zoom-other", image); SET_SENSITIVE ("view-zoom-other", image);
SET_SENSITIVE ("view-rotate-reset", image); SET_SENSITIVE ("view-flip-horizontally", image);
SET_SENSITIVE ("view-rotate-15", image); SET_ACTIVE ("view-flip-horizontally", flip_horizontally);
SET_SENSITIVE ("view-rotate-345", image);
SET_SENSITIVE ("view-rotate-90", image); SET_SENSITIVE ("view-flip-vertically", image);
SET_SENSITIVE ("view-rotate-180", image); SET_ACTIVE ("view-flip-vertically", flip_vertically);
SET_SENSITIVE ("view-rotate-270", image);
SET_SENSITIVE ("view-rotate-other", image); SET_SENSITIVE ("view-rotate-reset", image);
SET_SENSITIVE ("view-rotate-15", image);
SET_SENSITIVE ("view-rotate-345", image);
SET_SENSITIVE ("view-rotate-90", image);
SET_SENSITIVE ("view-rotate-180", image);
SET_SENSITIVE ("view-rotate-270", image);
SET_SENSITIVE ("view-rotate-other", image);
if (image) if (image)
{ {
@@ -727,6 +963,27 @@ view_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("view-navigation-window", image); SET_SENSITIVE ("view-navigation-window", image);
SET_SENSITIVE ("view-display-filters", image); SET_SENSITIVE ("view-display-filters", image);
SET_SENSITIVE ("view-color-management-enable", image);
SET_ACTIVE ("view-color-management-enable", cm);
SET_SENSITIVE ("view-color-management-softproof", image);
SET_ACTIVE ("view-color-management-softproof", sp);
SET_SENSITIVE ("view-display-intent-perceptual", cm);
SET_SENSITIVE ("view-display-intent-relative-colorimetric", cm);
SET_SENSITIVE ("view-display-intent-saturation", cm);
SET_SENSITIVE ("view-display-intent-absolute-colorimetric", cm);
SET_SENSITIVE ("view-display-black-point-compensation", cm);
SET_ACTIVE ("view-display-black-point-compensation", d_bpc);
SET_SENSITIVE ("view-softproof-profile", sp);
SET_SENSITIVE ("view-softproof-intent-perceptual", sp);
SET_SENSITIVE ("view-softproof-intent-relative-colorimetric", sp);
SET_SENSITIVE ("view-softproof-intent-saturation", sp);
SET_SENSITIVE ("view-softproof-intent-absolute-colorimetric", sp);
SET_SENSITIVE ("view-softproof-black-point-compensation", sp);
SET_ACTIVE ("view-softproof-black-point-compensation", s_bpc);
SET_SENSITIVE ("view-softproof-gamut-check", sp);
SET_ACTIVE ("view-softproof-gamut-check", gammut);
SET_SENSITIVE ("view-color-management-reset", image);
SET_SENSITIVE ("view-show-selection", image); SET_SENSITIVE ("view-show-selection", image);
SET_ACTIVE ("view-show-selection", display && options->show_selection); SET_ACTIVE ("view-show-selection", display && options->show_selection);
SET_SENSITIVE ("view-show-layer-boundary", image); SET_SENSITIVE ("view-show-layer-boundary", image);
@@ -859,9 +1116,32 @@ static void
view_actions_set_rotate (GimpActionGroup *group, view_actions_set_rotate (GimpActionGroup *group,
GimpDisplayShell *shell) GimpDisplayShell *shell)
{ {
gchar *label; const gchar *flip;
gchar *label;
label = g_strdup_printf (_("_Rotate (%d°)"), (gint) shell->rotate_angle); if (shell->flip_horizontally &&
shell->flip_vertically)
{
/* please preserve the trailing space */
flip = _("(H+V) ");
}
else if (shell->flip_horizontally)
{
/* please preserve the trailing space */
flip = _("(H) ");
}
else if (shell->flip_vertically)
{
/* please preserve the trailing space */
flip = _("(V) ");
}
else
{
flip = "";
}
label = g_strdup_printf (_("_Flip %s& Rotate (%d°)"),
flip, (gint) shell->rotate_angle);
gimp_action_group_set_action_label (group, "view-rotate-menu", label); gimp_action_group_set_action_label (group, "view-rotate-menu", label);
g_free (label); g_free (label);
} }

View File

@@ -21,6 +21,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h" #include "libgimpmath/gimpmath.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h" #include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h" #include "actions-types.h"
@@ -54,6 +55,9 @@
#include "display/gimpdisplayshell-close.h" #include "display/gimpdisplayshell-close.h"
#include "display/gimpimagewindow.h" #include "display/gimpimagewindow.h"
#include "dialogs/color-profile-dialog.h"
#include "dialogs/dialogs.h"
#include "actions.h" #include "actions.h"
#include "view-commands.h" #include "view-commands.h"
@@ -72,10 +76,17 @@
/* local function prototypes */ /* local function prototypes */
static void view_padding_color_dialog_update (GimpColorDialog *dialog, static void view_softproof_profile_callback (GtkWidget *dialog,
const GimpRGB *color, GimpImage *image,
GimpColorDialogState state, GimpColorProfile *new_profile,
GimpDisplayShell *shell); GFile *new_file,
GimpColorRenderingIntent intent,
gboolean bpc,
gpointer user_data);
static void view_padding_color_dialog_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpDisplayShell *shell);
/* public functions */ /* public functions */
@@ -134,6 +145,25 @@ view_zoom_fill_cmd_callback (GtkAction *action,
gimp_display_shell_scale_fill (gimp_display_get_shell (display)); gimp_display_shell_scale_fill (gimp_display_get_shell (display));
} }
void
view_zoom_selection_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *display;
GimpImage *image;
gint x, y, width, height;
return_if_no_display (display, data);
return_if_no_image (image, data);
gimp_item_bounds (GIMP_ITEM (gimp_image_get_mask (image)),
&x, &y, &width, &height);
gimp_display_shell_scale_to_rectangle (gimp_display_get_shell (display),
GIMP_ZOOM_IN,
x, y, width, height,
FALSE);
}
void void
view_zoom_revert_cmd_callback (GtkAction *action, view_zoom_revert_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
@@ -286,6 +316,44 @@ view_dot_for_dot_cmd_callback (GtkAction *action,
} }
} }
void
view_flip_horizontally_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *display;
GimpDisplayShell *shell;
gboolean active;
return_if_no_display (display, data);
shell = gimp_display_get_shell (display);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (active != shell->flip_horizontally)
{
gimp_display_shell_flip (shell, active, shell->flip_vertically);
}
}
void
view_flip_vertically_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *display;
GimpDisplayShell *shell;
gboolean active;
return_if_no_display (display, data);
shell = gimp_display_get_shell (display);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (active != shell->flip_vertically)
{
gimp_display_shell_flip (shell, shell->flip_horizontally, active);
}
}
void void
view_rotate_absolute_cmd_callback (GtkAction *action, view_rotate_absolute_cmd_callback (GtkAction *action,
gint value, gint value,
@@ -305,6 +373,9 @@ view_rotate_absolute_cmd_callback (GtkAction *action,
TRUE); TRUE);
gimp_display_shell_rotate_to (shell, angle); gimp_display_shell_rotate_to (shell, angle);
if (value == GIMP_ACTION_SELECT_SET_TO_DEFAULT)
gimp_display_shell_flip (shell, FALSE, FALSE);
} }
void void
@@ -411,18 +482,262 @@ view_display_filters_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
GtkWidget *dialog;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (! shell->filters_dialog) #define FILTERS_DIALOG_KEY "gimp-display-filters-dialog"
{
shell->filters_dialog = gimp_display_shell_filter_dialog_new (shell);
g_signal_connect (shell->filters_dialog, "destroy", dialog = dialogs_get_dialog (G_OBJECT (shell), FILTERS_DIALOG_KEY);
G_CALLBACK (gtk_widget_destroyed),
&shell->filters_dialog); if (! dialog)
{
dialog = gimp_display_shell_filter_dialog_new (shell);
dialogs_attach_dialog (G_OBJECT (shell), FILTERS_DIALOG_KEY, dialog);
} }
gtk_window_present (GTK_WINDOW (shell->filters_dialog)); gtk_window_present (GTK_WINDOW (dialog));
}
void
view_color_management_reset_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *global_config;
GimpColorConfig *shell_config;
return_if_no_shell (shell, data);
global_config = GIMP_CORE_CONFIG (shell->display->config)->color_management;
shell_config = gimp_display_shell_get_color_config (shell);
gimp_config_copy (GIMP_CONFIG (global_config),
GIMP_CONFIG (shell_config),
0);
shell->color_config_set = FALSE;
}
void
view_color_management_enable_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
GimpColorManagementMode mode;
gboolean active;
return_if_no_shell (shell, data);
color_config = gimp_display_shell_get_color_config (shell);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
mode = gimp_color_config_get_mode (color_config);
if (active)
{
if (mode != GIMP_COLOR_MANAGEMENT_SOFTPROOF)
mode = GIMP_COLOR_MANAGEMENT_DISPLAY;
}
else
{
mode = GIMP_COLOR_MANAGEMENT_OFF;
}
if (mode != gimp_color_config_get_mode (color_config))
{
g_object_set (color_config,
"mode", mode,
NULL);
shell->color_config_set = TRUE;
}
}
void
view_color_management_softproof_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
GimpColorManagementMode mode;
gboolean active;
return_if_no_shell (shell, data);
color_config = gimp_display_shell_get_color_config (shell);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
mode = gimp_color_config_get_mode (color_config);
if (active)
{
mode = GIMP_COLOR_MANAGEMENT_SOFTPROOF;
}
else
{
if (mode != GIMP_COLOR_MANAGEMENT_OFF)
mode = GIMP_COLOR_MANAGEMENT_DISPLAY;
}
if (mode != gimp_color_config_get_mode (color_config))
{
g_object_set (color_config,
"mode", mode,
NULL);
shell->color_config_set = TRUE;
}
}
void
view_display_intent_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
GimpColorRenderingIntent value;
return_if_no_shell (shell, data);
color_config = gimp_display_shell_get_color_config (shell);
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
if (value != gimp_color_config_get_display_intent (color_config))
{
g_object_set (color_config,
"display-rendering-intent", value,
NULL);
shell->color_config_set = TRUE;
}
}
void
view_display_bpc_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
gboolean active;
return_if_no_shell (shell, data);
color_config = gimp_display_shell_get_color_config (shell);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (active != gimp_color_config_get_display_bpc (color_config))
{
g_object_set (color_config,
"display-use-black-point-compensation", active,
NULL);
shell->color_config_set = TRUE;
}
}
void
view_softproof_profile_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpDisplayShell *shell;
GimpColorConfig *color_config;
GtkWidget *dialog;
return_if_no_image (image, data);
return_if_no_shell (shell, data);
color_config = gimp_display_shell_get_color_config (shell);
#define SOFTPROOF_PROFILE_DIALOG_KEY "gimp-softproof-profile-dialog"
dialog = dialogs_get_dialog (G_OBJECT (shell), SOFTPROOF_PROFILE_DIALOG_KEY);
if (! dialog)
{
GimpColorProfile *current_profile;
current_profile = gimp_color_config_get_simulation_color_profile (color_config,
NULL);
dialog = color_profile_dialog_new (COLOR_PROFILE_DIALOG_SELECT_SOFTPROOF_PROFILE,
image,
action_data_get_context (data),
GTK_WIDGET (shell),
current_profile,
NULL,
0, 0,
view_softproof_profile_callback,
shell);
dialogs_attach_dialog (G_OBJECT (shell),
SOFTPROOF_PROFILE_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
view_softproof_intent_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
GimpColorRenderingIntent value;
return_if_no_shell (shell, data);
color_config = gimp_display_shell_get_color_config (shell);
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
if (value != gimp_color_config_get_simulation_intent (color_config))
{
g_object_set (color_config,
"simulation-rendering-intent", value,
NULL);
shell->color_config_set = TRUE;
}
}
void
view_softproof_bpc_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
gboolean active;
return_if_no_shell (shell, data);
color_config = gimp_display_shell_get_color_config (shell);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (active != gimp_color_config_get_simulation_bpc (color_config))
{
g_object_set (color_config,
"simulation-use-black-point-compensation", active,
NULL);
shell->color_config_set = TRUE;
}
}
void
view_softproof_gamut_check_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplayShell *shell;
GimpColorConfig *color_config;
gboolean active;
return_if_no_shell (shell, data);
color_config = gimp_display_shell_get_color_config (shell);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (active != gimp_color_config_get_simulation_gamut_check (color_config))
{
g_object_set (color_config,
"simulation-gamut-check", active,
NULL);
shell->color_config_set = TRUE;
}
} }
void void
@@ -430,13 +745,15 @@ view_toggle_selection_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_show_selection (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_show_selection (shell, active); if (active != gimp_display_shell_get_show_selection (shell))
{
gimp_display_shell_set_show_selection (shell, active);
}
} }
void void
@@ -444,13 +761,15 @@ view_toggle_layer_boundary_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_show_layer (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_show_layer (shell, active); if (active != gimp_display_shell_get_show_layer (shell))
{
gimp_display_shell_set_show_layer (shell, active);
}
} }
void void
@@ -458,13 +777,15 @@ view_toggle_menubar_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_show_menubar (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_show_menubar (shell, active); if (active != gimp_display_shell_get_show_menubar (shell))
{
gimp_display_shell_set_show_menubar (shell, active);
}
} }
void void
@@ -472,13 +793,15 @@ view_toggle_rulers_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_show_rulers (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_show_rulers (shell, active); if (active != gimp_display_shell_get_show_rulers (shell))
{
gimp_display_shell_set_show_rulers (shell, active);
}
} }
void void
@@ -486,13 +809,15 @@ view_toggle_scrollbars_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_show_scrollbars (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_show_scrollbars (shell, active); if (active != gimp_display_shell_get_show_scrollbars (shell))
{
gimp_display_shell_set_show_scrollbars (shell, active);
}
} }
void void
@@ -500,13 +825,15 @@ view_toggle_statusbar_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_show_statusbar (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_show_statusbar (shell, active); if (active != gimp_display_shell_get_show_statusbar (shell))
{
gimp_display_shell_set_show_statusbar (shell, active);
}
} }
void void
@@ -514,13 +841,15 @@ view_toggle_guides_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_show_guides (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_show_guides (shell, active); if (active != gimp_display_shell_get_show_guides (shell))
{
gimp_display_shell_set_show_guides (shell, active);
}
} }
void void
@@ -528,13 +857,15 @@ view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_show_grid (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_show_grid (shell, active); if (active != gimp_display_shell_get_show_grid (shell))
{
gimp_display_shell_set_show_grid (shell, active);
}
} }
void void
@@ -542,13 +873,15 @@ view_toggle_sample_points_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_show_sample_points (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_show_sample_points (shell, active); if (active != gimp_display_shell_get_show_sample_points (shell))
{
gimp_display_shell_set_show_sample_points (shell, active);
}
} }
void void
@@ -556,13 +889,15 @@ view_snap_to_guides_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_snap_to_guides (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_snap_to_guides (shell, active); if (active != gimp_display_shell_get_snap_to_guides (shell))
{
gimp_display_shell_set_snap_to_guides (shell, active);
}
} }
void void
@@ -570,13 +905,15 @@ view_snap_to_grid_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_snap_to_grid (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_snap_to_grid (shell, active); if (active != gimp_display_shell_get_snap_to_grid (shell))
{
gimp_display_shell_set_snap_to_grid (shell, active);
}
} }
void void
@@ -584,13 +921,15 @@ view_snap_to_canvas_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_snap_to_canvas (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_snap_to_canvas (shell, active); if (active != gimp_display_shell_get_snap_to_canvas (shell))
{
gimp_display_shell_set_snap_to_canvas (shell, active);
}
} }
void void
@@ -598,13 +937,15 @@ view_snap_to_vectors_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); gboolean active;
return_if_no_shell (shell, data); return_if_no_shell (shell, data);
if (active == gimp_display_shell_get_snap_to_vectors (shell)) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
gimp_display_shell_set_snap_to_vectors (shell, active); if (active != gimp_display_shell_get_snap_to_vectors (shell))
{
gimp_display_shell_set_snap_to_vectors (shell, active);
}
} }
void void
@@ -632,12 +973,14 @@ view_padding_color_cmd_callback (GtkAction *action,
else else
options = shell->options; options = shell->options;
#define PADDING_COLOR_DIALOG_KEY "gimp-padding-color-dialog"
switch ((GimpCanvasPaddingMode) value) switch ((GimpCanvasPaddingMode) value)
{ {
case GIMP_CANVAS_PADDING_MODE_DEFAULT: case GIMP_CANVAS_PADDING_MODE_DEFAULT:
case GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK: case GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK:
case GIMP_CANVAS_PADDING_MODE_DARK_CHECK: case GIMP_CANVAS_PADDING_MODE_DARK_CHECK:
g_object_set_data (G_OBJECT (shell), "padding-color-dialog", NULL); dialogs_destroy_dialog (G_OBJECT (shell), PADDING_COLOR_DIALOG_KEY);
options->padding_mode_set = TRUE; options->padding_mode_set = TRUE;
@@ -647,17 +990,16 @@ view_padding_color_cmd_callback (GtkAction *action,
case GIMP_CANVAS_PADDING_MODE_CUSTOM: case GIMP_CANVAS_PADDING_MODE_CUSTOM:
{ {
GtkWidget *color_dialog; GtkWidget *dialog;
color_dialog = g_object_get_data (G_OBJECT (shell), dialog = dialogs_get_dialog (G_OBJECT (shell), PADDING_COLOR_DIALOG_KEY);
"padding-color-dialog");
if (! color_dialog) if (! dialog)
{ {
GimpImage *image = gimp_display_get_image (display); GimpImage *image = gimp_display_get_image (display);
GimpDisplayShell *shell = gimp_display_get_shell (display); GimpDisplayShell *shell = gimp_display_get_shell (display);
color_dialog = dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (image), gimp_color_dialog_new (GIMP_VIEWABLE (image),
action_data_get_context (data), action_data_get_context (data),
_("Set Canvas Padding Color"), _("Set Canvas Padding Color"),
@@ -668,21 +1010,20 @@ view_padding_color_cmd_callback (GtkAction *action,
&options->padding_color, &options->padding_color,
FALSE, FALSE); FALSE, FALSE);
g_signal_connect (color_dialog, "update", g_signal_connect (dialog, "update",
G_CALLBACK (view_padding_color_dialog_update), G_CALLBACK (view_padding_color_dialog_update),
shell); shell);
g_object_set_data_full (G_OBJECT (shell), "padding-color-dialog", dialogs_attach_dialog (G_OBJECT (shell),
color_dialog, PADDING_COLOR_DIALOG_KEY, dialog);
(GDestroyNotify) gtk_widget_destroy);
} }
gtk_window_present (GTK_WINDOW (color_dialog)); gtk_window_present (GTK_WINDOW (dialog));
} }
break; break;
case GIMP_CANVAS_PADDING_MODE_RESET: case GIMP_CANVAS_PADDING_MODE_RESET:
g_object_set_data (G_OBJECT (shell), "padding-color-dialog", NULL); dialogs_destroy_dialog (G_OBJECT (shell), PADDING_COLOR_DIALOG_KEY);
{ {
GimpDisplayOptions *default_options; GimpDisplayOptions *default_options;
@@ -737,6 +1078,32 @@ view_fullscreen_cmd_callback (GtkAction *action,
/* private functions */ /* private functions */
static void
view_softproof_profile_callback (GtkWidget *dialog,
GimpImage *image,
GimpColorProfile *new_profile,
GFile *new_file,
GimpColorRenderingIntent intent,
gboolean bpc,
gpointer user_data)
{
GimpDisplayShell *shell = user_data;
GimpColorConfig *color_config;
gchar *path = NULL;
color_config = gimp_display_shell_get_color_config (shell);
if (new_file)
path = g_file_get_path (new_file);
g_object_set (color_config,
"printer-profile", path,
NULL);
shell->color_config_set = TRUE;
gtk_widget_destroy (dialog);
}
static void static void
view_padding_color_dialog_update (GimpColorDialog *dialog, view_padding_color_dialog_update (GimpColorDialog *dialog,
const GimpRGB *color, const GimpRGB *color,
@@ -769,7 +1136,7 @@ view_padding_color_dialog_update (GimpColorDialog *dialog,
/* fallthru */ /* fallthru */
case GIMP_COLOR_DIALOG_CANCEL: case GIMP_COLOR_DIALOG_CANCEL:
g_object_set_data (G_OBJECT (shell), "padding-color-dialog", NULL); gtk_widget_destroy (GTK_WIDGET (dialog));
break; break;
default: default:

View File

@@ -19,83 +19,113 @@
#define __VIEW_COMMANDS_H__ #define __VIEW_COMMANDS_H__
void view_new_cmd_callback (GtkAction *action, void view_new_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_close_cmd_callback (GtkAction *action, void view_close_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_zoom_fit_in_cmd_callback (GtkAction *action, void view_zoom_fit_in_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_zoom_fill_cmd_callback (GtkAction *action, void view_zoom_fill_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_zoom_revert_cmd_callback (GtkAction *action, void view_zoom_selection_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_zoom_cmd_callback (GtkAction *action, void view_zoom_revert_cmd_callback (GtkAction *action,
gint value, gpointer data);
gpointer data); void view_zoom_cmd_callback (GtkAction *action,
void view_zoom_explicit_cmd_callback (GtkAction *action, gint value,
GtkAction *current, gpointer data);
gpointer data); void view_zoom_explicit_cmd_callback (GtkAction *action,
void view_zoom_other_cmd_callback (GtkAction *action, GtkAction *current,
gpointer data); gpointer data);
void view_dot_for_dot_cmd_callback (GtkAction *action, void view_zoom_other_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_dot_for_dot_cmd_callback (GtkAction *action,
gpointer data);
void view_scroll_horizontal_cmd_callback (GtkAction *action, void view_scroll_horizontal_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
void view_scroll_vertical_cmd_callback (GtkAction *action, void view_scroll_vertical_cmd_callback (GtkAction *action,
gint value, gint value,
gpointer data); gpointer data);
void view_rotate_absolute_cmd_callback (GtkAction *action, void view_flip_horizontally_cmd_callback (GtkAction *action,
gint value, gpointer data);
gpointer data); void view_flip_vertically_cmd_callback (GtkAction *action,
void view_rotate_relative_cmd_callback (GtkAction *action, gpointer data);
gint value,
gpointer data);
void view_rotate_other_cmd_callback (GtkAction *action,
gpointer data);
void view_navigation_window_cmd_callback (GtkAction *action, void view_rotate_absolute_cmd_callback (GtkAction *action,
gpointer data); gint value,
void view_display_filters_cmd_callback (GtkAction *action, gpointer data);
gpointer data); void view_rotate_relative_cmd_callback (GtkAction *action,
void view_toggle_selection_cmd_callback (GtkAction *action, gint value,
gpointer data); gpointer data);
void view_toggle_layer_boundary_cmd_callback (GtkAction *action, void view_rotate_other_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_toggle_menubar_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_rulers_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_scrollbars_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_statusbar_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_guides_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_sample_points_cmd_callback (GtkAction *action,
gpointer data);
void view_snap_to_guides_cmd_callback (GtkAction *action, void view_navigation_window_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_snap_to_grid_cmd_callback (GtkAction *action, void view_display_filters_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_snap_to_canvas_cmd_callback (GtkAction *action,
gpointer data);
void view_snap_to_vectors_cmd_callback (GtkAction *action,
gpointer data);
void view_padding_color_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void view_shrink_wrap_cmd_callback (GtkAction *action, void view_color_management_reset_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_fullscreen_cmd_callback (GtkAction *action, void view_color_management_enable_cmd_callback(GtkAction *action,
gpointer data); gpointer data);
void view_color_management_softproof_cmd_callback
(GtkAction *action,
gpointer data);
void view_display_intent_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void view_display_bpc_cmd_callback (GtkAction *action,
gpointer data);
void view_softproof_profile_cmd_callback (GtkAction *action,
gpointer data);
void view_softproof_intent_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void view_softproof_bpc_cmd_callback (GtkAction *action,
gpointer data);
void view_softproof_gamut_check_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_selection_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_layer_boundary_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_menubar_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_rulers_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_scrollbars_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_statusbar_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_guides_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_sample_points_cmd_callback (GtkAction *action,
gpointer data);
void view_snap_to_guides_cmd_callback (GtkAction *action,
gpointer data);
void view_snap_to_grid_cmd_callback (GtkAction *action,
gpointer data);
void view_snap_to_canvas_cmd_callback (GtkAction *action,
gpointer data);
void view_snap_to_vectors_cmd_callback (GtkAction *action,
gpointer data);
void view_padding_color_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void view_shrink_wrap_cmd_callback (GtkAction *action,
gpointer data);
void view_fullscreen_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __VIEW_COMMANDS_H__ */ #endif /* __VIEW_COMMANDS_H__ */

View File

@@ -222,7 +222,7 @@ windows_actions_setup (GimpActionGroup *group)
G_CALLBACK (windows_actions_recent_remove), G_CALLBACK (windows_actions_recent_remove),
group, 0); group, 0);
for (list = GIMP_LIST (global_recent_docks)->list; for (list = GIMP_LIST (global_recent_docks)->queue->head;
list; list;
list = g_list_next (list)) list = g_list_next (list))
{ {

View File

@@ -53,16 +53,16 @@ void
windows_hide_docks_cmd_callback (GtkAction *action, windows_hide_docks_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
Gimp *gimp; Gimp *gimp;
gboolean active;
return_if_no_gimp (gimp, data); return_if_no_gimp (gimp, data);
if (GIMP_GUI_CONFIG (gimp->config)->hide_docks == active) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
g_object_set (gimp->config, if (active != GIMP_GUI_CONFIG (gimp->config)->hide_docks)
"hide-docks", active, g_object_set (gimp->config,
NULL); "hide-docks", active,
NULL);
} }
void void
@@ -70,32 +70,32 @@ windows_set_tabs_position_cmd_callback (GtkAction *action,
GtkAction *current, GtkAction *current,
gpointer data) gpointer data)
{ {
GimpPosition value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action)); Gimp *gimp;
Gimp *gimp; GimpPosition value;
return_if_no_gimp (gimp, data); return_if_no_gimp (gimp, data);
if (GIMP_GUI_CONFIG (gimp->config)->tabs_position == value) value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
return;
g_object_set (gimp->config, if (value != GIMP_GUI_CONFIG (gimp->config)->tabs_position)
"tabs-position", value, g_object_set (gimp->config,
NULL); "tabs-position", value,
NULL);
} }
void void
windows_use_single_window_mode_cmd_callback (GtkAction *action, windows_use_single_window_mode_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
{ {
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
Gimp *gimp; Gimp *gimp;
gboolean active;
return_if_no_gimp (gimp, data); return_if_no_gimp (gimp, data);
if (GIMP_GUI_CONFIG (gimp->config)->single_window_mode == active) active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
return;
g_object_set (gimp->config, if (active != GIMP_GUI_CONFIG (gimp->config)->single_window_mode)
"single-window-mode", active, g_object_set (gimp->config,
NULL); "single-window-mode", active,
NULL);
} }
void void

View File

@@ -48,6 +48,7 @@
#include "gegl/gimp-gegl.h" #include "gegl/gimp-gegl.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimp-batch.h"
#include "core/gimp-user-install.h" #include "core/gimp-user-install.h"
#include "file/file-open.h" #include "file/file-open.h"
@@ -59,9 +60,7 @@
#endif #endif
#include "app.h" #include "app.h"
#include "batch.h"
#include "errors.h" #include "errors.h"
#include "units.h"
#include "language.h" #include "language.h"
#include "gimp-debug.h" #include "gimp-debug.h"
@@ -210,8 +209,6 @@ app_run (const gchar *full_prog_name,
errors_init (gimp, full_prog_name, use_debug_handler, stack_trace_mode); errors_init (gimp, full_prog_name, use_debug_handler, stack_trace_mode);
units_init (gimp);
/* Check if the user's gimp_directory exists /* Check if the user's gimp_directory exists
*/ */
gimpdir = gimp_directory_file (NULL); gimpdir = gimp_directory_file (NULL);
@@ -219,7 +216,8 @@ app_run (const gchar *full_prog_name,
if (g_file_query_file_type (gimpdir, G_FILE_QUERY_INFO_NONE, NULL) != if (g_file_query_file_type (gimpdir, G_FILE_QUERY_INFO_NONE, NULL) !=
G_FILE_TYPE_DIRECTORY) G_FILE_TYPE_DIRECTORY)
{ {
GimpUserInstall *install = gimp_user_install_new (be_verbose); GimpUserInstall *install = gimp_user_install_new (G_OBJECT (gimp),
be_verbose);
#ifdef GIMP_CONSOLE_COMPILATION #ifdef GIMP_CONSOLE_COMPILATION
gimp_user_install_run (install); gimp_user_install_run (install);
@@ -301,7 +299,7 @@ app_run (const gchar *full_prog_name,
} }
if (run_loop) if (run_loop)
batch_run (gimp, batch_interpreter, batch_commands); gimp_batch_run (gimp, batch_interpreter, batch_commands);
if (run_loop) if (run_loop)
{ {

View File

@@ -40,6 +40,8 @@ libappconfig_a_sources = \
gimpconfig-utils.h \ gimpconfig-utils.h \
gimpcoreconfig.c \ gimpcoreconfig.c \
gimpcoreconfig.h \ gimpcoreconfig.h \
gimpdialogconfig.c \
gimpdialogconfig.h \
gimpdisplayconfig.c \ gimpdisplayconfig.c \
gimpdisplayconfig.h \ gimpdisplayconfig.h \
gimpdisplayoptions.c \ gimpdisplayoptions.c \
@@ -110,7 +112,6 @@ test_config_LDADD = \
$(libgimpmath) \ $(libgimpmath) \
$(libgimpconfig) \ $(libgimpconfig) \
$(libgimpbase) \ $(libgimpbase) \
$(LCMS_LIBS) \
$(PANGOCAIRO_LIBS) \ $(PANGOCAIRO_LIBS) \
$(HARFBUZZ_LIBS) \ $(HARFBUZZ_LIBS) \
$(GDK_PIXBUF_LIBS) \ $(GDK_PIXBUF_LIBS) \
@@ -119,7 +120,7 @@ test_config_LDADD = \
$(GEXIV2_LIBS) \ $(GEXIV2_LIBS) \
$(Z_LIBS) \ $(Z_LIBS) \
$(JSON_C_LIBS) \ $(JSON_C_LIBS) \
$(LIBMYPAINTGEGL_LIBS) \ $(LIBMYPAINT_LIBS) \
$(libm) $(libm)
CLEANFILES = $(EXTRA_PROGRAMS) foorc CLEANFILES = $(EXTRA_PROGRAMS) foorc

View File

@@ -35,6 +35,7 @@ typedef struct _GimpGeglConfig GimpGeglConfig;
typedef struct _GimpCoreConfig GimpCoreConfig; typedef struct _GimpCoreConfig GimpCoreConfig;
typedef struct _GimpDisplayConfig GimpDisplayConfig; typedef struct _GimpDisplayConfig GimpDisplayConfig;
typedef struct _GimpGuiConfig GimpGuiConfig; typedef struct _GimpGuiConfig GimpGuiConfig;
typedef struct _GimpDialogConfig GimpDialogConfig;
typedef struct _GimpPluginConfig GimpPluginConfig; typedef struct _GimpPluginConfig GimpPluginConfig;
typedef struct _GimpRc GimpRc; typedef struct _GimpRc GimpRc;

View File

@@ -56,13 +56,18 @@ static void dump_with_linebreaks (GOutputStream *output,
gboolean gboolean
gimp_config_dump (GimpConfigDumpFormat format) gimp_config_dump (GObject *gimp,
GimpConfigDumpFormat format)
{ {
GOutputStream *output; GOutputStream *output;
GimpConfigWriter *writer; GimpConfigWriter *writer;
GimpConfig *rc; GimpConfig *rc;
rc = g_object_new (GIMP_TYPE_RC, NULL); g_return_val_if_fail (G_IS_OBJECT (gimp), FALSE);
rc = g_object_new (GIMP_TYPE_RC,
"gimp", gimp,
NULL);
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
output = g_win32_output_stream_new ((gpointer) 1, FALSE); output = g_win32_output_stream_new ((gpointer) 1, FALSE);

View File

@@ -30,7 +30,8 @@ typedef enum
} GimpConfigDumpFormat; } GimpConfigDumpFormat;
gboolean gimp_config_dump (GimpConfigDumpFormat format); gboolean gimp_config_dump (GObject *gimp,
GimpConfigDumpFormat format);
#endif /* __GIMP_CONFIG_DUMP_H__ */ #endif /* __GIMP_CONFIG_DUMP_H__ */

View File

@@ -47,7 +47,7 @@ gimp_config_connect_notify (GObject *src,
(dest_spec->flags & G_PARAM_WRITABLE) && (dest_spec->flags & G_PARAM_WRITABLE) &&
(dest_spec->flags & G_PARAM_CONSTRUCT_ONLY) == 0) (dest_spec->flags & G_PARAM_CONSTRUCT_ONLY) == 0)
{ {
GValue value = { 0, }; GValue value = G_VALUE_INIT;
g_value_init (&value, param_spec->value_type); g_value_init (&value, param_spec->value_type);
@@ -128,7 +128,7 @@ gimp_config_connect_full_notify (GObject *src,
(dest_spec->flags & G_PARAM_WRITABLE) && (dest_spec->flags & G_PARAM_WRITABLE) &&
(dest_spec->flags & G_PARAM_CONSTRUCT_ONLY) == 0) (dest_spec->flags & G_PARAM_CONSTRUCT_ONLY) == 0)
{ {
GValue value = { 0, }; GValue value = G_VALUE_INIT;
g_value_init (&value, param_spec->value_type); g_value_init (&value, param_spec->value_type);

View File

@@ -66,6 +66,8 @@ enum
PROP_BRUSH_PATH_WRITABLE, PROP_BRUSH_PATH_WRITABLE,
PROP_DYNAMICS_PATH, PROP_DYNAMICS_PATH,
PROP_DYNAMICS_PATH_WRITABLE, PROP_DYNAMICS_PATH_WRITABLE,
PROP_MYPAINT_BRUSH_PATH,
PROP_MYPAINT_BRUSH_PATH_WRITABLE,
PROP_PATTERN_PATH, PROP_PATTERN_PATH,
PROP_PATTERN_PATH_WRITABLE, PROP_PATTERN_PATH_WRITABLE,
PROP_PALETTE_PATH, PROP_PALETTE_PATH,
@@ -76,16 +78,14 @@ enum
PROP_TOOL_PRESET_PATH_WRITABLE, PROP_TOOL_PRESET_PATH_WRITABLE,
PROP_FONT_PATH, PROP_FONT_PATH,
PROP_FONT_PATH_WRITABLE, PROP_FONT_PATH_WRITABLE,
PROP_MYPAINT_BRUSH_PATH,
PROP_MYPAINT_BRUSH_PATH_WRITABLE,
PROP_DEFAULT_BRUSH, PROP_DEFAULT_BRUSH,
PROP_DEFAULT_DYNAMICS, PROP_DEFAULT_DYNAMICS,
PROP_DEFAULT_MYPAINT_BRUSH,
PROP_DEFAULT_PATTERN, PROP_DEFAULT_PATTERN,
PROP_DEFAULT_PALETTE, PROP_DEFAULT_PALETTE,
PROP_DEFAULT_GRADIENT, PROP_DEFAULT_GRADIENT,
PROP_DEFAULT_TOOL_PRESET, PROP_DEFAULT_TOOL_PRESET,
PROP_DEFAULT_FONT, PROP_DEFAULT_FONT,
PROP_DEFAULT_MYPAINT_BRUSH,
PROP_GLOBAL_BRUSH, PROP_GLOBAL_BRUSH,
PROP_GLOBAL_DYNAMICS, PROP_GLOBAL_DYNAMICS,
PROP_GLOBAL_PATTERN, PROP_GLOBAL_PATTERN,
@@ -97,14 +97,13 @@ enum
PROP_UNDO_LEVELS, PROP_UNDO_LEVELS,
PROP_UNDO_SIZE, PROP_UNDO_SIZE,
PROP_UNDO_PREVIEW_SIZE, PROP_UNDO_PREVIEW_SIZE,
PROP_PLUG_IN_HISTORY_SIZE, PROP_FILTER_HISTORY_SIZE,
PROP_PLUGINRC_PATH, PROP_PLUGINRC_PATH,
PROP_LAYER_PREVIEWS, PROP_LAYER_PREVIEWS,
PROP_LAYER_PREVIEW_SIZE, PROP_LAYER_PREVIEW_SIZE,
PROP_THUMBNAIL_SIZE, PROP_THUMBNAIL_SIZE,
PROP_THUMBNAIL_FILESIZE_LIMIT, PROP_THUMBNAIL_FILESIZE_LIMIT,
PROP_COLOR_MANAGEMENT, PROP_COLOR_MANAGEMENT,
PROP_COLOR_PROFILE_POLICY,
PROP_SAVE_DOCUMENT_HISTORY, PROP_SAVE_DOCUMENT_HISTORY,
PROP_QUICK_MASK_COLOR, PROP_QUICK_MASK_COLOR,
@@ -155,170 +154,109 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
object_class->set_property = gimp_core_config_set_property; object_class->set_property = gimp_core_config_set_property;
object_class->get_property = gimp_core_config_get_property; object_class->get_property = gimp_core_config_get_property;
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_LANGUAGE, GIMP_CONFIG_PROP_STRING (object_class, PROP_LANGUAGE,
"language", LANGUAGE_BLURB, "language",
NULL, /* take from environment */ "Language",
GIMP_PARAM_STATIC_STRINGS | LANGUAGE_BLURB,
GIMP_CONFIG_PARAM_RESTART); NULL, /* take from environment */
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_INTERPOLATION_TYPE, GIMP_PARAM_STATIC_STRINGS |
"interpolation-type", GIMP_CONFIG_PARAM_RESTART);
INTERPOLATION_TYPE_BLURB,
GIMP_TYPE_INTERPOLATION_TYPE, GIMP_CONFIG_PROP_ENUM (object_class, PROP_INTERPOLATION_TYPE,
GIMP_INTERPOLATION_CUBIC, "interpolation-type",
GIMP_PARAM_STATIC_STRINGS); "Interpolation",
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_DEFAULT_THRESHOLD, INTERPOLATION_TYPE_BLURB,
"default-threshold", DEFAULT_THRESHOLD_BLURB, GIMP_TYPE_INTERPOLATION_TYPE,
0, 255, 15, GIMP_INTERPOLATION_CUBIC,
GIMP_PARAM_STATIC_STRINGS); GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_INT (object_class, PROP_DEFAULT_THRESHOLD,
"default-threshold",
"Default threshold",
DEFAULT_THRESHOLD_BLURB,
0, 255, 15,
GIMP_PARAM_STATIC_STRINGS);
path = gimp_config_build_plug_in_path ("plug-ins"); path = gimp_config_build_plug_in_path ("plug-ins");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PLUG_IN_PATH, GIMP_CONFIG_PROP_PATH (object_class, PROP_PLUG_IN_PATH,
"plug-in-path", PLUG_IN_PATH_BLURB, "plug-in-path",
GIMP_CONFIG_PATH_DIR_LIST, path, "Plug-In path",
GIMP_PARAM_STATIC_STRINGS | PLUG_IN_PATH_BLURB,
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
path = gimp_config_build_plug_in_path ("modules"); path = gimp_config_build_plug_in_path ("modules");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MODULE_PATH, GIMP_CONFIG_PROP_PATH (object_class, PROP_MODULE_PATH,
"module-path", MODULE_PATH_BLURB, "module-path",
GIMP_CONFIG_PATH_DIR_LIST, path, "Module path",
GIMP_PARAM_STATIC_STRINGS | MODULE_PATH_BLURB,
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
path = gimp_config_build_plug_in_path ("interpreters"); path = gimp_config_build_plug_in_path ("interpreters");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_INTERPRETER_PATH, GIMP_CONFIG_PROP_PATH (object_class, PROP_INTERPRETER_PATH,
"interpreter-path", INTERPRETER_PATH_BLURB, "interpreter-path",
GIMP_CONFIG_PATH_DIR_LIST, path, "Interpreter path",
GIMP_PARAM_STATIC_STRINGS | INTERPRETER_PATH_BLURB,
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
path = gimp_config_build_plug_in_path ("environ"); path = gimp_config_build_plug_in_path ("environ");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_ENVIRON_PATH, GIMP_CONFIG_PROP_PATH (object_class, PROP_ENVIRON_PATH,
"environ-path", ENVIRON_PATH_BLURB, "environ-path",
GIMP_CONFIG_PATH_DIR_LIST, path, "Environment path",
GIMP_PARAM_STATIC_STRINGS | ENVIRON_PATH_BLURB,
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
path = gimp_config_build_data_path ("brushes"); path = gimp_config_build_data_path ("brushes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH, GIMP_CONFIG_PROP_PATH (object_class, PROP_BRUSH_PATH,
"brush-path", BRUSH_PATH_BLURB, "brush-path",
GIMP_CONFIG_PATH_DIR_LIST, path, "Brush path",
GIMP_PARAM_STATIC_STRINGS | BRUSH_PATH_BLURB,
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
path = gimp_config_build_writable_path ("brushes"); path = gimp_config_build_writable_path ("brushes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH_WRITABLE, GIMP_CONFIG_PROP_PATH (object_class, PROP_BRUSH_PATH_WRITABLE,
"brush-path-writable", "brush-path-writable",
BRUSH_PATH_WRITABLE_BLURB, "Writable brush path",
GIMP_CONFIG_PATH_DIR_LIST, path, BRUSH_PATH_WRITABLE_BLURB,
GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_CONFIG_PARAM_RESTART); GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
path = gimp_config_build_data_path ("dynamics"); path = gimp_config_build_data_path ("dynamics");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_DYNAMICS_PATH, GIMP_CONFIG_PROP_PATH (object_class, PROP_DYNAMICS_PATH,
"dynamics-path", DYNAMICS_PATH_BLURB, "dynamics-path",
GIMP_CONFIG_PATH_DIR_LIST, path, "Dynamics path",
GIMP_PARAM_STATIC_STRINGS | DYNAMICS_PATH_BLURB,
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
path = gimp_config_build_writable_path ("dynamics"); path = gimp_config_build_writable_path ("dynamics");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_DYNAMICS_PATH_WRITABLE, GIMP_CONFIG_PROP_PATH (object_class, PROP_DYNAMICS_PATH_WRITABLE,
"dynamics-path-writable", "dynamics-path-writable",
DYNAMICS_PATH_WRITABLE_BLURB, "Writable dynamics path",
GIMP_CONFIG_PATH_DIR_LIST, path, DYNAMICS_PATH_WRITABLE_BLURB,
GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_CONFIG_PARAM_RESTART); GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
path = gimp_config_build_data_path ("patterns");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH,
"pattern-path", PATTERN_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("patterns");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH_WRITABLE,
"pattern-path-writable",
PATTERN_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("palettes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH,
"palette-path", PALETTE_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("palettes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH_WRITABLE,
"palette-path-writable",
PALETTE_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("gradients");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH,
"gradient-path", GRADIENT_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("gradients");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH_WRITABLE,
"gradient-path-writable",
GRADIENT_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("tool-presets");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_TOOL_PRESET_PATH,
"tool-preset-path", TOOL_PRESET_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("tool-presets");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_TOOL_PRESET_PATH_WRITABLE,
"tool-preset-path-writable",
TOOL_PRESET_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("fonts");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH,
"font-path", FONT_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_CONFIRM);
g_free (path);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH_WRITABLE,
"font-path-writable", NULL,
GIMP_CONFIG_PATH_DIR_LIST, NULL,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
#if 0 #if 0
/* FIXME these are useful dirs, disabled until we figure how to /* FIXME these are useful dirs, disabled until we figure how to
* properly generate a default gimprc * properly generate a default gimprc
@@ -335,11 +273,13 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
#endif #endif
"~/.mypaint/brushes", "~/.mypaint/brushes",
NULL); NULL);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH, GIMP_CONFIG_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH,
"mypaint-brush-path", MYPAINT_BRUSH_PATH_BLURB, "mypaint-brush-path",
GIMP_CONFIG_PATH_DIR_LIST, path, "MyPaint brush path",
GIMP_PARAM_STATIC_STRINGS | MYPAINT_BRUSH_PATH_BLURB,
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
#if 0 #if 0
g_free (dir1); g_free (dir1);
@@ -352,89 +292,237 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
#endif #endif
"~/.mypaint/brushes", "~/.mypaint/brushes",
NULL); NULL);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH_WRITABLE, GIMP_CONFIG_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH_WRITABLE,
"mypaint-brush-path-writable", "mypaint-brush-path-writable",
MYPAINT_BRUSH_PATH_WRITABLE_BLURB, "Writable MyPaint brush path",
GIMP_CONFIG_PATH_DIR_LIST, path, MYPAINT_BRUSH_PATH_WRITABLE_BLURB,
GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_CONFIG_PARAM_RESTART); GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path); g_free (path);
#if 0 #if 0
g_free (dir2); g_free (dir2);
#endif #endif
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_BRUSH, path = gimp_config_build_data_path ("patterns");
"default-brush", DEFAULT_BRUSH_BLURB, GIMP_CONFIG_PROP_PATH (object_class, PROP_PATTERN_PATH,
DEFAULT_BRUSH, "pattern-path",
GIMP_PARAM_STATIC_STRINGS); "Pattern path",
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_DYNAMICS, PATTERN_PATH_BLURB,
"default-dynamics", DEFAULT_DYNAMICS_BLURB, GIMP_CONFIG_PATH_DIR_LIST, path,
DEFAULT_DYNAMICS, GIMP_PARAM_STATIC_STRINGS |
GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_PATTERN, g_free (path);
"default-pattern", DEFAULT_PATTERN_BLURB,
DEFAULT_PATTERN,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_PALETTE,
"default-palette", DEFAULT_PALETTE_BLURB,
DEFAULT_PALETTE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_GRADIENT,
"default-gradient", DEFAULT_GRADIENT_BLURB,
DEFAULT_GRADIENT,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_TOOL_PRESET,
"default-tool-preset", DEFAULT_TOOL_PRESET_BLURB,
DEFAULT_TOOL_PRESET,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_FONT,
"default-font", DEFAULT_FONT_BLURB,
DEFAULT_FONT,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_MYPAINT_BRUSH,
"default-mypaint-brush", DEFAULT_MYPAINT_BRUSH_BLURB,
DEFAULT_MYPAINT_BRUSH,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_BRUSH, path = gimp_config_build_writable_path ("patterns");
"global-brush", GLOBAL_BRUSH_BLURB, GIMP_CONFIG_PROP_PATH (object_class, PROP_PATTERN_PATH_WRITABLE,
TRUE, "pattern-path-writable",
GIMP_PARAM_STATIC_STRINGS); "Writable pattern path",
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_DYNAMICS, PATTERN_PATH_WRITABLE_BLURB,
"global-dynamics", GLOBAL_DYNAMICS_BLURB, GIMP_CONFIG_PATH_DIR_LIST, path,
TRUE, GIMP_PARAM_STATIC_STRINGS |
GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_PATTERN, g_free (path);
"global-pattern", GLOBAL_PATTERN_BLURB,
TRUE, path = gimp_config_build_data_path ("palettes");
GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_PATH (object_class, PROP_PALETTE_PATH,
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_PALETTE, "palette-path",
"global-palette", GLOBAL_PALETTE_BLURB, "Palette path",
TRUE, PALETTE_PATH_BLURB,
GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_GRADIENT, GIMP_PARAM_STATIC_STRINGS |
"global-gradient", GLOBAL_GRADIENT_BLURB, GIMP_CONFIG_PARAM_RESTART);
TRUE, g_free (path);
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_FONT, path = gimp_config_build_writable_path ("palettes");
"global-font", GLOBAL_FONT_BLURB, GIMP_CONFIG_PROP_PATH (object_class, PROP_PALETTE_PATH_WRITABLE,
TRUE, "palette-path-writable",
GIMP_PARAM_STATIC_STRINGS); "Writable palette path",
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_IMAGE, PALETTE_PATH_WRITABLE_BLURB,
"default-image", DEFAULT_IMAGE_BLURB, GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_TYPE_TEMPLATE, GIMP_PARAM_STATIC_STRINGS |
GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_PARAM_AGGREGATE); g_free (path);
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_GRID,
"default-grid", DEFAULT_GRID_BLURB, path = gimp_config_build_data_path ("gradients");
GIMP_TYPE_GRID, GIMP_CONFIG_PROP_PATH (object_class, PROP_GRADIENT_PATH,
GIMP_PARAM_STATIC_STRINGS | "gradient-path",
GIMP_CONFIG_PARAM_AGGREGATE); "Gradient path",
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_UNDO_LEVELS, GRADIENT_PATH_BLURB,
"undo-levels", UNDO_LEVELS_BLURB, GIMP_CONFIG_PATH_DIR_LIST, path,
0, 1 << 20, 5, GIMP_PARAM_STATIC_STRINGS |
GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_PARAM_CONFIRM); g_free (path);
path = gimp_config_build_writable_path ("gradients");
GIMP_CONFIG_PROP_PATH (object_class, PROP_GRADIENT_PATH_WRITABLE,
"gradient-path-writable",
"Writable gradient path",
GRADIENT_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("tool-presets");
GIMP_CONFIG_PROP_PATH (object_class, PROP_TOOL_PRESET_PATH,
"tool-preset-path",
"Tool preset path",
TOOL_PRESET_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("tool-presets");
GIMP_CONFIG_PROP_PATH (object_class, PROP_TOOL_PRESET_PATH_WRITABLE,
"tool-preset-path-writable",
"Writable tool preset path",
TOOL_PRESET_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("fonts");
GIMP_CONFIG_PROP_PATH (object_class, PROP_FONT_PATH,
"font-path",
"Font path",
FONT_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_CONFIRM);
g_free (path);
GIMP_CONFIG_PROP_PATH (object_class, PROP_FONT_PATH_WRITABLE,
"font-path-writable",
"Writable font path",
NULL,
GIMP_CONFIG_PATH_DIR_LIST, NULL,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_BRUSH,
"default-brush",
"Default brush",
DEFAULT_BRUSH_BLURB,
DEFAULT_BRUSH,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_DYNAMICS,
"default-dynamics",
"Default dynamics",
DEFAULT_DYNAMICS_BLURB,
DEFAULT_DYNAMICS,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_MYPAINT_BRUSH,
"default-mypaint-brush",
"Default MyPaint brush",
DEFAULT_MYPAINT_BRUSH_BLURB,
DEFAULT_MYPAINT_BRUSH,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_PATTERN,
"default-pattern",
"Default pattern",
DEFAULT_PATTERN_BLURB,
DEFAULT_PATTERN,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_PALETTE,
"default-palette",
"Default palette",
DEFAULT_PALETTE_BLURB,
DEFAULT_PALETTE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_GRADIENT,
"default-gradient",
"Default gradient",
DEFAULT_GRADIENT_BLURB,
DEFAULT_GRADIENT,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_TOOL_PRESET,
"default-tool-preset",
"Default tool preset",
DEFAULT_TOOL_PRESET_BLURB,
DEFAULT_TOOL_PRESET,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_FONT,
"default-font",
"Default font",
DEFAULT_FONT_BLURB,
DEFAULT_FONT,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_BRUSH,
"global-brush",
"Global brush",
GLOBAL_BRUSH_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_DYNAMICS,
"global-dynamics",
"Global dynamics",
GLOBAL_DYNAMICS_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_PATTERN,
"global-pattern",
"Global pattern",
GLOBAL_PATTERN_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_PALETTE,
"global-palette",
"Global palette",
GLOBAL_PALETTE_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_GRADIENT,
"global-gradient",
"Global gradient",
GLOBAL_GRADIENT_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_FONT,
"global-font",
"Global font",
GLOBAL_FONT_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_DEFAULT_IMAGE,
"default-image",
"Default image",
DEFAULT_IMAGE_BLURB,
GIMP_TYPE_TEMPLATE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_AGGREGATE);
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_DEFAULT_GRID,
"default-grid",
"Default grid",
DEFAULT_GRID_BLURB,
GIMP_TYPE_GRID,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_AGGREGATE);
GIMP_CONFIG_PROP_INT (object_class, PROP_UNDO_LEVELS,
"undo-levels",
"Undo levels",
UNDO_LEVELS_BLURB,
0, 1 << 20, 5,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_CONFIRM);
undo_size = gimp_get_physical_memory_size (); undo_size = gimp_get_physical_memory_size ();
@@ -443,81 +531,107 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
else else
undo_size = 1 << 26; /* 64GB */ undo_size = 1 << 26; /* 64GB */
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_UNDO_SIZE, GIMP_CONFIG_PROP_MEMSIZE (object_class, PROP_UNDO_SIZE,
"undo-size", UNDO_SIZE_BLURB, "undo-size",
0, GIMP_MAX_MEMSIZE, undo_size, "Undo size",
GIMP_PARAM_STATIC_STRINGS | UNDO_SIZE_BLURB,
GIMP_CONFIG_PARAM_CONFIRM); 0, GIMP_MAX_MEMSIZE, undo_size,
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_UNDO_PREVIEW_SIZE, GIMP_PARAM_STATIC_STRINGS |
"undo-preview-size", UNDO_PREVIEW_SIZE_BLURB, GIMP_CONFIG_PARAM_CONFIRM);
GIMP_TYPE_VIEW_SIZE,
GIMP_VIEW_SIZE_LARGE, GIMP_CONFIG_PROP_ENUM (object_class, PROP_UNDO_PREVIEW_SIZE,
GIMP_PARAM_STATIC_STRINGS | "undo-preview-size",
GIMP_CONFIG_PARAM_RESTART); "Undo preview size",
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_PLUG_IN_HISTORY_SIZE, UNDO_PREVIEW_SIZE_BLURB,
"plug-in-history-size", GIMP_TYPE_VIEW_SIZE,
PLUG_IN_HISTORY_SIZE_BLURB, GIMP_VIEW_SIZE_LARGE,
0, 256, 10, GIMP_PARAM_STATIC_STRINGS |
GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, GIMP_CONFIG_PROP_INT (object_class, PROP_FILTER_HISTORY_SIZE,
PROP_PLUGINRC_PATH, "plug-in-history-size", /* compat name */
"pluginrc-path", PLUGINRC_PATH_BLURB, "Filter history size",
GIMP_CONFIG_PATH_FILE, FILTER_HISTORY_SIZE_BLURB,
"${gimp_dir}" G_DIR_SEPARATOR_S "pluginrc", 0, 256, 10,
GIMP_PARAM_STATIC_STRINGS | GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_LAYER_PREVIEWS,
"layer-previews", LAYER_PREVIEWS_BLURB, GIMP_CONFIG_PROP_PATH (object_class,
TRUE, PROP_PLUGINRC_PATH,
GIMP_PARAM_STATIC_STRINGS); "pluginrc-path",
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_LAYER_PREVIEW_SIZE, "plugninrc path",
"layer-preview-size", LAYER_PREVIEW_SIZE_BLURB, PLUGINRC_PATH_BLURB,
GIMP_TYPE_VIEW_SIZE, GIMP_CONFIG_PATH_FILE,
GIMP_VIEW_SIZE_MEDIUM, "${gimp_dir}" G_DIR_SEPARATOR_S "pluginrc",
GIMP_PARAM_STATIC_STRINGS); GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_THUMBNAIL_SIZE, GIMP_CONFIG_PARAM_RESTART);
"thumbnail-size", THUMBNAIL_SIZE_BLURB,
GIMP_TYPE_THUMBNAIL_SIZE, GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_LAYER_PREVIEWS,
GIMP_THUMBNAIL_SIZE_NORMAL, "layer-previews",
GIMP_PARAM_STATIC_STRINGS); "Layer previews",
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_THUMBNAIL_FILESIZE_LIMIT, LAYER_PREVIEWS_BLURB,
"thumbnail-filesize-limit", TRUE,
THUMBNAIL_FILESIZE_LIMIT_BLURB, GIMP_PARAM_STATIC_STRINGS);
0, GIMP_MAX_MEMSIZE, 1 << 22,
GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_PREVIEW_SIZE,
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_COLOR_MANAGEMENT, "layer-preview-size",
"color-management", COLOR_MANAGEMENT_BLURB, "Layer preview size",
GIMP_TYPE_COLOR_CONFIG, LAYER_PREVIEW_SIZE_BLURB,
GIMP_PARAM_STATIC_STRINGS | GIMP_TYPE_VIEW_SIZE,
GIMP_CONFIG_PARAM_AGGREGATE); GIMP_VIEW_SIZE_MEDIUM,
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_COLOR_PROFILE_POLICY, GIMP_PARAM_STATIC_STRINGS);
"color-profile-policy",
COLOR_PROFILE_POLICY_BLURB, GIMP_CONFIG_PROP_ENUM (object_class, PROP_THUMBNAIL_SIZE,
GIMP_TYPE_COLOR_PROFILE_POLICY, "thumbnail-size",
GIMP_COLOR_PROFILE_POLICY_ASK, "Thumbnail size",
GIMP_PARAM_STATIC_STRINGS); THUMBNAIL_SIZE_BLURB,
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAVE_DOCUMENT_HISTORY, GIMP_TYPE_THUMBNAIL_SIZE,
"save-document-history", GIMP_THUMBNAIL_SIZE_NORMAL,
SAVE_DOCUMENT_HISTORY_BLURB, GIMP_PARAM_STATIC_STRINGS);
TRUE,
GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_MEMSIZE (object_class, PROP_THUMBNAIL_FILESIZE_LIMIT,
GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_QUICK_MASK_COLOR, "thumbnail-filesize-limit",
"quick-mask-color", QUICK_MASK_COLOR_BLURB, "Thumbnail file size limie",
TRUE, &red, THUMBNAIL_FILESIZE_LIMIT_BLURB,
GIMP_PARAM_STATIC_STRINGS); 0, GIMP_MAX_MEMSIZE, 1 << 22,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_COLOR_MANAGEMENT,
"color-management",
"Color management",
COLOR_MANAGEMENT_BLURB,
GIMP_TYPE_COLOR_CONFIG,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_AGGREGATE);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SAVE_DOCUMENT_HISTORY,
"save-document-history",
"Save document history",
SAVE_DOCUMENT_HISTORY_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_RGB (object_class, PROP_QUICK_MASK_COLOR,
"quick-mask-color",
"Quick mask color",
QUICK_MASK_COLOR_BLURB,
TRUE, &red,
GIMP_PARAM_STATIC_STRINGS);
/* only for backward compatibility: */ /* only for backward compatibility: */
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_INSTALL_COLORMAP, GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_INSTALL_COLORMAP,
"install-colormap", NULL, "install-colormap",
FALSE, NULL, NULL,
GIMP_PARAM_STATIC_STRINGS | FALSE,
GIMP_CONFIG_PARAM_IGNORE); GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_MIN_COLORS, GIMP_CONFIG_PARAM_IGNORE);
"min-colors", NULL,
27, 256, 144, GIMP_CONFIG_PROP_INT (object_class, PROP_MIN_COLORS,
GIMP_PARAM_STATIC_STRINGS | "min-colors",
GIMP_CONFIG_PARAM_IGNORE); NULL, NULL,
27, 256, 144,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
} }
static void static void
@@ -641,6 +755,14 @@ gimp_core_config_set_property (GObject *object,
g_free (core_config->dynamics_path_writable); g_free (core_config->dynamics_path_writable);
core_config->dynamics_path_writable = g_value_dup_string (value); core_config->dynamics_path_writable = g_value_dup_string (value);
break; break;
case PROP_MYPAINT_BRUSH_PATH:
g_free (core_config->mypaint_brush_path);
core_config->mypaint_brush_path = g_value_dup_string (value);
break;
case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
g_free (core_config->mypaint_brush_path_writable);
core_config->mypaint_brush_path_writable = g_value_dup_string (value);
break;
case PROP_PATTERN_PATH: case PROP_PATTERN_PATH:
g_free (core_config->pattern_path); g_free (core_config->pattern_path);
core_config->pattern_path = g_value_dup_string (value); core_config->pattern_path = g_value_dup_string (value);
@@ -681,14 +803,6 @@ gimp_core_config_set_property (GObject *object,
g_free (core_config->font_path_writable); g_free (core_config->font_path_writable);
core_config->font_path_writable = g_value_dup_string (value); core_config->font_path_writable = g_value_dup_string (value);
break; break;
case PROP_MYPAINT_BRUSH_PATH:
g_free (core_config->mypaint_brush_path);
core_config->mypaint_brush_path = g_value_dup_string (value);
break;
case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
g_free (core_config->mypaint_brush_path_writable);
core_config->mypaint_brush_path_writable = g_value_dup_string (value);
break;
case PROP_DEFAULT_BRUSH: case PROP_DEFAULT_BRUSH:
g_free (core_config->default_brush); g_free (core_config->default_brush);
core_config->default_brush = g_value_dup_string (value); core_config->default_brush = g_value_dup_string (value);
@@ -697,6 +811,10 @@ gimp_core_config_set_property (GObject *object,
g_free (core_config->default_dynamics); g_free (core_config->default_dynamics);
core_config->default_dynamics = g_value_dup_string (value); core_config->default_dynamics = g_value_dup_string (value);
break; break;
case PROP_DEFAULT_MYPAINT_BRUSH:
g_free (core_config->default_mypaint_brush);
core_config->default_mypaint_brush = g_value_dup_string (value);
break;
case PROP_DEFAULT_PATTERN: case PROP_DEFAULT_PATTERN:
g_free (core_config->default_pattern); g_free (core_config->default_pattern);
core_config->default_pattern = g_value_dup_string (value); core_config->default_pattern = g_value_dup_string (value);
@@ -717,10 +835,6 @@ gimp_core_config_set_property (GObject *object,
g_free (core_config->default_font); g_free (core_config->default_font);
core_config->default_font = g_value_dup_string (value); core_config->default_font = g_value_dup_string (value);
break; break;
case PROP_DEFAULT_MYPAINT_BRUSH:
g_free (core_config->default_mypaint_brush);
core_config->default_mypaint_brush = g_value_dup_string (value);
break;
case PROP_GLOBAL_BRUSH: case PROP_GLOBAL_BRUSH:
core_config->global_brush = g_value_get_boolean (value); core_config->global_brush = g_value_get_boolean (value);
break; break;
@@ -749,8 +863,8 @@ gimp_core_config_set_property (GObject *object,
gimp_config_sync (g_value_get_object (value), gimp_config_sync (g_value_get_object (value),
G_OBJECT (core_config->default_grid), 0); G_OBJECT (core_config->default_grid), 0);
break; break;
case PROP_PLUG_IN_HISTORY_SIZE: case PROP_FILTER_HISTORY_SIZE:
core_config->plug_in_history_size = g_value_get_int (value); core_config->filter_history_size = g_value_get_int (value);
break; break;
case PROP_UNDO_LEVELS: case PROP_UNDO_LEVELS:
core_config->levels_of_undo = g_value_get_int (value); core_config->levels_of_undo = g_value_get_int (value);
@@ -782,9 +896,6 @@ gimp_core_config_set_property (GObject *object,
gimp_config_sync (g_value_get_object (value), gimp_config_sync (g_value_get_object (value),
G_OBJECT (core_config->color_management), 0); G_OBJECT (core_config->color_management), 0);
break; break;
case PROP_COLOR_PROFILE_POLICY:
core_config->color_profile_policy = g_value_get_enum (value);
break;
case PROP_SAVE_DOCUMENT_HISTORY: case PROP_SAVE_DOCUMENT_HISTORY:
core_config->save_document_history = g_value_get_boolean (value); core_config->save_document_history = g_value_get_boolean (value);
break; break;
@@ -846,6 +957,12 @@ gimp_core_config_get_property (GObject *object,
case PROP_DYNAMICS_PATH_WRITABLE: case PROP_DYNAMICS_PATH_WRITABLE:
g_value_set_string (value, core_config->dynamics_path_writable); g_value_set_string (value, core_config->dynamics_path_writable);
break; break;
case PROP_MYPAINT_BRUSH_PATH:
g_value_set_string (value, core_config->mypaint_brush_path);
break;
case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
g_value_set_string (value, core_config->mypaint_brush_path_writable);
break;
case PROP_PATTERN_PATH: case PROP_PATTERN_PATH:
g_value_set_string (value, core_config->pattern_path); g_value_set_string (value, core_config->pattern_path);
break; break;
@@ -876,18 +993,15 @@ gimp_core_config_get_property (GObject *object,
case PROP_FONT_PATH_WRITABLE: case PROP_FONT_PATH_WRITABLE:
g_value_set_string (value, core_config->font_path_writable); g_value_set_string (value, core_config->font_path_writable);
break; break;
case PROP_MYPAINT_BRUSH_PATH:
g_value_set_string (value, core_config->mypaint_brush_path);
break;
case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
g_value_set_string (value, core_config->mypaint_brush_path_writable);
break;
case PROP_DEFAULT_BRUSH: case PROP_DEFAULT_BRUSH:
g_value_set_string (value, core_config->default_brush); g_value_set_string (value, core_config->default_brush);
break; break;
case PROP_DEFAULT_DYNAMICS: case PROP_DEFAULT_DYNAMICS:
g_value_set_string (value, core_config->default_dynamics); g_value_set_string (value, core_config->default_dynamics);
break; break;
case PROP_DEFAULT_MYPAINT_BRUSH:
g_value_set_string (value, core_config->default_mypaint_brush);
break;
case PROP_DEFAULT_PATTERN: case PROP_DEFAULT_PATTERN:
g_value_set_string (value, core_config->default_pattern); g_value_set_string (value, core_config->default_pattern);
break; break;
@@ -903,9 +1017,6 @@ gimp_core_config_get_property (GObject *object,
case PROP_DEFAULT_FONT: case PROP_DEFAULT_FONT:
g_value_set_string (value, core_config->default_font); g_value_set_string (value, core_config->default_font);
break; break;
case PROP_DEFAULT_MYPAINT_BRUSH:
g_value_set_string (value, core_config->default_mypaint_brush);
break;
case PROP_GLOBAL_BRUSH: case PROP_GLOBAL_BRUSH:
g_value_set_boolean (value, core_config->global_brush); g_value_set_boolean (value, core_config->global_brush);
break; break;
@@ -930,8 +1041,8 @@ gimp_core_config_get_property (GObject *object,
case PROP_DEFAULT_GRID: case PROP_DEFAULT_GRID:
g_value_set_object (value, core_config->default_grid); g_value_set_object (value, core_config->default_grid);
break; break;
case PROP_PLUG_IN_HISTORY_SIZE: case PROP_FILTER_HISTORY_SIZE:
g_value_set_int (value, core_config->plug_in_history_size); g_value_set_int (value, core_config->filter_history_size);
break; break;
case PROP_UNDO_LEVELS: case PROP_UNDO_LEVELS:
g_value_set_int (value, core_config->levels_of_undo); g_value_set_int (value, core_config->levels_of_undo);
@@ -960,9 +1071,6 @@ gimp_core_config_get_property (GObject *object,
case PROP_COLOR_MANAGEMENT: case PROP_COLOR_MANAGEMENT:
g_value_set_object (value, core_config->color_management); g_value_set_object (value, core_config->color_management);
break; break;
case PROP_COLOR_PROFILE_POLICY:
g_value_set_enum (value, core_config->color_profile_policy);
break;
case PROP_SAVE_DOCUMENT_HISTORY: case PROP_SAVE_DOCUMENT_HISTORY:
g_value_set_boolean (value, core_config->save_document_history); g_value_set_boolean (value, core_config->save_document_history);
break; break;

Some files were not shown because too many files have changed in this diff Show More