Commit Graph

2676 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Michael Natterer 2ef8719cbe app: rename more stuff from "floating sel" to "floating selection" 2016-05-20 16:46:26 +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
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
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
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
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 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
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
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 5f8b6ce8da app: s/gimp_babl_get_description/gimp_babl_format_get_description/ 2016-04-15 19:19:09 +01: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
Michael Natterer 8984df028f app: add a canvas style for "split view" guides 2016-04-04 22:12:33 +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
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 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
Michael Natterer 34913f49a5 app: clean up the color and pattern dropping code in gimpdisplayshell-dnd.c 2016-03-14 00:33:15 +01:00
Michael Natterer 7b7b8f5d03 app: remove some #includes 2016-03-11 22:45:15 +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 f2d581a536 Bug 761170 - Warnings building with clang
Fix a bunch of clang warnings.
2016-02-12 22:49:47 +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 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 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
Jehan ec98b57bc4 app: GimpGuideStyle is not in display-enums anymore. 2016-02-03 20:53:21 +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
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
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
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