Re: GtkStyleContext status update



On Fri, Nov 26, 2010 at 2:31 AM, Matthias Clasen
<matthias clasen gmail com> wrote:
> On Fri, Nov 26, 2010 at 1:46 AM, Alexander Larsson <alexl redhat com> wrote:
>
>> Any chance we could merge the radio-group branch then too?
>
> Its on my list to look at it this weekend.
>

Ok, I have now spent some time looking at the mess that we have with
toggle/check/radio buttions/menuitems/toolitems/actions. And at your
GtkRadioGroup branch.

Here is the thoughts I came away with:

- We already have an API like the value/current-value that we've been
discussing for GtkRadioGroup in GtkRadioAction. The only difference is
that it is integers, not strings.
I've verified that you can indeed use g_settings_bind to bind the
current-value on the first
radio action to a setting.

- Using radio buttons as proxies for radio actions doesn't really
work, since radio buttons insist on being grouped themselves, and what
we want for actions and proxies is to group the actions, but not the
proxies. Looking at what radio action does to create menu proxies, it
actually creates check menu items and sets ::draw-as-radio on them. So
I guess if we want to have working button proxies for radio actions,
we need a ::draw-as-radio properties on GtkCheckButton.

- As far as freeing the radio widgets of the weird GSList api, the
GtkRadioGroup seems ok.

- Not sure where this leaves us wrt. to adding value/current-value to
GtkRadioGroup.
  I'm tempted to say: use actions if you want to bind to settings. But
 a) the value/current-value exposed there are ints, not strings - is
that a big problem ?
 b) We can't actually do radio button groups that are backed by
actions, see above.
 c) Having to use the first action for this is somewhat less elegant
than having an object that represents the group itself.


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