This commit is contained in:
oleting
2020-12-30 16:29:40 +01:00
parent ea5b92f3eb
commit 38cf99f953
2 changed files with 28 additions and 13 deletions

View File

@@ -83,7 +83,6 @@ class Gui:
[
sg.Text('Output name'),
sg.In(size=(25, 1), enable_events=True, key='-OUTPUT NAME-'),
sg.Button('Confirm', key='-SET OUTPUT NAME-'),
],
[
sg.HSeparator(),
@@ -212,10 +211,10 @@ class Gui:
'You didn\'t set a name for the image, it will be named randomly.')
output_name = secrets.token_hex(16)
nassi(input_path=file_path, output_path=output_path, outputname=output_name, gui=self,
folder = nassi(input_path=file_path, output_path=output_path, outputname=output_name, gui=self,
font_filepath=font_filepath, behaviour=exists_choice)
fnames = output(values)
fnames = output(folder=folder)
sg.popup_annoying('Successfully created!', title='Created',
auto_close_duration=2, auto_close=True, text_color='green')
window['-OUTPUT FILE LIST-'].update(fnames)
@@ -271,7 +270,7 @@ class Gui:
if event == '-OUTPUT FOLDER-':
logging.debug(('event = ' + str(event) +
' value = ' + str(values['-OUTPUT FOLDER-'])))
fnames = output(values)
fnames = output(values['-OUTPUT FOLDER-'])
window['-OUTPUT FILE LIST-'].update(fnames)
elif event == '-OUTPUT FILE LIST-':
logging.debug(('event = ' + str(event) +
@@ -300,7 +299,7 @@ class Gui:
# optional Input
if event == '-SET OUTPUT NAME-':
if event == '-OUTPUT NAME-':
output_name = values['-OUTPUT NAME-']
if event == '-TTF FOLDER-':
@@ -314,7 +313,7 @@ class Gui:
if event == '-REFRESH-':
try:
fnames = output(values)
fnames = output(values['-OUTPUT FOLDER-'])
window['-OUTPUT FILE LIST-'].update(fnames)
except NoPathError:
pass