Re: Glade 2 & passing data to signal handlers
- From: Dave Reed <drlinux columbus rr com>
- To: Russell Shaw <rjshaw iprimus com au>
- Cc: gtk-list gnome org
- Subject: Re: Glade 2 & passing data to signal handlers
- Date: Sat, 18 Oct 2003 12:15:33 -0400
On Saturday 18 October 2003 11:24, Russell Shaw wrote:
> Joe Scaduto wrote:
> > On Sat, 2003-10-18 at 06:01, Sven Neumann wrote:
> >
> >>Hi,
> >>
> >>Russell Shaw <rjshaw iprimus com au> writes:
> >>
> >>
> >>>Maybe you need: g_signal_connect((gpointer) okLoginButton,
"clicked",
> >>> G_CALLBACK (on_okLoginButton_clicked),
> >>> GTK_OBJECT (loginDialog) );
> >>
> >>Yes. Or simpler (w/o all the redundant casts):
> >>
> >> g_signal_connect (okLoginButton, "clicked",
> >> G_CALLBACK (on_okLoginButton_clicked),
> >> loginDialog);
> >>
> >>or even without writing a dedicated callback function:
> >>
> >> g_signal_connect_swapped (okLoginButton, "clicked",
> >> G_CALLBACK (gtk_widget_destroy),
> >> loginDialog);
> >>
> >>
> >>Sven
> >
> >
> > Both of your suggestions seems logical to me and I will try them.
The
> > only problem I have is that Glade 2 created that siganl connection
not
> > me. And at the beginning of the file where the signal connections
are
> > it says "DO NOT EDIT THIS FILE - generated by Glade" Can i still go
in
> > and change the signal connections as you suggested?
>
> Yes, but it will be over-written next time you generate the code.
> Most users don't use this generated code and use gladelib xml which
> is less intrusive on your program.
Which leads me to the question: how do you pass extra parameters when
you're using libglade along with glade?
Thanks,
Dave
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]