After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313547 - Lock selected GimpData editors to always edit the currently selected item.
Lock selected GimpData editors to always edit the currently selected item.
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other All
: Normal enhancement
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-08-15 17:53 UTC by david gowers
Modified: 2005-10-25 22:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Lock editors to edit the currently selected item (eg gradient, palette, brush..) (631 bytes, patch)
2005-08-17 06:05 UTC, david gowers
needs-work Details | Review

Description david gowers 2005-08-15 17:53:10 UTC
The selected palette can be different from the one shown in the palette editor.
This can be confusing, when I use 'palette-add-entry' to add an entry to
the current palette, i may not see that change.
(the script in question adds the current foreground color to the current
palette.. something that is a bit painful to do normally (change color, then
drag color from fg-square to palette.))

The most generally useful behaviour would be to lock the current palette
together with the edited palette.
When the palette changes, save the one that was being previously edited before
editing the new one.
Comment 1 david gowers 2005-08-16 05:30:10 UTC
Note: the reason this is confusing, is that the palette editor is the only place
you can pick colors from a palette. and generally you select a palette so you
can pick colors from it.
i.e. in most cases an extraneous double-click is required to actually *use* the
palette you selected.
Comment 2 Michael Schumacher 2005-08-16 15:32:39 UTC
We should even think about having this for all editors. Especially for the brush
editor, this could make editable resources a bit more discoverable, provided
that we make read-only ones 'editable', at least as far as the user is concerned.
Comment 3 david gowers 2005-08-17 06:02:30 UTC
OKAY!
Changing bug title to reflect that.
 
Here is a patch that implements the required behaviour.
All GimpDataFactoryViews auto-activate, the respective editor auto-raises as
needed. It is much nicer than the previous behaviour.

Since this is a one line patch, I'll mention that the way it is done is that
GimpDataFactoryView now uses the activate callback for both selection and
activation. This works fine for every data-selector... the ones that don't have
an editor just select, the ones that do auto-save the previously edited data and
edit what just got selected.
Comment 4 david gowers 2005-08-17 06:05:44 UTC
Created attachment 50830 [details] [review]
Lock editors to edit the currently selected item (eg gradient, palette, brush..)

An unconsidered sideeffect of this is that an editor will appear if
none are visible. I think this is ok, you can throw it into a dock easily
enough.
Comment 5 Michael Schumacher 2005-08-17 08:18:59 UTC
The editor opens whenever e.g. a new brush is selected? I'd call this an
unwanted side-effect - there should be a check for an open editor first.

We might think about adding some of the editors to the initial dock setup, though.
Comment 6 Sven Neumann 2005-08-17 08:41:04 UTC
I agree with Michael that the side effect isn't acceptable but we should
nevertheless consider doing something similar for GIMP 2.4.
Comment 7 david gowers 2005-08-17 13:43:38 UTC
Okay, that should be easy to fix.

I also need to fix these: 

* Initially the editor may edit something else than the current selection of data. 

* The editor grabs input focus as soon as i select a palette, so further
cursor-navigations are not immediately possible. I think I just need to grab it
back.



Comment 8 Michael Natterer 2005-10-25 22:05:30 UTC
Implemented this in a different way, saving is still missing:

2005-10-25  Michael Natterer  <mitch@gimp.org>

	Let the data editors optionally follow the active brush, palette
	and gradient. Still needs to be saved in sessionrc and probably
	be enabled by default. Addresses bug #313547.

	* app/widgets/gimpdataeditor.[ch]: added new functions
	gimp_data_editor_set,get_edit_active().

	Make it configurable from the palette and gradient editor menus:

	* app/actions/gradient-editor-actions.c
	* app/actions/palette-editor-actions.c: added actions...

	* app/actions/data-editor-commands.[ch]: ...and callbacks...
	(new file).

	* app/widgets/gimphelp-ids.h: ...help IDs...

	* menus/gradient-editor-menu.xml
	* menus/palette-editor-menu.xml: ...and menu items.

	Add menu to the brush editor and make it configurable there too:

	* app/actions/Makefile.am
	* app/actions/actions.c
	* app/actions/brush-editor-actions.[ch]
	* app/menus/menus.c
	* menus/Makefile.am
	* menus/brush-editor-menu.xml: added all the bits needed for
	the new menu.

	* app/widgets/gimpbrusheditor.[ch]: use the menu. Added menu_factory
	paramater to the contstructor.

	* app/dialogs/dialogs-constructors.c: changed accordingly.
Comment 9 Michael Natterer 2005-10-25 22:06:01 UTC
Fixed n CVS:

2005-10-26  Michael Natterer  <mitch@gimp.org>

	Fixed bug #313547:

	* app/widgets/gimpdataeditor.c
	(gimp_data_editor_set_aux_info)
	(gimp_data_editor_get_aux_info): store the state of edit_active
	in sessionrc.

	(gimp_data_editor_constructor): enable edit_active by default.