Commit graph

2363 commits

Author SHA1 Message Date
Jehan
b283facb89 Bug 703787 - Crash during switch from multi to single window mode
Shells can now travel from one window to another. Canvas position code
should therefore not keep track of the image window for a specific shell
but must use whatever is the current window for this shell (even though
it may be a different one before and after the size-allocate).
This also partly fixes some positioning issue during mode switch.
(cherry picked from commit 7e513faa50)
2013-07-13 09:16:01 +09:00
Jehan
0c4e7686e8 Bug 703736: when switching from multi to single window mode, tab order is lost.
(cherry picked from commit 112fa53730)
2013-07-08 09:35:45 +09:00
Téo Mazars
f7cbd9de65 Bug 701410 - Small artifacts appear when performing a selection
Do not allow negative radius.
(cherry picked from commit 7a0f8ad78e)
2013-06-21 20:20:21 +02:00
Michael Natterer
eb28d90866 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.
(cherry picked from commit a078ca3f5f)
2013-05-13 00:08:24 +02:00
Jehan
714c232eee 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.
(cherry picked from commit 6008c2019b)
2013-05-12 04:59:30 +09:00
Massimo Valentini
9937a0a99b app: don't crash when adjusting quality during an export to jpeg
with preview enabled
(cherry picked from commit 8940b25c6d)
2013-05-04 18:19:11 +02:00
Michael Natterer
e1645fe427 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.
(cherry picked from commit 87584d2f82)
2013-04-28 15:31:30 +02:00
Michael Natterer
019eb59111 Bug 697530 - zoom during mouse-pan focuses on wrong location
Block all key events while middle-mouse panning, to prevent
accelerators from being invoked.
(cherry picked from commit 3643551280)
2013-04-21 20:02:01 +02:00
Michael Natterer
53d083c844 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.
(cherry picked from commit 5880685472)
2013-04-09 15:48:12 +02:00
Pedro Gimeno Fortea
fb38e0a5f9 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. (cherry-picked from commit faf2217811)
2013-04-02 17:32:15 +02:00
Pedro Gimeno Fortea
e12243e94e app: Two mostly cosmetic changes
Use a temporary that is less expensive to refer to. Don't loop more
than necessary when comparing pairs. (Cherry-picked from master's
commit c83e7790bf)
2013-04-02 17:12:21 +02:00
Michael Natterer
de8830ed4b 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.
(cherry picked from commit bc190a6bab)
2013-03-13 10:40:57 +01:00
Michael Natterer
26d40c10c6 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.
(cherry picked from commit 9da0f489e1)
2013-02-27 23:50:18 +01:00
Michael Natterer
0d47f71d13 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.
(cherry picked from commit 97af52c465)
2013-02-27 23:29:29 +01:00
Michael Natterer
1de589a791 Bug 676927 - Shortcuts with backspace not working if image is focused
Move local variable out of the switch() block, it was never initialized.
(cherry picked from commit 169d32532a)
2013-02-15 01:12:57 +01:00
Michael Natterer
6f1b26ddf7 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.
(cherry picked from commit a907741d8a)
2013-02-06 23:29:04 +01:00
Michael Natterer
67cb43963e Bug 689087 - Drag-and-drop foo.jpg behaves different from 'gimp foo.jpg'...
Prefer text/uri-list over image/* to make dropping from file managers
always behave like opening the image directly.
(cherry picked from commit 454639f9d9)
2013-01-09 00:33:32 +01:00
Michael Natterer
5db271cc52 Bug 680621 - View menu options are discarded after closing an image
Sync GimpDisplayShell's properties with the default values when it's
emptied and turns into the empty display, so the default values used
when filling it with an image are displayed while it's empty.
(cherry picked from commit 54cf6c6e9f)
2012-11-12 01:00:04 +01:00
Michael Natterer
28d42d3dd7 Bug 686521 - Zoom Tool Displays Wrong Cursor When Zooming In/Out
When updating the tool cursor on BUTTON_PRESS, pass a state *without*
the newly pressed button's mask to gimp_display_shell_update_cursor(),
or it will simply never call the cursor update function. Tool cursors
don't normally change when a mouse button is down.
(cherry picked from commit 5de48ef8b5)
2012-11-06 22:49:00 +01:00
Michael Natterer
9d6e8e23df Bug 687673 - The image has been exported to '(null)' when export...
Show the imported URI if the exported URI is NULL, they are equivalent
for this dialog.
(cherry picked from commit 55f025e469)
2012-11-06 22:15:21 +01:00
Michael Henning
f45349e74c app: Save the maximized state of the main window in the sessionrc file.
(cherry picked from commit 89760cf044)

This is technically a new feature because it adds new stuff to
sessionrc, but on the other hand not handling maximized state in
sessionrc is worse, therefore merged to 2.8.
2012-10-22 00:23:15 +02:00
Michael Natterer
634ae4a2cf Bug 686025 - Closing a tab closes wrong tab
Replace /* FIXME: switch tabs */ with an actual call to
gimp_image_window_set_active_shell(). WTF...
(cherry picked from commit 56c6935a0c)
2012-10-13 00:24:04 +02:00
Michael Natterer
72ae6656e7 app: use g_get_monotonic_time() also for limiting display flushing
(cherry picked from commit a9353cd3a2)
2012-10-06 18:03:49 +02:00
Michael Natterer
5745a4fae2 Bug 684785 - typo in log message
Apply patch from Okano Takayoshi that fixes the typo.
2012-09-25 22:03:35 +02:00
Michael Natterer
f3a4200e72 Bug 683462 - cropping with rectangular select tool leaves misaligned...
Reset the tool on image changes again, but not if only the active
drawable changes, so keep bug #678890 closed:

