Re: bonobo toolbar separator patch




John Sullivan <sullivan@eazel.com> writes:

> 2000-03-17  John Sullivan  <sullivan@eazel.com>
> 
>     * bonobo/bonobo-uih-toolbar.c:
>     (toolbar_toplevel_item_create_widgets): Check for NULL
>     toolbar_item before reffing and adding to hash table.
>     The separator case does not create a widget. Added comments
>     explaining this and why it is bad (can't remove later).

This looks fine; we should make sure that we bail gracefully when we
try to remove the widget later.  Can you look at this?

>     (toolbar_toplevel_item_set_sensitivity_internal): Handle
>     the NULL toolbar_widget case, since it's legitimate when
>     the item is a separator. Added explanatory comment.

This is fine.  Can you format comments like this, though:

/*
 * My comment which is more than one line.
 * La la la.
 */

>     (bonobo_toplevel_set_sensitivity): Changed name to
>     bonobo_toplevel_item_set_sensitivity; made it call
>     toolbar_toplevel_get_item instead of toolbar_toplevel_get_toolbar
>     and bonobo_toplevel_item_set_sensitivity_internal instead of
>     bonobo_toplevel_set_sensitivity_internal. Maybe both functions
>     are needed for a complete implementation, but there was only
>     one caller to this function and it expected the item version.
>     Obviously this code path had never been followed.

That was just a stupid bug; this is obviously a per-item method, not a
per-toolbar method.

>     * bonobo/bonobo-ui-handler.h:
>     (bonobo_ui_handler_toolbar_get_orientation),
>     (bonobo_ui_handler_toolbar_set_orientation): Eliminated
>     duplicate prototypes.

Has this method ever been used?

Nat



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]