Re: Weird RadioButton behaviour

Hi Tadej,

On Tue, 3 May 2011 22:25:58 +0200 you wrote:
> Why do you connect to both GtkButton::clicked and
> GtkToggleButton::toggled signals? It would probably be better to only
> connect to toggled one.

The SpinButtons "time out", so clicking back on the already-active
RadioButton should re-show it. It seemed from my original tests that
the toggled signal was not emitted by this, but I wasn't expecting the
clicked signal to be useful for the button being moved away from. For

The "Current" RadioButton is selected and the user clicks on "Power"
 - This needs to hide the "Current" spinner and show the "Power" one

The "Power" RadioButton is selected and the user clicks it again
 - The "Power" spinner needs to be shown again if it's timed out

With only the toggled signal connected, I don't get the second of
these, and I _do_ still have the buggy behaviour with cursor keys. This
was where I started from before adding the timeouts.

Rather surprisingly (at least it feels counter-intuitive to me), with
only the clicked signal connected, it seems to work. I'm not totally
happy with relying on a signal being sent when the event it's named for
clearly hasn't happened, but if it's the best way to do it I'll cope :)

Thanks for your help.

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