GNOME Bugzilla – Bug 119829
Problems with drag-begin code
Last modified: 2004-12-22 21:47:04 UTC
[ Filing to cover the file roller bits of bug 115263 ] Currently, when file-roller gets the "drag-begin" signal from GTK+, it: A) Uncompresses the files, B) Iterates the main loop while doing that This is highly improper/likely to break GTK+. It's also really confusing for the user. The user is unlikely to realize they have to hold down the mouse button until the extraction finishes. What you need to do is: - Start extracting the archives incrementally in the background - Only block to wait for the archive extracting to finish when you get the "drag-data-get" signal. Iterating the main loop in drag-data-get may be a little risky, but it's certainly a whole lot better. "in the background" could be done with an idle function, but I think this is one case where threading your application would make a lot of sense. Use the main thread to do all your GTK+ stuff, another thread to do file extraction. If you are just forking off external programs to uncompress, you could do that with g_spawn_command_line_async() and avoid the threading. At any rate, *please* don't recurse the main loop out of drag-begin, I'll leave bug 115613 open to try to make that robust in GTK+, but it's not going to easy or going to happen right away.
I've just checked in the changes you suggest.
So Paolo, can we close the bug ?
yes :)