Commit graph

15296 commits

Author SHA1 Message Date
Michael Natterer
60bf4e367d Bug 700193 - undoing paint tools doesn't update last_coords properly
paint_core->start_coords is in fact the last stroke's endpoint and
only used for storing it in GimpPaintCoreUndo, so the last endpoint
can be resotred for straight-line painting after an undo. Make the
code actually doing that.

(cherry picked from commit d1795ac204)
2013-07-15 00:45:12 +02:00
Michael Natterer
a1cd4144df Bug 704118 - crash on invalid number of PLTE entries
Make sure an indexed image always has a colormap. This was the case
before, except one could set a NULL colormap via the PDB.

Add gimp_image_unset_colormap(), and make gimp_image_set_colormap()
never set the colormap to NULL, even if NULL is passed. Change the
only places where actual unsetting makes sense to use unset().

Make some GUI places deal gracefully with palettes/colormaps with zero
entries.

(cherry picked from commit 37372555e5)
2013-07-14 22:33:52 +02:00
Michael Natterer
3632680049 Bug 703692 - Unable to Resize Large Left Dock Area
Small fix for the last commit: set a silly small initial size request
on the wrap_box so it doesn't initially request too much and breaks
dock layout deserialization.

(cherry picked from commit a2334b0b15)
2013-07-14 13:30:53 +02:00
Michael Natterer
38ab5f9d64 Bug 703692 - Unable to Resize Large Left Dock Area
gimp_container_grid_view_viewport_resized(): set the wrap_box'
required width to just one cell_width, not cell_width * columns. This
way it can shrink also when attached to a toolbox dock. It remains
unclear why it could nicely shrink in all other dock columns.

(cherry picked from commit 6a5e37b68d)
2013-07-13 18:53:59 +02:00
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
f7fe056e19 app - call to keep the active shell in single window mode switch out of loop.
Small fix from commit 2697b29. This previous commit was working well, but
implied calling this method as many time as there are opened shells,
whereas once is enough.
(cherry picked from commit 8ef5fca062)
2013-07-10 09:12:53 +09:00
Massimo Valentini
cc836e7c84 Bug 703806: GIMP crashes when scaling an image
during an image rescale, while spinning the main-loop,
layer-groups preview generation used to start before their
layers were fully rescaled, so it tried to access tiles that
were not yet there
(cherry picked from commit 3cc923d5a5)
2013-07-09 19:46:09 +02: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
Jehan
893c73cea4 Bug 703738: when switching between multi and single window mode, keep the same active shell.
(cherry picked from commit 2697b29963)
2013-07-07 23:54:55 +09:00
Massimo Valentini
42e370e208 app: don't pass NULL to g_object_add_weak_pointer
opening many images from the command line used to print:

(gimp-2.9:): GLib-GObject-CRITICAL **: g_object_add_weak_pointer:
assertion 'G_IS_OBJECT (object)' failed

because only the first finds the empty display
(cherry picked from commit 8a7d5c9d16)
2013-07-05 18:19:20 +02:00
Massimo Valentini
4e664a011d Bug 629941 - GIMP doesn't exit properly when quitting while loading images
GIMP's "exit" signal was emitted before the handler was connected.

Don't start loading command line images or batch processing before
app_exit_after_callback() is connected. Make sure we don't use
dangling main loop pointers or try to stop a non-running main loop.

(cherry picked from commit 09682d62ae)
2013-07-04 21:41:27 +02:00
Massimo Valentini
dea99e516b app: file_open_from_command_line(): don't access a dangling display pointer
Happens if GIMP is quit while the image is being loaded.

(cherry picked from commit 6c62eb2238)
2013-07-04 21:08:39 +02:00
Michael Natterer
92e9de96ae app: view_close_cmd_callback(): don't forbid to close images without layers
Also no need to check for shell != NULL.
2013-07-03 09:26:03 +02:00
Michael Natterer
bd91caf778 app: port GimpImagePropView's file size querying to GIO 2013-06-25 19:18:25 +02: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
dd9f57f8de Bug 701335 - Gimp crashing on creating huge clipboard brush
Change the maximum size of clipboard patterns and brushes to 1024x1024.
2013-06-21 12:43:29 +02:00
Michael Natterer
ef649f4827 Bug 701803 - Cage Transform raises segmentation fault...
...if layer bounds are changed.

Call gimp_tool_control_set_preserve (tool->control, FALSE) so it is
stopped when the drawable changes.

