def draw_row(index): if index not in self.cached_rows: ts = self.curstate[self.sorted_ids[index]] self.cached_rows[index] = (format_utils.format_row( [get_column_value(name, ts) for name in self.cols_to_show], self.column_widths), ts['state']) return self.cached_rows[index]
def add_field(name, row, pre_color='{!info!}', post_color='{!input!}'): s = '%s%s: %s%s' % (pre_color, torrent_data_fields[name]['name'], post_color, get_column_value(name, status)) if row: row = self.add_string(row, s) return row return s