Re: [gtk-list] Re: additions to gnome-app-helper
- From: Tim Janik <timj gimp org>
- To: Federico Mena <federico nuclecu unam mx>
- cc: marc redhat com, sopwith redhat com, gtk-list redhat com
- Subject: Re: [gtk-list] Re: additions to gnome-app-helper
- Date: Sun, 22 Feb 1998 03:05:46 +0100 (CET)
On Sat, 21 Feb 1998, Federico Mena wrote:
> Right now GtkToolbar contemplates three kinds of children: buttons,
> widgets, and spaces. Buttons are GtkButtons with special geometry
> management by the toolbar (they are all allocated the same size).
> Widgets are arbitrary widgets, and they are only allocated the space
> they requested. Spaces are, well, spaces.
>
> I propose two things:
>
> - 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.
you really want to try out
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON(radio_button),FALSE);
> - Change the gtk_toolbar_{append,prepend,insert}_item functions to
> look like this:
>
> void
> gtk_toolbar_append_item (GtkToolbar *toolbar,
> GtkButton *button,
> const char *text,
> const char *tooltip_text,
> const char *tooltip_private_text,
> GtkWidget *icon);
>
> As you can see, this is the same as the current version, except
> that it does not have the callback and user_data fields. Instead
> it has a generic button field.
harg, you could have proposed that yesterday ;))
> The idea is that the user creates the desired button type (normal,
> toggle, or radio button) outside of this function, connects the
> relevant signals himself (because you may want "clicked" for
> buttons or "toggled" for other stuff), and just lets this function
> set up the contents of the button widget to the properly laid-out
> icon and label.
>
> (If you want to be really generic, you can substitute GtkButton *button
> by GtkContainer *item. Right now I can't think of any situations
> in which you would want a toolbar child with special geometry
> management to be something other than a button).
>
> This is a change simple enough to be worth doing, I think. Yes, it's
> an API change and all clients of GtkToolbar will have to be modified,
> but I don't think it will be painful at all.
>
> What do you think? Feel free to implement it as desired.
fine with me, as long as gtk_toggle_button_set_mode is honoured ;)
>
> Quartic
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]