Re: Add GtkRadioGroup?



On Fri, 2010-10-29 at 12:26 +0200, Andrew Cowie wrote:
> On Thu, 2010-10-28 at 22:38 +0200, Alexander Larsson wrote:
> > One thing I remember being really confused about when learning gtk+ is
> > the GSList * usage for the group in GtkRadioButton. We have added some
> > scaffolding now that makes this somewhat better, but whats the chance of
> > actually fixing this by adding a real GtkRadioGroup class 
> 
> We came up with that solution for the Java bindings (because GSList, as
> such, wasn't something we exposed, and we go for strongly  typed 'n all
> that) and meanwhile Vreixo found that the Radio* API was very tricky to
> explain to people
> http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gtk/RadioGroup.html
> 
> so for example, 
> 
>         group = new RadioGroup();
>          
>         opt1 = new RadioButton(group, "Kermit");
>         opt2 = new RadioButton(group, "Animal");
>         opt3 = new RadioButton(group, "Gonzo");
>         opt4 = new RadioButton(group, "Fozzie");
> 
> is the sort of thing we've got going on as seen at:
> http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gtk/RadioButton.html

This is basically the same as with my API. RadioGroup is even
GInitiallyUnowned, so no need for an unref in this example, so the code
is basically identical in C.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's a jaded sweet-toothed inventor with no name. She's a sarcastic red-headed 
barmaid from out of town. They fight crime! 



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