Commit Graph

2443 Commits

Author SHA1 Message Date
Michael Natterer a078ca3f5f app: change serialization of the right docks width in SWM (again)
Use "right-docks-width" and always a positive value instead of
"right-docks-position" (as opponsed to "left-docks-width", that
distinction is a GtkPaned implementation detail and does not belong
into a config file). Parse all old values too. Also fix a glitch in
the deserialization code which might fix bug #700147.
2013-05-13 00:00:57 +02:00
Jehan 6008c2019b Bug 664584: WM DELETE event in single window mode is synonym to file-quit.
In multi-window mode, closing an image window is only meant to close
the current image (unless this is the last empty window).
In single window mode though, you are meaning to close the whole program.

Thanks to Niels Martignène for the original patch.
2013-05-12 04:56:15 +09:00
Massimo Valentini 8940b25c6d app: don't crash when adjusting quality during an export to jpeg
with preview enabled
2013-05-04 18:13:19 +02:00
Michael Natterer 5bdadcc17d app: whitespace fix in gimpcanvaspen.h 2013-04-30 17:18:28 +02:00
Michael Natterer c7879266d4 app: fix GimpDisplayShell mask drawing, again 2013-04-29 23:15:37 +02:00
Michael Natterer 87584d2f82 Bug 699100 - Move tool: space-bar inhibits function of Move tool
Don't try to switch to the move tool if the move tool is already active.
Also never bail out early from gimp_display_shell_space_pressed() so we
don't end up in an inconsistent state.
2013-04-28 15:28:18 +02:00
Michael Natterer 77e70f3550 app: remove the manual double buffering from the canvas
It is messing with overlay widgets. Is was effectively disabled since
cairo tool drawing was introduced, but not completely.
2013-04-28 14:56:07 +02:00
Michael Natterer 915b0f3eec app: re-enable and port the display shell mask rendering code
for the ported foreground select tool. Untested!
2013-04-26 10:33:10 +02:00
Michael Natterer 89081075f3 app: don't subtract the offset twice in zoom_xy() and transform_xy() 2013-04-25 09:13:30 +02:00
Michael Natterer 5d0450e4ea app: draw guides across the entire canvas also when rotated 2013-04-25 09:12:35 +02:00
Michael Natterer 37d589335f app: consolidate all transform API in gimpdisplayshell-transform.[ch]
Added complete API for zoom/unzoom (scale and scroll) and
rotate/unrotate, with the same set of functions as the existing
transform/untransform. Moved some special case functions to the
namespaces they belong.
2013-04-25 00:29:58 +02:00
Michael Natterer aea94211b1 app: add an unrotated canvas item group to GimpDisplayShell
and put the software cursor and the tool progress there.
2013-04-24 00:01:01 +02:00
Michael Natterer a4d8ce6d11 app: update the rotate dialog's spinbutton when the view is rotated 2013-04-22 23:18:27 +02:00
Michael Natterer 3643551280 Bug 697530 - zoom during mouse-pan focuses on wrong location
Block all key events while middle-mouse panning, to prevent
accelerators from being invoked.
2013-04-21 20:00:28 +02:00
Michael Natterer 3972da5256 app: add signal GimpDisplayShell::rotated and use it to update the menu 2013-04-21 03:15:22 +02:00
Michael Natterer b4a2cf9432 app: remove useless real_new_scale variable from gimp_display_shell_scale() 2013-04-21 03:14:36 +02:00
Michael Natterer ca9a9fb498 app: reset the rotation to zero when the shell is emptied
so the next image doesn't appear rotated.
2013-04-21 02:46:17 +02:00
Michael Natterer 81e293cb06 app: don't leak the rotate transform matrices when destroying the shell 2013-04-21 02:40:41 +02:00
Michael Natterer ee2e5fb517 app: fix image rendering atifacts in rotated views
- stroke around the drawn area to work around the impossibility of
  tiling antialiased stuff.
- don't use the display xfer stuff because if we overdraw we must
  not have anything in the source pattern outside the drawn region
