Re: How do I connect one signal to another?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 21 Nov 1999, Owen Taylor wrote:

> 
> Damien Miller <djm@mindrot.org> writes:
> 
> > Hi,
> > 
> > How do I connect one signal to another? Specifically how do I 
> > connect the "activated" signal of a text entry widget to a "clicked"
> > handler of a button on the parent dialog?
> 
> You can't connect one signal to another, but you can
> connect a signal to a function that emits another signal.
> Since the other signal is emitted on a different object,
> you want to use gtk_signal_connect_object, so that the
> data you pass in is used as the first parameter to the
> handler:
> 
>  gtk_signal_connect_object (GTK_OBJECT (entry), "activate",
>                             GTK_SIGNAL_FUNC (gtk_button_clicked),
>                             GTK_OBJECT (button));

OK - I have just realised that this is a little more complicated than
I though, because the button in question is part of a GnomeDialog.

How does one get a GTK_OBJECT (button) from a GnomeDialog*?

BTW thanks for the quick response - everytime I ask as silly question,
you seems to respond with a sensible answer :)

Thanks,
Damien Miller

- --
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE4OJ/vormJ9RG1dI8RAujWAKCwPW1a4cJdJP56zfYNYsuVHtPHMQCcDbRZ
K/lwfTYBqrEXh3LzG5KfSBY=
=UdCE
-----END PGP SIGNATURE-----



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