Téo Mazars
68feec5dcf
app: add gegl:mosaic to Filters -> Distorts
2013-09-21 19:02:10 +02:00
Jehan
ac0ac60ca9
Bug 708521 - Getting rid of cage_complete property on GimpCageTool, redundant with tool_state.
2013-09-22 02:28:30 +12:00
Jehan
2294b8da26
Bug 708519 - Fix using Backspace to delete a closed cage tool's points.
2013-09-22 02:17:22 +12:00
Jehan
5e331e1d25
Bug 708517: Assertion on cage tool commit with ENTER + fix cage completion with ENTER.
...
The key press handler must return TRUE on successfully processing the key,
otherwise the handler ends up being run several times.
2013-09-21 22:42:41 +12:00
Michael Natterer
74c54464c3
app: add a label to GimpOperationTool's aux input button
...
and don't pack it expanding.
2013-09-17 20:06:37 +02:00
Michael Natterer
52fe319fcb
app: use a GimpPickableButton for GimpOperationTool's aux input
...
also WIP and currently looks like shit.
2013-09-15 00:37:42 +02:00
Jehan
c7aa623a55
app: clean out a big bunch of leading tabs.
...
For some unknown reason, most calls to gimp_message_literal() were
indented with tabs.
2013-09-15 04:59:20 +12:00
Michael Natterer
125cf2a2a3
app: use the image instead of the projection for accessing a pickable
2013-09-13 23:29:06 +02:00
Michael Natterer
0d5910aa4b
app: add gegl:bump-map to Filters -> Map
2013-09-04 00:16:25 +02:00
Michael Natterer
b60d361d6c
app: add gegl:plasma to Filters -> Render -> Clouds
2013-08-27 08:14:51 +02:00
Michael Natterer
28c9470d5f
app: fix warning when a gegl op's aux input combo box gets destroyed
...
gimp_operation_tool_aux_selected() is called with a NULL drawable
when the combo is destroyed, but at that time the GeglNode we set
the buffer on is already gone. Instead of adding evil if()s,
connect_object() the combo's "select-item" signal to the node
instead of the tool, so it gets disconnected automatically.
2013-08-25 22:41:43 +02:00
Téo Mazars
8bad383a3b
app: Add gegl:channel-mixer to Color/Components
2013-08-03 23:30:58 +02:00
Téo Mazars
23bc1b255c
app: Add gegl:antialias -> Filters/Enhance
2013-08-03 22:47:58 +02:00
Téo Mazars
62f65ea981
app: add gegl:tile-seamless to Filters -> Map
2013-07-28 19:15:25 +02:00
Jehan
3aaa0a956d
Bug 704238 - Notify through status bar that warp effect is committed with ENTER
2013-07-21 08:46:13 +09:00
Michael Natterer
d682135d7a
app: add gegl:alien-map to Colors -> Map
2013-07-18 22:53:06 +02:00
Michael Natterer
d1795ac204
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.
2013-07-15 00:41:43 +02:00
Michael Natterer
0fc78cd811
app: don't add the aux input as a child to GimpOperationTool's operation
...
It turns the operation into a graph, which breaks things.
2013-06-30 19:10:49 +02:00
Michael Natterer
0e98904f78
app: start supporting composer ops in GimpOperationTool
...
If the operation has an aux input, add a combo that allows feeding
it one of the image's channels. This is all work in progress and
and should allow to use any drawable of any image.
2013-06-29 01:18:19 +02:00
Michael Natterer
7947f24bd8
app: make gimp_operation_tool_set_operation() more readable
2013-06-27 23:42:08 +02:00
Michael Natterer
f56f6d1255
app: follow the GEGL invert -> invert-linear vs. invert-gamma change
...
and invert masks using invert-linear and other drawables using
invert-gamma. drawable_invert_cmd_callback() still always uses
invert-gamma even though it can be used on layer masks.
2013-06-24 00:45:04 +02:00
Michael Natterer
caf73f5f35
Add support for both gamma-corrected and linear for all bit depths
...
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
GimpPrecision enum values is loaded correctly
This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
2013-06-23 16:51:24 +02:00
Clayton Walker
df21310b0f
app: properly initialize variables
2013-06-23 01:41:50 +02:00
Michael Natterer
31e9cc2ad9
Bug 702369 - foreground selection doesnt work with image precision >8 bit
...
This removes the obsolete check which makes the tool fail from
gimp_display_shell_set_mask(). Also change the foreground select tool
and the display mask from using GimpChannel to GeglBuffer, because
that's what it needs, simply buffers. Most changed files simply newly
include <gegl.h> because a GeglBuffer appeared in two headers.
2013-06-22 22:26:46 +02:00
Michael Natterer
2e8ef97c13
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.
2013-06-18 19:05:54 +02:00
Michael Natterer
6280e4933a
app: add gimp_handle_bar_connect_events()
...
to replace 3 completely ugly signal connections, repeated in 4 places.
2013-06-17 22:13:48 +02:00
Michael Natterer
640189d01e
app: merge levels_linear_gamma_update() into its only caller
...
also reorder some functions to be in vtable order.
2013-06-17 22:07:31 +02:00
Michael Natterer
234a05845f
app: use prop widgets in GimpLevelsTool, and generally clean up a bit
2013-06-17 02:07:10 +02:00
Michael Natterer
a009b18a6e
app: use gimp_prop_widget_set_factor() not gimp_spin_scale_set_factor()
2013-06-15 20:52:57 +02:00
Michael Natterer
731360a8f7
app: add gimp_prop_widget_set_factor()
...
which allows adjustment-based prop widgets to display the property
value multiplied by factor. Remove gimp_prop_opacity_spin_scale_new()
because that's simply a factor of 100.0.
2013-06-15 01:28:54 +02:00
Michael Natterer
efbe095b66
app: configure GimpBrightnessContrastTool's scales according to image precision
2013-06-14 08:17:39 +02:00
Michael Natterer
afb767fcc1
app: use 0..1 axes in GimpCurveTool's curves widgets on != 8-bit images
2013-06-13 00:23:49 +02:00
Michael Natterer
4edba97932
app: port GimpThresholdTool to the new variable # of histogram bins
2013-06-12 16:35:15 +02:00
Michael Natterer
6c97908a9e
app: add "gboolean gamma_corrected" to gimp_histogram_new()
...
so we can make histograms of the gamma-corrected image data. Pass
TRUE all over the place so the histogram works perceptually. This
needs more thinking...
2013-06-12 01:02:25 +02:00
Michael Natterer
a7f42de4c0
app: turn GimpHistorgram into a GimpObject, no other changes
2013-06-11 21:23:32 +02:00
Michael Natterer
875b1705fc
app: don't ROUND() all input/output values to int in GimpLevelsTool
...
That was a leftover from before the change to 0..100 sliders for
non-8-bit images. Spoted by Elle Stone.
2013-06-10 21:51:15 +02:00
Michael Natterer
25cc5922b6
app: add gimp_tool_gui_set_focus_on_map() and use it
2013-06-08 15:34:23 +02:00
Michael Natterer
90797f0927
app: add an embedding toggling test button to the transform dialogs
2013-06-08 01:33:35 +02:00
Michael Natterer
ad8d12ed69
app: add "response" signal to GimpToolGui
...
and connect to it instead of to gimp_tool_gui_get_dialog()'s signal.
One more step towards on-the-fly embedding/detaching.
2013-06-07 23:45:11 +02:00
Michael Natterer
0afa7d30f0
app: add gimp_tool_gui_set_description() and use it
2013-06-07 17:01:39 +02:00
Michael Natterer
9a811d276e
app: add gimp_tool_gui_set_alternative_button_order() and use it
...
Also make some of GimpToolGui's memory management proper, there was
no leak but it needs to be proper in order to add runtime switching
between dialog and overlay.
2013-06-07 15:18:24 +02:00
Michael Natterer
88387d6e8d
app: remove the "shell" parameter from gimp_tool_dialog_new() and gui_new()
2013-06-07 12:19:42 +02:00
Michael Natterer
9b9302b91a
app: use a GimpToolGui in GimpColorPickerTool
2013-06-07 12:11:59 +02:00
Michael Natterer
c86eebb034
app: use a GimpToolGui in GimpMeasureTool
2013-06-07 12:03:39 +02:00
Michael Natterer
1c20940f82
app: use a GimpToolGui in GimpTransformTool
2013-06-07 11:52:48 +02:00
Michael Natterer
7abbd38a25
app: use a GimpToolGui in GimpImageMapTool
...
instead of implementing both dialog types manually.
2013-06-07 10:28:41 +02:00
Michael Natterer
964d59df58
app: use gimp_tool_control_push/pop_preserve() in GimpWarpTool
...
instead of set_preserve(TRUE/FALSE). It makes no difference in this
case, but push/pop is the right API to use anyway.
2013-06-07 10:05:05 +02:00
Michael Natterer
785436f32e
app: don't crash the flip tool on each click
...
Don't push an internal transform tool undo after invoking the flip
special case of directly transforming on each click, because the
transform clears the tool state and there is nothing to undo anyway
(flip is atomic). Additionally, add a precondition check to
gimp_transform_tool_push_internal_undo().
2013-06-06 02:08:00 +02:00
Michael Natterer
ec786816bb
*/Makefile.am: merge INCLUDES into AM_CPPFLAGS
...
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Michael Natterer
6f17eb54a1
app: make sure the warp tool halts when the drawable is changed
...
Set preserve=FALSE by default, also don't set preserve=TRUE around
aborting the image map, that's not needed any longer because image map
has stopped to be a temporarily destructive thing.
2013-06-04 10:16:32 +02:00
Michael Natterer
f1e5544053
app: gegl:noise-CIE_lch was renamed to gegl:noise-cie-lch
2013-06-04 00:54:12 +02:00
Michael Natterer
a328f9d305
app: shorten enum GimpMattingEngine's value names
...
and reorder code in GimpForegroundSelectOptions to match the order of
properties.
2013-06-03 23:11:39 +02:00
Michael Natterer
28a9e69885
app: clean up and simplify the GimpForegroundSelectOptions GUI
...
Also use spin scales and the new combo box labels.
2013-06-03 23:05:39 +02:00
Michael Natterer
fc0765ce16
app: ellipsize most tool options combo boxes
...
which means that now check/radio button labels are our biggest
width-wasters.
2013-06-03 17:35:36 +02:00
Michael Natterer
a5d2123adf
app: use the new combo box label in many tool options
...
and generally clean up a bit. Reuse the clone options code in the
perspective clone options. Addresses bug #122862 .
2013-06-03 16:40:24 +02:00
Michael Natterer
cbbfe674b0
app: add gegl:motion-blur-circular and -zoom to Filters -> Blur
...
and follow the gegl:motion-blur -> gegl:motion-blur-linear rename.
2013-06-03 00:20:42 +02:00
Michael Natterer
338ca6694a
app: add gegl:waves to Filters -> Distorts
2013-06-01 15:13:40 +02:00
Michael Natterer
86d0120482
app: add gegl:grid to Filters -> Render -> Pattern
2013-06-01 01:20:30 +02:00
Michael Natterer
7a284def90
app: add gegl:dropshadow to Filters -> Light and Shadow
...
Also move gegl:vignette there from Filters -> Decor.
2013-06-01 01:13:22 +02:00
Michael Natterer
01ada21ae6
app: add totally evil "heuristic" for picking coords to GimpOperationTool
...
This can't continue like that, GEGL properties need to be tagged
somehow using gegl_operation_class_set_keys(), as planned.
2013-05-31 22:56:27 +02:00
Michael Natterer
fc65928df7
app: reorder the list of blacklisted ops to be more managable
...
It's now two sections: ops that are in GIMP's menus, and ops
blacklisted for other reasons.
2013-05-31 22:54:46 +02:00
Michael Natterer
1ad50f300a
app: don't manually blackist all GEGL transform ops any longer
...
They now all have the "transform" category set.
2013-05-31 09:37:00 +02:00
Michael Natterer
822057a4ff
app: call gimp_color_tool_disable() when an old op's options_table dies
...
so gimp_image_map_tool_color_picked() isn't called any longer on clicks.
Add a warning there in case it happens anyway because this is always a
programming error.
2013-05-31 02:50:17 +02:00
Michael Natterer
3b68ae0f3c
app, pdb, libgimp: Remove all traces of the supersampling recursion level
...
from all transform APIs. This is no longer used since we use GEGL to
transform, the value was only passed around and never used.
2013-05-31 01:15:32 +02:00
Michael Natterer
40a1efef09
app: GimpOperationTool: add support for picking coordinates from the image
...
gimp_operation_tool_color_picked(): if the picker's identifier is of
the form "param_spec_name:param_spec_name" and the param specs both
exist and are of the same numeric type, set the pick coordinates on
these properties of the operation's config object.
2013-05-30 23:32:54 +02:00
Michael Natterer
814c47b0b9
app: don't crash on a dangling image_map_tool->active_picker pointer
...
gimp_operation_tool_set_operation(): set it to NULL when destroying
the previous operation's options_table (if it was non-NULL it was a
widget from that table).
2013-05-30 23:28:26 +02:00
Michael Natterer
0a2b86e534
app: fix parameter name of gimp_image_map_tool_add_color_picker()
...
It's a "tooltip", and used as such, not a "help_id".
2013-05-30 23:25:39 +02:00
Michael Natterer
83dffbc03e
app: fix signature of GimpColorTool's "picked" signal
2013-05-30 22:34:55 +02:00
Michael Natterer
b593e3eb02
app: add gegl:motion-blur to Filters -> Blur
2013-05-30 20:04:10 +02:00
Michael Natterer
b8558f8859
app: add coordinates to GimpColorTool's and GimpImageMapTool's "picked"
...
signals and vfuncs. This is currently unused, but GEGL operations
can soon pick coordinates just like they can pick colors.
2013-05-30 19:29:36 +02:00
Michael Natterer
73d7c28f76
app: add dedicated source files for gimp_prop_table_new()
2013-05-30 16:33:30 +02:00
Massimo Valentini
0a31b29b9a
app: transform_tool - don't flush the image when display is NULL
...
it means the dialog is being deleted
2013-05-29 20:10:33 +02:00
Michael Natterer
e3ef19ec89
app: don't gimp_display_get_image(NULL) in gimp_transform_tool_response()
2013-05-29 19:41:54 +02:00
Michael Natterer
279abd260b
app: add gegl:noise-spread to Filters -> Noise
2013-05-29 19:22:14 +02:00
Michael Natterer
963275e846
app: use gimp_prop_color_button_new() in GimpColorizeTool
...
which removes the remaining old callbacks. Remove the set/get_color()
API from GimpColorizeConfig and instead add an unserialized "color"
property that stores its value in the other properties.
2013-05-29 00:45:24 +02:00
Michael Natterer
0c70a79c69
app: use GimpSpinScales in GimpBrightnessContrastTool
2013-05-29 00:28:39 +02:00
Michael Natterer
905439b4bf
app: use GimpSpinScales in GimpColorizeTool
2013-05-29 00:18:07 +02:00
Michael Natterer
a544b9d689
app: hue-saturation's lightness and saturation are -100..100 not -180..180
2013-05-29 00:16:25 +02:00
Michael Natterer
8ba777f5b1
app: use GimpSpinScales in GimpHueSaturationTool
2013-05-29 00:04:35 +02:00
Michael Natterer
3f193cd503
app: set GimpColorBalanceTool's sliders back to -100..100
2013-05-28 23:48:01 +02:00
Michael Natterer
1822bd1502
app: use gimp_prop_spin_scale_new() in GimpColorBalanceTool
2013-05-28 23:18:53 +02:00
Michael Natterer
783edc1e7b
app: use gimp_prop_spin_scale_new() in GimpPosterizeTool
...
and remove tons of code needed to update the old stuff.
2013-05-28 22:47:12 +02:00
Michael Natterer
d5fb5922b7
app: port "range" and "preserve" widgets in GimpColorBalanceTool to propwidgets
2013-05-28 19:13:40 +02:00
Michael Natterer
38e771eea3
app: use gimp_prop_enum_radio_frame_new() in GimpDesaturateTool
...
and remove tons of code that was needed to update the old widget.
2013-05-28 19:01:14 +02:00
Michael Natterer
07c87c7ce1
app: add gegl:shift to Filters -> Distorts
2013-05-27 00:45:51 +02:00
Michael Natterer
9c69130f72
app: add gegl:fractal-trace to Filters -> Map
2013-05-26 23:58:12 +02:00
Michael Natterer
5f76a735af
app: add gegl:deinterlace to Filters -> Enhance
2013-05-26 22:15:36 +02:00
Michael Natterer
9072bf331a
app: rename GimpImageMapConfig to GimpSettings
...
It was misnamed from the beginning and has no relation to GimpImageMap
except that it happens to be used by GimpImageMapTools. Now it feels
less weird to potentially use it for other settings too.
2013-05-25 15:26:18 +02:00
Michael Natterer
df22570727
app: simplify gimp_tool_set_[active]_modifier_state()
...
by factoring out bits of code that were repeated 8 times, also
make sure we actually pass TRUE or FALSE as gboolean, and not some
(state & MODIFIER).
2013-05-25 02:09:33 +02:00
Michael Natterer
d4bb6e0fe7
app: some general cleanup in seamless clone
2013-05-23 23:12:17 +02:00
Michael Natterer
fb7ae4ba48
app: reorder functions in GimpSeamlessCloneTool to standard order
2013-05-23 22:59:51 +02:00
Michael Natterer
278def0bf9
app: set the warp tool's image_map to DRAWABLE mode
2013-05-23 19:30:46 +02:00
Massimo Valentini
e378a29a91
app: fix warping an offset layer with selection
2013-05-23 19:03:31 +02:00
Michael Natterer
fdfa2c782d
app: integrate transform tool undo with normal image undo
...
Also clean up formatting a bit, and add gimp_transform_tool_halt()
which really cleans the tool's state, so we don't end up with wrong
undo/redo actions in a new tool interaction.
2013-05-23 16:02:42 +02:00
Michael Natterer
79c0ab31c2
app: some skeleton code for better warp cursors, does nothing
2013-05-22 23:59:44 +02:00
Michael Natterer
72e0743067
app: fix some broken wrap undo/redo behavior, and factor out common code
2013-05-22 23:47:31 +02:00
Michael Natterer
f862bfb342
app: don't leak all new warp ops, don't abort the image map on undo/redo
2013-05-22 23:37:22 +02:00
Michael Natterer
867c5721a6
app: implement redo in the warp tool
2013-05-22 23:26:07 +02:00
Michael Natterer
2a93677b0c
app: implement undo in the warp tool, no redo yet
2013-05-22 23:01:51 +02:00
Michael Natterer
f51c8af556
app: remove the deleted node from the graph in gimp_warp_tool_undo()
2013-05-22 22:48:37 +02:00
Michael Natterer
b601018e33
app: update the display in a "changed" handler of the warp stroke
...
and get the update extents from the signal's "roi" parameter. Should
be more correct but produces more artifacts for me. Either this patch
is broken, or (more likely) this triggers a bug.
2013-05-22 22:43:32 +02:00
Michael Natterer
3eadcd5e9e
app: don't leak all warp strokes, unref them in button_release()
2013-05-22 09:01:54 +02:00
Michael Natterer
6938486471
app: make warp honor the layer offset
2013-05-22 02:21:07 +02:00
Michael Natterer
8e95b72b64
app: reorder GimpWarpOptions properties so "behavior" is first
2013-05-22 01:10:30 +02:00
Michael Natterer
27fbc0a05e
app: remove a bunch of unneded #includes from warp
2013-05-22 01:06:55 +02:00
Michael Natterer
a7eb1ee1a2
app: #ifdef warp debug printfs away
2013-05-22 01:04:29 +02:00
Michael Natterer
9426a94617
app: fix default tool order, warp is at the end of transform tools
2013-05-22 00:49:29 +02:00
Michael Natterer
b63be0e79a
app: reorder warp tool functions to be in standard order
2013-05-22 00:47:43 +02:00
Michael Natterer
2264dc8d63
app: add gimp_warp_tool_halt() and make the tool's life cycle sane
...
Particularly, don't start any graph and imagemap madness in
oper_update().
2013-05-22 00:33:50 +02:00
Michael Natterer
78f6369114
app: general cleanup and formatting attack in the warp tool
2013-05-22 00:08:14 +02:00
Michael Natterer
199565f765
app: flush the display less aggressively, new GimpImageMap style
2013-05-21 23:46:33 +02:00
Michael Natterer
dff3f85c0d
app: fix some warp tool brokenness and make it build
2013-05-21 23:36:42 +02:00
Michael Muré
35888a3848
warp tool: fix undo when imagemap is busy
2013-05-21 23:28:43 +02:00
Michael Muré
e5545f4a4f
warp tool: range the range of the strength to 1-->100
2013-05-21 23:28:43 +02:00
Michael Muré
7193cdd72c
warp tool: fix the undo to update the whole dirtied area
2013-05-21 23:28:43 +02:00
Michael Muré
877c2ef96e
warp tool: fix one reason that make the outline not moving along the stroke
2013-05-21 23:28:43 +02:00
Michael Muré
a260039ec9
warp tool: fix wrong computation of the area to update and remove an uneeded anymore preview timer
2013-05-21 23:28:43 +02:00
Michael Muré
6abf634189
warp tool: fix commiting the deformation not working
2013-05-21 23:28:43 +02:00
Michael Muré
afa98e6ece
warp-tool: temporary fix to update the preview with imagemap apply_region, not totally working
2013-05-21 23:28:42 +02:00
Michael Muré
81647f3531
warp-tool: probably bad change to use the apply_region of imagemap
2013-05-21 23:28:42 +02:00
Michael Muré
c3bb13ce26
warptool: enable the caching in imagemap
2013-05-21 23:28:42 +02:00
Michael Muré
7aa7c5814c
warptool: use the warp operator imported to gegl
2013-05-21 23:28:42 +02:00
Michael Muré
57adfee72b
warptool: some quick cleaning
2013-05-21 23:28:42 +02:00
Michael Muré
061a6ad85e
gimpoperationwarp: add a hardness property
...
and use it to compute influence with a gaussian like curve
implementation use a lookup table to speed things gimpwarpoptions: add
a hardness property and UI
2013-05-21 23:28:42 +02:00
Michael Muré
5b5e9e30ae
warp-tool: remove unneeded options_notify
2013-05-21 23:28:42 +02:00
Michael Muré
34117fdba0
warptool: change range value for strength to 0-1, max 10
2013-05-21 23:28:42 +02:00
Michael Muré
379b0586e3
warp tool: implement basic undo
2013-05-21 23:28:42 +02:00
Michael Muré
0b93770745
gimpwarptool: add basic UI to choose the behavior
2013-05-21 23:28:41 +02:00
Michael Muré
017995fcf3
gimpwarptool: achieve good interpolation along the stroke
2013-05-21 23:28:41 +02:00
Michael Muré
8d1df4bc65
gimpwarptool: ask for exact motion event
2013-05-21 23:28:41 +02:00
Michael Muré
1769750542
gimpwarptool: use a second timer to refresh the preview
2013-05-21 23:28:41 +02:00
Michael Muré
20174d4afb
gimpwarptool: use a timer to add regularly point to the stroke
2013-05-21 23:28:41 +02:00
Michael Muré
eea8ff4ebc
gimpwarptool: build a stroke to pass to the op
2013-05-21 23:28:41 +02:00
Michael Muré
990b02c8da
gimpwarptool: move the test code to the gegl op
2013-05-21 23:28:41 +02:00
Michael Muré
df0416b4bc
gimpwarptool: create a gegl graph to render the transformation, and
...
insert warp operation for each stroke
2013-05-21 23:28:41 +02:00
Michael Muré
ea2c7e7be1
gimpwarptool: use gimp_draw_tool_add_arc instead of gimp_draw_tool_add_handle to draw the effect size
2013-05-21 23:28:40 +02:00
Michael Muré
bcbc30c2a3
gimpwarptool: draw the effect size with taking care of zoom level
2013-05-21 23:28:40 +02:00
Michael Muré
ab42a60998
gimpwarptool: add logic to commit the transformation
2013-05-21 23:28:40 +02:00
Michael Muré
e6d05c6352
gimpwarptool: start the tool if the cursor is over an image and not started somewhere else
2013-05-21 23:28:40 +02:00
Michael Muré
7bc094a443
gimpwarptool: draw a circle around the cursor to indicate the size of the effect
2013-05-21 23:28:40 +02:00
Michael Muré
33f000d15c
gimpwarptool: add strenght and size in the tool's options
2013-05-21 23:28:40 +02:00
Michael Muré
4f24f703ab
gimpwarptool: proof of concept code to act on the coords buffer
2013-05-21 23:28:40 +02:00
Michael Muré
901a148760
gimpwarptool: add gegl infrastructure and image map for preview
2013-05-21 23:28:40 +02:00
Michael Muré
d6ed13ef6c
GimpWarpTool: skeleton of the tool, with options
2013-05-21 23:28:40 +02:00
Michael Natterer
741792875e
app: add the GimpApplicator back for painting, but make its use optional
...
Default to using the new code. This is out of pure curiosity how
GEGL changes affect painting with a purely graph-based method.
2013-05-21 18:55:03 +02:00
Michael Natterer
b2f318de57
app: add a description label to the GEGL tool dialog
2013-05-20 17:42:32 +02:00
Michael Natterer
f48aacee18
app: add gegl:emboss to Filters -> Distorts
2013-05-20 02:20:09 +02:00
Michael Natterer
94294cd114
app: add gegl:whirl-pinch to Filters -> Distorts
2013-05-19 23:28:06 +02:00
Michael Natterer
dd648b1c12
app: add gegl:cubism to Filters -> Artistic
2013-05-19 22:21:38 +02:00
Michael Natterer
31f7b7fd63
app: add gegl:red-eye-removal to Filters -> Enhance
2013-05-19 20:51:35 +02:00
Michael Natterer
042a2400ad
app: blacklist "gegl:softglow" in the GEGL tool because it's in the menus
2013-05-19 19:06:46 +02:00
Michael Natterer
ef917b2c5c
app: add an "area" parameter to gimp_image_map_apply()
...
and only update the drawable in that area if it's not NULL. Useful for
expensive interactive operations like warp, where the tool exactly
knows which area has changed.
2013-05-18 01:45:01 +02:00
Michael Natterer
e3180de960
app: remove GimpPickable implementation from GimpImageMap
...
It's not needed because we don't modify the drawable's
pixels any more.
2013-05-17 02:02:28 +02:00
Michael Natterer
775ba72d7e
app: cleanup in GimpSeamlessCloneTool
...
- fix some leaks
- actually free the op, seems to cause a crash
- formatting cleanup
- remove lots of comments
2013-05-17 00:53:55 +02:00
Michael Natterer
0b37c9e374
app: some general minor seamless-clone cleanup, and make it build
2013-05-15 00:39:06 +02:00
Clayton Walker
32c129ded7
Update seamless clone tool to use new image map functions
2013-05-15 00:25:32 +02:00
Barak Itkin
a3e136ab7f
Fix: The offset for seamless cloning should be relative to the drawable
2013-05-15 00:25:32 +02:00
Barak Itkin
c9134ab55f
Make gimp use the all in one seamless clone GEGL operation
2013-05-15 00:25:32 +02:00
Barak Itkin
3f0cb773a6
Make the seamless clone tool compile again (update on API changes)
2013-05-15 00:25:31 +02:00
Barak Itkin
9e4e027ab0
Fix the the preview to redraw correctly! Also clean-up the code
2013-05-15 00:25:31 +02:00
Barak Itkin
ef235c389a
Fix the preprocessing. It now works without UV caching.
...
This gimp commit uses gegl commit 2d2d01d47f84, which still passes the
preprocessing result as a gpointer (and not a GObject*), and still does
not cache the UV cordinates into a buffer.
The result of the preprocessing currently isn't freed!
2013-05-15 00:25:31 +02:00
Barak Itkin
9390247c33
Add work in progress for preprocessing before rendering the op
2013-05-15 00:25:31 +02:00
Barak Itkin
35255505fd
Quick-Fix to the previous commit - return the right value on key press
2013-05-15 00:25:31 +02:00
Barak Itkin
a416acfe08
Fix bug in tilemanager unreffing and support committing the result
...
Unreffing the tilemanager of a GimpBuffer is wrong, since the function
to get the tilemanager of a buffer doesn't ref it.
Also, the operation of the tool can now be saved ("committed") using
the Enter key, and the tool can be halted using the Escape key. Note
however that we should do these in a nicer way, that does not require
restarting the tool to use it afterwards.
Finally, this commit removes the debug printing.
2013-05-15 00:25:31 +02:00
Barak Itkin
cab47522b7
Image map interaction works, and so are movement and drawing
2013-05-15 00:25:31 +02:00
Barak Itkin
8f2de693a7
Another WIP commit. There is a known tile manager leak, rest is OK
2013-05-15 00:25:31 +02:00
Barak Itkin
d745f85293
Another WIP commit. It now compiles, and runs with no runtime errors.
2013-05-15 00:25:31 +02:00
Barak Itkin
cacca4b317
commit of a WIP, introducing some of the actual tool logic
2013-05-15 00:25:31 +02:00
Barak Itkin
5fa0df17dd
Add a skeleton for the seamless clone tool, based on the cage tool
2013-05-15 00:25:30 +02:00
Michael Natterer
5baabf87fd
app: add gegl:exposure to Colors, and fix glitch in previous commit
2013-05-14 22:26:16 +02:00
Michael Natterer
de12010107
app: add gegl:box-blur to Filters/Blur
2013-05-14 21:34:03 +02:00
darkraid1
ac5428787e
Bug 598523 - Protect hidden layers from editing
...
Don't allow tool operations on invisible items, just like we do for
group layers or locked items.
Cleaned up and enhanced the patch a bit --Mitch
2013-05-13 23:29:43 +02:00
Michael Natterer
8320381885
app: add untested infrastructure for tool-internal undo/redo
...
Add virtual functions GimpTool::undo(), ::redo(), ::get_undo_desc()
and ::get_redo_desc() and corresponding wrappers in tool_manager.
Make the edit-undo and edit-redo actions check tool undo/redo first
before invoking image undo/redo.
2013-05-12 19:51:52 +02:00
Jehan
3496e178ef
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.
2013-05-12 05:24:12 +09:00
Miroslav Talasek
1cd1541b2d
app: port the foreground select tool to the GEGL matting ops
...
This is work in progress and needs the fixed GEGL ops too.
2013-05-08 00:00:48 +02:00
Miroslav Talasek
b893993e7b
app: add new enums GimpMattingDrawMode and GimpMattingEngine
2013-05-07 23:09:55 +02:00
Michael Natterer
0255a01f95
app: add gegl:checkerboard to <Image>/Filters/Render/Pattern
2013-04-30 19:20:18 +02:00
Michael Natterer
abbe2ecba9
app: build the foreground select tool again, minus the calls to SIOX
...
the interaction is completely there again, it just doesn't nothing
fancy with the mask :)
2013-04-30 00:04:28 +02:00
Michael Natterer
f6ec4f4af2
app: remove the image map tool overlay before hiding it again
...
Which means I have given up finding that last bug (for now).
2013-04-28 14:57:57 +02:00
Michael Natterer
2a0472b57e
app: don't forward key events to the curves tool graph if the tool isn't active
2013-04-26 00:11:51 +02:00
Michael Natterer
595f52bf09
app: more cleanup in GimpImageMapTool's overlay dialog handling
...
gimp_image_map_tool_initialize(): clean up adding the overlay.
gimp_image_map_tool_dialog_hide(): hide the overlay before removing it.
2013-04-25 22:46:05 +02:00
Michael Natterer
8230e948a8
app: allow to call gimp_image_map_tool_dialog_hide() multiple times
...
don't try to remove a GimpOverlayDialog from the canvas twice.
2013-04-25 22:23:32 +02:00
Michael Natterer
325d7541c7
app: always show the tool progress in the center of the canvas
...
getting rid of one more untransform_viewport().
2013-04-25 09:41:21 +02:00
Michael Natterer
62c5a737fd
app: fix conditions for guide and sample point moving/removing
...
Simply check the transfomred coords against the canvas extents and the
untransformed against the image contents instead of using
untransform_viewport(). The code is easier to read now, and
untransform_viewport() is still broken and can't really be implemented
properly when the canvas is rotated.
2013-04-25 09:30:46 +02:00
Michael Natterer
37d589335f
app: consolidate all transform API in gimpdisplayshell-transform.[ch]
...
Added complete API for zoom/unzoom (scale and scroll) and
rotate/unrotate, with the same set of functions as the existing
transform/untransform. Moved some special case functions to the
namespaces they belong.
2013-04-25 00:29:58 +02:00
Michael Natterer
aea94211b1
app: add an unrotated canvas item group to GimpDisplayShell
...
and put the software cursor and the tool progress there.
2013-04-24 00:01:01 +02:00
Mikael Magnusson
8cc53bbbdf
app: forgot to invert the matrix in corrective mode when transforming the selection.
2013-04-23 17:15:23 +02:00
Michael Natterer
a80795e222
app: remove "GeglRectangle visible" from gimp_image_map_apply()
...
because we now use a filter and the image projection updates
the visible part only.
2013-04-22 00:29:38 +02:00
Michael Natterer
f1b5012f23
app: fix gimp_draw_tool_on_handle() on rotated views
...
Unrotate the display coords, then compare rectangles.
2013-04-20 15:30:23 +02:00
Michael Natterer
52b92e740f
app: rename gimpdisplayshell-style to gimpcanvas-style
...
because it doesn't and shouldn't depend on GimpDisplayShell at all.
In the future, it will take its defaults from the canvas' theme.
2013-04-18 16:46:01 +02:00
Michael Natterer
b71ffeca60
app: do more stuff generically in gimp_image_map_tool_initialize()
...
- reset the config object if it exists
- trigger the first preview of the filter
- remove the same stuff from all subclasses
2013-04-16 23:28:02 +02:00
Michael Natterer
9bb4c3d484
app: pull some GEGL operation logic from subclasses into GimpImageMapTool
...
- connect to the config object's notify generically and update the preview
- allow to properly exchange the operation at runtime to remove major
uglyness from GimpOperationTool
- return undo_desc from GimpImageMapTool::get_operation() so we have
proper strings in the undo history, not always "GEGL operation"
- simplify all get_operation() implementations
2013-04-16 22:06:48 +02:00
Michael Natterer
9994a4d514
app: remove the notify::use-gegl callback from GimpImageMapTool
2013-04-16 20:38:40 +02:00
Michael Natterer
e3b2a54da7
app: add a stock_id to GimpImageMap and use it for its filter
...
Refactor GimpImageMapTool and GimpOperationTool to set the stock_id,
and to be a bit smarter with the image map's undo string.
2013-04-16 20:32:58 +02:00
Michael Natterer
1e17f0aed1
app: port GimpImageMap to use the new drawable filters
...
which makes live update more responsive and removes tons of code, but
adds a delay with progress when finally committing the effect.
2013-04-12 14:35:27 +02:00
Michael Natterer
46f74d9f46
app: return GeglBuffer from gimp_image_contiguous_region_foo()
...
now all intermediate masks should be in "Y float" and avoid all
conversions.
2013-04-09 01:38:24 +02:00
Michael Natterer
71c88aebdc
app: add gegl:vignette to Filters -> Decor
2013-03-27 01:35:49 +01:00
Mikael Magnusson
a2e8da357e
transformtool: flip cursor if needed
2013-03-24 23:13:56 +01:00
Michael Natterer
a6862af834
app: shorten the labels of the cage tool options by adding newlines
...
This is an exception because the tool only has three option widgets.
2013-03-24 22:11:20 +01:00
Michael Natterer
cdf2c7ba4b
app, menus: add CIE lch noise to the menus
2013-03-09 22:59:13 +01:00
Michael Natterer
c76a23075d
app: blacklist some more useless ops in the GEGL tools
2013-03-09 22:23:52 +01:00
Michael Natterer
06a4d2e29f
app: have proper titles in the GEGL filter settings import/export dialogs
...
"Import foo" and "Export foo" were just not good enough...
2013-03-09 20:34:15 +01:00
Michael Natterer
54778783ed
app: make a hack in GimpOperationTool slightly worse, but clearer
2013-03-09 20:27:02 +01:00
Michael Natterer
69c897a118
app: fix crash in GEGL tool when an operation specific tool was used before
...
gimp_image_map_tool_initialize(): add the saved settings combo only if
we have a config object.
2013-03-09 20:16:24 +01:00
Michael Natterer
edec6ac8cc
app: add some more gegl ops to the menus (wip)
2013-03-09 18:10:14 +01:00
Michael Natterer
448722c849
app: blacklist some more ops in the GEGL tool, they are in the menus
2013-03-08 17:24:02 +01:00
Michael Natterer
931ea102f8
Bug 693978 - GIMP crashes after changing text preset
...
Applying a preset overwrites all the tool option's properties, also
temporarily its name. This name change gets auto-synced with the
option's text proxy object which also inherits from GimpObject and has
a name. Make sure we don't queue that name change for being applied to
the text layer's text object, because that code only handles
properties of GimpText itself.
2013-02-16 20:38:15 +01:00
Téo Mazars
f6e64b9ed9
Bug 688068 - Rect selection: "Fixed: Aspect Ratio" doesn't work when...
...
Use current aspect when creating rectangle tool from a selection.
2013-02-13 00:36:44 +01:00
Téo Mazars
4a5a6ef914
Bug 684330 - Rectangle tool's "fixed size" option is off-by-one
...
ROUND() is consistent only on positive values, and bad rounding
creates an offset when negative values are involved. Introduce
SIGNED_ROUND() and use it in gimprectangletool.c. It should probably
be used in much more places.
2013-02-13 00:08:39 +01:00
Ville Skyttä
6b0d1038cc
Bug 692641 - Various spelling fixes
2013-01-27 18:59:02 +01:00
Michael Natterer
e5112fa540
Bug 690900 - Typo in GIMP UI
...
Fix typo in gimptransformtool.c
2012-12-30 20:38:37 +01:00
Michael Natterer
593ddb741f
Bug 688746 - Select tool Alt+Shift and Alt+Ctrl dragging modifies...
...
Check for layer groups and locked layers in gimp_selection_tool_start_edit()
and show the usual warning instead of allowing the forbidden operation.
2012-12-14 23:02:56 +01:00
Michael Natterer
908f727f0a
Chain up unconditionally in GObject::constructed()
...
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
Michael Natterer
5efd56c1c8
Bug 679223 - "Rate" in tool options needs translation context
...
Add translation contexts for "Rate" of airbrush, convolve and smudge.
2012-11-12 01:06:58 +01:00
Michael Natterer
76b05c2afc
app: make Tab, Shift+Tab and Escape move the focus back to text editing
...
when it was in the floating text style editor. While this doesn't fix
anything by itself, it enables fixing text style setting to behave
reasonably when there is no selection.
2012-11-09 22:06:51 +01:00
Michael Natterer
d4933b3052
Bug 674160 - Redesign of "Lock panel"
...
Apply and heavily modify patch from remyDev which adds "lock position"
to GimpItem, similar to "lock content". Lock position disables all
sorts of translation and transform, from the GUI and the PDB.
Cleaned up some aspects of the lock content code as well because a
second instance of similar code always shows what went wrong the first
time.
2012-11-09 11:17:25 +01:00
Michael Natterer
6a33951aa6
Bug 687851 - Gimp crashes on Colors > Desaturate
...
Don't install the frame rate limiting draw timeout when resuming a
draw tool that is not active, so accidential timeout installation from
whatever tool dispose code can't happen.
2012-11-07 23:21:13 +01:00
Michael Natterer
eba022f01b
Bug 687375 - Text tool: unnecessarily insists on having a layer before working
...
There is no reason to disallow the text tool from working on a
previously empty image, so allow it.
2012-11-06 22:22:02 +01:00
Michael Natterer
66bd90c9f2
Bug 533590 - Perspective clone of a pattern doesn't apply perspective
...
Implement perspective cloning from a pattern. This needed quite some
refactoring, so GimpSourceCore would be able call its get_source()
vfunc also for a GimpClone subclass: essentially this commit adds a
new GimpSourceCore::use_source() vfunc that replaces the
source_options->use_source flag hack, and makes sure the graph used in
GimpPerspectiveClone's get_source() impl reads from the pattern
instead the drawable.
This version does not properly tile the pattern yet, so you can only
clone one copy of the pattern (gegl:tile is not quite doing the right
thing, so it's disabled).
2012-11-01 21:39:14 +01:00
Massimo Valentini
9b58e2ba0c
Bug 684483 - Text tool: crash after double clicking text
...
It seems that when the undo action reverts a text -> mark-up change
(or v.v.) the notifications are inverted, first is emitted the new
value notification and successively the property becoming NULL. The
result is that gimp_text_buffer_set_{text,mark-up} is called last with
NULL, unsetting both text_buffer text and mark-up.
The right way to do it is to always prefer "markup" over "text" if
markup is present, no matter if the notification was for "markup" or
"text".
2012-10-22 15:40:55 +02:00
Michael Natterer
2b3e5ebd78
Bug 686523 - Text tool: text editor not shown on empty text box
...
gimp_text_tool_options_notify(): always show the editor, also when no
text object exists yet. There was no reason for this limitation.
2012-10-21 23:30:34 +02:00
Michael Natterer
438fc4221e
app: remove unused variable in gimp_unified_transform_tool_init()
2012-10-12 22:39:11 +02:00
Michael Natterer
52d933a1cc
Bug 663582 - Brush outline is too slow
...
Even less drawing: let the timeout running if it triggers within the
50ms since the last drawing, so it's reduced to its actual purpose of
updating to the actual cursor position after framerate-limiter skipped
drawing.
2012-10-06 16:39:14 +02:00
Michael Natterer
4218d9342f
Bug 663582 - Brush outline is too slow
...
One more try: merge the spirit of Alexia's patch, but don't disable
the timeout, only make sure the minimum fps is also applied when
drawing is triggered by gimp_draw_tool_resume().
2012-10-06 00:27:49 +02:00
Michael Natterer
db5c952c4e
Bug 663582 - Brush outline is too slow
...
Don't confuse microseconds with milliseconds: the 20 fps interval
is 50000, not 50, sigh.
2012-10-06 00:03:47 +02:00
Michael Natterer
fd4e220c28
Bug 663582 - Brush outline is too slow
...
Keep around the last drawing time in GimpDrawTool and make sure we
draw at least with a frame rate of around 20 fps, which feels
reasonably non-laggy.
2012-10-04 20:43:58 +02:00
Michael Natterer
303e554ab1
app: remove "gboolean active_layer_only" from gimp_image_crop()
...
Also a very historic API, it doesn't belong there. Instead, simply
call gimp_item_resize() in GimpCropTool.
2012-09-22 15:08:05 +02:00
Michael Natterer
c1811d6bdf
app: gimp_image_crop_auto_shrink() -> gimp_pickable_auto_shrink()
...
It was in gimpimag-crop only for historic reasons. Clean up API
and code to do simpler and more reasonable stuff.
2012-09-22 14:56:52 +02:00
Mikael Magnusson
da795c1267
gimptransformtool: Restore code that apparently was for the flip tool
2012-09-20 15:18:00 +02:00
Michael Natterer
9b927ba0cd
Bug 683791 - Free select tool constraint key
...
Fix condition that constrains angles to 15°, its bracketing was wrong.
2012-09-14 11:04:21 +02:00
Michael Natterer
2c3a046d83
Bug 683553 - Spinscale scrollvalues in Brushsize are much too smal
...
Set the step/page increments to 1.0/10.0 for brush size and to 0.1/1.0
for aspect ratio. the previous values were way too small.
2012-09-11 20:28:20 +02:00
Michael Natterer
e546f2b43b
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.
2012-09-06 23:55:35 +02:00
Mikael Magnusson
0f380eba53
transformtool: actually use the correct index for the angle vector
2012-08-27 15:12:29 +02:00
Mikael Magnusson
6396e83057
transformtool: use new corner and side cursors appropriately considering current transform
2012-08-27 15:07:15 +02:00
Mikael Magnusson
11a9fe33d9
app: another minor cleanup in gimpunifiedtransformtool.c
...
you missed a spot
2012-08-23 02:16:06 +02:00
Mikael Magnusson
b11a705203
transformtool: rotate handles along with frame
2012-08-22 22:53:59 +02:00
Mikael Magnusson
e83b40982f
transformtool: adjust handles a bit
...
Since the move handle is gone, the pivot can be normal sized and circle again,
also put shear handles at 3/4 rather than 3/5.
2012-08-22 22:49:45 +02:00
Michael Natterer
5d711be340
app: formatting cleanup in gimpunifiedtransformtool.c
2012-08-22 20:45:16 +02:00
Michael Natterer
95584e5548
app: re-format a comment in gimptransformtool.c
2012-08-22 20:41:44 +02:00
Mikael Magnusson
8dfc72dca9
transformtool: Make real_pick_function and real_draw_gui implementations of vfuncs
2012-08-21 20:59:15 +02:00
Michael Natterer
b1acd93f5e
Some formatting cleanup in the unified transform tool commits
2012-08-21 19:50:01 +02:00
Mikael Magnusson
08cd798ec6
transformtool: Set the cursor and tool cursor properly on each handle by way of the new cursor_update method
2012-08-20 20:28:21 +02:00
Mikael Magnusson
d789cbff9d
transformtool: Fix indent of switch statement
2012-08-20 20:28:19 +02:00
Mikael Magnusson
6af6218c2b
transformtool: Remove now unused variables
2012-08-20 16:57:58 +02:00
Mikael Magnusson
4c22ed8128
transformtool: Use the same method for frompivot for shearing as everything else
2012-08-20 16:42:29 +02:00
Mikael Magnusson
3f72695a80
transformtool: kill rotate and move handle, instead rotate when outside frame (move already works inside)
2012-08-20 15:46:48 +02:00
Mikael Magnusson
0f6709d2d0
transformtool: Be a bit more strict about the pivot being inside the transform frame to use it, to protect against it flying away to infinity
2012-08-20 15:46:47 +02:00
Mikael Magnusson
574df2b6db
transformtool: We show corrective preview for selections and paths, so why not drawables
2012-08-20 15:46:47 +02:00
Mikael Magnusson
4e57571103
transformtool: Remove some annoying duplication and draw perspective handles differently
2012-08-20 15:46:47 +02:00
Mikael Magnusson
b27c33f13c
transformtool: Add back statusbar code (but more helpful) that was deleted when I made pick_function
2012-08-20 15:46:47 +02:00
Mikael Magnusson
c37619ade7
transformtool: Pick move operation anywhere inside polygon
2012-08-20 15:46:47 +02:00
Mikael Magnusson
a0d79634ed
transformtool: Add one more rotation handle, in case the point you want to pivot around is close to the first one
2012-08-20 15:46:47 +02:00
Mikael Magnusson
62525e090b
transformtool: use GimpFrame + GtkBox to group the options instead of just putting GtkLabel between them
2012-08-20 15:46:46 +02:00
Mikael Magnusson
f84987de73
transformtool: Add the bunch of 8 separate options for 3 things
2012-08-20 15:46:46 +02:00
Mikael Magnusson
03117bdf40
transformtool: Update modifier keys for options, solves problem with perspective frompivot + constrain
2012-08-20 15:46:46 +02:00
Mikael Magnusson
f2099fbb28
transformtool: Check if new transform is convex and don't involve the pivot if it isn't
2012-08-20 15:46:46 +02:00
Mikael Magnusson
501c15f910
transformtool: Add a pick_function method to the TransformTool class and remove some more hack duplication
2012-08-20 15:46:46 +02:00
Mikael Magnusson
293600c579
transformtool: Add a draw_gui method to the TransformTool class and remove some hack duplication
2012-08-20 15:46:46 +02:00
Mikael Magnusson
01142f248d
transformtool: some more cleanup + comments
2012-08-20 15:46:45 +02:00
Mikael Magnusson
03d9a75c30
transformtool: Rename p to d because p is a weird name for a delta/diff
2012-08-20 15:46:45 +02:00
Mikael Magnusson
eb65b09ebd
transformtool: move assignment of coords to after the logic code, this somehow fixes frompivot perspective
2012-08-20 15:46:45 +02:00
Mikael Magnusson
ed29503f28
transformtool: Deduplicate code, use more vector representations, fix style and warnings
2012-08-20 15:46:45 +02:00
Mikael Magnusson
70671f2967
transformtool: Factor out getpivotdelta() function
2012-08-20 15:46:45 +02:00
Mikael Magnusson
bad3c0d86c
transformtool: Add frompivot for perspective handles too
2012-08-20 15:46:45 +02:00
Mikael Magnusson
9be0d2b029
transformtool: Add option for locking pivot to canvas, add code to transform the pivot along with all transformations
2012-08-20 15:46:24 +02:00
Mikael Magnusson
52dd46f9d3
transformtool: Copy the corner scale non-aspect frompivot code to side scale
2012-08-20 15:41:55 +02:00
Mikael Magnusson
76f23aa8a0
transformtool: Use better method for keepaspect side scaling
2012-08-20 15:41:55 +02:00
Mikael Magnusson
051775eb0d
transformtool: Fix frompivot for cornerscale, only problem is the handle doesn't end up at mouse cursor
2012-08-20 15:41:55 +02:00
Mikael Magnusson
615b5fabfd
transformtool: Add the five options instead of just two
2012-08-20 15:41:55 +02:00
Mikael Magnusson
6dac9e84f9
transformtool: Show an incredibly helpful message in the statusbar when a handle is hovered over
2012-08-20 15:41:55 +02:00
Mikael Magnusson
5cfa57ae87
transformtool: how to draw in screen coords
2012-08-20 15:41:54 +02:00
Mikael Magnusson
b0dbaaae54
transformtool: Add todo about pivot point
...
Move pivot with frame, needs to do so for all operations
2012-08-20 15:41:54 +02:00
Mikael Magnusson
be3f42c401
transformtool: implement aspect constraint for scaling via side handle
2012-08-20 15:41:54 +02:00
Mikael Magnusson
e762764a1d
transformtool: Make basic scale op via side handle behave as spec, no constrain or frompivot
2012-08-20 15:41:54 +02:00
Mikael Magnusson
3367a415c4
transformtool: corner scale: use full transform machinery to keep pivot constant position, missing some offset maybe
2012-08-20 15:41:54 +02:00
Mikael Magnusson
d5220e7d42
transformtool: nonworking naive frompivot for corner scale
...
This just scales the distance to the pivot from the handle in x and y
separately, which turns out to only work sometimes.
2012-08-20 15:41:54 +02:00
Mikael Magnusson
c5b4beff65
transformtool: Make corner scale op behave as spec, no frompivot
2012-08-20 15:41:53 +02:00
Mikael Magnusson
948cf1801c
transformtool: implement fromcenter constraint for shearing (old spec)
...
This doesn't keep the pivot in place, it merely moves the opposite edge
by the same amount (but in the opposite direction).
2012-08-20 15:41:53 +02:00
Mikael Magnusson
9a58e878be
transformtool: Make shear op behave as spec, no frompivot
2012-08-20 15:41:53 +02:00
Mikael Magnusson
5ed30efc49
transformtool: remove unneeded old stuff, cleanup
2012-08-20 15:41:53 +02:00
Mikael Magnusson
ce2c959408
transformtool: Make perspective op behave as spec
2012-08-20 15:41:53 +02:00
Mikael Magnusson
a532c77bca
transformtool: Make rotation axis behave as spec
2012-08-20 15:41:33 +02:00
Mikael Magnusson
81cb334d94
transformtool: Make rotate op behave as spec
2012-08-20 15:22:22 +02:00
Mikael Magnusson
dd470c9259
transformtool: Make move op behave as spec
2012-08-20 15:22:22 +02:00
Mikael Magnusson
003ccf2aec
transformtool: Enable hit detection for new handles
2012-08-20 15:22:22 +02:00
Mikael Magnusson
a8a8450b6e
transformtool: Add temporary new handles
...
put perspective handles on the outside instead (if you invert the frame,
they'll switch place with the scale handles, oh well)
2012-08-20 15:22:22 +02:00
Mikael Magnusson
9e330e432b
transformtool: temp hack to fiddle with drawing interface
2012-08-20 15:22:22 +02:00
Mikael Magnusson
c4143ff209
transformtool: Remove shift-clicking to accept transform since shift is used as a modifier
2012-08-20 15:22:22 +02:00
Mikael Magnusson
362afb122a
transformtool: Try to straighten out modifiers
2012-08-20 15:22:21 +02:00
Mikael Magnusson
2967e4fbfd
transformtool: remove unused function shearvector()
2012-08-20 15:22:21 +02:00
Mikael Magnusson
99f9d4d219
transformtool: add old "new" unified transformation tool
...
This is the proof of concept code I wrote before gsoc, with very naive
behaviour and simple interface.
2012-08-20 15:22:21 +02:00
Mikael Magnusson
f5b08f33aa
transformtool: Infinite undo
...
add undo and redo buttons, can undo all interactions. The reset button
is equivalent to undoing all operations and lets you press redo to get
back to before you reset. Doing something after undo will of course
clear all redo events.
2012-08-20 15:22:21 +02:00
Mikael Magnusson
c883c761df
transformtool: calculate center handle position correctly, add pivot handle
...
and use pivot handle in rotatetool so it works as before.
2012-08-20 15:22:21 +02:00
Mikael Magnusson
7baaaa4867
app: remove useless function call in gimp_tool_motion
2012-08-20 15:22:20 +02:00
Michael Natterer
47c987b09e
Bug 676270 - cppcheck report
...
Fix a couple of harmless stuff pointed out in the report, and one
real bug: gimp_plug_in_close() was killing each process 10 times
on windows.
2012-08-04 03:20:36 +02:00
Michael Natterer
078128bb09
Bug 678890 - Selection box handles do not respond after changing layer
...
Make sure that temporarily setting/unsetting tool->control's "preserve
tool across image changes" does not mess up the default value:
Introduce gimp_tool_control_push/pop_preserve() which restores the old
state automatically, and use it in all tools, instead of saying
set_preserve(TRUE/FALSE) around image changes.
2012-07-26 18:17:01 +02:00
Massimo Valentini
c743a4fc0a
app: don't pass a NULL widget to gtk_widget_event
...
<Alt>C C <Ctrl>1 <ESC> used to print:
(gimp-2.8:1): Gtk-CRITICAL **: IA__gtk_widget_event:
assertion `GTK_IS_WIDGET (widget)' failed
2012-07-05 18:08:01 +02:00
Michael Natterer
3de48e6570
app: experiment with different UI value ranges for different image precisions
...
in the levels tool. This clearly needs a generic solution for the many
places that need such changes.
2012-06-07 21:47:07 +02:00
Michael Natterer
ccae8cffc3
app: add color-reduction to the colors menu
2012-05-23 12:56:24 +02:00
Michael Natterer
7d280abd9a
Bug 676585 - Gimp crashes when writing in Arabic and clicking right arrow
...
Check for pango_layout_move_cursor_visually() returning a new index of
G_MAXINT, which indicates that we moved beyond the end of the layout,
and do nothing instead of trying to access the memory there.
2012-05-23 09:44:51 +02:00
Michael Natterer
513e3b6a78
app: disable the foreground select tool properly: #if 0 everything
...
so it's not in the way of further cruft removal.
2012-05-21 03:09:08 +02:00
Michael Natterer
d93b7e5e54
app: the TileManager in gimptransformtoolundo.h needs porting
2012-05-21 02:27:03 +02:00
Michael Natterer
d80182cf25
app: disable the IScissors tool, if you want it back, please go ahead
2012-05-20 20:38:12 +02:00
Michael Natterer
e5fc441433
app: GimpIscissorsTool: move one-time initializations to class_init()
2012-05-20 19:19:12 +02:00
Michael Natterer
2d882dd64f
Bug 676279 - Ctrl or Shift causes selection tools to reset...
...
Make sure to not override the logic that separates the tool option's
selection mode from the one determined by modifiers, by blindly
calling gimp_modifiers_to_channel_op(state) on a zero state.
2012-05-17 23:34:22 +02:00
Michael Natterer
c4142d0574
app: change the value to render in the GimpScanConvert API to a 0..1 double
2012-05-13 23:13:53 +02:00
Alexandre Prokoudine
eb48617a38
Replaced old Difference of Gaussians, Laplace and Sobel filters with new GEGL operations
2012-05-13 06:41:19 +04:00
Alexandre Prokoudine
ac85c84a0f
Replaced old Ripple and Lens Distortion filters with new GEGL operations
2012-05-13 06:15:24 +04:00
Alexandre Prokoudine
20ae491b21
Replaced the old Unsharp Mask filter with the new GEGL operation
2012-05-13 05:38:24 +04:00
Michael Muré
bec5a7e805
cage tool: fix handle added in the wrong side of the cage
...
This happened when:
1) cage still open
2) clicking on the edge between the first and the last handle
2012-05-11 12:34:53 +09:00
Michael Muré
d9ba8b81da
Bug 675825 - (cage) simply using cage transform tool makes gimp to crash.
...
Just check if there is enough handles before closing
2012-05-11 12:02:58 +09:00
Michael Natterer
7101ee191a
app: move all GEGL operations to new directory app/operations/
2012-05-10 21:22:44 +02:00
Michael Natterer
69893e4f72
app: remove GimpPickable::get_tiles()
...
and change some legacy places to get their tiles from the buffer
returned by GimpPickable::get_buffer().
2012-05-06 01:01:54 +02:00
Michael Natterer
e7e8c9ef0a
app: don't call gimp_image_flush() when cancelling GimpImageMapTool
...
because the tool might be cancelled from some other place opening an
undo group, so flushing the image would update menus and whatnot while
that other operation is running, with unforeseeable side
effects. Also, flusing the image here is not needed because we didn't
change anything in the image. Instead, make sure manually that the
display is updated correctly after restoring GimpImageMapTool's
temporary editing.
2012-05-05 21:47:17 +02:00
Michael Natterer
d198c9d85c
app: don't use g_str_has_prefix() for blacklisting GEGL ops
...
so we don't accidentially blacklist things.
2012-05-05 20:49:27 +02:00
Michael Natterer
5ea928b3df
app: use our gtk_box_new() wrapper instead of gtk_vbox_new()
2012-05-04 17:23:17 +02:00
Michael Natterer
c1259daa54
app: blacklist gegl:sdl-display in the GEGL tool
2012-05-03 15:06:45 +02:00
Michael Natterer
84745b48e8
app: add a color button and picker to the colorize tool dialog
2012-05-03 15:02:34 +02:00
Michael Natterer
cf43a09626
app: clamp the return value of gimp_operation_levels_map_input()
...
before putting it into 8 bit for rendering UI stuff, because the
function itself doesn't clamp any longer.
2012-05-02 17:51:23 +02:00
Michael Natterer
1ea3bb827e
app: add a dedicated menu entry for gegl:color-temperature
2012-05-02 17:51:23 +02:00
Michael Natterer
3db9deed1c
app: add color pickers to all GEGL tool color properties
...
The way to make gimp_prop_table_new() create tool pickers is
disgusting, but works.
2012-05-02 17:51:22 +02:00
Michael Natterer
50439e812e
app: move GimpLevelTool's color picking stuff into GimpImageMapTool
...
so all subclasses can use it.
2012-05-02 17:51:22 +02:00
Michael Natterer
662bba9fb3
app: generalize some Babl format hardcoding in GimpLevelsTool
2012-05-02 17:51:22 +02:00
Michael Natterer
981f039053
app: don't disable the blend tool on indexed drawables
2012-05-02 17:51:21 +02:00
Michael Natterer
fa0faf4254
app: replace the polar-coords plug-in by gegl:polar-coordinates
2012-05-02 17:51:19 +02:00
Michael Natterer
c57b4f0fa3
app: port by color select and fuzzy select to float
...
so it works nicely on all precisions, disable HSV color matching for
now, need to decide what to do with it.
2012-05-02 17:51:18 +02:00
Michael Natterer
1bbd3d40a8
app: make the GimpTempBuf struct private and add accessors
2012-05-02 17:51:12 +02:00
Michael Natterer
7d9cd6a413
app: don't hardcode "Y u8" when checking whether to clip transformed buffers
...
instead, check if the format has alpha.
2012-05-02 17:51:08 +02:00
Michael Natterer
85bd6b0dd9
app: pass a format, not bpp, to gimp_viewable_get_dummy_pixbuf()
...
and add tons of <gegl.h> includes.
2012-05-02 17:51:08 +02:00
Michael Natterer
3e9fdf1815
app: change GimpBoundary to find the boundary a float component
...
Require passing in a Babl format that will extract the float component
the algorithm should run on.
2012-05-02 17:51:07 +02:00
Michael Natterer
3ea0e3f090
app: return double not int from GimpPickable::get_opacity_at()
...
and fix GimpLayer's impl to honor the mask also for layers without
alpha.
2012-05-02 17:51:07 +02:00
Michael Natterer
ca6323f382
app: fix signal signature of GimpColorTool::picked()
...
A Babl format is not of GIMP_TYPE_IMAGE_TYPE, this would have horribly
crashed on 64bit, I guess...
2012-05-02 17:51:02 +02:00
Michael Natterer
bdf6b48138
app: move GimpTempBuf from base/ to core/
...
and forget about include policy in base/, it's scheduled for removal
anyway.
2012-05-02 17:51:01 +02:00
Michael Natterer
dccb909009
app: make GimpTempBuf reference counted
...
and remove the "take_ownership" parameter from
gimp_temp_buf_create_buffer(), simply always ref the buf.
2012-05-02 17:51:00 +02:00
Michael Natterer
d5d8e36d21
app: gimp_-namespace all GimpTempBuf functions
2012-05-02 17:51:00 +02:00
Michael Natterer
42a5f01be3
app: rename TempBuf to GimpTempBuf
2012-05-02 17:51:00 +02:00
Michael Natterer
9285529f9b
app: silence compiler warning in GimpBucketFillTool
2012-05-02 17:50:59 +02:00
Michael Natterer
7441a1f6f7
app: turn the TempBuf's "bytes" into "format" and port everything to it
2012-05-02 17:50:59 +02:00
Michael Natterer
d743bae6a7
app: remove temp_buf_resize()
...
and fix its only user by simply reallocating the buf.
2012-05-02 17:50:58 +02:00
Mikael Magnusson
3406bf0b69
gimpbucketfilltool: Fix switch block always falling through to pattern fill
2012-05-02 17:50:54 +02:00
Michael Natterer
aebf55d799
app: blacklist gegl:threshold
2012-05-02 17:50:52 +02:00
Michael Natterer
64cd825796
app: blacklist all ops that are in gimp menus now, and some useless ones
2012-05-02 17:50:52 +02:00
Michael Natterer
797e622734
app: remove obsolete include
2012-05-02 17:50:52 +02:00
Michael Natterer
75f2bc1aac
app: resurrect the operation tool's title
2012-05-02 17:50:49 +02:00
Michael Natterer
cf37aa7dba
app: add a GimpSettingsBox to all GEGL operation filter dialogs
...
so they store all recently used settings, and explicitly added ones,
just like the color tools.
2012-05-02 17:50:49 +02:00
Michael Natterer
9031cdc645
app: add a ton of parameters to GimpImageMapTool::get_settings_ui()
...
so they can be passed in instead of being looked up in the class
struct, which enables freely configuring the settings stuff from
subclasses, such as soon GimpOperationTool.
2012-05-02 17:50:48 +02:00
Øyvind Kolås
818739a0e3
app: remove superfluous frame and label from GEGL tool
2012-05-02 17:50:47 +02:00
Øyvind Kolås
ebd419d4d5
app: use a gamma of 1.7 for brush radius slider
2012-05-02 17:50:45 +02:00
Michael Natterer
8bc6f1ee09
app: add parent_type parameter to gimp_gegl_get_config_proxy()
...
and derive from that type. Use GimpImageMapConfig as base class for
GimpOperationTool's config.
2012-05-02 17:50:42 +02:00
Michael Natterer
e8cc9d1bf5
app: turn gimp_image_map_tool_add_settings_gui() into a virtual function
...
and change it to return the settings ui, not add it.
2012-05-02 17:50:42 +02:00
Øyvind Kolås
49de3d5292
app: follow changes in GeglOperation API
2012-05-02 17:50:42 +02:00
Michael Natterer
2a853cd1ee
app: remove GimpPickable::get_bytes()
2012-05-02 17:50:42 +02:00
Michael Natterer
867da8f293
app: add gimp_context_get_foreground,background_pixel()
...
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer
89d525c970
app: remove legacy support from GimpImageMap
2012-05-02 17:50:40 +02:00
Michael Natterer
98226d0b36
app: remove legayc support from GimpImageMapTool
2012-05-02 17:50:40 +02:00
Michael Natterer
f248324fd3
app: remove the lagacy hue-saturation cruft
...
it's unclear whether the operation is correct, but that can be sorted
out on master and merged.
2012-05-02 17:50:40 +02:00
Michael Natterer
8008b75411
app: forgot the GimpImageType -> Babl change in pick_color() here
2012-05-02 17:50:39 +02:00
Michael Natterer
36e982e2ed
app: port gimp_image_pick_color() to return a Babl format
...
instead of a GimpImageType.
2012-05-02 17:50:39 +02:00
Michael Natterer
2c0fde88f2
app: remove the legacy color-balance cruft
2012-05-02 17:50:38 +02:00
Michael Natterer
3a48101b9d
app: use below new function for shapeburst blend and cage tool progress
2012-05-02 17:50:37 +02:00
Michael Natterer
96357dbfd3
app: add infrastructure to invoke GEGL filters from a menu item
...
and for fun add pixelize and gaussian blur to Filters -> Blur.
2012-05-02 17:46:16 +02:00
Michael Natterer
98ccc9512c
app: factor out the "Apply GEGL Operation" functionality from GimpGeglTool
...
to a new GimpOperationTool, make GimpGeglTool its subclass and leave
only the selection of the operation in GimpGeglTool.
2012-05-02 17:46:16 +02:00
Michael Natterer
726d3c980c
app: factor out gimp_gegl_config_proxy_sync() from GimpGeglTool
2012-05-02 17:46:16 +02:00
Michael Natterer
fd033afe11
app: factor out the creation of GeglOperation config proxy objects
2012-05-02 17:46:15 +02:00
Michael Natterer
2b6b5a8ada
app: remove unused base/ includes
2012-05-02 17:46:15 +02:00
Michael Natterer
8d5471502e
app: move GimpHistogram from base/ to core/
2012-05-02 17:46:13 +02:00
Michael Natterer
a4c83d13ed
app: forgot to remove the Threshold cruft typedef
2012-05-02 17:46:12 +02:00
Michael Natterer
cde58408fa
app: remove the legacy levels cruft
2012-05-02 17:46:12 +02:00
Michael Natterer
a34b19774b
app: remove the legacy curves cruft
...
and move PDB parameter collection into GimpCurvesConfig convenience
constructors.
2012-05-02 17:46:11 +02:00
Michael Natterer
6c59c45612
app: replace GimpPaintCore's undo_tiles by a GeglBuffer
...
and simply use a dumb straight copy of the drawable, it's GEGL's job
to do proper COW.
2012-05-02 17:46:10 +02:00
Michael Natterer
f8f4455459
app: change GimpDrawable::set_tiles() to ::set_buffer()
...
and remove the "type" argument, GeglBuffers have a format.
2012-05-02 17:46:07 +02:00
Michael Natterer
525a405270
app: port the entire transform API from TileManager to GeglBuffer
2012-05-02 17:46:06 +02:00
Michael Natterer
0bcae125b5
app: merge gimp_drawable_get_read_buffer() and get_write_buffer()
...
into get_buffer(). The loss of zero copy will be compensated soon.
2012-05-02 17:46:04 +02:00
Michael Natterer
f67bcfa82b
app: port the entire GimpScanConvert API to GeglBuffer
2012-05-02 17:46:04 +02:00
Michael Natterer
e01189ca77
app: remove checks from stuff that now works on indexed layers
2012-05-02 17:46:04 +02:00
Michael Natterer
dcfcfcf433
app: port GimpBoundary to GEGL, including its API
2012-05-02 17:46:03 +02:00
Michael Natterer
58dfa962a1
app: port simple rotating and flipping to GEGL
...
Which requires making the entire copy/paste apparatus aware of the
Babl format of the passed around tile managers.
2012-05-02 17:46:02 +02:00
Michael Natterer
2c62644f94
app: BoundSeg -> GimpBoundSeg, boundary_foo() -> gimp_boundary_foo()
2012-05-02 17:46:02 +02:00
Michael Natterer
9323c2f28c
app: move base/boundary.[ch] to core/gimpboundary.[ch]
...
No other changes yet, just make the move build.
2012-05-02 17:46:02 +02:00
Michael Natterer
1780cfc1e7
app: remove the !seed_fill case from gimp_drawable_bucket_fill()
...
We use gimp_edit_fill() for that now. Also remove bucket fill's
_full() variant because it's unused now.
2012-05-02 17:46:01 +02:00
Michael Natterer
3ec245a991
app: add opacity and paint_mode to gimp_edit_fill[_full]()
...
and use it instead of bucket-fill in the non-seed-fill case.
2012-05-02 17:46:01 +02:00
Øyvind Kolås
cdf503ab96
app: make the GEGL tool work on indexed images
...
With the recent refactoring, there is nothing that stops GEGL operations from
working on indexed images.
2012-05-02 17:46:01 +02:00
Michael Natterer
15957cb3c4
app: remove the legacy brightness-contrast code and use GEGL instead
...
it's reasonably fast now.
2012-05-02 17:45:53 +02:00
Michael Natterer
8684b87f04
app: clean up the desaturate cruft removal to look like the others
2012-05-02 17:45:45 +02:00
Michael Natterer
aa07344d56
app: remove the legacy colorize code
2012-05-02 17:45:45 +02:00
Michael Natterer
e3c720ad20
app: remove the legacy threshold code
2012-05-02 17:45:45 +02:00
Michael Natterer
7aa7f168b8
app: remove the legacy posterize code
2012-05-02 17:45:45 +02:00
Michael Natterer
70b26d1ecb
app: remove the legacy desaturate implementation
...
The GEGL one is just as fast or faster.
2012-05-02 17:45:45 +02:00
Michael Natterer
08dd7901b1
app: allow to opionally not implement GimpImageMapTool::map()
...
it's not needed for many tools that have no legacy implementation.
2012-05-02 17:45:45 +02:00
Michael Natterer
24e6b20be8
Bug 674373 - Resizing Mask size is making gimp to crash
...
gimp_transform_tool_real_transform(): make sure we clip layer masks
and channels to their original extents also when transforming them
completely (not just a selection of them).
2012-04-21 22:42:53 +02:00
Øyvind Kolås
17f92b7379
app: the destroy functions are gone from GEGL, use g_object_unref() instead
2012-03-29 22:21:05 +01:00
Øyvind Kolås
eea7a40dbc
app: update GeglOps to new GEGL API
2012-03-29 19:22:22 +01:00
Michael Natterer
439f7f579a
app: s/Babl/const Babl/
2012-03-24 18:52:31 +01:00
Massimo Valentini
6600bb8347
app: silence a harmless critical warning
...
Executing Desaturate... or Posterize... used to print:
Gimp-Widgets-CRITICAL **: gimp_settings_box_add_current: assertion
`GIMP_IS_SETTINGS_BOX (box)' failed
2012-03-18 18:30:28 +01:00
Michael Natterer
b262c93048
app: create an own GimpOperationBrightnessContrast
...
and use it instead of gegl:brightness-contrast because the GEGL op is
giving different reaults.
2012-03-13 15:02:17 +01:00
Michael Natterer
aa7e7c153c
app: remove another bunch of one-line GtkTables
2012-03-12 20:12:11 +01:00
Michael Natterer
5e94863c8e
app: get rid of a GtkTable in gimp_paint_options_gui(), and some cleanup
2012-03-09 20:30:05 +01:00
Massimo Valentini
7fed1b6e93
Bug 651956: Text tool misremembers point size upon reloading file
...
When setting the unit of a property shared with a gimp_prop_size_entry,
a conversion is applied to the corresponding size property (to preserve
size_entry's ref-value), but the conversion risks to change the size
property already updated.
To update, at the same time, size and unit, it is better to start updating
size_entry's unit in order to trigger the useless conversion on the stale
size.
2012-03-09 19:21:44 +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
Michael Natterer
7f5a43f3e1
app: rename GimpToolInfo::menu_path to ::menu_label
...
"path" is a really ancient pre-GtkAction terminology here.
2012-02-14 10:00:26 +01:00
Michael Natterer
f2fc342101
Bug 670024 - Zoom Tool menu label is not translated
...
Remove the message context from the zoom tool's menu label. It's not
needed and can't work like that for menu items.
2012-02-14 09:54:29 +01:00
Massimo Valentini
b994280473
Bug 668814: Cannot move cursor right in on canvas editor
...
One possible way to decrease the incompatibilities
between letter spacing in a tagged gtk_text_buffer
and in an equivalent pango_layout
Remove also a valgrind reported invalid write in
gimptextbuffer.c
2012-02-09 12:36:43 +01:00
Michael Natterer
2414301799
Review the last few commits and apply some style fanaticism
...
some completely unrelated,
2012-02-07 20:36:55 +01:00
Massimo Valentini
05aa83270d
Bug 554359: text tool should compress undo steps...
...
when the rectangle is manipulated
2012-02-07 17:32:02 +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
325bce54a7
app: port dockable showing to using GimpWindowStrategy API
...
so it works right in SWM. Fixed actions/, tools/, and app/ for now.
2012-01-30 23:24:44 +01:00
Michael Natterer
a77809a13b
Bug 668447 - Rotate tool: wrong keyboard bindings to rotate image interactively
...
Make "Right" rotate right and "Left" rotate left.
2012-01-22 20:47:25 +01:00
Michael Natterer
b26216f1d3
app: gimp_rectangle_tool_auto_shrink(): honor the drawable's offset
2012-01-14 21:28:34 +01:00
Alexis Wilhelm
915da4517d
Bug 666853 - Auto shrink selection doesn't work
2012-01-11 21:12:58 +01:00
Martin Nordholts
64d2dc122a
app: Add and use gimp_dialog_factory_find_widget()
2012-01-10 19:47:52 +01:00
Michael Natterer
c34239c0bb
Bug 667367 - Bad widget hint
...
Remove the tooltip of GimpTransformOptions:constrain from the param
spec and add it manually, so it is different for rotate and scale.
2012-01-07 22:18:22 +01:00
Michael Natterer
056e09a6cb
Remove the makefile.msc build system, it is unmaintained since 2008
2011-12-16 15:53:56 +01:00
Michael Natterer
8569c6e2f7
app: don't request motion hints on the canvas
...
They are a dark ages concept, and it's almost 2012.
2011-12-10 23:22:08 +01:00
Michael Natterer
3f4754d124
app: set GimpToolControl->motion_mode to COMPRESS for move and color picker
2011-12-10 23:16:06 +01:00
Michael Natterer
57dd302ee8
app: don't redundantly set GimpToolControl->scroll_lock to FALSE
2011-12-10 23:15:03 +01:00
Michael Natterer
4300612962
app: separate handling of reverse-gradient from paint dynamics
...
because it belongs to the gradient and should be changed whenever the
gradient gets changed.
Introduce gimp_paint_options_copy_gradient_props() and call it at the
right places in the tool manager.
2011-12-06 22:39:29 +01:00
Michael Natterer
06d5b9e9df
app: fix indentation in gimptextool-editor.c
2011-12-04 19:37:35 +01:00
Michael Natterer
31d443a465
app: don't let applying a tool preset overwrite the tool option's name
...
GimpConfig needs some was to "lock" properties, or some other proper
solution to this problem.
2011-11-24 22:15:23 +01:00
Massimo Valentini
82480557ea
app: silence a harmless Gimp-Tools-CRITICAL
...
double-clicking on the preview of a newly created path
in paths dockable (to activate the vector tool) used to
show a
Gimp-Tools-CRITICAL **: gimp_draw_tool_add_path: ...
assertion `desc != NULL' failed
2011-11-18 18:36:29 +01:00
Michael Natterer
d38ded387d
Bug 663121 - guides are below rotate/transform/shear/perspective preview
...
Add a canvas item group for previews, and a small preview infrastructure
to GimpDrawTool, and put the transform preview into the preview group,
which is below all guides, grid and layer boundaries.
2011-11-16 21:32:29 +01:00
Michael Natterer
ffc9948d6e
app: add a canvas group for tool items
...
so we can control where in the canvas item stack they appear.
Put the group right below the software cursor.
2011-11-16 21:10:43 +01:00
Michael Natterer
f39399c9fc
app: don't leak GimpInkOption's GtkSizeGroup
2011-11-04 01:32:17 +01:00
Mukund Sivaraman
abaf846578
Revert "app (selectiontool): Drop dead code"
...
This reverts commit c0083d24e6 . It was
decided that although this code doesn't have an effect, it needs to be
modified to be fixed.
2011-10-12 19:30:58 +05:30
Mukund Sivaraman
c0083d24e6
app (selectiontool): Drop dead code
2011-10-12 17:15:04 +05:30
Mukund Sivaraman
9a3ee43ff6
app: Remove redundant assignment
2011-10-08 18:24:55 +05:30
Michael Natterer
89d3869760
app: update GimpBlendTool's status when Alt is pressed/released
2011-10-07 01:39:53 +02:00
Michael Natterer
23dca3b522
app: don't use gimp_get_mod_reparator() for the source tool status
...
The new code is just as broken from an i18n point of view, but at
least looks right if translated right. Add translator comments to the
used strings in the clone and heal tools.
2011-10-07 00:34:43 +02:00
Michael Natterer
6d1b5c4241
app: pull virtual modifier replacement into gimp_get_mod_string()
...
and remove it from all other places. We only want to have the virtual
modifiers when displaying a modifier string (and in some other cases,
but these are all handled internally by GTK+).
2011-10-06 22:56:05 +02:00
Michael Natterer
38b8f0596d
app: use the new modifier API instead of constants in all tools
...
There are still many uses of literal SHIFT and MOD1 left, but all uses
of CONTROL are gone. Should work exactly as before on Win/X11, and
still has some glitches on OSX.
2011-10-06 21:59:07 +02:00
Alexia Death
da2410148c
Revert "app: initalize rectangle tool respecting size constrants"
...
This reverts commit ef7060251c .
2011-10-06 20:16:26 +03:00
Alexia Death
970782cfef
Revert "app: prevent executing rectangle tool on the creating click"
...
This reverts commit 5a99bf4f47 .
2011-10-06 20:16:26 +03:00
Alexia Death
c8cde40952
Revert "app: handle motion right just created size fixed rects"
...
This reverts commit c8fa2c99e8 .
2011-10-06 20:16:26 +03:00
Alexia Death
3ad505b124
Revert "app: rect tool changes made for suppressed execute need to be applied"
...
This reverts commit eff20af915 .
2011-10-06 20:16:25 +03:00
Michael Natterer
e55ceea11a
app: handle MOD2 in GimpTool's generic modifier code
...
because we "know" that it's used on the Mac and unfortunately there
is no other way of knowing but simply knowing it...
2011-10-06 16:43:23 +02:00
Mukund Sivaraman
ad3633110a
app: Remove duplicate assignment
2011-10-06 08:37:41 +05:30
Michael Natterer
990a4bd271
app: don't forget to move the start handle in GimpBlendTool
...
because the tool moves both handles when Alt is pressed.
2011-10-05 23:40:44 +02:00
Michael Natterer
3982ddc39b
app: implement gimp_get_mod_string() using gtk_accelerator_get_label()
...
so it can handle all modifiers (also Mac ones).
Remove gimp_get_mod_name_shift,control,alt().
2011-10-05 01:30:59 +02:00
Michael Natterer
19b9bfd189
libgimpwidgets: add gtk_scale_new() to gimp3migration.[ch]
...
and use it all over the place. Also change some GtkObject* variables
to GtkAdjustment*.
2011-10-02 14:36:41 +02:00
Alexia Death
eff20af915
app: rect tool changes made for suppressed execute need to be applied
2011-10-01 17:07:51 +03:00
Alexia Death
c8fa2c99e8
app: handle motion right just created size fixed rects
2011-10-01 15:03:16 +03:00
Alexia Death
5a99bf4f47
app: prevent executing rectangle tool on the creating click
2011-10-01 15:03:16 +03:00
Alexia Death
ef7060251c
app: initalize rectangle tool respecting size constrants
2011-10-01 12:38:04 +03:00
Michael Natterer
3e336199b9
app: use gtk_box_new()
2011-09-30 11:29:11 +02:00
Michael Natterer
624e99041b
app: remove unused variable in gimp_image_map_tool_initialize()
2011-09-24 16:20:50 +02:00
Massimo Valentini
281c4cebb2
Bug 659804: wrong tooltips in the Align tool options
2011-09-22 18:13:10 +02:00
Massimo Valentini
b300e389d2
Bug 659052: stroke path with a pattern always uses the Pine pattern
2011-09-20 14:01:35 +02:00
Alexia Death
d32fa80d1d
app: Move smooth to painttool and clean up the rest
2011-09-14 20:44:45 +03:00
Massimo Valentini
27feccc4a4
Do not access transform tool handles if NULL or stales
...
For example starting GIMP and pressing
Ctrl-N Enter Shift-T (or Shift-R or Shift-P)
showed warnings on the console, and with window manager's
focus mode set to 'click' it was also possible to crash GIMP.
2011-09-13 18:12:35 +02:00
Michael Natterer
a4591aae11
app: GimpPerspectiveCloneTool: don't start an already active draw tool
2011-09-03 10:14:52 +02:00
Michael Natterer
f6d106705e
app: move variable to local scope in GimpTextOptions
2011-09-02 00:12:10 +02:00
Bruce Cowan
841c8a7ebe
String review: fix some spelling and formatting issues
2011-08-28 20:07:55 +02:00
Michael Natterer
5a7c517574
app: improve the undo strings of the transform tools
...
Apply modified patch from Liam Quin which replaces the hardcoded
undo strings by dynamic ones returned by a new virtual function
of GimpTransformTool.
2011-08-27 08:37:30 +02:00
Mikael Magnusson
6d3047f6a9
app: add missing space in help string
2011-08-16 19:03:18 +02:00
Mikael Magnusson
bed3ca0ada
app: fix right-click cancel after a reset in transformtool
2011-08-13 13:34:17 +02:00
Michael Muré
4f913949d3
cage tool options: better description for the fill plain color option
2011-08-09 14:02:52 +02:00
Martin Nordholts
71af0311de
Bug 645120 - Disable color tools overlay dialogs
2011-08-05 01:59:49 +02:00
Michael Natterer
762428501d
app: remove excess newlines from gimppaintoptions-gui.c
2011-08-02 16:34:00 +02:00
Michael Natterer
5726141905
app: use g_object_bind_property() in GimpBucketFillOptions
...
to set a frame's sensitivity instead of a signal callback. Also
improve tool options.
2011-08-02 10:46:53 +02:00
Michael Natterer
0453f264da
app: a space was missing in GimpMeasureOptions' tooltip
2011-07-31 22:52:06 +02:00
Michael Natterer
1b2ae6fd9e
app: clean up the transform options' preview and guides UI
2011-07-31 00:25:43 +02:00
Michael Natterer
e9bf7ba6dc
app: rename the "Tool toggle" frame in zoom options to "Direction"
2011-07-31 00:25:04 +02:00
Michael Natterer
314717f4bb
app: clean up GimpTransformOptions' preview controls
...
Turn the "Preview type" combo into a simple "Show image" toggle and
enable the "No guides" choice in the guides combo. Remove unused enum
GimpTransformPreviewType. This way the preview and guide/grid controls
are strictly separate and much less confusing.
2011-07-27 23:15:02 +02:00
Michael Natterer
d092573a3b
app: fix GimpTransformOptions::clip's tooltip
2011-07-27 22:24:10 +02:00
Michael Natterer
3704b8cd59
app: GimpTransformOptions::clip is enum GimpTransformResize, not gboolean
2011-07-27 22:23:43 +02:00
Michael Muré
2ba3673359
gegl-tool: blacklist lens-correct and hstack since they can't be used with the gegl tool.
...
lens-correct expect a lens correction model
hstack expect and aux buffer
2011-07-25 15:24:16 +02:00
Michael Natterer
6b78436f56
app: implement all rectangle guides options for the transform guides
2011-07-24 19:07:51 +02:00
Michael Natterer
c2e6f24687
app: add GimpCanvasTransformGuides and use them in the transform tool
...
which removes a lot of code from the transform tool, and reduces the
number of canvas items used for the transform grid from possibly
gazillions to one.
2011-07-24 18:42:13 +02:00
Michael Natterer
43788feb50
app: remove enum GimpTransformGridType
...
and use the two new values from GimpGuidesType instead.
2011-07-24 18:01:21 +02:00
Michael Natterer
be5c0df173
app: add "n-lines" property to GimpCanvasRectangleGuides
...
and add handling of the N_LINES guides type. Hardcode "4" in
GimpdrawTool for now, it's currently unused anyway.
2011-07-24 17:49:31 +02:00
Michael Natterer
f7a390d5d0
app: add N_LINES and SPACING to enum GimpGuidesType
...
but don't show them in the rectangle options UI, this is just a step
towards unifying the enums.
2011-07-24 17:47:08 +02:00
Michael Muré
2ebf1b555a
gegltool: blacklist contrast-curve, fill-path and vector-stroke since curve and path are not supported by the UI
2011-07-23 21:32:13 +02:00
Michael Natterer
8b57ef51cc
app: clean up the new brush outline stuff a bit
2011-06-30 09:27:43 +02:00
Alexia Death
3c3657f780
app: Refactor path code to support styles and add outline style for use in brush outline
2011-06-29 23:05:14 +03:00
Michael Muré
40e564711c
gimpcagetool: remove unused parameter for gimp_cage_tool_compute_coef
2011-06-28 23:25:13 +02:00
Michael Natterer
df448eb171
app: GimpTransformTool: remove members handle_w and handle_h
...
Instead, return them from the private gimp_transform_tool_handles_recalc()
because they are only needed in the caller.
2011-06-26 23:37:32 +02:00
Michael Natterer
7f626b9877
app: fix applying paint tool presets when gobal brush/dynamics are used
2011-06-08 21:34:43 +02:00
Michael Natterer
9eba5b9311
app: refactor the tool_manager brush options sharing code
2011-06-07 21:25:22 +02:00
Michael Natterer
ea27c7bc83
app: add the MIN4() and MAX4() macros to gimp-utils.h
...
instead of having them in 5 .c files.
2011-06-04 17:16:21 +02:00
Michael Natterer
d27b7a985c
app: make gimp_selection_tool_start_edit() much easier to use correctly
...
- Add a "display" parameter and ignore tool->display
- Require the tool to be inactive, not active when calling it
This exactly matches all its use cases, which is "delegate to
GimpEditSelection tool if we are not doing anything ourselves", and
enables removing all delegate_button_press() functions because they
became one-liners after adapting to this change.
2011-06-03 09:49:40 +02:00
Alexia Death
52cd1b9043
app: share brush modifiers along with the brush or dynamics
2011-06-02 21:17:52 +03:00
Michael Natterer
92e3b5532f
app: update the color picker tool's dialog properly
...
Set its shell to the shell the user clicked on, so raising it won't
implicitly raise its old shell (which is very evil). Set its viewable
to the active drawable so it shows the right preview.
2011-05-25 23:03:16 +02:00
Michael Muré
0d510bfa23
fix a typo in cage tool
2011-05-24 23:35:28 +02:00
massimo v
ef15fd8623
app: remove deprecated gtk_range_set_update_policy
2011-05-24 20:46:31 +02:00
massimo v
63cc68561a
app: SIOX memory leaks
2011-05-24 20:46:31 +02:00
Michael Natterer
6c85014473
app: gimpalignoptions.c: fix typo s/distrubution/distribution/
2011-05-24 20:11:34 +02:00
Michael Natterer
4e6f43a890
app: add new item class GimpCanvasRectangleGuides and use it
...
Removes a lot of code from the rectangle tool and fixes off-by-one
drawing problems because in image coordinates, lines can't be aligned
correctly with rectangles.
2011-05-22 22:09:09 +02:00
Michael Natterer
6b34f79e51
app: gimp_rectangle_tool_draw(): lose "pub_" from local rectangle variables
...
to improve readability.
2011-05-22 17:54:29 +02:00
Michael Natterer
2f51c8afd4
app: GimpRectangleToolPrivate: don't keep a copy of the guides type around
...
It was needed only for XOR drawing.
2011-05-20 19:48:11 +02:00
Michael Natterer
0dcdfe9e80
app: move enum GimpRectangleGuide from tools/ to display/
...
and rename it to enum GimpGuidesType.
2011-05-20 19:41:48 +02:00
Michael Natterer
da380504bf
app: don't call gimp_tool_control_halt() in gimp_rectangle_tool_halt()
...
It's not the rectangle tool's business to manage press/motion/release
cycles. Fixes warnings in the crop tool.
2011-05-20 19:15:31 +02:00
Michael Natterer
3e51484b18
app: fix off-by-one x2,y2 in gimp_rectangle_tool_draw_guides()
...
the 1.0 was subtracted explicitly, I have no clue why but the reason
for it is obviously gone.
2011-05-17 23:18:19 +02:00
Michael Natterer
ab0b88b5db
app: replace the last GtkObject members by GtkAdjustment
...
Also get rid of some unneeded GTK_ADJUSTMENT() casts and replace some
local GtkObject veriables by GtkAdjustment.
2011-05-15 17:00:41 +02:00
Mikael Magnusson
80e18bdee0
app: Fix tooltip for "Use editor" checkbox
2011-05-11 22:09:21 +02:00
Michael Natterer
3184c0f339
app: use g_object_bind_property() to set sensitivity here too
2011-05-11 11:43:19 +02:00
Michael Natterer
b77b94d3ed
app: don't rely on gimp_brush_tool_create_outline() returning an outline
...
It can just as well return NULL.
2011-05-05 12:19:25 +02:00
Michael Natterer
91550117c7
app: fix GimpSourceTool's source position drawing for other displays
...
by adding the source outline's canvas item to the source display
directly. Poking in GimpDrawTool internals is gone and generally not
possible any longer since GimpCanvasItem based drawing.
2011-05-04 23:25:55 +02:00
Michael Muré
989b85988b
Cage tool: allow to add handle by clicking on an edge
2011-05-03 00:46:42 +02:00
Michael Muré
cc247b3e66
Cage tool: in cage mode, remove selected handles when hitting backspace
2011-05-03 00:46:42 +02:00
Michael Natterer
909e7833a3
app: remove some more -Wunused-but-set-variable
2011-05-02 13:53:58 +02:00
Michael Natterer
c35ff719a7
app/libgimp*: remove stuff found by -Wunused-but-set-variable
2011-05-01 23:23:19 +02:00
Michael Natterer
092e26935b
app: GimpForegroundSelectToolUndo: shorten local variable names
2011-05-01 23:19:49 +02:00
Michael Natterer
2af539020b
app: don't include individual files from libgimp*
2011-04-28 14:23:33 +02:00
Alexandre Prokoudine
b18d638000
More tooltips for tools options
...
Added previously missing tooltips for transformation tools, Flip tool,
text tool and Bucket Fill tool.
2011-04-21 15:28:05 +04:00
Mukund Sivaraman
aaea0805e1
app: Initialize orig_tiles to NULL for GIMP_TRANSFORM_TYPE_PATH case
2011-04-21 14:08:36 +05:30
Alexandre Prokoudine
58016e0a02
More tooltips for tools options
...
Added previously missing tooltips for options of the following tools:
Scissors Select tool, Foreground Select tool, Color Picker tool,
Zoom tool, Measurement tool, Align tool, Crop tool.
Changed a bunch of _() to N_() in Foreground Select tool's options
as per agreement with mitch.
2011-04-21 02:41:59 +04:00
Michael Natterer
27d312b110
app: call gimp_tool_control_halt() early in transform_tool_button_release()
...
The generic shutdown triggered by shift-click executing copes with an
already halted tool, but we don't want to add checks to tons of
button_release functions.
2011-04-20 22:22:11 +02:00
Alexandre Prokoudine
c5b44f6bd0
More tooltips for tools options
...
Added previously missing tooltips for rectangular and region
selection based tools.
2011-04-21 00:17:31 +04:00
Alexandre Prokoudine
3eee39c8fb
Terminology fixes and missing tooltips
...
Options of brush-based tools now have clearer names,
and the options themselves now have tooltips that
had been missing.
2011-04-20 22:24:19 +04:00
Michael Muré
5d771014d4
GimpCageConfig: use a GArray to store cage's point, to make easier
...
further improvement
2011-04-20 18:50:17 +02:00
Alexia Death
4d438a89de
app: restore brush size scale silder visible range to 1000
2011-04-18 22:56:45 +03:00
Michael Natterer
4d3e6b062d
app: limit the paint options' fade length scale to 1000
2011-04-18 21:35:41 +02:00
Michael Natterer
6a3fe9f9c5
app: restore the original brush size upper limit of 10000
...
but restrict the tool options sclae to 500.
2011-04-18 21:10:47 +02:00
Michael Natterer
aa7c31b802
app: s/gdouble inertia_factor/gboolean event_fill/ in eval_event()
...
Also remove "gdouble max_coord_smooth" from GimpTool and simply use
the existing motion mode for deciding whether or not to fill in
events.
2011-04-17 19:59:31 +02:00
Michael Natterer
b04c6889ac
app: remove the STRICT_TOOL_CHECKS define and ifdefs
...
Tools behave more predictably than before already, and whatever
remaining warnings will be sorted out before 2.8.
2011-04-16 20:21:52 +02:00
Michael Natterer
fcbc5eebeb
app: add an edit button the the tool options' brush etc. selectors
...
which makes getting to the editor dialogs much easier.
2011-04-07 23:48:08 +02:00
Michael Natterer
cb6b821c70
app: tool_manager: correctly preserve tool state across a push/pop
...
tool_manager_select_tool(): don't reset the previously active tool if
it is only temporarily pushed to the tool stack.
tool_manager_pop_tool(): don't try to restore the previously active
tool's state because it was not reset on push().
2011-04-06 20:40:26 +02:00
Michael Natterer
9778b6a440
app: GimpEditSelectionTool: activate the tool *after* pushing it
...
because pushing sets its focus_display which is now only possible
while the a tool is not active.
2011-04-06 20:33:23 +02:00
Michael Natterer
b659aec9a7
app: GimpMoveTool: activate the tool before starting GimpEditSelectionTool
...
Also halt it uncontitionally in button_release() because we can't
get there any longer if the tool isn't active.
2011-04-06 20:32:04 +02:00
Michael Natterer
0315f483e6
app: some general GimpPaintCore cleanup
2011-04-06 09:11:25 +02:00
Michael Natterer
21b8007b29
app: add GimpBrushCache which stores brush stuff based on transform parameters
...
such as masks and outlines. The cache is currently very stupid and
only cacheds the last transformed object. Add caches to GimpBrush for
its mask, its pixmap and its boundary, and remove the same caches and
a ton of members from GimpBrushCore. This involves adding lots of
const qualifiers because GimpBrush returns const pointers now for
trasnformed stuff.
2011-04-05 22:15:30 +02:00
Michael Natterer
a50f668d87
app: GimpBrushCore: simplify brush and dynamics setting
...
by checking for an actual change in the setters. Remove the
"foo != core->foo" checks from all callers.
2011-04-05 19:05:55 +02:00
Michael Muré
7f6d06d3e9
cagetool: fix buffer leak
2011-04-05 10:18:07 +02:00
Michael Muré
2200b80033
cagetool: fix the restoration of the image when going back to edit mode
2011-04-05 00:05:56 +02:00
Michael Muré
ec25c6be42
cage tool: fix transformed area going away when setting a cage,
...
going back to edit mode, edit the cage then going to deform mode
2011-04-05 00:05:56 +02:00
Michael Natterer
647a576cd4
app: use the new brush boundary API in GimpBrushTool
2011-04-04 21:14:57 +02:00
Michael Natterer
99e0e73fc6
app: add "x" and "y" properties to GimpCanvasPath
...
so paths can be rendered at any position. Pass 0,0 from all places
that draw GimpVectors.
2011-04-04 20:58:38 +02:00
Michael Natterer
7d39d800fc
app: GimpColorTool and GimpMoveTool: don't start the draw tool twice
...
and some minor coding style cleanup.
2011-04-04 19:20:04 +02:00
Michael Natterer
492e0f9cfd
app: some more mostly cosmetic tool cleanup
2011-04-04 08:19:12 +02:00
Enrico Schröder
d4316902a2
app: DodgeBurn/Convolve: Fix error in behavior of modifier keys
...
Fix for bug #632816 : When holding shift key to go to LineDraw mode,
then pressing ctrl and releasing shift before ctrl, the release of
ctrl switches the function of DodgeBurn and Convolute tool. This patch
adds a variable to GimpDodgeBurnTool/GimpConvolveTool to only switch
said function on releasing ctrl when it has been toggled previously.
2011-04-04 00:38:01 +02:00
Michael Natterer
036c5aff73
app: constify "color" parameter in GimpColorTool::picked()
2011-04-04 00:08:57 +02:00
Michael Natterer
ea34b145e8
app: some random tool cleanup
2011-04-04 00:01:30 +02:00
Michael Natterer
70e5cf57a1
app: move GimpColorPickerTool's shutdown code to control(HALT)
2011-04-03 23:33:07 +02:00
Michael Natterer
64b9ac3f6c
app: move the GimpTextTool shutdown code to control(HALT)
2011-04-03 00:40:41 +02:00
Michael Natterer
6de9615154
app: bail out in gimp_blend_tool_initialize() if there is no gradient
2011-04-03 00:33:41 +02:00
Michael Natterer
9ec725c297
app: move the GimpIscissorsTool shutdown code to control(HALT)
2011-04-02 11:58:29 +02:00
Michael Natterer
3056cdbc43
app: remove the entire IscissorsDraw enum and member
...
and simplify drawing massively. It was a pile of XOR cruft that's not
needed any longer.
2011-04-02 11:40:56 +02:00
Michael Natterer
6f4be58716
app: GimpFreeSelectTool: highlight the hovered handle
2011-04-02 08:29:53 +02:00
Michael Natterer
efbbe39734
app: rmove gimp_free_select_tool_update_button_state()
...
and priv->button1_down. Use gimp_tool_control_is_active() instead
because it now has exactly that meaning.
2011-04-02 08:24:24 +02:00
Michael Natterer
7a6bf9b5fe
app: generically call gimp_tool_control(HALT) in GObject::dispose()
...
so all the previously added shutdown fragments are executed when the
tool destroyed.
2011-04-01 22:56:33 +02:00
Michael Natterer
880572860a
app: move shutdown code from gimp_image_map_tool_response() to control(HALT)
2011-04-01 22:56:33 +02:00
Michael Natterer
d90de689fb
app: GimpCageTool: in CAGE_CHANGE mode, switch to DEFORM when enter is pressed
2011-04-01 22:56:33 +02:00
Michael Natterer
a7f32f2290
app: move shutdown code from gimp_cage_tool_halt() to control(HALT)
2011-04-01 22:56:33 +02:00
Michael Natterer
813392cafd
app: move shutdown code from gimp_free_select_tool_halt() to control(HALT)
2011-04-01 22:56:33 +02:00
Michael Natterer
8ca28f19a3
app: move shutdown code from gimp_measure_tool_halt() to control(HALT)
2011-04-01 22:56:33 +02:00
Michael Natterer
931d2110c6
app: move shutdown code from gimp_align_tool_halt() to control(HALT)
...
and also remove GObject::dispose() because that's going to be
handled generically soon.
2011-04-01 22:56:33 +02:00
Michael Natterer
eb9fefe505
app; move GimpTransformTool's shutdown code to control(HALT)
...
and remove gimp_transform_tool_halt(), including all the duplicated
parent class shutdown code.
2011-04-01 22:56:33 +02:00
Michael Natterer
c48c77b2e0
app: NULLify GimpRectangleOptions widget pointers upon destruction
...
so the NULL checks in GimpRectangleTool work no matter what the
shutdown order is.
2011-04-01 22:56:33 +02:00
Michael Natterer
0c7cd5b8a1
app: GimpPaintTool: don't call paint_core_paint(FINISH) in control(HALT)
...
because that simply can't happen (we call paint(FINISH) in
button_release() already and press and release are always paired. Only
call paint_core_cleanup() in control(HALT).
2011-04-01 22:56:32 +02:00
Michael Natterer
e1bc19faf6
app: make state checks on tool much more strict
...
so wrong calls will run into precondition checks and warnings. This is
optional, but currently enabled, to reduce the risk of introducing
permanent new warnings for 2.8. See STRICT_TOOL_CHECKS in gimptool.h.
2011-04-01 22:56:32 +02:00
Michael Natterer
6a046d09e4
app: GimpBrushTool: don't split brush setting in two callbacks
...
The need to both connect() and connect_after() to "set-brush" is gone
because XOR drawing is gone.
2011-03-30 23:38:14 +02:00
Michael Natterer
0db785c36a
app: don't call control_activate()/control_halt() in GimpRectangleTool
...
Instead, call it in all implementors.
2011-03-30 22:13:31 +02:00
Michael Natterer
884e4868a4
app: fix calls to control_activate() and control_halt() in GimpIScissorsTool
2011-03-30 21:48:37 +02:00
Michael Natterer
55f80cd758
app: fix GimpForegroundSelectTool pen cursor drawing
...
It seems some of the junk removed in the last commit did have a
purpose :) Also use a tool progress because it's the result of a
canvas interaction.
2011-03-30 21:24:04 +02:00
Michael Natterer
cc63337be5
app: simplify gimp_foreground_select_tool_oper_update() a lot
...
by removing tons of cruft. Fixes both status messages and tool drawing
with multiple displays.
2011-03-30 20:39:00 +02:00
Enrico Schröder
074e2c088a
app: GimpRectangleTool: Rounding error when moving/resizing with keyboard
...
Fix for bug #653186 : When a rectangle selection is created or moved by
mouse at certain zoom-levels (200%, 400%, 800%), its coordinates can
become exactly .500. By then using the keyboard to move/resize in
steps of one pixel, a rounding error occurs in
gimp_rectangle_tool_update_int_rect(). This leads to the coordinate
either not beeing changed at all or changed by 2 pixels at a time. The
patch changes the function from using RINT() to ROUND() for the
calculations, which prevents the rounding error from happening.
2011-03-30 19:45:46 +02:00
Michael Natterer
2e406872c4
app: GimpBrushTool: don't set a BAD cursor permanently
...
by chaining up after setting it. Instead, don't set it and call
gimp_tool_set_cursor() directly when there is no brush or no dynamics.
2011-03-30 19:18:29 +02:00
Michael Natterer
96c8c35575
app: GimpFreeSelectTool: remove if (tool->display != display) checks
...
This can't happen in motion() and release() because they won't be
called if we didn't activate the tool.
2011-03-30 19:01:11 +02:00
Michael Natterer
9755d7d06c
app: GimpForegroundSelectTool: call control_activate() unconditionally
2011-03-30 15:05:33 +02:00
Michael Natterer
3d2fb51a63
app: GimpEditSelectionTool: call control_halt() in button_release()
...
Just for consistency, the tool is destroyed at the end of
button_release() anyway.
2011-03-30 12:08:38 +02:00
Michael Natterer
6899b0bf60
app: GimpCageTool: go to deform mode only if the user clicked the first handle
...
and not if it was only moved.
2011-03-30 11:51:51 +02:00
Michael Natterer
f585788e46
app: tool control cleanup in GimpCageTool
...
Don't call tool_control functions twice in init(). Call activate() and
halt() only on button_press() and button_release() to indicate that
the tool wants motion events.
2011-03-30 11:48:05 +02:00
Michael Natterer
28c48b1857
app: GimpBrightnessContrastTool: don't call gimp_tool_control_pause()/resume()
...
It must not be called directly, and is entirely useless here anyway.
2011-03-30 11:44:12 +02:00
Michael Natterer
7c60bb5181
app: use more of the new GDK_KEY_foo key names
...
and move the compat defines from display-enums.h to widgets-enums.h
2011-03-29 17:24:08 +02:00
Michael Natterer
2468f9fd55
app: cancel the align tool on Escape, and some more cleanup
2011-03-29 15:16:17 +02:00
Michael Natterer
bb5dea615b
app: some more cleanup and namespacing in GimpAlignTool
2011-03-29 14:32:00 +02:00
Michael Natterer
0c8ff468f6
app: remove empty GimpTool::initialize() impl from GimpAlignTool
2011-03-29 14:00:10 +02:00
Michael Natterer
f7bb4afbd8
app: add gimp_image_pick_layer_by_bounds() and use it in GimpAlignTool
...
Also do some refactoring in the align tool, like adding
gimp_align_tool_halt() and using it to shut down the tool.
2011-03-29 13:58:23 +02:00
Michael Natterer
08e409d6e3
app: move the GimpAlignTool options GUI to GimpAlignOptions
...
which fixes a major uglyness, it should have always been there.
Also fixes warnins on quit if the align tool is active.
2011-03-29 13:26:18 +02:00
Michael Natterer
f32e285ea3
app: more cleanup in GimpMeasureTool
...
- highlight the active point while dragging
- make sure the tool is only active while dragging
- misc formatting cleanup
2011-03-29 09:16:22 +02:00
Michael Natterer
f59eeb95e7
app: remove GimpMeasureTool:active_handle and use the existing :point
...
Also don't re-find the active point in button_press().
2011-03-29 08:52:09 +02:00
Michael Natterer
2b9b737686
app: add gimp_measure_tool_oper_update() which should have always been there
...
and add the stuff that should not be done in cursor_update(). Also add
highlighting of the currently hovered handle.
2011-03-28 20:44:30 +02:00
Michael Natterer
44a6e4f07a
app: use gimp_canvas_item_hit() in GimpMeasureTool
2011-03-28 20:13:18 +02:00
Michael Natterer
365902b582
app: use gimp_canvas_item_hit() in gimp_transform_tool_oper_update()
...
so all the extents calculation and parameter passing is not
duplicated for the first time \o/
2011-03-28 18:55:08 +02:00
Michael Natterer
d96091d514
app: port GimpMagnifyTool away from draw_tool_pause()/resume()
2011-03-28 12:22:29 +02:00
Michael Natterer
accc12a3ca
app: change GimpCanvasItem setters to take GimpCanvasItem*
...
not GimpCanvasLine* etc. We keep them around as items, and their
constructors return items, and it's getting more code anyway when
porting away from pause/resume, so let's keep the casting minimal at
least.
2011-03-28 12:20:36 +02:00
Michael Natterer
aa5d2f8082
app: port GimpBlendTool to pause()/resume()-less drawing
...
Instead, keep around the created GimpCanvasItems, and update them when
the blend coordiates change. Add setters to GipmCanvasLine and
GimpCanvasHandle which take care of calling begin_change() and
end_change() on the items around the change, so thes invalidate
properly.
2011-03-28 11:08:40 +02:00
Michael Natterer
1c0fe73da4
app: gimp_transform_tool_draw(): initialize the array of handles to NULL
...
And update/improve some comments in the entire file.
2011-03-28 10:16:00 +02:00
Michael Natterer
20bed2c609
app: add gimp_draw_tool_add_transform_preview() and use it
2011-03-28 02:18:00 +02:00
Michael Natterer
fd80b90cf0
app: more minor GimpTransformTool cleanup
2011-03-28 02:10:33 +02:00
Michael Natterer
9f6b60c29d
app: draw the perspective clone handles only when they can be used
2011-03-28 01:27:02 +02:00
Michael Natterer
4097825f3c
app: some more code removal and cleanup in the transform classes
2011-03-28 01:20:47 +02:00
Michael Natterer
dde7d6c0ee
app: remove lots of junk from GimpPerspectiveCloneTool
...
This is an evil transform tool copy, so do the same changes here.
2011-03-28 01:20:47 +02:00
Michael Natterer
babc2186c5
app: move the enum of indexes into the trans_info array to the .c files
...
and turn #defines from 0 to N into enums.
2011-03-28 00:50:46 +02:00
Michael Natterer
06e0183f96
app: right-align the perspective matrix labels with the right API
...
Use gtk_misc_set_alignment() instead of gtk_label_set_justify().
2011-03-28 00:39:39 +02:00
Michael Natterer
d36887644d
app: highlight the active transform tool handle
2011-03-28 00:13:14 +02:00
Michael Natterer
32f240fa4a
app: prepare GimpTransformTool for highlighting the handles
2011-03-27 23:57:12 +02:00
Michael Natterer
18929f0865
app: lay out the GimpTransformOptions GUI more uniformly
2011-03-27 23:18:28 +02:00
Michael Natterer
8512675088
app: rename GimpTransformTool::recalc() to ::recalc_matrix()
2011-03-27 23:12:11 +02:00
Michael Natterer
fb2ba3f289
app: remove display parameters from all virtual GimpTransformTool functions
2011-03-27 22:39:31 +02:00
Michael Natterer
eb4f01039a
app: add utility function gimp_transform_polygon_is_convex()
...
and use it in GimpTransformTool and GimpCanvasTransformPreview.
2011-03-27 22:04:33 +02:00
Michael Natterer
caa8cdd4c1
app: add gimp_transform_options_show_preview()
...
which returns whether or not to show a transform preview. Also clean
up gimp_transform_tool_draw() a bit and add a stroke group for the
center handle.
2011-03-27 21:49:34 +02:00
Michael Natterer
8a09fd1f34
app: refactor GimpCanvasTransformPreview to not know GimpTransformTool any more
...
Instead, add drawable, transform, x1, y1 etc. properties. This is
cleaner and has the nice side effect of not leaving artifacts, because
the changed state of the transform tool doesn't affect the extents
calculation any longer.
2011-03-27 21:19:38 +02:00
Michael Natterer
6fe9430cab
app: remove members "type" and "direction" from GimpTransformTool
...
and use the stuff from GimpTransformOptions directly. The copied
values were only there because of XOR drawing. Also did some more
cleanup and junk removal.
2011-03-27 17:38:49 +02:00
Michael Natterer
f09be52c1b
app: turn the transform preview into a GimpCanvasItem
...
And remove all the complicated handling code entirely. This makes
GimpTransformTool a lot less complex. As a nice side effect, the
preview is now always 100% in sync with the grid and handles.
2011-03-27 16:40:41 +02:00
Michael Natterer
cf28e07b64
app: move enum TransformAction from tools-enums.h to gimptransformtool.h
...
Moving it to tools-enums.h was a mistake, it's actually supposed to be
a private enum, accessible only by subclasses. And it's ugly.
2011-03-26 22:32:35 +01:00
Michael Natterer
f632c4a8aa
app: transform the transform grid lines on the fly
...
which is much less code than keeping the transformed lines around.
2011-03-26 22:14:07 +01:00
Michael Natterer
74f276fe4f
app: make sure GimpTransformTool draws correctly after options changes
2011-03-26 21:53:06 +01:00
Michael Natterer
deafe3d341
app: remove some entirely useless members from GimpTransformTool
2011-03-26 20:40:35 +01:00
Michael Natterer
6606d10be1
app: gimp_transform_tool_transform(): don't unref NULL orig_tiles
2011-03-26 18:57:31 +01:00
Michael Natterer
ae72971866
app: pass the orig_tiles and their offset to GimpTransformTool::transform()
...
instead of keeping them around as members. This is another artifact
from ancient times. Also get rid of some more legacy junk
code. Disable more code in GimpTransformToolUndo but keep it around
even though it does nothing at the moment.
2011-03-26 18:45:58 +01:00
Michael Natterer
bc8d5f84d6
app: remove the "offset" API from TileManager
...
It made the transform code hard to read and never belonged into the
tile manager anyway. It's a simple pixel buffer that should not know
about any position in an image. Instead, pass around the offsets of
tile managers explicitly, so everything is less obscure for the price
of having more parameters. This will also help replacing TileManagers
with GeglBuffers.
2011-03-26 08:30:15 +01:00
Michael Natterer
3ed87015a6
app: if there is no selection, don't cut/transform/paste in the transform tool
...
instead, take the easy path that simply calls gimp_item_transform()
and does exactly the same, just less weird.
2011-03-25 21:50:58 +01:00
Michael Natterer
bef6d5716a
app: use a tool progress for GimpTransformTool
2011-03-25 21:35:19 +01:00
Michael Natterer
f078a7416c
app: remove some junk from GimpTransformTool
...
which was there for the purpose of transfomring the same buffer
multiple times (which would be nice but is broken and disabled for
ages). Also remove some junk that was there for unknown reasons, this
tool has a long history.
2011-03-25 21:32:08 +01:00
Michael Natterer
6fdcc5f465
app: add a progress indicator for cage transform
...
- add a double "progress" property to GimpOperationCageTransform
and update it every 20 rows
- connect to the notify::progress in the tool and display a tool
progress
2011-03-25 15:41:53 +01:00
Michael Natterer
41b905baa8
app: make GimpTool implement the GimpProgress interface properly
...
and remove the previously added quick hack. Change the cage progress
code to standard progress code, and use the tool progress also in
blend.
2011-03-25 10:55:07 +01:00
Michael Natterer
8daee72518
app: various GimpCageTool fixes
...
- completely halt the tool before starting it
- bail out on options changes when the tool is not active
- initialy set the mode to CAGE_CHANGE
- indentation, formatting, various small cleanups
2011-03-25 10:18:56 +01:00
Michael Natterer
e9dd30127a
app: add an on-canvas progress facility to GimpTool
...
and use it in GimpCageTool.
2011-03-25 09:48:26 +01:00
Michael Natterer
afa8a416c9
app: don't crash if GimpBrushTool has no dynamics to paint a brush outline
...
Also, set the BAD cursor when there isn't both brush and dynamics
available.
2011-03-24 20:21:57 +01:00
Michael Natterer
1659f62e2c
app: small style cleanup in the merged cage code
2011-03-23 22:29:00 +01:00
Michael Muré
2aeac1cf4e
Merge branch 'soc-2010-cage-2'
2011-03-23 20:07:17 +01:00
Michael Natterer
91195e8593
app: remove the old tool presets system
...
Instead, keep around a GimpFilteredContainer in GimpToolInfo that
maintains a per-tool list of presets from the global preset factory.
Turn the tool options dialog's preset Save/Restore/Edit/Delete menus
and buttons into shortcuts for managing the active tool's presets.
2011-03-23 09:27:29 +01:00
Omari Stephens
cc04620b96
Adjust Bug 559716 bugfix to not test exact double equality
2011-03-21 16:53:35 +01:00
Michael Natterer
ec1108d62a
Bug 559716 - Changing crop size in Crop Tool Options can make UI unresponsive
...
In gimp_rectangle_tool_update_options(), freeze()/thaw() notifications
around setting setting x, y, width, height, so all values are
up-to-date when "notify" is emitted. Also, only set the values that
have actually changed so we don't process notifications when no change
was done.
2011-03-21 14:38:26 +01:00
Michael Natterer
38287ba9f4
app: GimpTextTool: use the highlight color for the selected text
2011-03-20 23:59:19 +01:00
Michael Natterer
6378e9fc4d
app: rename member GimpImageMapTool->shell to ->dialog
...
"shell" has confused me once too often today...
2011-03-20 18:27:11 +01:00
Michael Natterer
4149452279
Bug 643155 - Tool dialogs don't stay on top of the image window
...
Change the "GtkWidget *parent" parameter of GimpToolDialog to
"GimpDisplayShell". Also add API gimp_tool_dialog_set_shell() so an
existing dialog can be used on different images. Make sure the dialog
closes when the shell is unmapped (like when switching tabs in SWM),
and make the dialog transient for the toplevel GimpImageWindow.
Change all tool dialog users accordingly.
2011-03-20 18:15:42 +01:00
Michael Natterer
13bedf69e2
app: minor cleanups in GimpColorPickerTool
2011-03-20 16:57:23 +01:00
Michael Natterer
1f5e180334
app: move GimpToolDialog from app/widgets/ to app/display/
...
Zero logic changes yet, just a rename.
2011-03-20 13:34:03 +01:00
Michael Natterer
4f62bdf436
app: paint the text cursor in the highlight color
...
so it can be distinguished from the text box rectangle more easily.
2011-03-19 10:11:47 +01:00
Michael Natterer
ecbfb4a9e8
app: add a GimpText property and construct param to GimpTextStyleEditor
...
which will be used to get default values from.
2011-03-18 21:16:53 +01:00
Michael Natterer
df731912a5
app: add a GimpTextStyleEditor to the text tool's editor dialog
...
so it's an alternative to on-screen editing for esoteric use cases
that can do everything on-screen editing is capable of.
2011-03-18 12:58:32 +01:00
Michael Natterer
f13abfa3f0
app: change image parameter in gimp_text_layout_new() to xres,yres
...
Because GimpTextLayout doesn't depend on any image, it only needs a
resolution.
2011-03-18 02:31:20 +01:00
Michael Natterer
503acbae54
Bug 600554 - Implement layer group transforms
...
When transforming layer groups, don't cut out a buffer to transform.
Instead, simply call GimpTransformTool::transform() with
tr_tool->original being NULL, just as when we are transforming a
path. In the transform() implementations, simplify the code to not
look at the type of item to be transformed; instead, simply look at
tr_tool->original and transform it if it exists, otherwise call
gimp_item_transform() which does the right thing for all sorts of
items automatically.
2011-03-17 21:52:43 +01:00
Michael Natterer
d3153960df
app: rename gimp_transform_tool_doit() to gimp_transform_tool_transform()
2011-03-17 21:39:11 +01:00
Michael Natterer
54c7725417
app: GimpTextTool: remove disabled testing code
2011-03-14 14:28:08 +01:00
Michael Natterer
22808b996f
app: GimpTextOptions: implement GimpToolOptions::reset()
...
and avoid resetting the rectangle options, so the text box keeps its
position.
2011-03-14 14:12:43 +01:00
Michael Natterer
75548264d0
app: set the text option's unit menu to "plural"
...
It gets changed to "abbreviation" for the permanently displayed
string automatically.
2011-03-14 12:58:34 +01:00
Michael Natterer
e69ecba237
app: move all GimpSettingsBox members to private
2011-03-08 11:32:49 +01:00
Michael Natterer
fcfb7cf160
Use the new g_[s]list_free_full() instead of foreach() and free()
2011-03-07 17:11:28 +01:00
Michael Muré
fe7aa4e113
Merge branch 'master' into soc-2010-cage-2
2011-03-02 15:08:11 +01:00
Michael Natterer
9b5dc7559a
app: set GimpFreeSelectTool active only while mouse-1 is down
...
First step towards tightening the tool state machine...
2011-02-28 21:04:42 +01:00
Michael Natterer
ca618093cf
app: don't show the line to the next free select point when not in proximity
...
like when leaving the canvas or crossing a window above (tools receive
one oper_update() with proximity = FALSE to indicate the pointer
leaving the canvas).
2011-02-27 11:49:54 +01:00
Michael Natterer
8f294661b2
app: don't #include "core/gimpprogress.h" when not needed
2011-02-22 17:32:33 +01:00
Michael Natterer
c3ff71df8b
app: connect the blob editor's and the ink option's properties explicitly
...
instead of using gimp_config_connect(model,view,NULL) because that
also connected the model's name to the view's *widget* name, which is
a really bad idea.
2011-02-15 18:48:38 +01:00
Michael Natterer
543b97bfb3
Bug 641761 - "Smooth Stroke" option in Blend tool
...
Show the smooth stroke options only for paint tools.
2011-02-14 10:38:32 +01:00
Michael Natterer
ec196a8ac4
app: allow to set a color for GimpCurveView's primary curve
...
and redo how the curves tool sets its curves in order to support this
without code duplication. Also change the color of the yellow curve in
the dynamics output editor to orange because yellow is hardly visible.
2011-02-10 20:05:50 +01:00
Barak Itkin
18b9ba1c87
app: Add some comment documentation to code
2011-02-07 03:29:23 +02:00
Michael Natterer
f76bcab221
app: move "default-threshold" from GimpGuiConfig to GimpCoreConfig
2011-02-06 11:20:06 +01:00
Michael Natterer
70f88c4320
app: don't update the highlight when the rectangle tool is resumed
...
It causes an infinite invalidation loop.
2011-01-27 21:36:58 +01:00
Alexia Death
452819143a
app: half-sane aspect ratio implementation
2011-01-25 23:28:02 +02:00
Martin Nordholts
3c95ed31e0
Fix compiler warning about missing newline
2011-01-24 08:10:01 +01:00
Alexia Death
5f9bd0c044
app: add reset buttons to all brush settings sliders
2011-01-23 18:17:25 +02:00
Michael Muré
7056d38681
cagetool: implement rubber band selection for edit mode, if the cage is closed
2011-01-22 15:38:35 +01:00
Michael Muré
aa98319f1b
cage tool: implement options_notify to allow switching back to edit mode
...
and update fill option
2011-01-22 14:17:28 +01:00
Michael Muré
3f581c37b6
cagetool: fix a drawing bug when adding point to the cage while moving cursor
2011-01-22 14:17:28 +01:00
Michael Muré
f379f3c467
fix rubber band selection for layer with offset
2011-01-22 14:17:28 +01:00
Michael Muré
e7d219d387
Cage tool: add rubber band selection for deform mode
2011-01-22 14:17:28 +01:00
Michael Muré
dd28e1fe02
Implementation of the multi-selection in the cage tool and refactoring that come with.
...
This editing mode should work like the path tool.
The backup of the cages point for undo is replaced by a displacement that affect
all the selected point in CageConfig with commit/reset displacement.
2011-01-22 14:17:28 +01:00
Michael Muré
006c7ab9f4
refactor of the GimpCageConfig with a custom GimpCagePoint data structure
2011-01-22 14:17:28 +01:00
Michael Muré
23193cba2f
Rewrite of the cage tool as a state machine
2011-01-22 14:17:28 +01:00
Øyvind Kolås
cad3778eea
gegl-tool: remove render ops from blacklist
...
This allows fractal-explorer, checkerboard and the newly added grid op to
render.
2011-01-13 23:02:50 +00:00
Michael Natterer
503a9cebce
app: implement GObject::constructed() instead of ::constructor()
2011-01-13 10:06:07 +01:00
Michael Natterer
70574877d3
app: use GimpSpinScale for the new smoothing options
...
This drops the log scale, but the new widget will get a better
solution for this anyway. Also did some cleanup.
2011-01-09 00:21:10 +01:00
Michael Natterer
c29aefccc2
app: fix coding style in the new smoothing code
2011-01-08 22:18:56 +01:00
Alexia Death
339deed1da
app: Clean up smooth so it would be acceptable for master
2011-01-08 22:19:27 +02:00
Alexia Death
082aa272a4
app: G-Pen algorithm for GIMP trunk. Now smoothing function works for Ink and Brush tools.
...
Rebased/fixed to go on top of current master. Next commit will add cleanup.
Had to change author tag because gnome is not accepting random stuff
in email fields. Original author is tarai, from gimp painter project
in sourceforge.
2011-01-08 22:17:26 +02:00
Michael Natterer
4aa36044f7
app: no need to set GTK_UPDATE_DELAYED on the levels scale
...
because we idle preview anyway in GimpImageMap.
2011-01-07 19:33:45 +01:00
Michael Natterer
6d6ec38085
app: no need to set a GtkRange's update-policy to CONTINUOUS
...
because it's the default.
2011-01-07 17:18:48 +01:00
Michael Natterer
36de5a2ab1
Bug 630376 - Crash with text layer / text tools stay on canvas when text info is discarded
...
Halt the tool when the text layer's text disappears.
2010-11-28 15:28:28 +01:00
Michael Natterer
357e25bfd1
app: move the cage tool after all other transform tools, not before them
2010-11-28 13:16:35 +01:00
Michael Natterer
bbc3943638
app: some cleanup in the new paint options code
2010-11-25 21:30:29 +01:00
Alexia Death
904048cdcb
app: Clearly present Fade and Color dynamics options as such
2010-11-25 19:06:16 +02:00
Michael Natterer
d46b53f63d
Bug 635040 - Edit -> Stroke Path performs no action on an incomplete path
...
Add error reporting to gimp_drawable_stroke_vectors() and produce the
same warning as the paint core when trying to stroke a path with zero
or one points only.
2010-11-25 11:31:40 +01:00
Michael Natterer
65c6264259
app: change icon for brush size reset button and add tooltip
2010-11-24 22:31:56 +01:00
Michael Natterer
223ae53fcc
app: set the cage tool's dirty mask so it is canceled upon image changes
2010-11-21 14:13:58 +01:00
Michael Natterer
b5ece8b364
app: the ink sensitivity spin scales need two decimal digits precision
2010-11-19 15:19:24 +01:00
Michael Natterer
7a3dc6ee38
app: remove unused #includes
2010-11-15 00:23:18 +01:00
Michael Natterer
c4cd420ef8
app: rename GIMP_INK_BLOB_TYPE_ELLIPSE to GIMP_INK_BLOB_TYPE_CIRCLE
...
- TYPE_SQUARE is also named SQUARE and not RECTANGLE
- serialization doesn't suffer from the changed name because it's the
default value that never gets serialized
- a lot of messy code in the ink options can be replaced by a one-liner
because the enum names now match their resp. stock items
2010-11-14 16:29:42 +01:00
Michael Natterer
dc9018bd14
app: implement GimpTool::options_notify()
2010-11-10 19:08:39 +01:00
Alexia Death
5fa1e9ea40
app: Tell the user how to commit the cage transform
2010-11-10 19:11:49 +02:00
Michael Natterer
ef44bfedad
app: check for GIMP_BUTTON_RELEASE_CANCEL, not GDK_BUTTON3_MASK
2010-11-10 14:39:30 +01:00
Mikael Magnusson
372bc90f65
app: fix right-click cancelling a transform tool
...
to only revert back to before the current drag, not do a full reset
2010-11-10 14:39:06 +01:00
Mikael Magnusson
d6e76a10d6
app: fix redraw after cancelling a transform tool with right-click cancelling
2010-11-10 14:35:27 +01:00
Michael Natterer
32926c9b6a
app: implement GimpTool::options_notify()
...
instead of connecting to the tool options manually.
2010-11-10 14:20:33 +01:00
Michael Natterer
9e5eca8fd1
app: add virtual function GimpTool::options_notify()
...
which gets called on each "notify" from the tool options. This way
tool can simply implement this method instead of connecting to
"notify" themselves individually.
2010-11-10 14:18:33 +01:00
Michael Natterer
f6a284dc4c
app: use a canvas progress in the cage tool
...
This is a proof-of-concept hack that needs review and comments before
being used generally.
2010-11-09 19:35:54 +01:00
Michael Natterer
63fcfb15a2
app: use the new shifting API instead of reimplementing it
2010-11-09 11:32:40 +01:00
Michael Natterer
3f6a70f7fe
app: define one more standard tool handle size
2010-11-08 22:48:50 +01:00
Michael Natterer
cf0402f069
app: consistent handle sizes for tool drawing
...
Replace a myriad of defines in different tools by three consistent
sizes defined in gimpdrawtool.h.
2010-11-08 22:37:00 +01:00
Michael Natterer
a73348c561
app: fix handle hovering detection, it was using the wrong radius
2010-11-06 00:06:13 +01:00
Michael Natterer
31aa09a11f
app: add proper cursors that show what will happen
2010-11-06 00:06:13 +01:00
Michael Natterer
9d604a545f
app: move all the cage modifying logic to button_release()
...
so any interaction can be canceled by holding BUTTON3 while
releasing. Add additional state "hovering_handle" so we can do proper
drawing that matches what will happen on mouse interaction.
2010-11-05 23:49:48 +01:00
Michael Natterer
f4c98fbad6
app: don't use a GimpVector2 for the cursor position
...
because less code is more readable.
2010-11-05 22:30:10 +01:00
Michael Natterer
9867cf62c3
app: -1000 is a valid cursor position, use G_MINDOUBLE as "no cursor"
2010-11-05 22:25:14 +01:00
Michael Natterer
baf964a734
app: rename member handle_moved to moving_handle
2010-11-05 22:21:56 +01:00
Michael Natterer
038a6dd671
app: no need to abort the image map when a handle changes
2010-11-05 21:05:54 +01:00
Michael Natterer
77bb31ba51
app: put the drawn lines into a stroke group
2010-11-05 20:00:20 +01:00
Michael Natterer
86a220bbdf
app: remove the preview node and other unneeded stuff
...
and simplify the code even further.
2010-11-05 19:47:57 +01:00
Michael Natterer
6f31f3d2f6
app: pass the drawable to gimp_cage_tool_create_image_map()
2010-11-05 19:42:42 +01:00
Michael Natterer
2028d547a2
app: use the GimpImageMap as it's meant to be used
...
Have an incremental live preview of the rendering and actually use the
rendering instead of throwing it away and doing it all over again on
commit. gimp_cage_tool_process() is therefore currently unused but I
left it there for Alexia to fix the tool for layers with masks.
2010-11-05 19:10:03 +01:00
Michael Natterer
e0dad1bf35
app: canonicalize cage op names, and some indentation fixes
2010-11-05 12:45:07 +01:00
Michael Natterer
eb3db78b06
app: rename config->cage_vertice_number to config->n_cage_vertices
...
and some minor cleanup.
2010-11-05 10:04:45 +01:00
Michael Natterer
09aae9a919
app: more minor cage tool cleanup
2010-11-05 09:49:03 +01:00
Michael Natterer
c98688873d
app: more minor cage cleanup
2010-11-04 22:47:03 +01:00
Michael Natterer
a6d85e8d57
app: more formatting cleanup
2010-11-04 22:38:41 +01:00
Michael Natterer
f6a8ad61fa
app: remove useless box from cage options gui
2010-11-04 22:32:01 +01:00
Michael Natterer
428e8541c3
app: remove unused #includes
2010-11-04 22:30:30 +01:00
Michael Natterer
b7a674285f
app: derive GimpCageOptions directly from GimpToolOptions
2010-11-04 22:28:47 +01:00
Michael Natterer
33a8c15403
app: large scale formatting cleanup in the new cage code
...
- move enum to the new gimp-gegl-enums.[ch]
- clean up includes
- spacing
- indentation
- coding style
2010-11-04 22:16:27 +01:00
Martin Nordholts
5ce581f797
app: Use Shift+G for Cage Tool
...
We can't use Shift+R which is taken by the rotate tool, so use Shift+G
instead. G is for "Green coordinate".
2010-11-04 21:44:31 +01:00
Michael Natterer
26ca306cc9
app: Makefile formatting cleanup
2010-11-04 21:08:51 +01:00
Alexia Death
d2563a69fd
app: Cleanup in preparation of merge
2010-11-04 20:27:11 +02:00
Alexia Death
dfd5470a2e
Merge remote branch 'origin/master' into soc-2010-cage-2
2010-11-04 20:00:36 +02:00
Alexia Death
27c77e6a5e
Merge branch 'master' into soc-2010-cage-2
2010-11-04 00:41:45 +02:00
Alexia Death
9b96120c31
app: Make cage tool behave nice with offset layers
2010-11-04 00:26:43 +02:00
Alexia Death
e529428a68
app: Make cage tool apply to layer mask as well if one is present
2010-11-04 00:26:04 +02:00
Michael Natterer
9208834880
app: make the blob shape widgets more compact
2010-11-03 09:53:18 +01:00
Michael Natterer
aa846ec451
app: use spin scales for the ink options
2010-11-02 23:30:47 +01:00
Michael Natterer
d5ff5b6748
app: get rid of more tables in the tool options and fix up spacing a bit
2010-11-02 22:14:34 +01:00
Michael Natterer
6ee6fb9b81
app: use a spin scale for the aspect ratio
...
even though a non-log scale is totally broken here, but that at least
creates pressure for finding a solution...
2010-11-02 22:01:15 +01:00
Michael Natterer
bf14241f26
app: make the brush size reset button smaller
2010-11-02 21:57:37 +01:00
Alexia Death
1ae2ad8566
app: Generic cage cleanup
2010-11-02 21:28:30 +02:00
Alexia Death
f09f6dae06
app: Make cage tool work with gegl master
2010-11-02 20:56:53 +02:00
Mikael Magnusson
90e525ca09
app: use a spin scale for the brush size (have to limit size to 1000 temporarily)
2010-11-02 14:41:21 +01:00
Michael Natterer
8f991c5950
app: make the brush, pattern etc selecing boxes more compact
...
by integrating their label instead of requiring one externally. This
way we get rid of some more labels in the tool options. Also clean up
tool options further (add more spin scales, and some general
reordering and spacing cleanup).
2010-11-02 14:05:47 +01:00
Michael Natterer
9cb69b80be
app: minor fixes
2010-11-01 23:38:17 +01:00
Michael Natterer
7af8cc0e4d
app: use a spin scale for fade-length
2010-11-01 22:19:59 +01:00
Michael Natterer
7bfdf76a47
app: use the new opacity prop scale
2010-11-01 22:07:55 +01:00
Michael Natterer
0a98d16814
app: use spin scales for all trivial cases in tool options
2010-11-01 21:48:59 +01:00
Michael Natterer
fc0e19022e
app: use a spin scale for the jitter amount
2010-11-01 21:03:01 +01:00
Michael Natterer
5e58df8aa8
app: use a GimpSpinScale for the brush angle, please test and comment!
2010-11-01 20:04:53 +01:00
Martin Nordholts
df0772fcde
app: Add 'crop_set_width_without_pending_rect' regression test
...
Add regression test 'crop_set_width_without_pending_rect' for "Bug
322396 - Crop dimension entering causes crash".
2010-10-31 15:09:03 +01:00
Martin Nordholts
48690d60e1
app: Add gimp_tools_get/set_tool_options_gui()
...
Add gimp_tools_get_tool_options_gui() and
gimp_tools_set_tool_options_gui() widgets utility functions.
2010-10-31 13:05:15 +01:00
Alexia Death
8663b22c2a
app: Fixes to brush scale->size replacement
2010-10-30 21:38:54 +03:00
Michael Natterer
ae742f0920
app: some cleanup in the new brush size code
2010-10-30 19:56:24 +02:00
Alexia Death
5d42803d7f
app: Expose brush size in pixels, not as ratio
2010-10-30 19:51:07 +03:00
Michael Natterer
79f0f5639b
Don't use gtk_container_add() for adding to GtkBoxes
...
because the packing options are different for GtkH/VBox and GtkBox
itself which is now instantiable. Instead, always use
gtk_box_pack_start() and specify expanding explicitely.
2010-10-30 14:57:56 +02:00
Alexia Death
e8df164366
app: Add dynamics selector to the tool options
2010-10-27 21:49:24 +03:00
Martin Nordholts
c33b287dab
app: Register GimpToolAction for gimp_enum_get_value_name()
...
Register GimpToolAction so we can use gimp_enum_get_value_name() on
it.
2010-10-26 14:23:08 +02:00
Martin Nordholts
73d2f44210
app: Add some GimpRectangleTool GIMP_LOG() messages
2010-10-26 14:23:08 +02:00
Michael Natterer
400f5ac5f3
app: store adjustments as GtkAdjustment pointers instead of GtkObject ones
...
and get rid of casting them.
2010-10-19 12:28:26 +02:00
Michael Natterer
22db39afd2
app: fix incomplete earlier s/GtkAnchorType/GimpHandleAnchor/ change
2010-10-18 20:13:09 +02:00
Michael Natterer
5b64b83569
app: introduce enum GimpHandleAnchor as replacement for GtkAnchorType
...
because the latter is gone in GTK+ 3.0
2010-10-18 12:50:17 +02:00
Michael Natterer
c36f762f7d
libgimpwidgets: deprecate GimpUnitMenu and gimp_prop_unit_menu_new()
...
Add gimp_prop_unit_combo_box_new() and adapt all places using the
prop_unit_menu. Some things are broken now, like there are no pixel
digits set, resolution unit menus show "pixels" and warn badly when
pixels is selected, and file-pdf-load is not built right now.
More fixes to come...
2010-10-14 23:03:34 +02:00
Michael Natterer
8e0dd56feb
app: fix crashes by not trying to navigate on a NULL layout
...
Add boolean return value to gimp_text_tool_ensure_layout() and check
it where needed. Also fix the new VISUAL_POSITIONS navigation code yet
again.
2010-10-14 11:01:16 +02:00
Michael Natterer
852196eb3d
app: fix insert and overwrite cursors for RTL text
...
by using the right function to figure the location of both kinds of
cursors. Also fix crash in my last cursor movement commit: check for
error values returned by pango_layout_move_cursor_visually() and don't
try to move the cursor beyond the buffer boundaries.
2010-10-14 02:45:32 +02:00
Michael Natterer
0c7ec05035
app: honor text direction when moving the cursor
...
Use pango_layout_move_cursor_visually() instead of e.g. simply using
gtk_text_iter_forward_cursor_position() when "right" was pressed.
This is much more correct now but still not 100% right.
2010-10-14 01:01:33 +02:00
Michael Natterer
11bc11d2f7
app: add back the draw timeout
2010-10-11 22:27:32 +02:00
Michael Natterer
38153d7476
app: gimp_paint_tool_oper_update(): stop/start the draw tool only when needed
2010-10-11 22:26:52 +02:00
Michael Natterer
3de4d7263a
app: Bug 631619 - Drawing artifacts spread by paintbrush outline on canvas
...
Add a transform matrix to GimpCanvasBoundary and get rid of the whole
BoundSeg transform code in boundary.c and gimpbrushcore.c, it was
impossible to get this right on that level. Also fix te extents of
GimpCanvasBoundary os it leaves no artifacts.
2010-10-09 22:00:19 +02:00
Michael Natterer
545e65dda6
app: add gimp_display_shell_selection_pause() and _resume()
...
and use them instead of gimp_display_shell_selection_control() with
the resp. enum values. Remove the GIMP_SELECTION_PAUSE and _RESUME
enums values and thus the presence of this concept in the core.
2010-10-09 14:26:33 +02:00
Michael Natterer
e11ca44ba0
app: use gimp_display_shell_selection_control() in the paint tool
...
not gimp_image_selection_control(). The image dealing with that
is an artifact that is going to die.
2010-10-09 14:07:04 +02:00
Michael Natterer
54a65fa9c3
app: add gimp_draw_tool_add_path() and use it in the vector tool
...
Also clean up gimp_vector_tool_draw() a bit.
2010-10-07 14:10:57 +02:00
Alexia Death
d7492cb528
app: remove forward transform preview from cage tool, reverse is actually faster
2010-10-07 00:41:40 +03:00
Michael Natterer
49f2204a8a
app: add a newline
2010-10-05 09:08:56 +02:00
Michael Natterer
4151d9f693
app: some draw tool cleanup
...
- call undraw() from draw() instead of duplicating its code
- merge clear_items() into undraw()
2010-10-04 23:31:25 +02:00
Sven Neumann
8587e1e920
app/tools: introduce gimp_draw_tool_add_crosshair()
...
gimp_draw_tool_add_crosshair() is a convenience function that
adds two intersecting guide lines in a stroke group.
2010-10-04 22:02:12 +02:00
Sven Neumann
5a3dc38af0
app/tools: draw two guides for the moving sample point
...
Instead of drawing two lines cropped at image borders, use two guides
that extend all across the canvas and also put them into a stroke group.
Also apply a similar fix as in the move tool and don't use -1 but
G_MININT as the invalid sample point position.
2010-10-04 21:40:52 +02:00
Sven Neumann
5e0fbc66a0
app/tools: don't use -1 as invalid guide position
...
Introduce a define for the invalid guide position that is used when
creating a new guide and define it as G_MININT. The value of -1
that used to be used for this caused the moving guide to disappear
at position -1.
2010-10-04 21:22:28 +02:00
Michael Natterer
b693269060
app: simplify creating of stroke and fill groups a lot
...
- add gimp_draw_tool_push_group()/pop_group() which manage a stack
of groups; all items automatically get added to the stack's top group
- use push_group()/pop_group() all over the place, which saves a lot
of code in most cases
- return GimpCanvasGroup not GimpCanvasItem pointers from
gimp_draw_tool_add_stroke_group() and fill_group()
Unrelated:
- add GipmCanvasGroup parameter to gimp_rectangle_tool_draw()
- put rect select's round corners into the stroke group to
avoid ugly overdrawing (the mis-alignment of arcs becomes
very visible now however, will fix that soon)
2010-10-04 14:03:37 +02:00
Michael Natterer
64d9d76722
app: gimp_draw_tool_add_arc() pass the "filled" parameter down to the item
...
instead of always passing FALSE.
2010-10-04 13:58:29 +02:00
Michael Natterer
d88a348c18
app: add public API for the "guide-style" and "sample-point-style" properties
...
of the guide and sample point canvas items. They are too obscure to
additionally hide them, and these items are used rarely enough to
justify the additional parameter to the new() functions.
2010-10-03 22:14:40 +02:00
Martin Nordholts
19bf6ff497
Bug 629926 - some tool sliders are not usable
...
"Aspect Ratio" takes too much horizontal space, shorten to just
"Aspect".
2010-10-03 19:06:24 +02:00
Michael Natterer
f3450431a3
app: add a pen canvas item class and use it in the foreground select tool
...
Remove gimp_display_shell_draw_pen().
2010-10-03 02:26:40 +02:00
Michael Natterer
33ab94517f
app: add gimp_draw_tool_add_stroke_group() and add_fill_group()
...
and use it in all tools which have groups.
2010-10-01 14:24:46 +02:00
Michael Natterer
201bfe3e25
app: add a "shell" property to GimpCanvasItem
...
and pass it to all constructors. The GimpDisplayShell is needed
because items are going to become more powerful soon.
2010-10-01 14:13:45 +02:00
Michael Natterer
26d0035be0
app: draw guides using GimpCanvasItems
...
- Add signals GimpImage::guide_added(), removed() and moved()
- Remove singal GimpImage::update_guide()
- Adapt core code to emit the new signals instead of update_guide()
- Have the shell connect to the new signals and update guide canvas
items as needed
- Remove gimp_display_shell_draw_guides()
2010-10-01 10:34:15 +02:00
Michael Natterer
2ced18cc87
app: add gimp_draw_tool_add_sample_point()
...
and use it in the color tool. Also rename
gimp_draw_tool_add_guide_line() to gimp_draw_tool_add_guide().
2010-09-30 02:03:16 +02:00
Michael Natterer
f5750647c1
app: use a GimpCanvasSamplePoint to draw the hovered sample point
2010-09-30 01:32:34 +02:00
Michael Natterer
50efb96222
app: remove empty GimpTool::control() implementation
2010-09-30 00:40:42 +02:00
Michael Natterer
a8259996e4
app: simplify the drawing code
...
by using gimp_draw_tool_add_guide_line() for the active guide too.
2010-09-30 00:39:15 +02:00
Michael Natterer
d3e2db88bb
app: restart the draw tool after moving a guide
...
so the dropped guide is highlighted. Also don't uselessly stop/start
the draw tool in each oper_update(), only do so when the display
changes.
2010-09-30 00:29:11 +02:00
Michael Natterer
89af8f4143
app: use a GimpCanvasGuide to display the hovered guide
...
And don't call any shell draw functions directly any longer.
2010-09-30 00:18:00 +02:00
Michael Natterer
7edfa2ca54
app: start an infrastructure where the shell keeps around its canvas items
...
- Invalidate the proper area when an item gets added or removed.
- Draw the kept canvas items instead of calling a draw tool function.
- The draw tool now sets its item on the shell.
2010-09-29 22:12:01 +02:00
Sven Neumann
2ef259cd20
app: use GimpRGB as mask color
...
Instead of passing GimpChannelType as mask color to
gimp_display_shell_set_mask(), change that function to accept a
GimpRGB color.
Adapt GimpForegroundSelectTool, the only user of the display mask
feature, to this change.
2010-09-29 20:35:00 +02:00
Michael Natterer
ebeb933350
app: add gimp_display_shell_expose_item() and use it in the draw tool
2010-09-29 20:10:21 +02:00
Michael Natterer
e869e83f56
app: add the text tool's selection rectangles to a filling group
...
Doesn't look any better but is a step in the right direction.
2010-09-27 23:04:18 +02:00
Michael Natterer
3f2641c4be
app: put the bounding box lines into a stroking group
2010-09-27 19:32:25 +02:00
Alexia Death
1a5bacf649
Fix cage tool to work with the draw tool in master
2010-09-26 23:57:45 +03:00
Michael Natterer
06da10bc08
app: change boundary drawing by tools to work like the selection
...
- GimpCanvasBoundary takes unsorted BoundSeg arrays now and uses
gimp_display_shell_transform_boundary() and gimp_cairo_add_boundary().
- Nobody calls boundary_sort() any longer for the purpose of displaying
a boundary.
- gimp_display_shell_transform_boundary() got offset parameters
so it can transform things that are not in the image's coordinate
system.
2010-09-26 22:41:04 +02:00
Michael Natterer
4492725110
app: add some (disabled) code that draws the untransformed brush outline
2010-09-26 22:27:55 +02:00
Alexia Death
74e5864fa6
Merge branch 'master' into soc-2010-cage-2
2010-09-26 23:08:15 +03:00
Michael Natterer
ffd57307c8
app: put the transform tool's grid and boundary into a stroke group
2010-09-26 18:44:40 +02:00
Michael Natterer
6ec1729035
app: add the handle that is being dragged to the stroke group too
2010-09-26 17:13:53 +02:00
Michael Natterer
9cce1b894b
app: put a lot of rectangle tool lines into a stroke groups
...
so they don't overlap.
2010-09-26 16:17:05 +02:00
Michael Natterer
e0f35d8979
app: put the lines and the angle arc into a stroke group
...
This looks much better, and makes the lines appear under the handles
as a nice side effect.
2010-09-26 15:49:10 +02:00
Michael Natterer
a306a46d45
app: make the code that puts the lines into a stroke group nicer
...
This much lesss feels like we need new API, let's see...
2010-09-26 15:43:59 +02:00
Michael Natterer
4b89850a2e
app: draw the free select tool's line in one stroke()
...
This is clearly too complicated for general use, but it's only a test
case for the new APIs.
2010-09-26 14:17:04 +02:00
Michael Natterer
b173707c84
app: add gimp_draw_tool_remove_item()
2010-09-26 14:15:47 +02:00
Michael Natterer
970a062b01
app: argh! never add even only one line of code without testing...
2010-09-26 00:30:09 +02:00
Michael Natterer
b3af235e79
app: rename all gimp_draw_tool_draw_foo() functions
...
to gimp_draw_tool_add_foo() because that's what they do now.
2010-09-25 19:02:22 +02:00
Michael Natterer
5089b9a706
app: remove gimp_draw_tool_in_radius()
...
It was used only once and that code is not less readable when using
gimp_draw_tool_calc_distance_square().
2010-09-25 18:24:38 +02:00
Michael Natterer
dfd5a265eb
app: remove gimp_draw_tool_draw_dashed_line()
...
Instead, draw a normal line and set the "highlight" property on the
returned canvas item.
2010-09-25 18:04:40 +02:00
Michael Natterer
e91dce5f9f
app: remove gimp_draw_tool_draw_arc_by_anchor()
...
Instead, draw a circular handle and set the angles on the returned
canvas item.
2010-09-25 17:59:56 +02:00
Michael Natterer
5cda4393d0
app: return the created item from gimp_draw_tool_draw_foo()
2010-09-25 17:52:56 +02:00
Michael Natterer
02924e1e70
app: change the unit of angles in the draw tool's draw_arc() functions
...
from the weird X 1/64 of a degree to radian.
2010-09-25 17:35:40 +02:00
Michael Natterer
df44ced093
app: keep the draw tool's items around in a GimpCanvasGroup
...
which reduces the number of invalidations on the canvas to one.
2010-09-25 17:20:08 +02:00
Michael Natterer
62f8f559a7
app: add gimp_draw_tool_add_item() and use it all over the place
2010-09-25 11:19:00 +02:00
Michael Natterer
cbaf997ae2
app: undraw the old canvas items only before drawing new ones
...
or when the draw tool is really stopped. This seems to get rid of any
remaining flickering and also reduces expose events. Also get rid of
the "is_drawn" state and API because they make no sense any longer.
2010-09-24 23:25:19 +02:00
Michael Natterer
5d14e9befc
app: move clearing and invalidating canvas items to utility functions
2010-09-24 21:25:01 +02:00
Michael Natterer
7a6a57c42f
app: remove code in draw() that special cases drawing vs. undrawing
...
GimpDrawTool::draw() is not used for undrawing any longer.
2010-09-24 21:18:45 +02:00
Michael Natterer
313f8bee1e
app: remove "gboolean use_cairo" from the draw tool again
...
It's always TRUE now.
2010-09-24 21:14:49 +02:00
Michael Natterer
21adcb22e1
app: port the region select tool to gimp_draw_tool_draw_boundary()
...
instead of drawing cached segments directly. This is a massive
performance regression, will have to optinmize boundary drawing
some other way.
2010-09-24 20:58:22 +02:00
Michael Natterer
a5c961ae6f
app: remove the last traces of gimp_canvas_draw_foo() from the draw tool
2010-09-24 20:40:02 +02:00
Michael Natterer
9154814b94
app: enable cairo drawing for the text tool
...
This looks absolutely unacceptable if there is a selection, will
fix that later with a special text selection item or a special
style.
2010-09-24 20:35:59 +02:00
Michael Natterer
957acb42e8
app: add support for cairo text cursor drawing
2010-09-24 20:35:14 +02:00
Michael Natterer
e7f1d444c3
app: remove much more dead code paths from the draw tool and the canvas
2010-09-24 19:08:19 +02:00
Michael Natterer
9cb4a2e87b
app: enable cairo drawing for the align tool
2010-09-24 18:59:05 +02:00
Michael Natterer
926bbc6658
app: enable cairo drawing for the rect and ellipse select tools
...
and draw the rectangle's round corners under the bounding box.
2010-09-24 18:43:09 +02:00
Michael Natterer
67708a65a1
app: add support for cairo arcs
2010-09-24 18:42:36 +02:00
Michael Natterer
db1da1ed64
app: handle sizes should be odd numbers
2010-09-24 13:13:53 +02:00
Michael Natterer
398742b3ac
app: draw the grid under the bounding box
2010-09-24 13:13:33 +02:00
Michael Natterer
b5194b65c5
app: handle sizes should be odd numbers
2010-09-24 13:13:02 +02:00
Michael Natterer
75c11e259d
app: fix off-by-one in rectangle tool guides
...
and draw the guides below the rectangle.
2010-09-24 11:21:07 +02:00
Michael Natterer
4a5d3301ad
app: enable cairo drawing for the crop tool
2010-09-24 10:51:10 +02:00
Michael Natterer
6fb802f77b
app: add draw tool support for cairo corners
2010-09-24 10:50:44 +02:00
Michael Natterer
41c338ce93
app: remove XOR drawing code paths which are now dead
2010-09-24 02:11:04 +02:00
Michael Natterer
3afd2da690
app: enable cairo drawing for the measure tool
2010-09-24 01:33:15 +02:00
Michael Natterer
1c550d4623
app: suppose arc slices
2010-09-24 01:32:57 +02:00
Michael Natterer
590e63f658
app: enable cairo drawing for all transform tools
2010-09-23 23:52:32 +02:00
Michael Natterer
a75b298946
app: enable cairo drawing for the edit selection tool
2010-09-23 23:47:20 +02:00
Michael Natterer
3b4d26e8d2
app: enable cairo drawing for all paint tools
2010-09-23 23:39:36 +02:00
Michael Natterer
ecd59cd013
app: add cairo support to boundary drawing
2010-09-23 23:39:16 +02:00
Michael Natterer
2c0520281d
app: reorder code in draw() so handles are on top of lines
2010-09-23 19:47:14 +02:00
Michael Natterer
39a4dfb923
app: enable cairo drawing for the vector tool
2010-09-23 19:26:29 +02:00
Michael Natterer
db1a85148e
app: use the highlight color for "dashed" lines, oh well...
2010-09-23 19:26:02 +02:00
Michael Natterer
fb68e40214
app: draw the line before the handles so it will look ok with cairo
2010-09-23 19:24:32 +02:00
Michael Natterer
76be01d026
app: enable cairo drawing for the move tool
2010-09-23 19:24:26 +02:00
Michael Natterer
fe5e989af6
app: add support for drawing guide lines with cairo
2010-09-23 19:24:21 +02:00
Michael Natterer
ddc63de6d6
app: remove "gboolean use_offsets" from gimpdisplayshell-transform.[ch]
2010-09-23 19:24:04 +02:00
Michael Natterer
a0cb4fe805
app: add boundary_offset() which offsets BoundSegs in place
...
and use it in gimp_region_select_tool_calculate().
Also fix boundary_transform() indentation.
2010-09-23 19:23:58 +02:00
Michael Natterer
4d0c750327
app: get rid of "gboolean use_offsets" in the draw tool
...
and always pass image coordinates. Transform the coords manually in
the very few places which passed TRUE.
2010-09-23 19:23:27 +02:00
Michael Natterer
517e77b707
app: keep GimpColorTool->center_x and _y around in image coords
2010-09-23 01:04:22 +02:00
Michael Natterer
7c82f3dc09
app: add gimp_canvas_polygon_new_from_coords()
...
and use it from gimp_draw_tool_draw_strokes().
2010-09-23 00:40:32 +02:00
Michael Natterer
eeeea7c69b
app: enable cairo drawing for the iscissors tool
2010-09-23 00:30:09 +02:00
Michael Natterer
f9a7bea24a
app: enable cairo drawing in the free select tool
2010-09-23 00:00:57 +02:00
Michael Natterer
83bab2f0cd
app: add support for cairo polygons
2010-09-23 00:00:57 +02:00
Michael Natterer
721fae71fb
app: enable cairo drawing for the color picker tool
2010-09-22 22:45:17 +02:00
Michael Natterer
e7de19ed2f
app: remove debug spew in the draw tool
2010-09-22 22:26:41 +02:00
Michael Natterer
919b3d83b8
app: enable cairo drawing in the blend tool
...
and reorder drawing functions so the handles are on top of the line.
2010-09-22 22:25:37 +02:00
Michael Natterer
55369b5f22
app: enable cairo drawing in the zoom tool
2010-09-22 22:25:09 +02:00
Michael Natterer
683e097d89
app: add cairo drawing support in GimpDrawTool
...
- add boolean "use_cairo" toggle to enable it per tool
- split draw() in draw() and undraw() and add cairo variants of drawing
- create canvas items in draw_line(), draw_handle() and draw_rectangle()
- some related changes
2010-09-22 22:19:28 +02:00
Michael Natterer
5722345cc7
app: remove prototype for non-existing gimp_draw_tool_set_transform()
2010-09-22 21:02:38 +02:00
Michael Natterer
24654e0df3
app: remove the draw timeout from GimpDrawTool
...
This slows down painting again, but it's in the way of refactoring so
the slowdown is temporary.
2010-09-22 15:31:17 +02:00
Michael Natterer
69da253e51
app: move enum GimpHandleType to display-enums.h
2010-09-20 19:26:34 +02:00
Michael Natterer
0c1073460c
app: get rid of some public draw tool API
...
and use gimp_draw_tool_draw_handle() instead which does exactly the
same for these cases.
2010-09-20 00:13:32 +02:00
Michael Natterer
7e28f52dd7
app: remove unused clipping functions in GimpDrawTool and GimpCanvas
2010-09-19 18:58:23 +02:00
Simon Budig
4e3775b7c5
app: another rounding fix, style cleanups.
2010-09-17 22:27:28 +02:00
Simon Budig
610b6a23e2
app: properly round the bounding box in the move tool
2010-09-17 21:59:51 +02:00
Sven Neumann
72b25fd355
app: let the vectors tool draw vectors the old way again
...
Seems like the best solution until tool drawing is ported to cairo.
2010-09-16 23:09:14 +02:00
Sven Neumann
5ab83e72ac
app: don't let the vectors tool draw the active vectors
...
Let the display shell deal with drawing the vectors. The vectors
tool only draws the handles on the active vectors object.
2010-09-16 21:13:08 +02:00
Michael Natterer
095ae5cc9b
app: move mask_bounds() and mask_intersect() from GimpDrawable to GimpItem
...
There is nothing drawable-specific in there, and having them on
GimpItem enables some simplifications, esp. in upcoming PDB
wrappers. None of these refactorings is in this commit though.
2010-09-07 21:30:46 +02:00
Sven Neumann
178aa9c6dc
app/tools: fix alternative button order
2010-09-07 20:39:45 +02:00
Alexia Death
e133035440
Fix point selection detection
2010-09-05 13:33:26 +03:00
Alexia Death
d261248792
Clean up debug code
2010-09-05 12:48:23 +03:00
Alexia Death
55b0c9f08e
Some generic method sorting and cleanup in the tool
2010-09-02 22:28:06 +03:00
Alexia Death
6ecb219c4f
Fix a preview update related segfault
2010-09-02 20:11:34 +03:00
Alexia Death
6dc2042fe2
app: cage tool adjustments and fixes
...
Just show the complete preview and take the fill color from under first point.
2010-08-30 23:36:20 +03:00
Alexia Death
aee148a486
Merge branch 'master' into soc-2010-cage-2
2010-08-26 21:50:55 +03:00
Michael Natterer
cd192adf09
app: undo some of the previous refactorings and keep using GdkSegment
...
It's not going to be deprecated, so there is no harm in using it; get
rid of all the added _old() functions too.
2010-08-25 21:21:16 +02:00
Michael Natterer
3127d36216
app: rename gimp_display_shell_transform_segments()
...
to gimp_display_shell_transform_segments_old() as step one
of porting selection drawing to cairo.
2010-08-25 01:37:19 +02:00
Michael Natterer
18d3882c5c
app: port GimpDisplayShell pen drawing to cairo
2010-08-23 21:59:27 +02:00
Martin Nordholts
92d0b22653
app: Fix translation, "region_select" => "selection"
2010-08-17 19:08:33 +02:00
Martin Nordholts
876e99fdd0
app: Rectangle tool: Allow 'size' separators in 'aspect' and vice versa
...
In the Rectangle tool options, allow 'Fixed: Size' separators in
'Fixed: Aspect ratio' and vice versa, no point in being strict.
2010-08-16 22:00:06 +02:00
Michael Muré
f44dcf26b3
fill the original cage position with a plain color + UI
2010-08-15 14:20:47 +02:00
Alexia Death
28cfa9d3df
tools: Fix some warnings I introduced into cage tool earlyer
2010-08-15 02:58:31 +03:00
Alexia Death
f037300658
tools: Many cage tool fixes.
...
Adds idle function to update the projection while imagemap is rendering.
2010-08-15 02:32:31 +03:00
Michael Muré
6c36d7ac13
gimpcagetool: add preview
2010-08-13 18:25:48 +02:00
Michael Muré
c29396a0c2
GimpCageTool: add code in #if #else #endif to test the forward transform
2010-08-12 14:38:21 +02:00
Michael Muré
3d79167074
change name of gimp cage gegl op to gimp internal op.
2010-08-12 13:47:31 +02:00
Michael Natterer
1d1ff1fedd
app: port GimpDisplayShell sample point drawing to cairo
...
Same disclaimer about tool uglyness applies here. Will be fixed.
2010-08-12 13:13:15 +02:00
Michael Natterer
922c330bec
app: port GimpDisplayShell guide drawing to cairo
...
The cairo_t code in GimpMoveTool is still disgusting. This probably
needs some GimpTool API that creates a cairo_t for tools.
2010-08-12 00:51:58 +02:00
Michael Muré
fe9f1f4a01
GimpCageTool: better memory gestion in different handle
...
+ code to render/debug coefficient, in #if #else #endif
+ cleaning / coding style
2010-08-11 20:27:32 +02:00
Michael Muré
67c1981a40
GimpCageTool: don't allow to add handle after closing the cage
2010-08-10 00:58:24 +02:00
Michael Muré
34b40a6c7e
solve the problem result cropped to the bounding box of the cage
2010-08-09 23:33:11 +02:00
Michael Muré
19b81bb097
gimpcagetool: fix buffer leak
2010-08-08 18:21:26 +02:00
Michael Muré
459414c9dc
gimpcagetool: use cage_transform and gegl_render_mapping to do the transform
...
gimpoperationcage: cleaning
gimpcageconfig: cleaning
2010-08-08 13:27:20 +02:00
Michael Muré
9677eeeffc
gimpcagetool: add a warning if the coef buffer isn't initialised
2010-08-08 13:27:11 +02:00
Michael Muré
8c33eb83f7
gimpcagetool, gimpoperationcage: now the forward transform work as
...
expected
2010-08-08 13:27:02 +02:00
Michael Muré
3c5c65ea3c
gimpcagetool: use GimpCageConfig, and apply gegl op. Doesn't work yet.
2010-08-08 13:26:52 +02:00
Michael Muré
c686093b38
make GimpCageOptions to use the new enum for Cage mode
2010-08-08 13:25:10 +02:00
Michael Muré
066bbb80f4
gimpcagetool: flush the image correctly after applying a cage deform
2010-08-08 13:24:39 +02:00
Michael Muré
e141953d35
gimpcagetool: the cage can be closed only if the number of point is 3 or more
2010-08-08 13:24:29 +02:00
Michael Muré
98ff627955
gimpcagetool: fix a missing include and a function declaration
2010-08-08 13:24:16 +02:00
Michael Muré
fcd156014a
gimpcagetool: beginning of the link tool/gegl op
2010-08-08 13:24:06 +02:00
Michael Muré
db5981a69c
gimpcagetool: draw/edit cage, accordingly to cage mode
2010-08-08 13:22:56 +02:00
Michael Muré
d836615ae7
gimpcagetool: now inherit from GimpDrawTool. Moving cage point also works.
2010-08-08 13:22:44 +02:00
Michael Muré
ad0a81c528
gimpoperationcage: iterate accordingly to cage's bounding box.
...
pre-copy the input buffer to the output.
2010-08-08 13:22:34 +02:00
Michael Muré
2157a67cea
app/core/gimpcage: add access functions to the cage data structure (add a vertice, remove the last, move a vertice, check if a point is near a vertice)
...
app/tools/gimpcagetool: The tool can now draw a cage, add vertices, remove the last, close the cage
2010-08-08 13:20:24 +02:00
Michael Muré
6a387f7db0
Enhancement of the CageOptions object to allow the selection of the mode (creation or transform of the cage) + basic gui
2010-08-08 13:19:45 +02:00
Michael Muré
f6316285be
structure of the cage tool, with an options object
2010-08-08 13:17:10 +02:00
Michael Muré
24652b4fbd
empty gobject for GimpCage (data structure), GimpOperationCage (Gegl op) and GimpCageTool (frontend)
2010-08-08 13:16:57 +02:00
Barak Itkin
5a9f2f1eac
app: Add '/' as a seperator for the rectangle tools options (in the Fixed field)
2010-07-23 19:17:12 +03:00
Michael Natterer
3184c440b3
app: introduce GimpItem::to_selection()
...
Which replaces all the deparate functions to turn layers, channels,
layer masks and vectors into selections. Use the new virtual function
all over the place instead of calling the functions in
gimpchannel-select.c manually.
2010-07-20 23:09:19 +02:00
Mukund Sivaraman
597b255262
Update Desaturate tool's status text
...
The existing text is poor English and is confusing.
2010-07-05 19:27:44 +05:30
Michael Natterer
c448cc7d25
app: really really destroy the tool options widgets this time
2010-06-24 18:38:19 +02:00
Nelson A. de Oliveira
c4588f1209
Bug 575911 - Add 'Rule of fifths' crop guide overlay
...
Implement a rule of fifths guideline for GIMP. See
http://markhancock.blogspot.com/2006/03/address-basic-composition.html
for more info.
2010-06-24 08:37:09 +02:00
Michael Natterer
bbd4038e98
app: make sure all tool options widgets are properly destroyed
...
...and with them all references their widgets keep (which are a lot).
Take ownership of the widget after creating it, so it can be reliably
unrefed upon exit.
2010-06-23 22:48:53 +02:00
Michael Natterer
94e757df51
app: don't leak options->language; add finalize() to free it
2010-06-22 23:06:35 +02:00
Michael Natterer
170f0bed00
app: use a GimpOverlayFrame for the text style editor
...
so it gets round corners and doesn't look so old school.
2010-06-12 23:49:55 +02:00
Michael Natterer
434bfbd6fa
app: rename GimpToolOverlay to GimpOverlayDialog
...
because it's only used by tools currently, but not related to them in
any way.
2010-06-03 22:32:30 +02:00
Michael Natterer
a3b93151aa
app: some #if 0'ed testing code I occasionally need for debugging
...
(so I don't have to constantly add/remove it, will get rid of it
before 2.8)
2010-06-03 22:16:08 +02:00
Michael Natterer
02b8eea086
app: restrict sample point drawing to the exposed region
...
With the same limitation as for guides in the last commit.
2010-05-02 15:58:51 +02:00
Michael Natterer
6e4be79bef
app: restrict grid and guide drawing to the exposed region
...
Doesn't really clip yet for guide drawing, but at least doesn't bother
to draw them when they are outside the expose region's bounding box.
2010-05-02 15:40:11 +02:00
Alexia Death
06c1b290d0
app: Add tool preset editor to controll what elements get applied
...
I had to remove the asserrt in tool preset constructor, because with it
it wasnt possible to initalize an empty model object for the editor.
At init time the gimp object passed to the constructor is not yet available.
2010-04-24 17:55:54 +03:00
Michael Natterer
8d3a5099f8
app: turn a g_warning() into a g_return_if_fail()
2010-04-22 17:17:02 +02:00
Michael Natterer
5b28d04674
app: queue the draw timeout only if paused_count reaches zero
2010-04-22 17:15:08 +02:00
Michael Natterer
2f5d2bc85f
Bug 616342 - gimp crashes on startup if you have a contextrc file from 2.6
...
Remove the draw timeout in GObject::dispose() to be safe.
2010-04-22 16:45:44 +02:00
Michael Natterer
56e4585f70
app: finally apply tool presets when one is seleced
...
currently respects the fact that FG/BG are always global and the
global brush,pattern,... settings from gimprc. This should probably
not change, but rather be overridable on a per-preset basis as
suggested.
2010-04-21 20:56:49 +02:00
Michael Natterer
94181ce538
app: don't overwrite all tool options' "tool" and "paint-info"
...
with bogus values from contextrc, we want them to always match the
tool option's type.
2010-04-21 20:43:27 +02:00
Michael Natterer
d47aa2ba52
app: change to the preset's tool when a tool preset is selected
...
but don't set any tool options yet because that is a lot more tricky.
2010-04-20 20:11:37 +02:00
Michael Natterer
547c92d0f6
Bug 541586 - Tool options not saved/loaded correctly?
...
Don't overwrite the entire context part of all tool options with
values from contextrc, or we will end up with one tool option set to a
non-default values affecting all other tool options that were at their
default value in the next gimp session.
2010-04-18 12:47:18 +02:00
Michael Natterer
93645e9083
app: cosmetic cleanup
2010-04-01 22:29:08 +02:00
Michael Natterer
91cce1c81b
app: add size control for text spans, does not work as expected yet
2010-03-28 21:38:31 +02:00
Michael Natterer
d66b6134a0
app: micro cleanups
2010-03-20 22:25:58 +01:00
Alexia Death
69e28668a1
app: Tune redraw limit to sane bounds
2010-03-19 23:25:22 +02:00
Michael Natterer
08193e8b56
Limit the draw tool's redraw framerate to about 29 FPS using a timeout
2010-03-19 21:08:41 +01:00
Alexia Death
054bd341bd
app: fix incomplete revert
2010-03-19 21:21:01 +02:00
Alexia Death
1e8ec625df
Revert "app: Fix the code that disables outline to be a bit neater"
...
This reverts commit 58d82dcadc .
2010-03-19 21:21:01 +02:00
Alexia Death
656eb53aad
Revert "app: Do not show brush outline when painting"
...
This reverts commit 031dc8e68a .
2010-03-19 21:21:01 +02:00
Michael Natterer
f9e68fe0ee
Fix undo when going back from a modified text layer to an editable one
...
My earlier change to using gimp_drawable_push_undo() here was a very
bad idea. Go back to using gimp_image_undo_push_drawable_mod(), but
make use of its new tile-copying feature so the problem that made me
do the earlier change is fixed too. See comments in the changed code.
2010-03-18 10:32:52 +01:00
Øyvind Kolås
63824d7153
app: use a blacklist instead of whitelist for gegl op categories
...
The set of core GEGL ops that GIMP does not want to see falls into a
well defined set of categories. Blacklisting allows freedom in choosing
new and better categorisation for GEGL ops.
2010-03-17 23:48:18 +00:00
Alexia Death
58d82dcadc
app: Fix the code that disables outline to be a bit neater
2010-03-17 00:36:19 +02:00
Alexia Death
031dc8e68a
app: Do not show brush outline when painting
...
It takes resourses and jsut gets in the way of seeing the real brush
2010-03-16 23:48:56 +02:00
Alexia Death
bd2f852ac1
app: make off-canvas changes have effect on brush outline
2010-03-16 21:53:34 +02:00
Alexia Death
44a5a34d7e
app: Make brush boundaries dynamic aswell
2010-03-15 02:55:15 +02:00
Alexia Death
e85220f8f9
app: Add an option to explicity turn off airbrush rate
...
This was decided in a discussion with guiguru on irc
some time ago. However, one element is missing. The
rate slider needs to be disabled when motion only is
enabled, because it has no effect.
2010-03-14 17:28:08 +02:00
Alexia Death
861179b452
app: Rename so-called airbrush pressure to Flow
...
Top reasons for this are, that pressure is already
used as input for dynamcs and the fact that flow of
paint makes much more sense.
2010-03-14 17:23:49 +02:00
Michael Natterer
3e3613bef7
app: allow for more fine-grained baseline and kerning adjustments
...
In theory for now, by changing the parameters of
GimpTextProxy::change_baseline() and ::change_kerning()
from gint to gdouble.
2010-03-08 21:57:29 +01:00
Michael Natterer
98a2b0210f
app: fix crash introduced by layout offset refactoring
...
Need to call gimp_text_tool_ensure_layou() in gimp_text_tool_draw()
explicitely now, because we don't redundantly call the
get_cursor_rect() function any more when there is a selection.
2010-03-07 17:34:49 +01:00
Michael Natterer
a5409e2872
app: allow to pick text layers with the text tool
...
When the button_press is not in the currently edited text layer, and
not on any rectangle handle, try to pick a text layer.
2010-03-07 12:41:15 +01:00
Michael Natterer
6650693d29
app: move gimp_image_pick_layer() to its own file
...
and add a (still unused) text layer picking function.
2010-03-07 01:55:31 +01:00
Michael Natterer
cda52f946c
app: minor code cleanup (add local variable to improve readability)
2010-03-07 01:19:32 +01:00
Michael Natterer
2e5de8f6ab
app: pass the cursor's PangoRectangle to gimp_draw_tool_draw_text_cursor()
...
and let the drawing function decide everything instead of doing some
cursor extents fiddling in the text tool.
2010-03-07 01:15:04 +01:00
Michael Natterer
b9405d046a
app: fix some corner cases in gimp_text_tool_button_release()
...
- request "click" releases instead of trying to detect them ourselves,
but keep a minimum reasonable text layer size anyway (reduce it from
20 to 3 pixels though).
- ignore RELEASE_CANCEL when selecting, we can't undo that yet.
- properly handle RELEASE_CANCEL when creating new lext layers (don't
leave a dead overlay style editor around).
2010-03-07 00:53:32 +01:00
Michael Natterer
a077d618ea
app: no need any more to block drawing before non-text changes to the proxy
2010-03-07 00:21:51 +01:00
Michael Natterer
44f6d074a3
app: call gimp_text_tool_block_drawing() in proxy_notify()
...
so we also correctly handle non-text and non-markup changes (e.g. via
tool options). This is not exactly the right place to call
block_drawing(), but all places which change change the actual content
(and thus un-sync buffer and layout cursor posotions) already block
drawing before the actual buffer change happens.
2010-03-07 00:15:32 +01:00
Michael Natterer
2934095816
app: use gimp_text_layout_get_offsets()
...
instead of duplicating GimpTextLayout's positioning logic in two
different incomplete ways. Also gets rid of the unrelated offset
return values of gimp_text_tool_editor_get_cursor_rect().
2010-03-07 00:11:05 +01:00
Michael Natterer
e9f85b3afc
app: block text buffer signals around copying to the clipboard
...
so the copying doesn't produce an undo step. Same fix as applied
earlier in button_press().
2010-03-05 10:53:09 +01:00
Michael Natterer
076948b4b7
app: don't leave drawing blocked in the error case
2010-03-05 10:50:50 +01:00
Michael Natterer
5284c9c836
app: fix text tool drawing for good this time (hopefully)
...
Earlier I claimed that drawing would work now because we make sure
that buffer and layout are always in sync. This was nonsense. In fact,
we constantly ran into the sutiation where the buffer was modified,
and we were drawing with the previous layout. It's unclear why this
didn't cause drawing artifacts, but it did cause e.g. the cursor
temporarily jumping to the next position while editing in the middle
of text (especially visible at line ends).
Several underlying problems existed: first, we now modify the buffer
from outside the text tool (from GimpTextStyleEditor) where we can't
pause the tool; second, proxy changes are handled asymetrically
(property changes are queued and processed all together in an idle
function) so we can't pause/resume drawing across the entire operation
because it has many beginnings and only one end.
Therefore:
- add gimp_text_tool_block_drawing()/unblock_drawing(), where block()
can be called as many times as needed, and a single unblock()
enables drawing again. block() also clears the layout, because it
served its purpose (it was just used to pause drawing, and we know
the buffer will change, so kill it).
- connect to GtkTextBuffer::begin-user-action and call block() from
the callback, so we undraw stuff and kill the cached layout before
any buffer change happens.
- call unblock() at the end of gimp_text_tool_apply() because then
the text and the buffer are in sync again, the tool is undrawn and
we can safely create the layout again to draw our stuff.
- also call block()/unblock() from some other places, like when a
new text layer is created.
- get rid of *all* calls to draw_tool_pause()/resume() around buffer
modifications, they are not needed any longer.
- add calls to begin/end_user_action() where they were missing.
2010-03-04 23:47:23 +01:00
Michael Natterer
e54a05f78f
app: get rid of gimp_text_tool_idle_apply()
...
and make gimp_text_tool_apply() itself the idle function. Might seem
like a bad idea, but is needed by an upcoming drawing refactoring.
2010-03-04 23:10:23 +01:00
Michael Natterer
bbd2d521f1
app: rename "spacing" to "kerning" because that's what it does
2010-03-03 10:48:42 +01:00
Michael Natterer
080f1a6ce4
app: fix editing text layers which don't contain markup
...
In gimp_text_tool_connect(), set either text *or* markup on the
buffer, or the latter will always override the former (now that text
and markup are mutually exclusive in GimpText).
2010-03-03 01:15:27 +01:00
Michael Natterer
9a9d7489d1
app: make undo compression in the text tool work again
...
- in GimpText, make "text" and "markup" mutually exclusive, so that
whenever one is set to non-NULL, the other is cleared automatically.
- add gimp_text_buffer_has_markup() which returns TRUE if any char
in the buffer is tagged.
- in the text tool, only set "markup" on the text proxy if there is
actually markup in the buffer, and set "text" otherwise.
This way we don't push "text" *and* "markup" undos on each keystroke,
and undo compression works the way it did before.
2010-03-02 21:54:24 +01:00
Michael Natterer
9c4864e789
app: optimize away redundant and expensive text layer re-rendering
...
- Add signal GimpText::changed() and emit it from
GObject::dispatch_properties_changed() after all notifications have
been emitted, so "changed" is emitted only once for any number of
properties set within a g_object_freeze/thaw_notify() pair.
- Connect GimpTextLayer to "changed" instead of "notify" so we aviod
lots of expensive re-rendering when multiple properties are set
at once.
- Connect GimpTextTool to "notify" *and* "changed", and move some
common code to the "changed" callback (e.g. we don't need to
re-frame the item for each set property).
2010-03-02 17:44:31 +01:00
Michael Natterer
6d4f2c3431
Bug 565001 - Text-Tool crashes when edit a 2.4.2 version xcf
...
Need to convert to text->box_unit, not text->unit.
2010-03-02 15:24:17 +01:00
Michael Natterer
1fb61b8515
app: make sure mouse-selecting doesn't push an undo step
...
GtkTextBuffer emits "end-user-action" after something has been copied
to the clipboard. Work around that bug.
2010-03-02 13:04:37 +01:00
Michael Natterer
78ea82df1f
app: simplify mouse selection by using iters instead of indices
...
This also removes the evil code dupication added yesterday, and is
generally less and cleaner code.
2010-03-02 12:23:29 +01:00
Michael Natterer
aeac58089b
app: add a font selector to the text style editor
...
Selects fonts just fine, but has no effect on the text yet.
2010-03-02 00:12:27 +01:00
Michael Natterer
f214b4f9b7
app: oper_update(): if we are not in proximity, set the function to DEAD
...
so all hovering is undrawn. oper_update() is called with proximity ==
FALSE when the pointer leaves the canvas, either to the outside or
into an overlay widget, so this is exactly the right thing to do (and
is probably missing from a lot of other tools too).
2010-03-01 23:34:52 +01:00
Michael Natterer
8a1a19fc32
app: argh forgot one more place
...
Time for a refactoring that pulls the forgotten code into one common
place.
2010-03-01 21:39:26 +01:00
Michael Natterer
3d1f677b4f
app: fix cursor placement and selecting by mouse when there is manual kerning
...
Forgot to convert the layout coords to buffer offsets functions when
porting everything to the new iter/index conversion functions in
GimpTextBuffer.
2010-03-01 21:19:08 +01:00
Michael Natterer
f8ac0c61ab
app: make manual kerning / character spacing work
...
Add gimp_text_buffer_get_iter_at_index() which does the reverse thing
than the already existing function gimp_text_buffer_get_iter_index().
Use the new function when cursor-navigation lines. Add "gboolean
layout_index" to both functions, which if TRUE indicates that the
passed in/out index is an index into the PangoLayout's content rather
than the text buffer's. When dealing with layout indices, take into
account the additional characters we insert into the serialized markup
(and thus the layout) for each character that is tagged with spacing.
2010-03-01 16:27:34 +01:00
Michael Natterer
ff50b52c72
app: use gtk_text_buffer_delete_interactive()
...
instead of just gtk_text_buffer_delete() so "end-user-action" is
emitted and everything is updated.
2010-03-01 16:03:48 +01:00
Martin Nordholts
11b1300b6f
app: Introduce gimp_dialog_factory_get_singleton()
...
Instead of including dialogs/dialogs.h everywhere, introduce
gimp_dialog_factory_get_singleton(). The dialog factory singleton is
still initialized by dialogs.c though.
Right now the assumption is that we never will have another dialog
factory instance around. There were so many problems before when we
had four of them, so let's just keep one of them around.
2010-02-28 23:23:24 +01:00
Martin Nordholts
947e28596f
app: Remove gimp_dialog_factory_from_name()
...
We only have one dialog factory now, and
gimp_dialog_factory_from_name() doesn't provide compile-time type
safety, so use global_dialog_factory directly instead.
2010-02-28 20:02:45 +01:00
Michael Natterer
783e04013a
app: make letter spacing work when there is no selection
2010-02-28 17:56:20 +01:00
Michael Natterer
9af58d8c43
app: remove redundant call to gimp_text_buffer_set_text()
2010-02-28 17:19:36 +01:00
Michael Natterer
65216b939d
app: group text buffer changes by user actions
...
Use gtk_text_buffer_begin_user_action() and end_user_action() to group
all text buffer operations triggered by a single editing operation.
Connect to the buffer's "end-user-action" signal instead of to
"changed", "apply-tag" and "remove-tag" separately, so we only update
the text proxy once per user editing.
2010-02-28 17:15:06 +01:00
Michael Natterer
84d33e4316
app: make image-coords overlay widgets work fine at any zoom factor
...
Add anchor and spacing parameters to the shell overlay API, so
overlays can be positioned on each side of a point in image space,
with configurable spacing in display space.
2010-02-28 14:48:47 +01:00
Michael Natterer
1c8b01f012
app: make the text style editor aware of the image's resolution
...
Needed for adding proper text size controls.
2010-02-28 14:20:56 +01:00
Michael Natterer
d88949547d
app: make the change_spacing() call only act on the cursor position
...
if there is no selection, instead of on the rest of the buffer.
2010-02-28 13:58:08 +01:00
Michael Natterer
8399eefc95
app: make sure the text style box is repositioned on *each* rectangle change
2010-02-28 13:49:51 +01:00
Alexia Death
45c835aaa2
app: Add API to remove all background curves from the curve view
...
Also, use this change in cuves tool.
2010-02-27 19:22:48 +02:00
Michael Natterer
1e26bb1348
app: support baseline changing via Alt+Up and Alt+Down
...
Add a list of available baseline tags to GimpTextBuffer and
automatically create baseline tags as needed. They get serialized as
<span rise="value">, so add attribute and value parameters to the
buffer's tag_to_name() and name_to_tag() functions. Properly managing
the rise's amount is a TODO, currently each keystroke changes the
baseline by 1024 pango units, which might be whatever depending on the
output grid.
2010-02-27 18:00:39 +01:00
Michael Natterer
4171d9c774
app: add signals bindings to change baseline and spacing
...
Bind them to Alt+up/down/left/right and connect to the signals in
the text tool editor. The callbacks do nothing yet.
2010-02-27 13:14:28 +01:00
Michael Natterer
9766f65132
app: almost fix changing layers
...
Still leaves artifacts, but it's much better than before.
2010-02-26 21:22:10 +01:00
Michael Natterer
8af94be7a0
app: move the style overlay a few pixels
...
so it intersects less with the rectangle handles.
2010-02-26 19:56:53 +01:00
Alexandre Prokoudine
b040220ebc
Marked forgotten user visible message for translation
2010-02-26 04:36:50 +03:00
Michael Natterer
6c556698e5
app: add gimp_text_buffer_insert() and use it
...
Does nothing special yet, but will soon apply the currently active
tags to the inserted text.
2010-02-26 02:34:01 +01:00
Michael Natterer
ebfbc5a030
app: make sure the style editor moves with the text layer
2010-02-26 02:10:03 +01:00
Michael Natterer
c0358d8122
app: restore text box moving functionality, it got lost a few commits back
2010-02-26 01:57:51 +01:00
Michael Natterer
9cff2365b1
app: enable editing text styles
...
- create a GimpTextStyleEditor on the canvas when editing text.
- sync "text" and "markup" between proxy and text, not only "text.
- connect to chages to text marks on the buffer.
2010-02-26 01:36:31 +01:00
Michael Natterer
dbe54e3f05
app: rename GimpTextTool::text_buffer to just ::buffer
2010-02-25 17:49:33 +01:00
Michael Natterer
0b4bdc5613
app: add GimpTextBuffer, a GtkTextBuffer subclass
...
Pull all text buffer utility functions as methods and use
GimpTextBuffer all over the place instead of GtkTextBuffer.
Some actually usefuly features coming soon...
2010-02-25 17:41:10 +01:00
Michael Natterer
261bb2c598
app: configure the IM overlay's opacity explicitely
2010-02-24 01:37:15 +01: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
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
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
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
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
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
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
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
Michael Natterer
c91b026384
app: re-add gimp_text_tool_editor_get_text()
...
Return the entire buffer and use it in even more places than before to
get rid code duplication.
2010-02-20 19:25:07 +01:00
Michael Natterer
ec0f3bdcb8
app: buncha more text tool fixes
...
- hide the generated "empty" menu item in the IM submenu
- pause/resume the text tool around all selection/cursor/buffer changes
(fixes most drawing artifacts)
2010-02-20 16:18:41 +01:00
Michael Natterer
2e0f4e8938
app: make the preedit overlay better readable (text/base instead of fg/bg)
2010-02-20 15:37:54 +01:00
Michael Natterer
4704c18739
app: implement IM preedit using an overlay widget
...
This has several advantages:
- it's always readable, no matter how sick font/colors are.
- it does not mess up the buffer, which is a model that should not
contain temporary edit states.
- preediting does not clutter undo.
- it fixes the remaining bugs in the old preediting code because that
code is completely gone now.
2010-02-20 15:15:53 +01:00
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
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
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
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
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
Simon Budig
7bfa3272ab
Give a hint what pressing shift over a vector handle does.
2010-02-09 23:21:42 +01:00
Michael Natterer
09c897262e
Move all undo-related members to GimpImagePrivate
...
Also add some new API to access them.
2010-02-04 20:06:49 +01:00
Michael Natterer
b6ce5d075d
Remove macros SCREEN_XRES() and SCREEN_YRES()
...
and add gimp_display_shell_get_screen_resolution() instead. The times
when these macros were used in inner loops have long passed.
2010-02-03 19:50:46 +01:00
Michael Natterer
08b7709535
Bug 604820 - GEGL Operation "path" crashes GIMP
...
Blacklist "gegl:path".
2010-01-31 17:36:56 +01:00
Martin Nordholts
c331d5f9eb
Bug 598454 - Improve visual feedback for Free Select Tool handles
...
Highlight the handle for the first vertex in the Free Select Tool even
with button1 down, since releasing the button on the first point will
close the polygon, so it's a significant state which we must give
feedback for.
2009-12-21 22:24:26 +01:00
Martin Nordholts
50525e4543
app: Fill Free Select Tool handles when mouse is over them
...
Right now the Free Select Tool vertex handles are shown when the
cursor is in the proximity. Extend this a bit, so when the cursor is
_on_ a vertex handle, fill it completely. See bug 598454.
2009-12-21 21:27:54 +01:00
Martin Nordholts
90d7ffde1a
app: Make all GimpDialogFactory members private
...
Add necessary trivial API that allows us to make remaining
GimpDialogFactory instance members private, and make them private.
2009-12-20 20:21:26 +01:00
Martin Nordholts
6eb3e65445
app: Remove unused variables in gradient_options_gui()
2009-12-19 09:29:49 +01:00
Alexia Death
d2ad292848
app: Remove repeat options from gradient for paint tools
...
Repeat for gradient/color or any other dynamic driving is provided by fade.
2009-12-18 20:51:23 +02:00
Martin Nordholts
c7a5195bdf
Bug 604078 - Crash when pressing Backspace with Free Select Tool
...
Make sure we never call gimp_free_select_tool_remove_last_segment()
with priv->n_segment_indices being negative, and increase robustness
of the code in general.
Note that we always halt the tool when backspace is pressed and there
are no vertices left. This is to minimize the risk of ending up in an
invalid tool state.
2009-12-09 22:33:03 +01:00
Alexia Death
a736b8f972
Adding repeat option to fade.
...
Now fade can be applied either as sawtooth or triangular wave.
Also fade can be reversed.
2009-12-06 20:06:34 +02:00
Michael Natterer
ae70da3e72
Remove unused #define STATUSBAR_SIZE 200
2009-11-03 15:43:32 +01:00
Michael Natterer
398607ee94
Bug 599765 - F1 key on gimp-tool-align in menu have wrong link and it open gimp-tool-move
...
Add help ID "gimp-tool-align" and use it for the align tool.
2009-10-27 18:54:34 +01:00
Michael Natterer
8a377be277
Turn legacy tranlation context "tool|_Zoom" into a proper one
2009-10-19 00:13:56 +02:00
Michael Natterer
84ab7454b5
Put the image map tool dialogs into overlay boxes when in fullscreen mode
2009-10-18 22:42:21 +02:00
Alexia Death
210a4b5044
Merge resolution
2009-10-17 21:42:02 +03:00