2013-04-21 02:10:36 +02:00
Michael Natterer e98013af34 app: make the rotate angle spinner wrap around, and add a reset button 2013-04-20 23:54:55 +02:00
Michael Natterer 977a194923 app: add a rotate dialog to rotate to exact degrees 2013-04-20 23:22:14 +02:00
Michael Natterer 855fa3aa4a app: add gimp_display_shell_rotate() and rotate_to() 2013-04-20 22:14:30 +02:00
Michael Natterer 296284fe38 app: rotate cursors that indicate a direction with the view
- reorder enum GimpCursorType to be in angular order
- add gimp_cursor_rotate(cursor_type, angle)
- rotate the shell's cursors automatically in the setter
2013-04-20 17:21:01 +02:00
Michael Natterer 3a75ec3283 app: keep the view rotate angle within [0..360[ 2013-04-20 17:20:18 +02:00
Michael Natterer b3a9a6a3e3 Bug 55367 - Rotated view of the canvas (view is rotated, not image contents)
First version of display rotation, inspired by gimp-painter.
The rotation always happens around the image's center.

The only "UI" for rotating is currently shift+middle-drag and
shift+space-drag. Control constrains the angle to 15 degrees
and is currently the only way to go back to "no rotation".
2013-04-20 15:11:01 +02:00
Michael Natterer 057ec9ac4a app: remove rectangle parameters from gimp_display_shell_draw_checkerboard()
because the cairo_t is already clipped to the right extents.
2013-04-20 10:47:13 +02:00
Michael Natterer 6b8426874d app: simplify scroll offset calculation for middle-mouse scrolling 2013-04-20 08:37:15 +02:00
Michael Natterer 9785c4e1a3 app: simplify gimp_display_shell_canvas_draw_image() a lot
by not manually intersecting and subtracting regions at all. Simply
clip the cairo_t to the area we want to render, it will automatically
intersect with the clip region from the expose event, and check if the
clip is empty before actually drawing anything.
2013-04-19 02:23:38 +02:00
Michael Natterer 4279023bc6 app: small whitespace fix in gimpdisplayshell-scroll.c 2013-04-18 21:50:29 +02:00
Michael Natterer c3b53b8b66 app: move the "get scaled image size" functions from shell-draw to -scale 2013-04-18 19:06:17 +02:00
Michael Natterer afddcce4e5 app: remove gimp_display_shell_update_scrollbars_and_rulers()
and move its two statements to its two callers.
2013-04-18 18:45:55 +02:00
Michael Natterer 0add37a6cc app: remove GimpDisplayShell parameters from all GimpCanvasItem vfuncs
and get the shell from gimp_canvas_item_get_shell() if needed.  Remove
some cairo_translate() that didn't have any effect and were leftovers
from a very early canvas item code.
2013-04-18 16:46:01 +02:00
Michael Natterer 59c7d42530 app: missed two shell->canvas, use gimp_canvas_item_get_canvas() instead 2013-04-18 16:46:01 +02:00
Michael Natterer 52b92e740f app: rename gimpdisplayshell-style to gimpcanvas-style
because it doesn't and shouldn't depend on GimpDisplayShell at all.
In the future, it will take its defaults from the canvas' theme.
2013-04-18 16:46:01 +02:00
Michael Natterer 64c929a1d1 app: add an own GimpCanvasItem API for transforming coords
and use it in all subclasses. Removes all gimpdisplayshell-transform
dependency from all item implementations.
2013-04-18 16:46:00 +02:00
Michael Natterer dc514dd967 app: no need to ask the projection's buffer for its size
when we have the image, they are always exactly the same.
2013-04-18 16:46:00 +02:00
Michael Natterer 65a2d2be31 app: fix copy/paste error in gimp_display_shell_transform_xy() 2013-04-18 16:16:03 +02:00
Michael Natterer fd6c5dd576 app: port the image and wilber drawing code away from GdkRegion
the changes are simply copied from the gtk3-port branch, reducing the
number of diffs, and enabling hacking on drawing stuff in master while
keeping the branch easily rebasable.
2013-04-18 11:56:43 +02:00
Michael Natterer 810bb18949 app: remove the old rendering increments from struct GimpDisplayShell
and don't use them for (un)transforming integer coordinates. Everything
seems to work fine, but this sort of change has caused off-by-one errors
before, please review.
2013-04-18 02:10:38 +02:00
Michael Natterer 5880685472 Bug 675549 - image region does not have focus unless clicked on
We cannot simply randomy move the focus from e.g. a text entry back to
the canvas. Instead introduce global handling of "Escape" and a
"primary_focus_widget" that is always set the the image window's
active canvas. When Escape is pressed, move the focus to that primary
focus widget, or beep if it is already there. Text widgets still get
the key events before that logic and can consume the Escape.
2013-04-09 15:41:20 +02:00
Pedro Gimeno Fortea faf2217811 Bug 696958 - In-image preview in Transform tools is off by one screen pixel
Simplify the loops without any significant loss in performance, separating
the positive and negative X directions to treat each correctly. Fixes this
bug.
2013-04-02 17:23:40 +02:00
Pedro Gimeno Fortea c83e7790bf app: Two mostly cosmetic changes
Use a temporary that is less expensive to refer to. Don't loop more
than necessary when comparing pairs.
2013-04-02 17:05:52 +02:00
Michael Natterer 64438c1b4e Bug 694028 - statusbar cancel button for plug-ins is hard to discover
Add the word "Cancel" next to the cancel icon, the button is only
visible during a plug-in progress anyway, so no space is wasted.
2013-03-18 01:26:44 +01:00
Michael Natterer bc190a6bab Bug 397359 - Can't access color management parameters
Create all display filters with "color-config" and "color-managed"
parameters set, not only the automatically added color management
display filter. This way we don't only support removing and adding the
filter again, but also support potential other color management
modules.
2013-03-13 10:37:25 +01:00
Michael Natterer 0884880579 app: small indentation fix in GimpImageWindow 2013-03-10 19:55:48 +01:00
Michael Natterer fc19348621 app: consider the label in GimpStatusbar's size negotiation
doesn't change anything, except perhaps for weird themes.
2013-03-10 19:54:42 +01:00
Michael Natterer 9da0f489e1 Bug 694665 - SWM should distribute remaining space to main frame
Save the "right-docks-position" as negative value in pixels from the
right window border. Change the image window restoring code to
interpret negative values like that, but keep the meaning of positive
values for compatibility with existing sessionrc files.
2013-02-27 23:46:00 +01:00
Michael Natterer 97af52c465 Bug 686544 - Opening new image window doesn't restore docks
Call gimp_dialog_factory_show_with_display() in gimp_display_new(), we
otherwise do this only when the ICONIFIED state of an image window
changes.
2013-02-27 23:26:49 +01:00
Michael Natterer 169d32532a Bug 676927 - Shortcuts with backspace not working if image is focused
Move local variable out of the switch() block, it was never initialized.
2013-02-15 01:00:13 +01:00
Michael Natterer a907741d8a Bug 692900 - Dragging left canvas border doesn't respect dock borders
Don't allow the single window's docks to shrink smaller than their
requisition, because that's horribly broken.
2013-02-06 23:27:37 +01:00