def update_related_image(self, event, word_): self.main_win.status.set("Updating Related Image...") image_filename = utils.open_file_dialog("image") log.debug("CTRL: Updating Related Image with {}".format(image_filename)) if image_filename != "": self.vocab.update_word(word_["word_id"], "related_image", utils.convertToBinaryData(image_filename)) self.refresh_vocabulary() self.main_win.status.set("Ready...") else: pass
def trigger_xls_import(self, event=None): self.main_win.status.set("Importing Excel File...") temp_file = utils.open_file_dialog("excel_csv") if temp_file[-4:] == "xlsx": self.data_handler.load_excel(excel_file=temp_file) elif temp_file[-3:] == "csv": self.data_handler.load_excel(csv_file=temp_file) self.refresh_vocabulary()
def text_loader(self): self.temp_file = utils.open_file_dialog("text") if self.temp_file != "": self.population_window.file_chooser.configure(text=self.temp_file)
def add_related_image(self): self.temp_rel_image = utils.open_file_dialog("image")
def trigger_load_vocabulary(self): self.main_win.status.set("Loading Vocabulary...") voc_filename = utils.open_file_dialog("database") self.load_vocabulary(db_file=voc_filename, metadata=[]) self.refresh_vocabulary() self.display_empty_data()