Introduce new dirty flag GIMP_DIRTY_ACTIVE_DRAWABLE and set it on all
tools' dirty_mask except for rect select. Check the new flag when
reseting the active tool because of a drawable change.
(cherry picked from commit e546f2b43b)
2012-09-07 00:00:24 +02:00
Michael Natterer
e2059dde74 Bug 683050 - Copying a layer group to a new xcf results in portions...
Use gimp_item_translate() not gimp_item_set_offset() to position
dropped layers, because the latter doesn't affect child layers.
(cherry picked from commit 9ab3abc98b)
2012-09-05 13:05:45 +02:00
Michael Natterer
64b1ade7b0 Bug 586462 - Layer inserts misplaced
Another attempt to fix paste/drop positions for good.

Paste/drop target is either the selected area of a drawable, the
drawable itself, or the image:

- if the paste is larger than the target, center on the target
- if there is a viewport, and the viewport intersects with the
  target, center on the intersection
- otherwise, center on the target

Finally, if we did viewport-centered pasting, make sure the paste is
as completely within image bounds as possible.
(cherry picked from commit eda6fa1c14)
2012-07-30 16:28:25 +02:00
Michael Natterer
f4ce57aa97 Bug 676566 - Window title becomes "Untitled" after exporting without saving
Fix this and other issues more globally by moving the logic that
formats the image's display name into the GimpImage object, and return
the properly formatted name, e.g. "Foo.xcf", or "[Foo] (imported)"
from gimp_image_get_display_name().

Also add gimp_image_get_display_path() which returns the full path
instead. Use the two functions for formatting the image title, and
apply various other fixes that make sure the UI always uses the same
string to identify the image.

Call gimp_object_name_changed() whenever the save/export status
changes, so the image's cached display name and path get cleared.

(cherry picked from commit 220b28677b)
2012-07-17 22:59:09 +02:00
Michael Natterer
40deca6c04 Bug 679256 - SWM image tabs must have a minimum width
Set all tabs to the same width so very narrow images' tabs stay
clickable.
(cherry picked from commit 2c54f4b340)
2012-07-09 22:55:09 +02:00
Massimo Valentini
b874c8af1e Bug 679082: Crash after using Rotate tool 2012-06-30 13:05:55 +02:00
Massimo Valentini
bf503ea7dd app: compress motion events up to the first release event
I'm not sure if it'd be better to compress only sequence
of contiguous motion events, thinking to the case of anticipating
a motion event before a modifier key press/release.
2012-06-24 13:23:10 +02:00
Massimo Valentini
bf8e42330b Bug 677375: tools do not strictly follow mouse...
pointer (missing motion events)

