On Sat, 07 Jan 2006 04:01:23 +0100 Morten Nilsen <[EMAIL PROTECTED]> wrote:
> David Seikel wrote: > > e_menu_category_callback_del(). > > wouldn't that be semantically equal to calling > e_menu_category_callback_set() with the callback set to NULL ? If the e_menu_category_callback_set() code knew what to do with NULL - a) it doesn't, it will just create a new callback item, set the callback pointer in it to NULL, and add it to the list. I haven't figured out what will happen when it comes time to call that callback, but the old callback item is still on the list, and will still get called, and will still crash if it's code has been unloaded from ram. b) consistency is good, most other callback systems in E17 offer an add() and a del() function. Even if e_menu_category_callback_set() with the callback set to NULL was implemented, there is no unique parameter in the function that would identify which callback to remove. There way be multiple callbacks registered, that's why they are all added to a list. And that's why we usually call them add().
pgpSNwKJ4EloV.pgp
Description: PGP signature
