GNOME Bugzilla – Bug 313547
Lock selected GimpData editors to always edit the currently selected item.
Last modified: 2005-10-25 22:06:01 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.
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.
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.
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.
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.
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.
I agree with Michael that the side effect isn't acceptable but we should nevertheless consider doing something similar for GIMP 2.4.
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.
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.
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.