Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 38546: /trunk/gtk/ /trunk/gtk/: foll
      
      
On 8/15/2011 12:21 PM, Stephen Fisher wrote:
This call:
    gtk_quit_add_destroy(gtk_main_level(), GTK_OBJECT(streamwindow));
Appears to tell GTK to destroy the object "streamwindow" if Wireshark is
being closed entirely.  This then calls the signal that was connected a
few lines earlier:
   g_signal_connect(streamwindow, "destroy", G_CALLBACK(follow_destroy_cb), NULL);
Which calls the function "follow_destroy_cb" when the object
"streamwindow" is destroyed.  That "follow_destroy_cb" deletes the
temporary file used by the Follow TCP Stream feature (the Follow TCP
feeds the data into a temp file whereas Follow UDP and Follow SSL both
feed it via a tap).
So I think something needs to be substitued if they've gotten rid rid of
gtk_quit_add_destroy() in GTK 3..
I agree. I was looking at this a couple of days ago and ran a simple test.
Exiting Wireshark (with no gtk_quit_destroy()) in the follow_stream code 
left a file in the temp directory.
I was thinking about using "destroy_with_parent" but but then I starting 
going down the rathole about modal windows and etc and having to 
re-remember details about how GTK works.
There's also some discussion on the net about gtk_quit.... (which I 
didn't really understand) about the difficulties of substituting other 
code for this feature.
In any case, I ran out of time (and patience) to dig in further.
(I did remove two instances of the use of gtk_quit_destroy() in SVN 
#38415 which AFAIKT weren't needed since there was no special action 
taken when the window was destroyed).
Bill