Re: Looking at EggToolbar



On Sat, 2003-04-05 at 13:37, Soeren Sandmann wrote:
> Owen Taylor <otaylor redhat com> writes:
> 
> >  - It seems to me that expandable/homogeneous/pack_end should
> >    be child properties, not properties. While either would
> >    work, doing them as child properties is considerably
> >    more consistent with the rest of GTK+. (expand, not 
> >    expandable, BTW)
> > 
> >    The question then is whether we can keep
> > 
> >     egg_tool_item_set_pack_end (tool_item);
> > 
> >    Or need to switch to:
> > 
> >     egg_tool_bar_set_pack_end (tool_bar, tool_item)
> > 
> >    I think it's OK to keep them first way.
> 
> If we keep them the first way, what will happen if you call
> egg_tool_item_set_pack_end() on an item that isn't inside a toolbar?

I don't see a problem with that ... it just would affect
the value of the child property when the button was finally
added to a toolbar. 

Are you worried about the value of the child property when added not
corresponding to the default value? I don't think there is really an
issue there ... default for properties and child properties should 
only ever be used to decide whether a value needs to be saved when
persisting the widget or widget heirarchy.

> >  - The names egg_toolbar_append/prepend/insert_tool_item()
> >    are pretty cumbersome for the primary API. Can we just
> >    go with plain append/prepend/insert()?
> 
> I have changed these in CVS. What about _remove_tool_item()? That
> function seems to be just a duplicate of gtk_container_remove(). But
> see my other mail about compatibility.

If it is the same as gtk_container_remove(), we don't need it.

> > what I might suggest instead is functions on EggToolItem
> > that look at the toolbar and get these configuration options:
> > 
> >  egg_tool_item_get_orientation()
> 
> What is this going to return when the item is not inside a toolbar?
> Are you required to pass in a toolbar?

I'd just return a default value; the point of putting the function
on EggToolItem would be to avoid having to go through the
trouble of finding the parent toolbar, and then having to special
case it not existing. 

Regards,
                                          Owen





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