From: Austin H. <ah...@cs...> - 2000-05-19 23:24:41
|
- Chuck Homic arranged a host of electrons thusly: - > Austin: > > Just looking over your patch today, I have an idea. Your version of > download_pickup_queued() walks the list and looks up the download in the > queue list. Although I didn't try it to find out, I suspect this means > you're ignoring the exact order of the queue (for example, if the user > re-arranges the order), and also leaves the possiblility that the list can > be changed while you're walking it. entirely correct. I'd forgotten that the user could reorder the list. > Here is my version of that function which takes the files directly from > the GTK_CLIST, similar to the original function. I think doing it this > way is a bit more trustworthy. I'll test it for a couple of hours, now > that I got my computer up and running again, and if it's okay with you, > I'll put it into CVS later tonight. yup. fine by me. One thing that you might want to consider would be to do a gtk_clist_freeze(GTK_CLIST(clist_download_queue)) before the while loop, and then a gtk_clist_thaw(GTK_CLIST(clist_download_queue)) after it's done. That should (going to look now) keep the user from reordering while the function is running. I don't think it really prevents reordering, but it makes it so that there will be no visual feedback to the user, so... it should be effective. peace, ah -- / PGP Public Key: http://www.csc.uvic.ca/~ahenry/Austin_Henry.txt \ | Fingerprint: 3828 51C4 6ABE 457F 0862 E3DB E424 7527 1346 42BC | \ -> latest fortune cookie to grab my attention <- / \ Toddlers are the stormtroopers of the Lord of Entropy. / --------------------------------------------------------- |