(cherry picked from commit 2e8ef97c13)
2013-06-18 19:08:08 +02:00
Michael Natterer
4b957cf404 Bug 701594 - gimp-image-select-item does not recognize path transformations
pdb: Need to gimp_vectors_freeze()/thaw() around stroke modifications
so the vector's preview and the cached GimpBezierDesc are invalidated.
(cherry picked from commit 64887fe06c)
2013-06-04 16:51:20 +02:00
Massimo Valentini
ba98aedcb1 Bug 680290: -90 degree rotation distortion of layer
The previous code did not consider that a transformation
described by a matrix with non integer values in the 3rd
column or by a non affine matrix requires interpolation

and make floating point arithmetic rounding errors
consistent with INTERPOLATION_NONE
2013-06-01 17:07:24 +02:00
Michael Natterer
dd8aeeec92 Bug 700215 - Gradient name changes do not persist across sessions...
if the gradient itself isn't changed.

GimpData: implement GimpObject::name_changed() and set the "dirty"
flag to TRUE. Don't set dirty in GimpData::dirty()'s default impl
because that calls gimp_object_name_changed() anyway.
(cherry picked from commit 5280a02ed8)
2013-05-29 22:30:40 +02:00
Michael Natterer
a57ad1a997 Bug 700707 - Missing time data in tool-options/*.settings files
strftime() the time using %H:%M:%S which should work on
all platforms, unlike %T.
(cherry picked from commit 51181648f7)
2013-05-25 11:22:59 +02:00
Jehan
c947260d2d actions: dock-close had a default shortcut colliding with view-close.
When the accelerator is NULL, gtk_action_group_add_action_with_accel()
would use the default one for the stock icon used. And GTK_STOCK_CLOSE
default accelerator is "<Primary>w" which we already use for view-close.
We must use empty string when we want no default accelerator.
(cherry picked from commit 28669b07d1)
2013-05-25 07:19:09 +09:00
Michael Natterer
6cda75205a app: add the "view" action group to all docks
so all image and view related shortcuts work globally now.
(cherry picked from commit b234f5f879)
2013-05-25 07:09:47 +09:00
Michael Natterer
ae8749a9a7 app: can't call view_actions_setup() from file_actions_setup()
This breaks Ctrl+W from docks to close the active display, we'll
need another solution for this.
(cherry picked from commit 0ff07fa385)
2013-05-25 07:09:20 +09:00
Jehan
1380b0696c actions: forgot an include which was triggering an "implicit declaration" warning.
(cherry picked from commit 8a935f05a0)
2013-05-25 07:08:47 +09:00
Jehan
22d4cd02fc Bug 685559 - view-close action modified to close only an image view.
view-close was closing also toolbox docks if they had the focus. Now
this action will close only the current active image view (if any),
whatever the window which has actual focus.
Additionally all other view actions are available on dock focus.
(cherry picked from commit 2ad8634c06)
2013-05-25 07:08:37 +09:00
Michael Natterer
5207a4fcd8 Bug 700675 - Missing menu locations for registration and other menu...
Remove the legacy <Toolbox>, <Load> and <Save> from the error message
that states which plug-in menu paths are valid, and add the missing
<Fonts> and <ToolPresets>. Also actually handle <ToolPresets>, this
was apparently forgotten.
(cherry picked from commit 564e6010fd)
2013-05-24 09:30:52 +02:00
Michael Natterer
40726a341d Bug 700653 - Duplicate "(time ...)" values in gimp-curves-tool.settings
and gimp-levels-tool.settings

Serialize the channel properties manually (not using
gimp_config_serialize_properties()), so the parent class' "time"
property doesn't end up in the config file once per channel.
(cherry picked from commit 6781439fdc)
2013-05-19 21:45:37 +02:00
Michael Natterer
7ee3235bd0 Bug 688537 - Toolbox occasionally has spaces or tool names after the icons
Explicitly set the toolbox' style to GTK_TOOLBAR_ICONS to protect it
from user toolbar preferences.
(cherry picked from commit e1bfc0a362)
2013-05-17 14:43:56 +02:00
Michael Natterer
7b42013bae Bug 695687 - GimpSpinScale's label is unreadable on dark themes
Draw the label like GtkEntry draws its text: with different colors
inside and outside the progress bar.
(cherry picked from commit ce8ae69440)
2013-05-14 02:02:30 +02:00
Michael Henning
ecb06953ef tests: fix running make check with both parallel make and xvfb
Before, the xvfbs would all try to be on DISPLAY=:99, which
caused issues.
(cherry picked from commit 2df4fa2d6f)
2013-05-12 19:50:21 -04: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
a98b6581e6 Bug 699185 - when moving the pointer fast out of guide scope, do not keep it highlighted.
When a drawing timeout happens too close from the previous drawing, we don't want to cancel
the timeout function (FALSE), but simply retry later (TRUE).

In our case in particular, if you move your pointer very fast over a guide, the highlighting
drawing was happening less than MINIMUM_DRAW_INTERVAL before the un-highlighting drawing,
hence canceling the later, which caused the drawing bug.
(cherry picked from commit 3496e178ef)
2013-05-12 05:25:49 +09: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
Michael Natterer
7205a25112 app: fix include in test-core, re-closes bug 622054 2013-05-11 20:44:04 +02:00
Sven Claussner
9625dd92b4 Bug 699886 - Missing <Dynamics> menu location for script/plugin
Add the missing <Dynamics> menu location for script/plugin
registration.
	modified:   app/plug-in/gimppluginprocedure.c
2013-05-10 14:47:56 +02: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
a8aef360b9 app: fix saving/loading of .xcf.gz and other compressed XCFs
Make file_utils_uri_get_ext() public and use it instead of
strrchr(uri, '.'). Also add "xz" to the list of matched special cases,
and some cleanup.
(partial cherry pick from commit e99c0045a2)
2013-05-02 20:12:26 +02:00
Jehan
e083b6790d Revert "app: GimpContainerEntry's text is red when not a valid item."
Somehow breaks the completion popup.

This reverts commit 202c8ed762.
2013-04-29 22:17:18 +09:00
Jehan
202c8ed762 app: GimpContainerEntry's text is red when not a valid item.
If the selected item in a GimpContainerEntry is invalid, or else when the entry
is being updated, the text shows in red.
(cherry picked from commit 64fe3af1a9)
2013-04-29 08:48:29 +09: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
9069bd8d79 Bug 688348 - Layer tab and Images tab: not updated on dropping...
...one image onto another

gimp_dock_window_display_changed(): make sure the "auto-follow-active"
logic works both ways: when the active image or display is changed in
a dockable, update the global context. Fixes multi-window mode.

gimp_context_real_set_display(): make sure a context's display and
image are always in a consistent state and never have a display that
is not display->image: when display is the same as context->display,
check that the context's image matches display->image, so that after a
gimp_context_set_display(), the context is consistent in all
cases. Fixes single-window mode.
(cherry picked from commit bacc9c9635)
2013-04-23 21:09:40 +02:00
Michael Natterer
4cd97c8cf7 app: make gimp_dock_window_constructed() more readable
by adding a local "factory_context" variable instead of calling
gimp_dialog_factory_get_context (dock_window->p->dialog_factory)
multiple times.
(cherry picked from commit 076f375e78)

This is not a bugfix, just to seamlessly pick the next commit...
2013-04-23 21:09:04 +02:00
Mikael Magnusson
900cc4108b app: forgot to invert the matrix in corrective mode when transforming the selection. 2013-04-23 17:17:08 +02:00
Michael Natterer
380437e65e app: make GimpContainerEntry robust against reordered parent class destruction
So it will not warn on GTK+ 3.x. One less patch to do in gtk3-port.
(cherry picked from commit e746fa51da)
2013-04-21 21:49:50 +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
Massimo Valentini
ca52016116 Bug 698426: ALL text disappears when changing font ...
of selected text in on-canvas editor

It is necessary to escape font names containing '&'
2013-04-21 17:59:53 +02:00
Michael Natterer
839734463a Bug 694417 - GIMP Segmentation Faults (Segfault, Crash) after Changing Color...
Don't pass a NULL pointer to gimp_text_buffer_get_font_tag() because
it is dereferenced in a call to strcmp().

gimp_context_get_font_name() returns NULL when the selected text
includes spans with different fonts. Add the same special handling for
spans with inconsistent sizes too, and add comments that we should
have the same for the color.

Original patch from Massimo Valentini.
(cherry picked from commit 804313bbec)
2013-04-21 17:54:32 +02:00
Michael Henning
4055ccbe9c app: fix broken build on windows due to not #including windows.h
This was broken after 7392679be9
The corresponding commit on master did not break the build because
windows.h is already included there.
2013-04-20 22:19:12 -04:00
Nils Philippsen
37757e4e8d app: let the tag popup own its tag objects
This should fix crashes in which tag objects got accessed after they
were disposed, because they still were stored with the popup object.
(cherry picked from commit b109e05806)
2013-04-16 11:36:57 +02:00