RE: [gtk-list] Radio_Menu_Item problem in 0.99.8



Tony Gale <gale@daedalus.dera.gov.uk> wrote:
> On 25-Mar-98 Steve Hosgood wrote:
> > Basically - there's (apparently) a bug in radio-menu-items:
> 
> The handling of radio button groups is rather tricky and you have to
> get it right or you get strange behaviour. Specifically, creating a
> group and using it as the argument in every call to create a new
> radio button is not correct. You have to create a chain.
> 
> The GTK+ Tutorial has an example that tries to make it clear, and
> testgtk.c has a slightly more compact version.
>

I was working from an old printout of the GTK+ tutorial. I see the new one
on www.gtk.org has more details in that section. Thanks for the tip, Tony.
I've got it working OK now.

> It is somewhat counter intuitive.
> 

You're telling me!

Is this indicative of poor design of the radio-button widget, and if so
would it be sensible/possible to redesign it at this stage of the game to be
a bit more intuitive? I can see this being a cause of regular cries for
help from novice users (like me) from now until the end of time otherwise....

                             ----------------------

Has anyone got a rationale as to why I (as a user of a radio_menu_item) should
have to know that I must call 'gtk_check_menu_item_set_state()' and cast my
radio_menu_item with 'GTK_CHECK_MENU_ITEM()' in order to make it the default
enabled button?

Surely in an object-orientated design I should be expected to call
'gtk_radio_menu_item_set_state()', and just pass the radio button to it without
having to cast it to anything special?

For that matter, even if I *was* using check_menu_items, why do I have to make
an explicit cast with 'GTK_CHECK_MENU_ITEM()' in a call to
'gtk_check_menu_item_set_state()'? In an object-orientated design, shouldn't
the 'gtk_check_menu_item_set_state()' routine do that for me? 

--

Steve                                       | Steve's law of House Rewiring:
S.Hosgood@swansea.ac.uk                     | "No matter how many power sockets
Phone: +44 1792 297292 + ask for Steve      |  you fit in a room, you will run
Fax:   +44 1792 295811                      |  out within the first week of use
--------------------------------------------+  even if you took Steve's law of
http://iiit.swan.ac.uk/~iisteve/steve.html  |  House Rewiring into account"




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