* app/widgets/gimpitemtreeview.[ch]: add class members for the lock
content button's icon, tooltip and help_id and use them when
creating the button. Create the button in constructor() instead of
init() so we have access to our real class structure without the
need for a custom get_type() function.
* app/widgets/gimpdrawabletreeview.c: configure the button as "Lock pixels".
* app/widgets/gimpvectorstreeview.c: configure it as "Lock path strokes".
- new API to add widgets to a box of options, for stuff like the paint
mode menu and opacity scale. Set it sensitive automatically and
update its spacings in GtkWidget::style_set().
- new API to get a hbox for "lock" toggles, for stuff like lock
pixels and lock alpha.
This reverts commit d2e1f2ac74. If we
keep the layer group button in 2.7.0 people will expect layer groups
to fully work and get mad when that is not the case. We can enable it
again after the release.
Since Ctrl+E previously meant something harmless, don't use that
keyboard shortcut for the destructive command 'File->Overwrite'. We
still keep Ctrl+E for 'File->Export to' though, and we do this by
having 'File->Overwrite' as a separate GtkAction with its own keyboard
shortcut slot.
* app/core/gimpimage.[ch]: rename all gimp_image_reposition_foo() to
gimp_image_reorder_foo() and added "new_parent" parameters. Factor
out calculating of the item's new container and index to a utility
function.
* app/core/core-enums.[ch]: rename the REPOSITION undos to REORDER.
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpchannelpropundo.[ch]
* app/core/gimplayerpropundo.[ch]
* app/vectors/gimpvectorspropundo.[ch]: change accordingly. Remember
the old parent item in all item reorder undos.
* app/widgets/gimpitemtreeview.h: change GimpReorderItemFunc prototype
accordingly.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c (class_init): follow image API
name changes.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_drop_viewable):
implement reordering of items between groups.
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_reorder_item): fix to reorder the item
within its level of the tree (unrelated to above changes, but needed
to make them work).
* app/widgets/gimpcontainertreeview-dnd.c
(gimp_container_tree_view_real_drop_possible): support DND within a
tree and make sure a group item is not dropped into itself.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_drop_viewable):
implement intra-container reordering within all branches; print a
message for inter-container reordering because that's not yet
implemented in the core.
* app/widgets/gimpcontainerview.h: add "gboolean model_is_tree"
to GimpContainerViewInterface.
* app/widgets/gimpcontainerview.c: default to FALSE and enable the
commented-out optimization in remove_container() for list-only
container views.
* app/core/gimpimage.[ch]: make the parent parameter public in
add_layer(), add_layers(), add_channel() and add_vectors().
* app/vectors/gimpvectors-import.[ch]: add parent parameters to
the vectors import functions.
* app/core/gimpchannelundo.[ch]
* app/core/gimplayerundo.[ch]
* app/vectors/gimpvectorsundo.[ch]
* app/core/gimpimage-undo-push.[ch]: remember the parent item when
removing layers, channels and vectors.
* app/actions/channels-commands.c
* app/actions/debug-commands.c
* app/actions/edit-commands.c
* app/actions/layers-commands.c
* app/actions/vectors-commands.c
* app/core/gimp-edit.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-quick-mask.c
* app/core/gimplayer-floating-sel.c
* app/core/gimpselection.c
* app/core/gimptemplate.c
* app/dialogs/file-open-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/widgets/gimptoolbox-dnd.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/vectors.pdb: pass NULL as parent item to above
functions and add FIXMEs all over the place because there is some
more hacking needed to make adding with index = -1 (on top of the
current item) work again.
* app/pdb/image-cmds.c
* app/pdb/paths-cmds.c
* app/pdb/vectors-cmds.c: regenerated.
* app/core/gimpimage-duplicate.c: duplicate the original image's
tree structure in the copy.
* app/widgets/gimpitemtreeview.[ch]: add parent to GimpAddItemFunc,
add utility function gimp_item_tree_view_get_drop_index() which
figures where to add something dropped to an item tree.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly, using above
new GimpItemTreeView API.
* app/widgets/gimpcontainerview.[ch]: add and remove container trees
recursively. Change virtual function ::add_item() to pass the
insert_data of the parent viewable.
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c: changed accordingly.
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c: dito, but actually use the passed
parent_insert_data to insert the item at the right place in the
GtkTreeView.
Factor out large portions of identical code into new utility functions
gimp_container_view_connect_context() and
gimp_container_view_disconnect_context().
Keep around the handler IDs for the "name-changed" signals of the
container's children in a hash table that maps containers to handler
IDs and move adding/removing of the handler to
add_container()/remove_container(). This way the name-changed code is
prepared for handling multiple containers.
In preparation of having a tree of containers, added
gimp_container_view_add_container(),
gimp_container_view_remove_container() and
gimp_container_view_remove_foreach()
which do all the job of inserting/removing items and
connecting/disconnecting the "add", "remove" and "reorder" signals.
Also refactored things so when the toplevel container freezes/thaws,
it simply gets removed from the view instead of ignoring its signals.
gimp_container_view_real_set_container()
gimp_container_view_freeze()
gimp_container_view_thaw(): use the new add_container() and
remove_container() APIs and fix the code for the unlikely case
that a frozen container gets added/removed.
GHashTable has g_hash_table_remove_all() since GLib 2.12, so there is
no need any longer to clear the hash table by destroyung it. Instead,
keep the hash around during the view's entire lifetime and remove all
re-creation code and all checks for its existence.
Don't waste the expander space in all GimpContainerTreeViews. We can
later set it to TRUE in individual subclasses which actually display a
tree and not only a list.
Use gtk_tree_view_get_cell_area() instead of
gtk_tree_view_get_background_area() because the latter includes things
like expanders, indentation and padding and messes up the x coordinate
of our naive click detection.
Rename gimptoolview.[ch] to gimptooleditor.[ch]. The contents of the
file has already gone through this change, we do the file name change
separately for better diffs. Part of fix for bug #500930.
Convert the GimpToolView dockable to a non-dockable GimpToolEditor,
but wait with renaming the file so that we get better diffs. Part of
fix for bug #500930.
Remove the transient-docks setting for gimprc. What GIMP tried to
accomplish with this enabled is much better accomplished by the window
manager with the docks set to the 'Utility window' window hint. See
discussion in bug #322577.