def on_add_clue_db(self): paths = [p["path"]["value"] for p in preferences.prefs[constants.PREF_CLUE_FILES]] value = obtain_file(self, u"Add clue database", paths , u"The clue database has not been added because it's already in the list." , ClueFileDialog) if value is not None: preferences.prefs[constants.PREF_CLUE_FILES].append(value) self.pwindow.clues = create_clues(preferences.prefs[constants.PREF_CLUE_FILES]) self.load_clue_files(self.pwindow.clues)
def add_word_list(self): paths = [p["path"]["value"] for p in preferences.prefs[constants.PREF_WORD_FILES]] value = obtain_file(self, u"Add word list", paths , u"The word list has not been added because it's already in the list." , NewWordListDialog) if value is not None: preferences.prefs[constants.PREF_WORD_FILES].append(value) self.palabra_window.wordlists = word.create_wordlists(preferences.prefs[constants.PREF_WORD_FILES] , previous=self.palabra_window.wordlists) self.display_wordlists()