View Single Post
Old 05-05-2007, 06:53 AM   #59
ashkulz
Addict
ashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enough
 
ashkulz's Avatar
 
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
Quote:
Originally Posted by kovidgoyal
That's great I'm going to refactor the GUI anyway to support multithreaded device operations as I dont like having the GUI freeze while transferring stuff to the device. There may be a couple of small additions to the device interface to support multithreading...nothing that would require any major rewrites though.
Instead of trying to make the GUI multithreaded, wouldn't it be a bit simpler to add a callback to display the progress during bulk writes, which is where it would freeze most of the time? So you could display a progressbar showing [[[ xyz bytes transferred ]]]. If you don't specify the callback then you'd simply won't call it. Don't know whether calling it directly and updating the Qt control will work, as I recall that you have to change control values only from the event thread for Win32, there must be someway of enqueuing things to run in the event thread. I assume you know what'll work in Qt
ashkulz is offline   Reply With Quote