def add_to_grid(self, grid: Gtk.Grid): if self.tenant: raise Exception('Already added to a grid') tenant = self.tenant = GridRowTenant(grid) base = 0 if tenant.base_row > 0: tenant.attach(Gtk.Separator(visible=True, hexpand=True), width=FINISHED_JOB_COLUMNS) base += 1 tenant.attach(self.title_box, top=base) tenant.attach(self.finish_box, top=base, left=1) tenant.attach(self.buttons, top=base, left=2) tenant.attach(self.extra, top=base + 1, width=FINISHED_JOB_COLUMNS)
def add_to_grid(self, grid: Gtk.Grid): if self.tenant: raise Exception('Already added to a grid') tenant = self.tenant = GridRowTenant(grid) base = 0 if tenant.base_row > 0: tenant.attach(Gtk.Separator(visible=True, hexpand=True), width=FINISHED_JOB_COLUMNS) base += 1 tenant.attach(self.title_box, top=base) tenant.attach(self.finish_box, top=base, left=1) tenant.attach(self.buttons, top=base, left=2) tenant.attach(self.extra, top=base + 1, width=FINISHED_JOB_COLUMNS) grid.get_toplevel().register_interest_in_sources( on_update_callback=self.on_source_update)
def add_to_grid(self, grid: Gtk.Grid): if self.tenant: raise Exception('Already added to a grid') tenant = self.tenant = GridRowTenant(grid) tenant_top = 0 if tenant.base_row > 0: tenant.attach(Gtk.Separator(visible=True), width=RUNNING_JOB_COLUMNS) tenant_top += 1 tenant.attach(self.title_box, top=tenant_top) tenant.attach(self.cancel_btn, left=1, top=tenant_top) tenant.attach(self.progress_bar, top=tenant_top + 1, width=RUNNING_JOB_COLUMNS) tenant.attach(self.stats, top=tenant_top + 2, width=RUNNING_JOB_COLUMNS)