def remove(button): if self.cur_engine is not None: self.widgets['remove_engine_button'].set_sensitive(False) engine = discoverer.getEngineByName(self.cur_engine) discoverer.removeEngine(self.cur_engine) discoverer.save() update_store(discoverer) # Notify playerCombos in NewGameTasker discoverer.emit("all_engines_discovered") ts = self.tv.get_selection() ts.select_path((0, ))
def remove(button): if self.cur_engine is not None: self.widgets['remove_engine_button'].set_sensitive(False) engine = discoverer.getEngineByName(self.cur_engine) discoverer.removeEngine(self.cur_engine) discoverer.save() update_store(discoverer) # Notify playerCombos in NewGameTasker discoverer.emit("all_engines_discovered") ts = self.tv.get_selection() ts.select_path((0,))
def name_edited(renderer, path, new_name): if self.cur_engine is not None: old_name = self.cur_engine if new_name and new_name != old_name: names = [engine["name"] for engine in discoverer.getEngines()] if new_name not in names: engine = discoverer.getEngineByName(self.cur_engine) engine["name"] = new_name discoverer.save() self.cur_engine = new_name update_store() # Notify playerCombos in NewGameTasker discoverer.emit("all_engines_discovered")
def remove(button): if self.cur_engine is not None: self.widgets['remove_engine_button'].set_sensitive(False) # engine = discoverer.getEngineByName(self.cur_engine) discoverer.removeEngine(self.cur_engine) discoverer.save() selection = self.tv.get_selection() result = selection.get_selected() if result is not None: model, ts_iter = result model.remove(ts_iter) # Notify playerCombos in NewGameTasker discoverer.emit("all_engines_discovered")
def remove(button): if self.cur_engine is not None: self.widgets['remove_engine_button'].set_sensitive(False) engine = discoverer.getEngineByName(self.cur_engine) discoverer.removeEngine(self.cur_engine) discoverer.save() selection = self.tv.get_selection() result = selection.get_selected() if result is not None: model, iter = result model.remove(iter) # Notify playerCombos in NewGameTasker discoverer.emit("all_engines_discovered")
def remove(button): if self.cur_engine is not None: self.widgets['remove_engine_button'].set_sensitive(False) discoverer.removeEngine(self.cur_engine) selection = self.tv.get_selection() result = selection.get_selected() if result is not None: model, ts_iter = result model.remove(ts_iter) if model.iter_n_children() == 0: clearView() # Notify playerCombos in NewGameTasker discoverer.emit("all_engines_discovered")
def country_changed(widget): if self.cur_engine is not None and not self.selection: engine = discoverer.getEngineByName(self.cur_engine) old_country = discoverer.getCountry(engine) new_country = ISO3166_LIST[widget.get_active()].iso2 if old_country != new_country: engine["country"] = new_country # Refresh the flag in the tree view path = addDataPrefix("flags/%s.png" % new_country) if not os.path.isfile(path): path = addDataPrefix("flags/unknown.png") item = self.tv.get_selection().get_selected() if item is not None: model, ts_iter = item model[ts_iter][0] = get_pixbuf(path) # Notify playerCombos in NewGameTasker discoverer.emit("all_engines_discovered")