Commit Graph

206 Commits

Author SHA1 Message Date
8a95f32473 app: hide the region combo for operations which do not depend on the region
This fixes commit 62cbd3eac3.
2015-04-10 13:20:26 +02:00
b200345a98 app: change GimpImageMapTool::get_settings_ui()'s "default_folder" to GFile 2014-07-29 11:56:49 +02:00
a31cb02405 app: return a GFile from gimp_tool_info_build_options_filename()
and rename it to gimp_tool_info_get_options_file().
2014-07-01 15:41:12 +02:00
8c8135a881 app: port GimpImageMapTool's settings API from filename to GFile 2014-07-01 15:13:02 +02:00
f4803af808 app: add boolean "cancelable" API to GimpImageMap and gimpdrawable-filter.[ch]
Return booleans indicating success (FALSE == user has canceled), and
allow canceling only in GimpImageMapTool for now.
2014-06-30 01:06:04 +02:00
6eba4c716b app: cleanup in GimpImageMap
- don't allow to create a GimpImageMap of an operation without output
- make "region", "mode" and "gamma-hack" settable on a map that
  already has a graph
- don't insert a useless "over" if the operation is a source op
- do the gamma-hack always on formats with alpha, so we don't lose
  intermediate alpha results on source ops
- simplify graph connection a lot
- in GimpImageMap tool, don't recreate the map when reconfiguring
  "region" and "gamma-hack"
2014-06-25 18:16:52 +02:00
6857d0141d Revert "app: put #include "gegl-plugin.h" back in two places, but with a FIXME"
This reverts commit 5c1d0e8dc2.

gegl_operation_get_key() is now included via gegl.h as it should.
2014-06-10 23:04:32 +02:00
5c1d0e8dc2 app: put #include "gegl-plugin.h" back in two places, but with a FIXME 2014-06-10 10:04:22 +02:00
8aa0019c2e app: clean up inclusion of gegl-plugin.h, mostly removals 2014-06-10 03:13:09 +02:00
62cbd3eac3 app: show the region combo only if the op has the "position-dependent" key
otherwise, hide it and default to SELECTION.
2014-05-24 03:06:24 +02:00
6c5515c676 app: allow to specify the workarea of GEGL ops in the GEGL tool GUI
Add a combo that switches between "selection" and "entire layer".
Need to find a way to hide that thing when the setting makes no
difference. Also the combo is generally pretty much experimantal.
2014-05-24 01:07:28 +02:00
ebb663e1c6 Revert "app: add a small delay when applying a GUI change in GimpImageMapTool"
This reverts commit d46a8335e6,
it was a bad idea (like this at least).
2014-05-22 01:17:52 +02:00
d46a8335e6 app: add a small delay when applying a GUI change in GimpImageMapTool
This keeps the tool more responsive for expensive ops, since multiple
fast changes are compressed into one call to gimp_image_map_tool_preview().
2014-05-22 00:50:21 +02:00
f50b215d16 app: add a default impl of GimpImageMapTool::reset()
and chain up where possible instead of duplicating that code.
2014-05-16 16:22:31 +02:00
23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +02:00
84ce7f1a9a app: add a "Gamma hack" toggle to the GimpImageMap dialog 2014-05-04 20:42:58 +02:00
843866e7e7 app: make things behave more reasonable with multiple monitors
There is now a preference option that determines whether windows
should be opened on the same monitor as before. It should be disabled
when the machine gets monitors plugged/unplugged dynamically ("laptop")
and enabled when there is a static multi-monitor setup ("wokstation").
This is merely the current simplistic policy on top of the newly added
underlying infrastructure:

- pass integer monitor numbers around in all places where we already
  pass around a GdkScreen. Pass the "current" monitor to these changed
  APIs, where "current" is either the monitor where the action-triggering
  widget is, or if that is unavailable the monitor where the mouse is.

- add gimp_widget_get_monitor() in order to easily get to the monitor,
  just like gtk_widget_get_screen().

- add screen and monitor parameters in some places that were missed
  before.

- in sessionrc, save all window positions relative to the window's
  monitor, and save the monitor separately, if it's not the screen's
  primary monitor.

- when restoring window positions, use the stored monitor when the new
  prefs options says so (use the screen's primary monitor if there is
  no stored monitor), otherwise use current monitor that is now passed
  around.
2014-05-02 03:01:23 +02:00
a53c2f8b30 app: cancel the active tool before going brightness/contrast->levels->curves
because changing tools now automatically commits the old tool.
2014-04-18 21:15:46 +02:00
88e4d7e468 app: commit ongoing tool operations on tool change instead of cancelling
On tool change, we used to simply halt tools before switching to the
new one, which meant losing ongoing live-previewed tool changes, like
transforms, warps and color corrections. This change makes them being
applied to the image instead before switching to the new tool:

Add enum value GIMP_TOOL_ACTION_COMMIT that is passed to
GimpTool::control() before tool switching. Handle the new enum value
in all tools, and actually commit the previewed stuff. This changes
the behavior of GimpCageTool, GimpImageMapTool, GimpTransformTool and
GimpWarpTool.
2014-04-04 22:34:26 +02:00
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
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
88387d6e8d app: remove the "shell" parameter from gimp_tool_dialog_new() and gui_new() 2013-06-07 12:19:42 +02:00
7abbd38a25 app: use a GimpToolGui in GimpImageMapTool
instead of implementing both dialog types manually.
2013-06-07 10:28:41 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
9994a4d514 app: remove the notify::use-gegl callback from GimpImageMapTool 2013-04-16 20:38:40 +02:00
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
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
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
908f727f0a Chain up unconditionally in GObject::constructed()
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
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
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
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
50439e812e app: move GimpLevelTool's color picking stuff into GimpImageMapTool
so all subclasses can use it.
2012-05-02 17:51:22 +02:00
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
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
89d525c970 app: remove legacy support from GimpImageMap 2012-05-02 17:50:40 +02:00
98226d0b36 app: remove legayc support from GimpImageMapTool 2012-05-02 17:50:40 +02:00
8008b75411 app: forgot the GimpImageType -> Babl change in pick_color() here 2012-05-02 17:50:39 +02:00