Re: [gtk-list] Strange file selection behaviour



Lars Haugseth wrote:
> 
> I have a problem with the file selection dialog. When I click
> the cancel button, the dialog doesn't close, but instead the cancel
> button disappears. The code is as follows:

...snip..
>     /* Register cancellation event */
>     gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(dia_file)->cancel_button),
>                        "clicked",
>                        GTK_SIGNAL_FUNC(gtk_widget_destroy),
>                        GTK_OBJECT(dia_file));

That should be gtk_signal_connect_object in this instance, rather than
just gtk_signal_connect.
I think you'll then find it does what you want.

hth,

--
Lee.
http://atlas.cs.york.ac.uk/~lrpm100/



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