Re: GtkToggleButton signals question

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

 



On Sun, 21 Nov 2004 22:06:54 -0600, James M. Cape <jcape@xxxxxxxxxxxxxx> wrote:
> On Sun, 2004-11-21 at 19:27 -0700, Neil Zanella wrote:
> 
> > Hello,
> >
> > I would like to know whether the following behavior is reliable, since
> > it is not documented
> > in the API reference:
> >
> > When I press a GtkToggleButton (suppose the button goes from being
> > pressed out to
> > pressed in), I notice that the "toggled" signal is emitted _AFTER_ the
> > button becomes
> > pressed in, not before.
> >
> > Can I rely on this behavior?
> 
> Probably yes, because the "toggled" signal is emitted from the "clicked"
> handler inside of gtktogglebutton.c, though why do you *need* to rely on
> this behavior?

What do you mean why? Obviously, if I need to set the state of other
buttons and widgets in my signal handler based on whether the user
made the up to down transition on the button, I need to know that
the signal handler is running at the right moment. Of course!
Why else?

> > Also, how is the "toggled" signal different from the "clicked" signal
> > pertaining to the
> > GtkButton widget from which GtkToggleButton inherits?
> 
> "toggled" is emitted whenever the "active" property changes (which may
> happen as a result of user interaction or calls to
> gtk_toggle_button_set_active/g_object_set), whereas "clicked" is only
> emitted when the user actually clicks on a button (or, I think, uses
> mnemonic shortcuts).

I wish this was documented. It really feel that this is a _CRUCIAL_ piece
of information.

Peace,

Neil

> 
> --
> Peace,
> 
>     Jim Cape
>     http://esco.mine.nu
>     http://ignore-your.tv
> 
>     "If even one reporter had stood up during a pre-Iraq Bush press
>      conference last year and shouted, `Bullshit!' it might have made a
>      difference."
>         -- Matt Taibbi, New York Press
> 
> 
>
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux