Commit Graph

25503 Commits

Author SHA1 Message Date
Michael Natterer 6e29b94bd0 Add gimp_item_get_container_iter()
This is just a utility function like gimp_image_get_layer_iter()
in order to avoid including "core/gimplist.h" whenever a file needs
access to the actual GList inside the container.
2009-08-01 22:40:32 +02:00
Michael Natterer 571d26a198 Add functions for getting lists of all an image's items
* app/core/gimpitemstack.[ch]: add gimp_item_stack_get_item_list()
  which returns a GList of all the stack's items, in depth-first
  order if the stack is in fact a tree.

* app/core/gimpimage.[ch]: add gimp_image_get_layer_list(),
  channel_list(), vectors_list() which use above new function.
2009-08-01 21:59:45 +02:00
Michael Natterer 2f018dfcc2 Use the new item APIs for layer/channel/vectors reordering
Don't use image->layers, ->channels and ->vectors in the raise, lower
and position functions; use gimp_item_get_container() and
gimp_item_get_index() instead.
2009-08-01 21:37:19 +02:00
Michael Natterer 88f49a5ddb Use gimp_item_get_index() all over the place
Remove gimp_image_get_layer,channel,vectors_index() and
use the new function everywhere.
2009-08-01 20:49:55 +02:00
Michael Natterer a3cb1191b9 Actually assign the new get_container() impl to the vtable 2009-08-01 20:32:13 +02:00
Michael Natterer 297c2f0082 Add gimp_item_get_container() and gimp_item_get_index()
* app/core/gimpitem.[ch]: add virtual function ::get_container() plus
  pubic API wrapper which returns the children of the item's parent
  viewable, or the right toplevel container of its image.
  Add utility function get_index() which returns the item's index
  within its container.

* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: implement get_container() and return
  the right image container.

* app/core/gimplayer.[ch]: same here, and remove previously added
  public get_container() API.

* app/core/gimplayermask.c
* app/core/gimpselection.c: implement get_container() for these GimpChannel
  subclasses and return NULL.
