Commit Graph

19 Commits

Author SHA1 Message Date
Michael Natterer 569b262e2d app: various tool options and tool preset fixes
- move the code that sets the tool options' "defined" and "serialize"
  properties from GimpToolInto to GimpToolOptions so they are always
  set correctly.
- make GimpToolOptions fix broken serialized NULL tools automatically.
- make sure a GimpToolPreset's tool options always has a tool set. If all
  fails, set a NULL tool explicitly and let the logic in GimpToolOptions
  find the right tool.
- set GimpToolPreset's "use" booleans to FALSE for context properties
  that have no effect on the tool.
- set GimpToolPresetEditor's toggle insensitive for these properties.
2012-01-23 22:40:49 +01:00
Michael Natterer 6d73eead54 app: emit "notify::tool-options" when GimpToolPreset's options change
Fixes the "dirty" state and thus saving of modified presets.
2011-04-03 19:34:31 +02:00
Alexia Death 8bbc475eab Revert "app: initialize GimpToolPreset's tool options from the user context"
This reverts commit b458b1b5c0.

This hides preset errors form users and creates confusion in case
of presets with bugs distributed among users. It also tries to set
resources from user context when that context doesnt exist yet.
2011-04-03 12:34:52 +03:00
Michael Natterer b458b1b5c0 app: initialize GimpToolPreset's tool options from the user context
so that if deserializing wants to set an unknown brush, pattern etc.,
the previously set default value will be used instead.
2011-04-03 00:47:41 +02:00
Michael Natterer ab9cb53be8 app: gimp_tool_preset_new(): ignore the passed name
and use GimpToolInfo's blurb, so new presets are by default called
"Blend", "Paintbrush" etc. and not simply "Untitled".
2011-03-22 15:08:11 +01:00
Michael Natterer 5e4eee4653 app: implement GObject::constructed() instead of ::constructor() 2011-01-12 22:53:58 +01:00
Sven Neumann f1d89f712d Bug 626446 - segfaults when started with -i argument
We don't need a standard tool-preset object, so just remove the
code that was copied and pasted from other GimpData objects.
Fixes the crash on startup in non-interactive mode.
2010-08-25 21:47:22 +02:00
Michael Natterer c9bde335f0 app: don't additionally ref the standard data objects
Instead, set their statically remembered pointer as a weak pointer so
it's nullified automatically if they are ever finalized. Doesn't
actually get rid of them upon exit yet, this is just a preparation.
2010-06-24 18:38:16 +02:00
Michael Natterer 506469f9f9 app: minor formatting cleanup 2010-04-26 18:52:49 +02:00
Alexia Death 5e1c9d228c app: Fix tool preset editor init 2010-04-24 18:51:42 +03: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
Alexia Death 93ab387fb4 app: add use flags to tool preset 2010-04-24 15:54:35 +03:00
Michael Natterer bb00c53bf5 app: make sure tool options are created with the right tool set 2010-04-20 20:04:24 +02:00
Michael Natterer 4c4c861aa1 app: make sure GimpToolPreset got the "gimp" construct property passed
and pass a Gimp when creating the preset editor's local model.
2010-04-11 16:18:21 +02:00
Michael Natterer b676a1add0 app: make tool preset loading work
- add "Gimp" property to GimpToolPreset
- implement GimpConfigInterface::deserialize_property() and deserialize
  the "tool-options" locally so we can pass the required "gimp" construct
  property.
2010-04-11 15:43:29 +02:00
Michael Natterer 4fcf34699f app: flip context and name parameters in GimpDataNewFunc 2010-04-10 19:55:42 +02:00
Michael Natterer 430b0e5517 app: add a GimpContext parameter to all functions which create GimpData
and pass a context whereever needed. Fix up gimp_tool_preset_new()
to actually make a copy of the context's active tool's options.
2010-04-05 13:26:31 +02:00
Michael Natterer efed2bf623 app: some cleanup and fixes in the tool preset infrastructure 2010-04-04 13:58:55 +02:00
Alexia Death 29f7fe87b0 Base infra for tool presets. 2010-04-03 21:06:15 +03:00