Re: [gtk-list] Re: additions to gnome-app-helper



Tim Janik <timj@gimp.org> writes:
> On Sat, 21 Feb 1998, Marc Ewing wrote:
> 
> > >   - We need a radio button class with the same look and feel of the
> > >     GtkToggleButton widget.  It can either be derived from
> > >     GtkToggleButton (to keep the drawing functions) and add a 
> > >     GSList *group field.  Or it can be derived from GtkRadioButton (to
> > >     keep the GSList *group field) and add new drawing functions that
> > >     would be a copy of those in GtkToggleButton.  You figure out that
> > >     part to see what's the best way to do it.
> > 
> > I'll have a look at deriving from GtkToggleButton and adding the
> > group stuff.  I think that will end up easier.
> 
> don't do it, you don't need it, just call gtk_toggle_button_set_mode
> on your radio button. forbiding the indicator to be drawn will make
> the radio button look like a toggle button. the same thing is possible
> with check buttons.

Yeah!  Sounds like a plan.

> > Sounds good to me.  I'll at least generate a patch.  Inclusion in
> > GTK 1.0 is up to people other than me :-).  Is the toolbar used
> > much outside of GNOME applications yet?
> 
> atech uses them (i yesterday waded through the cvs repository to add the
> tooltip_private_text field to the api). as a total, i think there have
> been about 90-100 function calls to gtk_toolbar_append_item and nearly none
> to gtk_toolbar_prepend_item or gtk_toolbar_insert_item.
> 
> with fredericos proposed api changes, the only difference between
> the gtk_toolbar_[add-type]_item and gtk_toolbar_[add-type]_widget
> functions seems to be the argument GtkWidget *icon. since i have
> not found any invokations of the gtk_toolbar_*_widget in the
> CVS repository, you might consider to drop the gtk_toolbar_*_widget
> functions fully, and preserve their behaviour by
> gtk_toolbar_*_item (toolbar,tooltip_text,tooltip_private_text,NULL);

I think that was Federico's (unstated) intention.  Replace *_widget()
functions with the new *_item() functions he proposed.  Elliot
suggested that having the *_item() functions as they are makes things
easy to program (for adding simple text/icon buttons).  From your
analysis above, it looks like doing Federico's plan but for the
*_widget() functions might make more sense (because they aren't
really used much anywhere, and that leaves simple *_item() functions.

What do you think?  Elliot?  Federico?

-Marc



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