Disable calls gimp_help_set_help_data for shell->canavs
2012-06-18 18:14:42 +02:00
Massimo Valentini
a4ecfde635 Bug 677375: tools do not strictly follow mouse...
pointer (missing motion events)
2012-06-10 17:20:43 +02:00
Massimo Valentini
41ce828243 Bug 645345: 'Color Management' display filter causes performance problems 2012-06-09 15:36:34 +02:00
Michael Natterer
242d71fd73 Bug 677262 - move the layer with the arrow keys, broken after...
commit 9ce8d4fae2. Fix the return_val
logic added in that commit, and make sure we always swallow arroy key
events, because we don't want focus keynav away from the canvas.
(cherry picked from commit f400bc49ca)
2012-06-08 00:23:39 +02:00
Michael Natterer
9ce8d4fae2 Bug 676872 - Image Properties keyboard shortcut Alt+Return Broken
Don't swallow key events which were not handled by the keyboard
controller.
(cherry picked from commit 6c9f1b5715)
2012-05-27 19:57:43 +02:00
Massimo Valentini
0008be8484 Bug 673773: Colour of image changes with zooming
transform a right shift by 8 in the correct
division by 255 and rounds to the nearset
2012-05-24 19:42:42 +02:00
Michael Natterer
a4fb9692ae Bug 676522 - Changing tabs in single-window-mode should switch the active image
Change the active image when switching tabs in single-window-mode.
(cherry picked from commit c1cfe98d35)
2012-05-23 01:27:25 +02:00
Michael Natterer
062d38d141 Bug 675399 - Mention that the image was at least exported in the close...
If the image was exported, mention it in the close warning dialog.
(cherry picked from commit 57d4680ab3)
2012-05-10 01:11:54 +02:00
Michael Natterer
435feea20a app: use gimp_cairo_set_source_rgb() wheh setting a GimpRGB 2012-03-05 19:19:47 +01:00
Michael Natterer
0c236cbc48 app: don't draw the grid if it covers the image entirely
Regardless of the elaborate discussion in bug #599267, as soon as the
grid starts covering the image completely (when the is no more spacing
between grid lines), it is entirely useless, so skip drawing it.
2012-03-04 20:19:57 +01:00
Michael Natterer
71e8fc8c3a app: make sure undrawing the selection doesn't leave right/bottom pixel garbage
gimp_display_shell_mask_bounds(): transform the selection bounds with
sub-pixel precision and then apply floor()/ceil() accordingly.
2012-02-21 16:01:53 +01:00
Michael Natterer
fbd746f95a app: don't rely on gtk_container_remove() to always destroy the child
Instead, either destroy the child instead of removing it, or remove
*and* destroy it in cases where the remove() api on the "parent"
doesn't match GTK+'s parent/child relation (like with all our dock
widgets). We can't rely on remove() to implicitly detstroy, because
there might be arbitrary other code holding references, such as
accessibility modules and whatnot. Most likely fixes unclear crashes
in accessibility code and other crashes we blamed GTK+ for.
2012-02-21 00:36:18 +01:00
Mikael Magnusson
cd002dd0c6 app: remove two duplicated variable inits 2012-02-16 11:30:38 +01:00
Michael Natterer
b3c8cbd5a5 app: remove all docks from GimpImageWindow in dispose()
Seems to fix irregularly occuring warnings on exit about dialogs
being still around.
2012-02-13 00:12:50 +01:00
Michael Natterer
f70bc837fa app: remove gimpdisplay-utils.[ch], move its only function to gimpdisplay.[ch] 2012-02-11 17:57:27 +01:00
Massimo Valentini
39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
Michael Natterer
0a68527edc app: move the GimpWindowStrategy interface from display/ to widgets/ 2012-01-30 23:33:21 +01:00
Michael Natterer
79a66d36d2 app: rename GimpWindowStrategy::create_dockable_dialog()
to ::show_dockable_dialog() because that's what it wlays does, no
matter if the dialog has to be created or now.
2012-01-30 22:59:09 +01:00
Michael Natterer
4aa866a8b9 Bug 664885 - Open 'Document History' --> always a additional history tab appears
In SWM, try to find an existing dialog in
gimp_single_window_strategy_create_dockable_dialog() before falling
back to creating a new one.
2012-01-30 22:53:43 +01:00