.
This commit is contained in:
11
gui/gui.py
11
gui/gui.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user