Logo Search packages:      
Sourcecode: quickly-widgets version File versions  Download package

def widgets::asynch_task_progressbox::AsynchTaskProgressBox::__init__ (   self,
  run_function,
  params = None,
  cancelable = True 
)

Create an AsycnTaskProgressBox

Keyword arguments:
run_function -- the function to run asynchronously
params -- optional dictionary of parameters to be pass into run_function
cancelable -- optional value to determine whether to show cancel button. Defaults to True.
Do not use a value with the key of 'kill' in the params dictionary

Definition at line 33 of file asynch_task_progressbox.py.

00033                                                                    :
  """Create an AsycnTaskProgressBox

  Keyword arguments:
  run_function -- the function to run asynchronously
  params -- optional dictionary of parameters to be pass into run_function
  cancelable -- optional value to determine whether to show cancel button. Defaults to True.
  Do not use a value with the key of 'kill' in the params dictionary

  """
  gtk.HBox.__init__( self, False, 2 )

  self.progressbar = gtk.ProgressBar()
  self.progressbar.show()
  self.pack_start(self.progressbar, True)

  self.cancel_button = gtk.Button(stock=gtk.STOCK_CANCEL)
  if cancelable:
   self.cancel_button.show()
  self.cancel_button.set_sensitive(False)
  self.cancel_button.connect("clicked",self.__stop_clicked)
  self.pack_end(self.cancel_button, False)
  
  self.run_function = run_function
  self.pulse_thread = None
  self.work_thread = None
  self.params = params

  self.connect("destroy", self.__destroy)
  
 __gsignals__ = {'complete' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE,


Generated by  Doxygen 1.6.0   Back to index