gimp_paint_core_finish(): when bailing out early because nothing was
painted (e.g. because we repeatedly shift-click on the same pixel,
which doesn't advance the interpolation distance), don't forget to
call gimp_viewable_preview_thaw() or the drawable preview will be
frozen forever.
- Reset the IM context in much more situations, like on button_press
and when the text editor is initialized and halted (pretty much what
GtkTextView does).
- As a consequence, halt the rectangle text tool after the text tool
in control() because cancelling the IM preedit might cause a
re-framing of the layer because it resized.
- pause()/resume() the draw tool around gimp_text_tool_halt() so we
definitely avoid drawing atrifacts when the text tool is shut down
in the middle of an IM preedit. That pause/resume pair should have
been there from the beginning actually.
- most importantly, when the text changes and we set the buffer (as
happens when undoing), block the "changed" signal on the *buffer*
and not on the proxy (which doesn't even have a "changed"
signal). This was apparently something that happened during the
on-canvas editor merging.
- don't update the proxy when the layout changes, that's the wrong way
around. Instead, update the layout whenever the proxy changes,
remove lots of calls to update_layout() from the text editor and let
the "changed" callback on the buffer do its job of updating
everything.
Like that we start selecting on the very first click on an unframed
text layer alreadyand that we ignore clicks in dead space which had
unexpected results before. Also update all comments and move them
into the function.
Feed them into the text editor's IM context and into the proxy text
view's key bindings. Fixes input methods (e.g. entering of unicode
sequences seems to work flawlessly now).
There is no reason to recreate the layout when the cursor or selection
bound move, so remove the entire callback and all the signal
blocking/unblocking.
In button_press(), don't frame the item again and switch to selecting
mode on double and triple click events, we already did that when
receiving the normal button-press. Also clarify a comment.
Add regression test for hide/show of dock windows that makes sure that
dock window positions are kept after a hide/show cycle. Also introduce
a helper function gimp_ui_find_non_toolbox_dock_window().
Make sure that after we have set GTK_WIN_POS_MOUSE on a dialog created
with the dialog factory, it is eventually reset. Also remove the only
occurance of the DEBUG_FACTORY define.
- remove the button again.
- add a "box-mode" property to GimpTextOptions and a combo box.
- let the normal options -> proxy -> text mechanism do the setting.
- make sure we update the rectangle in some more situations.
- add utility function gimp_text_tool_frame_item().
Add a "Dynamic Text Box" button to the tool options which sets the
text box' mode back to dynamically resizing with the text. This badly
needs UI review but is at least possible now.
Port over the patch I did for GtkTextView and move *to* the end of the
selection and not *from* it when there is a selection and we are
moving by characters.
- bail out and don't warn like crazy in draw() when there is no text.
- fix crash in button_press() when clicking a modified text layer
bring up the confirm dialog and thus didn't set text_tool->text.
- pull setting the right text on text_tool->text_buffer into
gimp_text_tool_canvas_editor() (fixes editing after confirming a
modified text layer edit).
- add lots of missing calls to gimp_text_tool_set_layer() so the
tool will actually start editing.
- Add gimp_text_tool_halt() to shut down the tool and call it
from gimp_tool_control(HALT).
- call control(HALT) when escape is pressed to reset the tool
(can finally switch to other tools again now).
- fix button_press() to handle clicks on already existing
text layers well.
- also button_press(): fix the condition that sets the previously
existing text on the canvas editor so we don't end up with weird
ui states where displayed and internally used text differ.
- remove some redundant code.
Ctrl+Shift+R was taken by 'Show Rulers' so change to Ctrl+J and
Ctrl+Shift+J for 'Shrink Wrap' and 'Fit Image in Window' which was the
only sane free combo (Ctrl+K, Ctrl+Shift+K was the other).