Re: Signal handler bug in GTK?



On Sun, 2006-05-14 at 23:48 +0200, Sander Marechal wrote:

> On line 904 I call cfg_load(). This function is at line 550. The signals 
> seem to be emitted from that function, in a call to 
> gtk_file_chooser_set_filename() on line 631. After cfg_load() returns I 
> call glade_xml_signal_autoconnect() on line 918 and gtk_main() on line 
> 922. There's only one function call in between, game_new(), but that 
> doesn't touch the gtk_file_chooser at all and the signals come from the 
> gtk_file_chooser.
> 
> It looks like gtk_main() is emitting the signals from 
> gtk_file_chooser_set_filename() with the signal handlers defined in 
> glade_xml_signal_autoconnect() but with NULL for data.

The file chooser loads folders asynchronously.  So, when you call
gtk_file_chooser_set_filename(), it will

1. queue an operation to load the folder corresponding to your file

2. go back to the main loop

3. once the folder is loaded, it will actually select the file

4. it will emit "selection-changed"

Sometimes the signal is emitted more than once, depending on the loading
state of the file list.

  Federico




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