def refresh_rows(self): """Clear rows (cleaners) and add them fresh""" if None != self.row_changed_handler_id: self.tree_store.disconnect(self.row_changed_handler_id) self.tree_store.clear() for key in sorted(backends): c_name = backends[key].get_name() c_id = backends[key].get_id() c_value = options.get_tree(c_id, None) if not c_value and backends[key].auto_hide(): # hide irrelevant cleaner (e.g., the application is not detected) continue parent = self.tree_store.append(None, (c_name, c_value, c_id)) for (o_id, o_name) in backends[key].get_options(): o_value = options.get_tree(c_id, o_id) self.tree_store.append(parent, (o_name, o_value, o_id)) self.row_changed_handler_id = self.tree_store.connect("row-changed", \ self.on_row_changed)
def refresh_rows(self): """Clear rows (cleaners) and add them fresh""" if None != self.row_changed_handler_id: self.tree_store.disconnect(self.row_changed_handler_id) self.tree_store.clear() for key in sorted(backends): c_name = backends[key].get_name() c_id = backends[key].get_id() c_value = options.get_tree(c_id, None) if not c_value and options.get('auto_hide') \ and backends[key].auto_hide(): print "info: automatically hiding cleaner '%s'" % (c_id) continue parent = self.tree_store.append(None, (c_name, c_value, c_id)) for (o_id, o_name) in backends[key].get_options(): o_value = options.get_tree(c_id, o_id) self.tree_store.append(parent, (o_name, o_value, o_id)) self.row_changed_handler_id = self.tree_store.connect("row-changed", self.on_row_changed)