After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 119829 - Problems with drag-begin code
Problems with drag-begin code
Status: RESOLVED FIXED
Product: file-roller
Classification: Applications
Component: general
2.3.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2003-08-13 22:57 UTC by Owen Taylor
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2003-08-13 22:57:41 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.
Comment 1 Paolo Bacchilega 2003-08-14 12:53:28 UTC
I've just checked in the changes you suggest.
Comment 2 Vincent Untz 2003-09-22 22:55:10 UTC
So Paolo, can we close the bug ?
Comment 3 Paolo Bacchilega 2003-09-23 16:56:58 UTC
yes :)