Re: Status for long-running operation



On 17/09/10 22:01, Jeffrey Barish wrote:
> My application has one operation that runs for a long time (~1 minute).  
> During this time, the user is not allowed to do anything.  Nevertheless, I 
> felt that it was important to give the user some feedback that the 
> application is still alive and that the operation is running.  My solution 
> was to print a message in a TextBuffer and follow the message with a string 
> of dots that grows in length by one every second.  To get the TextView to 
> update, I used events_pending/main_iteration.  This all works nicely.  
> However, because of the events_pending/main_iteration statements, the entire 
> GUI is now alive.  Thus, the user is able to do things that disrupt the 
> long-running operation.  Basically, what I want is a way to get the TextView 
> to update so that I can update the progress indicator but for everything 
> else still to be locked out.  Is there a way to do this?

fslint does this, except that it allows one
to click only a stop button. It does this in the
the look_busy() function by doing:

  self.stop.grab_focus()
  self.control_buttons.grab_add()

You could do the same with a dummy widget?

http://www.pixelbeat.org/fslint/

cheers,
Pádraig.


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