def __init__(self, progress_items): self.dialog = gtk.Dialog( "Connection scanner progress", flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK), ) ChildProcessDialog.__init__(self, self.dialog, self.dialog.action_area.get_children()) table = gtk.Table( len(progress_items), 2, ) self.progress_bars = {} for index, (label, name) in enumerate(progress_items): l = gtk.Label("%s:" % name) l.set_alignment(0.0, 0.5) table.attach(l, 0, 1, index, index + 1) pb = gtk.ProgressBar() self.progress_bars[label] = pb table.attach(pb, 1, 2, index, index + 1) table.set_border_width(6) table.set_row_spacings(6) table.set_col_spacings(6) table.show_all() self.clear_gui() self.dialog.vbox.pack_start(table, expand=True, fill=True)
def __init__(self): GladeWrapper.__init__(self, "plugins/builder/gui.glade", "di_optimize", "dialog") ChildProcessDialog.__init__(self, self.dialog, self.dialog.action_area.get_children()) self.init_callbacks(OptimizationReportDialog) self.init_proxies(["la_num_iter", "la_rms_error", "progress_bar"]) self.state_indices = None
def __init__(self, progress_items): self.dialog = gtk.Dialog( "Connection scanner progress", flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK), ) ChildProcessDialog.__init__(self, self.dialog, self.dialog.action_area.get_children()) table = gtk.Table(len(progress_items), 2, ) self.progress_bars = {} for index, (label, name) in enumerate(progress_items): l = gtk.Label("%s:" % name) l.set_alignment(0.0, 0.5) table.attach(l, 0, 1, index, index+1) pb = gtk.ProgressBar() self.progress_bars[label] = pb table.attach(pb, 1, 2, index, index+1) table.set_border_width(6) table.set_row_spacings(6) table.set_col_spacings(6) table.show_all() self.clear_gui() self.dialog.vbox.pack_start(table, expand=True, fill=True)