just wanted to get this out before another week passes, as I probably 
won't be getting to it before next weekend (or maybe the odd sleepless 

I posted an update to the patch to
which now hides the old layer modes unless they are loaded from an XCF.

I haven't addressed anything else in the patch yet (except very minor 
changes / comments), specifically compositing onto nothing (which I 
consider definitely buggy now) and babl. But both are actually not 
specific to the LCH layer modes.

About hiding the old layermodes:
(This was my first contact with gtk et al., so I hope what I came up 
with isn't completely braindead)
After pursuing some dead-end roads, this is what I finally did:

- added 'was_loaded_with_obsolete_modes' to GimpImage (looks a bit
   lonely there -- I feel like I missed the right place to add the flag)

- in gimp_layer_tree_view_init(), create two paint_mode_menus, one
   'default' and one 'obsolete'. Connect signal handler / help data
   to both of them.

- instead of gimp_item_tree_view_add_options(), call a modified
   gimp_item_tree_view_add_options_mul(), which takes a list of
   options to add to an hbox. (only first one is shown). This
   saves us passing up a pointer to the hbox and breaking up

- in gimp_layer_tree_view_set_image(), show/hide the menus as apropriate
   and always set paint_mode_menu to the current menu so any other code
   automatically references the current menu only.

One other thing, also not specific to LCH modes, but somewhere in the 
same orbit: The Soft Light/Overlay 'situation' -- shouldn't we take the 
opportunity of bumping up the XCF version to finally fix that, too? I'd 
volunteer for the grunt-work, if only I knew which one needs to be 
changed and to what.


Gimp-developer mailing list

Reply via email to