Commit Graph

27122 Commits

Author SHA1 Message Date
Alexia Death 15081a3a73 app: Make catmul-rom coords intepolation clamp pressure 2010-02-24 02:15:50 +02:00
Michael Natterer 97db8b9b42 app: add function gimp_text_tool_editor_get_iter_index()
which returns the byte index at a GtkTextIter, and use it all over the
place.
2010-02-24 00:18:50 +01:00
Michael Natterer 14158b982a app: clean up comments 2010-02-24 00:03:15 +01:00
Michael Natterer a17ede4ce0 app: fix crash caused by bogus value of text_tool->selecting
Set "selecting" to TRUE only when we are definitely in selecting mode
(when there is actually a text layer to click on). This commit also
makes the setting of the "selecting" state much simpler and obvious.
2010-02-23 23:46:09 +01:00
Michael Natterer f9bee0d42f app: fix XOR cursor drawing artifacts
Switch to a completely new PangoLayout managing stategy: The drawing
code relies on text_tool->layout being a view on text_tool->text_buffer,
if they get out of sync, drawing is b0rk.

Therefore, split the update_layout() function into clear_layout()
(which kill the layout) and ensure_layout() (which creates the layout
if it doesn't exist).

Whenever the buffer gets modified, pause the draw tool before the
modification so the old cursor/selection undraw, then clear the
layout. Resuming the draw tool will automatically re-create the layout
for the buffer's new contents.

Also switch off any clipping for cursor and selection, so we can at
least see that our input has some effect, even if we don't actually
see the edited text because it's out-of-layer.
2010-02-23 23:22:03 +01:00
Michael Natterer 7ea07c884b app: some code cleanup
- move curve creation and signal connection to a utility function
- formatting cleanup
2010-02-23 20:59:10 +01:00
Alexia Death ced0c1af79 app: Fix some code ugliness intoduced by my last commit 2010-02-23 21:16:35 +02:00
Alexandre Prokoudine 639a17ad11 Updates and fixes to Russian translation 2010-02-23 21:56:20 +03:00
Alexia Death 0e1715fae2 app: Make the curve changes have immedate effect and have a working curve 2010-02-23 20:16:28 +02:00
Alexia Death 3a8c234261 app: Make all inputs for an output respect curves 2010-02-23 17:41:01 +02:00
Alexia Death 902e49fcc8 app: Make dynamics output curve getting work right. 2010-02-23 17:41:01 +02:00
rubikcube 62c0472ca5 Bug 600316 - Animated brushes, angle calculation
This was just a small bug in the angle->index calculation.
2010-02-23 14:32:24 +01:00
Barak Itkin 568823bbf2 Bug 609679 - Inconsistency in the colorize icons
* themes/Default/images/tools/stock-tool-colorize-22.xcf: Edited the color of the yellow circle and changed it to green.

* themes/Default/images/tools/stock-tool-colorize-22.png: regenerated.
2010-02-23 12:38:48 +01:00
Michael Natterer 088368079c app: make the coordinates display in the curve view configurable
Add API for X and Y ranges, default to 0.0..1.0 and configure the view
for 0..255 in the curves tool.
2010-02-23 11:39:35 +01:00
Michael Natterer 6224e3d5f7 app: pause/resume the draw tool at some more reasonable places 2010-02-23 10:27:35 +01:00
Alexia Death bdf4269e30 app: Add props for curves 2010-02-22 20:34:11 +02:00
Michael Natterer 86d417c6f7 app: fix curve focus drawing 2010-02-22 10:50:04 +01:00
Michael Natterer ba6a7d33ff app: fix code formatting and UI packing 2010-02-22 10:35:43 +01:00
Michael Natterer 652c6756c4 app: cosmetic cleanups in the new dynamics stuff in core/ 2010-02-22 08:53:50 +01:00
Alexandre Prokoudine dd8c65aed3 Typo fixed 2010-02-22 10:52:06 +03:00
Alexandre Prokoudine 35794e707e Updated Russian translation 2010-02-22 10:46:38 +03:00
Alexia Death 6c383b87a7 app: Add he beginnings of output editor 2010-02-22 01:04:37 +02:00
Alexia Death 53dce99bfb app: Prepare dynamics editor for output curves 2010-02-22 01:04:16 +02:00
Alexia Death 468b30b585 app: Add type for dynamics output 2010-02-22 01:00:16 +02:00
Michael Natterer a66cc1639b app: i hate unsigned integers 2010-02-21 23:36:25 +01:00
Michael Natterer 7c63af506e app: don't "fix" the extents of filled rectangles and circles
Apply the fix for Xlib evilness (non-filled rectangles and circles are
drawn one pixel larger) only for non-filled things, filled drawing is
right by default.
2010-02-21 20:41:48 +01:00
Michael Natterer b6db793e6f app: remove the old selection code, the new one works now and is correct 2010-02-21 20:41:17 +01:00
Michael Natterer 51dc42bdd9 app: use the line's y coords for selection rendering, not the char's
so the selection rectangles have a least the same height.
2010-02-21 20:25:17 +01:00
Michael Natterer 4ec38099e5 app: render the selection char-by-char
so it's correct for all kinds of mixed text directions. Still looks
like crap because all the rectangles are separate, but should be
logically correct now.
2010-02-21 20:11:13 +01:00
Michael Natterer 4295b1712c app: keep the "use-editor" setting consistent
When the editor is closed explicitely, set "use-editor" to FALSE
2010-02-21 18:59:51 +01:00
Michael Natterer ea7495a95c app: take the rendering direction into account when adjusting the x-offset
Move the layout to the right edge of the bounding box if LTR and RIGHT
*or* RTL and LEFT.
2010-02-21 17:47:21 +01:00
Michael Natterer 3befe0df59 app: #include "libgimpbase/gimpbase.h" 2010-02-21 17:35:04 +01:00
Michael Natterer 0908e53148 app: use the new unit conversion functions
and get rid of the brainfuck idea that app/ has to use _gimp_unit_foo()
functions, passing a gimp pointer. Instead, simply use the libgimpbase
API all over the place. Should we ever allow more than one gimp instance,
they will simply have to share one unit database.
2010-02-21 16:46:39 +01:00
Michael Natterer 52041715a9 libgimpbase: add utility functions to convert between pixels and units 2010-02-21 16:45:01 +01:00
Michael Natterer 41a277f040 Bug 565001 - Text-Tool crashes when edit a 2.4.2 version xcf
Convert the rectangle size from pixels to units before setting it as
box-width and box-height on the text object.
2010-02-21 14:33:33 +01:00
Michael Natterer e5e6638c32 app: push the right drawable undo here too 2010-02-21 12:23:51 +01:00
Michael Natterer f13204e0a4 app: fix the transition to modified text layer and back
- when the layer becomes modified, completely shut down the text tool
  completely instead of leaving it in some bastard hybrid
  half-attached state.
- when re-editing a modified layer (like after confirming the edit in
  the dialog), push a *drawable* undo, not a drawable_mod undo because
  the latter only refs the layer's tiles and doesn't copy them, so when
  the text layer re-render happens to not change the layer's size, it
  would overwrite the modified pixels without any chance of ever going
  back.

Unrelated:

- in button_press(), fix my recent fix for the condition that triggers a
  mouse-select and set the "seleting" state to FALSE when the
  condition is not met.
- in confirm_response(), don't check if the proxy exists because its
  existence is an invariant.
2010-02-21 12:04:19 +01:00
Michael Natterer 5150f3c8f6 app: when connecting the text object, also set its text on the buffer
and don't do it in editor_start(), which caused an undo to be pushed.
2010-02-21 02:00:57 +01:00
Michael Natterer a6ca7e184c app: more text tool
- drop the layout in gimp_text_tool_halt()
- reinitialize the tool completely when clicking another display
- therefore, have to recreate the layout in button_press() instead
  of bailing out if it doesn't exist
2010-02-21 01:39:38 +01:00
Michael Natterer 9a3dbbb6ef app: consistent IM callback names 2010-02-20 23:33:58 +01:00
Michael Natterer b5b6d37742 app: move the entire mouse-selection apparatus to gimptexttool-editor.[ch] 2010-02-20 23:20:18 +01:00
Martin Nordholts f9a2c5cfe1 app: Add Windows→Hide docks menu item
Add Windows→Hide docks menu item. We don't remove the hardcoding of
having Tab trigger it though, because gtk_accelerator_valid() returns
FALSE for GDK_tab. This means that if the user changes keyboard
shortcut for the menu item, both the user shortcut and the hardcoded
shortcut will work. We remove gimp_dialog_factories_toggle() and make
clients activate the action instead to toggle dock visibility.
2010-02-20 22:54:11 +01:00
Martin Nordholts 6d6a52b521 app: Make GimpDialogsState public in core 2010-02-20 22:54:11 +01:00
Michael Natterer 75f7e25e3a app: don't call update_layout() from buffer_changed()
because the layout gets updated anyway when the model changes, and the
buffer is not the model, its changes are applied to the model.
2010-02-20 22:48:51 +01:00
Michael Natterer 6c3e385cac app: fix line navigation for lines that are not left-aligned
Take the X position of the lines into account when navigating up and
down by lines, so we end up at the right x-pos also for centered and
right-aligned lines.
2010-02-20 22:18:38 +01:00
Michael Natterer e91f27a0fd app: simplify selection drawing a lot 2010-02-20 22:11:06 +01:00
Michael Natterer bd151ac84e app: add background curves when editing the R, B or G curve
Show the other two RGB channels in the background.
2010-02-20 20:32:19 +01:00
Michael Natterer 2352037dbd app: allow to show an arbitrary number of "background curves"
which are drawn with a configurable color at 50% opacity.
2010-02-20 20:31:22 +01:00
Michael Natterer 42de0453da app: when disconnecting from the text layer, also empty our text buffer
or the remaining text will be added to the next text layer which is
created.
2010-02-20 19:43:17 +01:00
Michael Natterer 487336fc09 app: remove gimp_text_tool_update_proxy()
and move its code into gimp_text_tool_buffer_changed() which was its
only caller.
2010-02-20 19:31:27 +01:00