- add member "GimpViewable *parent" and accessors to get/set it
(no property or signals yet)
- add virtual function ::get_children() which is supposed to return
a GimpContainer of the viewable's children
Remove a conditional so that, in interactive mode, the Send by E-mail
feature always uses the name of the file as the default file field
value, instead of using the previously entered value of the field.
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.