From 631cb8966e621ab11fc6e3fe0b5a3f1f0d6eccb8 Mon Sep 17 00:00:00 2001 From: oleting Date: Tue, 9 Feb 2021 15:56:15 +0100 Subject: [PATCH] dev --- gui/gui.py | 12 +++++++----- gui/utils.py | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gui/gui.py b/gui/gui.py index 6ca260d..a1b964f 100644 --- a/gui/gui.py +++ b/gui/gui.py @@ -52,7 +52,7 @@ class Gui: font_filepath = None output_name = None output_path = None - exists_choice = OB.SKIP + exists_choice = OB.OVERWRITE types = None comments = None modifier = None @@ -78,14 +78,16 @@ class Gui: if event_settings == '-OVERWRITE-' and exists_choice != OB.OVERWWRITE: exists_choice = OB.OVERWWRITE break - if event_settings == '-EXPICIT-' and exists_choice != OB.RANDOM_NAME: + elif event_settings == '-EXPICIT-' and exists_choice != OB.RANDOM_NAME: exists_choice = OB.RANDOM_NAME break - if event_settings == '-SKIP-' and exists_choice != OB.SKIP: + elif event_settings == '-SKIP-' and exists_choice != OB.SKIP: exists_choice = OB.SKIP break - if event_settings == sg.WIN_CLOSED or event == 'Quit': + elif event_settings == sg.WIN_CLOSED or event == 'Quit': break + else: + pass window_settings.close() if event == '-CREATE-': @@ -111,7 +113,7 @@ class Gui: if file_is_empty: sg.popup_annoying('Our interpreter did not find anything. --> blame Kons or yourself!', title='Empty') - elif path: + if path: fnames = output(path) sg.popup_annoying('Successfully created!', title='Created', auto_close_duration=2, auto_close=True, text_color='green') diff --git a/gui/utils.py b/gui/utils.py index 7678e0b..a1d882f 100644 --- a/gui/utils.py +++ b/gui/utils.py @@ -32,7 +32,7 @@ def nassi(input_path: str, output_path: str, outputname: str, types, remove_tags is_empty = NSD.load_from_file(input_path, custom_tags) - cancel = NSD.convert_to_image(output_directory, on_conflict=behaviour) + NSD.convert_to_image(output_directory, on_conflict=behaviour) return output_directory, is_empty