2009-08-01 20:22:07 +02:00
Michael Natterer fd8ebdacef gimp_item_is_attached(): an item is attached if its parent item is attached 2009-08-01 19:39:10 +02:00
Michael Natterer f4f5fc5f55 Add utility function gimp_layer_get_container()
The new function returns a layer's container, which is either its
parent viewable's children, or image->layers. Scheduled for being
moved to a virtual function on GimpItem.
2009-08-01 19:27:45 +02:00
Michael Natterer ad66250f90 Invalidate all the item stack's previews recursively 2009-08-01 19:23:59 +02:00
Michael Natterer 464ce841aa When an item is removed, emit "removed" on all its children 2009-08-01 19:21:43 +02:00
Michael Natterer ee022e907e Add basic support for trees of containers in GimpContainerView classes
* 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.
2009-08-01 19:13:35 +02:00
Michael Natterer 1e5da3939b Add basic infrastructure for trees of viewables
- 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
2009-08-01 19:04:33 +02:00
Michael Natterer 656e30cd3a Looking at widget->requisition in size_allocate() is useless
Use the passed GtkAllocation for calculating things, not
widget->requisition.
2009-08-01 18:59:58 +02:00
Michael Natterer 2abca796bf Don't touch widget->requisition in size_request()
gimp_ruler_size_request(): modify the passed GtkRequisition, not
widget->requisition.
2009-08-01 18:57:58 +02:00
Michael Natterer f712a316df Bug 589674 – "Send by Email" does not update "Filename"
Use g_filename_display_basename() so it doesn't choke on non-utf8
filenames.
2009-08-01 18:39:18 +02:00
Stephen Griffiths 6a41c872f6 app: Make GimpToolEditor changes cancellable
Allow the user to cancel rearrangements of tool order and visibility
in Preferences. See enhancement request/bug #500930.
2009-08-01 16:27:34 +02:00
Christopher Howard 9cddfeba73 Bug 589674 – "Send by Email" does not update "Filename"
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.
2009-08-01 11:36:14 +02:00
Michael Natterer 9c4a2ab4ea Move layer mask related functions together 2009-07-30 18:59:12 +02:00
Denis Arnaud 13082657be Updated breton translation 2009-07-30 04:54:25 +02:00
Alan Monfort 21dd836bf6 Updated breton translation 2009-07-29 18:13:51 +02:00
Denis Arnaud 55315a57f9 Updated breton translation 2009-07-29 12:15:04 +02:00
Denis Arnaud b68991dc47 Updated breton translation 2009-07-29 06:07:10 +02:00
Denis Arnaud 4ae4b45d5f Updated breton translation 2009-07-29 06:07:10 +02:00
Denis Arnaud bd50c5acba Updated breton translation 2009-07-29 06:07:10 +02:00
Denis Arnaud 4d2fa574ce Updated breton translation 2009-07-29 06:07:10 +02:00
Denis Arnaud 3dd535823a Updated breton translation 2009-07-29 06:07:09 +02:00
Michael Natterer 96126034c9 Get rid of antique code duplication
Factor out large portions of identical code into new utility functions
gimp_container_view_connect_context() and
gimp_container_view_disconnect_context().
2009-07-28 21:02:32 +02:00
Michael Natterer 3ae83c5ced Fix setting a context for the unlikely case that the container is frozen 2009-07-28 19:17:42 +02:00
Michael Natterer eff6d4f930 Cosmetic changes 2009-07-28 19:15:36 +02:00
Michael Natterer b54a0fdf88 Replace the name_changed_handler_id GQuark by a hash of quarks
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.
2009-07-28 19:08:07 +02:00
Michael Natterer 13ec6cca81 Add utility functions for adding/removing a container to/from the view
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.
2009-07-28 16:47:28 +02:00
Alexandre Prokoudine 062e90adcd Updated Russian translation 2009-07-28 18:13:00 +04:00
Alexandre Prokoudine ae3a0a5b47 Updated Russian translation 2009-07-28 18:12:54 +04:00
Alexandre Prokoudine a5bb58c273 Updated Russian translation 2009-07-28 17:29:34 +04:00
Michael Natterer 1b759561ce Keep the item hash table around permanently
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.
2009-07-28 15:04:43 +02:00
Denis Arnaud 3c844e867a Updated breton translation 2009-07-28 13:24:08 +02:00
Denis Arnaud e7d541a6d0 Added breton translation for tags 2009-07-28 13:23:41 +02:00
Denis Arnaud 05446a1416 Added br in LINGUAS 2009-07-28 13:23:04 +02:00
Alan Monfort aed2d23e90 Added breton translation 2009-07-28 06:20:27 +02:00
Alan Monfort 6fb5d6051e Added breton translation 2009-07-28 06:18:54 +02:00
Alan Monfort ff849661e8 Added breton translation 2009-07-28 06:18:23 +02:00
Denis Arnaud 3559aeb095 Added breton 2009-07-28 06:16:38 +02:00
Denis Arnaud 0f95e1d57f Added breton 2009-07-28 05:13:34 +02:00
Denis Arnaud fc3e62a469 Added breton 2009-07-28 05:13:21 +02:00
Denis Arnaud 621c991fa6 Added breton 2009-07-28 05:13:07 +02:00
Denis Arnaud 77c54ddf65 Added breton 2009-07-28 05:12:40 +02:00
Alan Monfort 0cbd4a8145 Added breton translation 2009-07-28 05:10:36 +02:00
Alan Monfort 5b770ffb89 Added breton translation 2009-07-28 05:10:02 +02:00
Alan Monfort 82c132bd63 Added breton translation 2009-07-28 05:09:46 +02:00
Alan Monfort b58ffe572c Added breton translation 2009-07-28 05:09:34 +02:00