Commit Graph

12864 Commits

Author SHA1 Message Date
Martin Nordholts 8b458fb591 app: Merge "toplevel" and "dock" dialog factories
Merge "toplevel" and "dock" dialog factories. The end goal is to have
only one dialog factory.
2010-02-20 09:28:26 +01:00
Michael Natterer 10ff2733ff app: add missing include 2010-02-19 23:42:45 +01:00
Michael Natterer 8a62672429 app: use gimp_item_tree_rename_item() to auto-rename text layers
so the name goes through the new unique-names logic in GimpItemTree.
2010-02-19 23:17:36 +01:00
Alexia Death 2cb8f0a864 app: Make sure button releases get handled by paint tools too 2010-02-19 22:42:35 +02:00
Michael Natterer 5f0255e269 Add GIMP_STOCK_INPUT_DEVICE icons and use them for the devices dialog
From icon masta Jimmac.
2010-02-19 21:25:24 +01:00
Alexia Death eb244f208a app: Best guess attempt to catch that very rare segfault from event_eval
This segfault is not easily repeatable, so I can't test for it.
If its still happening, let me know.
2010-02-19 22:07:54 +02:00
Michael Natterer c55753f2ad Bug 610478 - Layer preview suddenly stops getting updated
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.
2010-02-19 20:59:25 +01:00
Michael Natterer d967852cd7 app: turn the input devices dialog into a session managed toplevel
It works exactly as the keyboard shortcuts dialog now and has its own
menu entry: Edit -> Input Devices.
2010-02-19 20:13:26 +01:00
Michael Natterer a8a732f753 app: fix IM context reset
- 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.
2010-02-19 20:13:25 +01:00
Michael Natterer a8548fa7fd app: remove member text_tool->preedit_len
because it is always strlen(text_tool->preedit_string)
2010-02-19 20:13:24 +01:00
Michael Natterer 99b3af1cd2 app: re-frame the layer on each text change
because just about any text change can also change the text layer size.
2010-02-19 20:13:22 +01:00
Michael Natterer 5feec1dd9f app: some signal handling/updating fixes that also make undo mostly work
- 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.
2010-02-19 20:13:21 +01:00
Michael Natterer 92ba7b262a app: remove "return" at the end of a void function 2010-02-19 20:13:19 +01:00
Michael Natterer 21e2462b2c app: only resize the text layer if the rectangle size has actually changed
Like when the user just clicked a handle and didn't actually move it.
2010-02-19 20:13:18 +01:00
Michael Natterer 9f03c457e1 app: no reason to translate the newly created text layer
because a few lines up we set its offsets correctly before adding it
to the image.
2010-02-19 20:13:17 +01:00
Michael Natterer e4d63ce11a app: don't create new text layers on double and triple clicks 2010-02-19 20:13:16 +01:00
Michael Natterer c69459f13e app: adapt button_release() to the new realities
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.
2010-02-19 20:13:14 +01:00
Sven Neumann 3c63462e43 app: always use snprintf(), even in tests 2010-02-19 19:30:55 +01:00
Martin Nordholts 3545bafc41 app/tests: When session management test fails, use system() to say why 2010-02-18 21:49:34 +01:00
Michael Natterer 53ac78a4a0 app: register the pressure curve are sreialibable property
so it is actually saved to devicerc.
2010-02-18 21:35:45 +01:00
Michael Natterer 7e3b090c32 app: request and process key_release events
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).
2010-02-18 20:50:37 +01:00
Michael Natterer c0aa4498d2 app: add intrastructure to send key_release events to tools
The code is 100% identical to the key_press handling and simply
dispatches key_release events too tools which selected them via
GimpToolControl.
2010-02-18 20:50:11 +01:00
Michael Natterer e616ebad4d app: move tons of code out of the line iter loop
when drawing the selection and preedit underline (there is no reason
to calculate constants again for each line)
2010-02-18 20:16:11 +01:00
Michael Natterer becc85683c app: remove "mark_set" callback
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.
2010-02-18 19:53:44 +01:00
Michael Natterer fa6e9e6653 app: avoid to do things twice when double or triple clicks arrive
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.
2010-02-18 19:44:52 +01:00
Michael Natterer 051deba82d app: more minor cleanups 2010-02-18 11:47:16 +01:00
Michael Natterer 2ca9aab14c app: get rid of one indentation level in gimp_text_tool_motion() 2010-02-18 11:34:08 +01:00
Michael Natterer 3d0f2d8d1b app: clean up text editing members of struct GimpTextTool 2010-02-18 09:51:45 +01:00
Michael Natterer 5c9b660c24 app: turn text editing debug spew into proper GIMP_LOG() output 2010-02-18 09:39:25 +01:00
Michael Natterer 5794041ceb app: turn off clipping for the text cursor and the preedit strings
so they are visible also when partly out-of-layer.
2010-02-18 09:27:08 +01:00
Michael Natterer 468ea629a6 app: use image and rect_tool utility functions instead of duplicating them
and some random cleanups
2010-02-18 09:13:27 +01:00
Martin Nordholts b081d91370 app/tests: Add regression test for hide/show of dock windows
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().
2010-02-18 07:25:07 +01:00
Martin Nordholts 45efd84079 Bug 608834 - Toolbox and docks move on desktop change
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.
2010-02-18 07:25:07 +01:00
Michael Natterer 838f2d567d app: cleanup 2010-02-17 21:39:33 +01:00
Michael Natterer 8f27ec48c6 app: split the text editor code out to a separate file 2010-02-17 21:24:09 +01:00
Martin Nordholts 50ef39a01f app: Make gimpgegltool.c compile 2010-02-17 20:45:20 +01:00
Michael Natterer 31659758d1 app: do the setting of the text box mode properly
- 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().
2010-02-17 20:28:13 +01:00
Michael Natterer 919471c285 app: register descriptions for the GimpTextBoxMode enum 2010-02-17 20:28:13 +01:00
Michael Natterer d28ed195a3 app: make the "Dynamic Text Box" button insensitive by default 2010-02-17 20:28:13 +01:00
Sven Neumann dbae9c58a0 Bug 610282 - GEGL Operation tool's help-id
Assign a help ID to the GEGL tool.
2010-02-17 19:23:10 +01:00
Michael Natterer 2dc577d606 app: clean up the text options notify callback 2010-02-17 16:05:45 +01:00
Michael Natterer 8574f4c4e8 app: allow to set the text layer back to dynamic resizing
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.
2010-02-17 15:50:03 +01:00
Michael Natterer 9974fe36d1 app: improve cursor movement by positions when there is a selection
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.
2010-02-17 13:17:46 +01:00
Michael Natterer 3efd20de77 app: move gimp_text_tool_set_layer() to the public functions 2010-02-17 13:08:53 +01:00
Michael Natterer dd1ec8ff9d app: rename editor related functions
so the on-canvas editor's functions are just called "editor" because
it's the default and the dialog's functions are called "editor_dialog".
2010-02-17 12:03:18 +01:00
Michael Natterer 94d9dca2a3 app: more text tool fixes
- 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.
2010-02-17 11:57:32 +01:00
Michael Natterer 1fa6497922 app: don't try to hide a NULL transform dialog 2010-02-17 09:52:15 +01:00
Michael Natterer c2a8f51768 app: lots of text tool fixes
- 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.
2010-02-16 22:48:27 +01:00
Martin Nordholts 66a13cd0d1 Bug 608178 - view->show rules shortcut broken, duplicate keybinding
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).
2010-02-16 22:33:40 +01:00
Michael Natterer 88e2b1aab3 app: add a focus rectangle to GimpCurveView 2010-02-16 20:08:03 +01:00