This commit is contained in:
oleting
2021-02-09 15:56:15 +01:00
parent 7d000593f6
commit 631cb8966e
2 changed files with 8 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ class Gui:
font_filepath = None font_filepath = None
output_name = None output_name = None
output_path = None output_path = None
exists_choice = OB.SKIP exists_choice = OB.OVERWRITE
types = None types = None
comments = None comments = None
modifier = None modifier = None
@@ -78,14 +78,16 @@ class Gui:
if event_settings == '-OVERWRITE-' and exists_choice != OB.OVERWWRITE: if event_settings == '-OVERWRITE-' and exists_choice != OB.OVERWWRITE:
exists_choice = OB.OVERWWRITE exists_choice = OB.OVERWWRITE
break 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 exists_choice = OB.RANDOM_NAME
break break
if event_settings == '-SKIP-' and exists_choice != OB.SKIP: elif event_settings == '-SKIP-' and exists_choice != OB.SKIP:
exists_choice = OB.SKIP exists_choice = OB.SKIP
break break
if event_settings == sg.WIN_CLOSED or event == 'Quit': elif event_settings == sg.WIN_CLOSED or event == 'Quit':
break break
else:
pass
window_settings.close() window_settings.close()
if event == '-CREATE-': if event == '-CREATE-':
@@ -111,7 +113,7 @@ class Gui:
if file_is_empty: if file_is_empty:
sg.popup_annoying('Our interpreter did not find anything. --> blame Kons or yourself!', title='Empty') sg.popup_annoying('Our interpreter did not find anything. --> blame Kons or yourself!', title='Empty')
elif path: if path:
fnames = output(path) fnames = output(path)
sg.popup_annoying('Successfully created!', title='Created', sg.popup_annoying('Successfully created!', title='Created',
auto_close_duration=2, auto_close=True, text_color='green') auto_close_duration=2, auto_close=True, text_color='green')

View File

@@ -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) 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 return output_directory, is_empty