Re: [PATCH] Fix file properties dialog monitor addition/removal, properly disconnect on destroy



On Mon, 2005-10-03 at 18:25 +0200, Christian Neumair wrote:
> It's quiet dumb to register a file monitor with a pointer that isn't
> guaranteed to be constant among the lifecycle of the properties dialog -
> or am I missing something? Also, if a file isn't deleted while the
> properties dialog is alife, the "changed" callback is not	 disconnected
> until the file is destroyed.

On the contrary, &window->details->original_files is very much the same
over the life of the dialog, being an address inside window->details.
And your change of using window for both target and original files will
break if a file is in both lists (since the client pointer is reused).

Also, the changed callback is removed on destruction of the window,
because they are added with g_signal_connect_object().

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a short-sighted day-dreaming librarian trapped in a world he never made. 
She's a bloodthirsty insomniac femme fatale from a different time and place. 
They fight crime! 




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