+ fix
This commit is contained in:
18
gui/gui.py
18
gui/gui.py
@@ -228,7 +228,7 @@ class Gui:
|
|||||||
nassi(input_path=file_path, output_path=output_path, outputname=output_name, gui=self,
|
nassi(input_path=file_path, output_path=output_path, outputname=output_name, gui=self,
|
||||||
font_filepath=font_filepath, behaviour=exists_choice, types=types, remove_tages=modifier, comments=comments)
|
font_filepath=font_filepath, behaviour=exists_choice, types=types, remove_tages=modifier, comments=comments)
|
||||||
|
|
||||||
fnames = output(values)
|
fnames = output(values['-OUTPUT FOLDER-'])
|
||||||
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')
|
||||||
window['-OUTPUT FILE LIST-'].update(fnames)
|
window['-OUTPUT FILE LIST-'].update(fnames)
|
||||||
@@ -257,11 +257,9 @@ class Gui:
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
elif values['-JAVA FOLDER-']:
|
elif values['-JAVA FOLDER-']:
|
||||||
logging.error('No Output')
|
|
||||||
sg.popup_annoying('No Output', title='Error',
|
sg.popup_annoying('No Output', title='Error',
|
||||||
auto_close_duration=5, auto_close=True)
|
auto_close_duration=5, auto_close=True)
|
||||||
elif values['-OUTPUT FOLDER-']:
|
elif values['-OUTPUT FOLDER-']:
|
||||||
logging.error('No Input')
|
|
||||||
sg.popup_annoying('No Input', title='Error',
|
sg.popup_annoying('No Input', title='Error',
|
||||||
auto_close_duration=5, auto_close=True)
|
auto_close_duration=5, auto_close=True)
|
||||||
else:
|
else:
|
||||||
@@ -272,7 +270,7 @@ class Gui:
|
|||||||
|
|
||||||
if event == '-CREDITS-':
|
if event == '-CREDITS-':
|
||||||
sg.popup(
|
sg.popup(
|
||||||
'This was made by Plexx, Weckyy702 and Oleting. Libraries used are PySimpleGUI and Pillow', title='Credits')
|
'This was made by plexx(Image generation), Weckyy702(Interpreter) and oleting(Frontend). Used Python 3.9.1, Libraries PySimpleGUI and Pillow.', title='Credits')
|
||||||
|
|
||||||
if event == '-DONATE-':
|
if event == '-DONATE-':
|
||||||
logging.debug(('event = ' + str(event)))
|
logging.debug(('event = ' + str(event)))
|
||||||
@@ -285,7 +283,7 @@ class Gui:
|
|||||||
if event == '-OUTPUT FOLDER-':
|
if event == '-OUTPUT FOLDER-':
|
||||||
logging.debug(('event = ' + str(event) +
|
logging.debug(('event = ' + str(event) +
|
||||||
' value = ' + str(values['-OUTPUT FOLDER-'])))
|
' value = ' + str(values['-OUTPUT FOLDER-'])))
|
||||||
fnames = output(values)
|
fnames = output(values['-OUTPUT FOLDER-'])
|
||||||
window['-OUTPUT FILE LIST-'].update(fnames)
|
window['-OUTPUT FILE LIST-'].update(fnames)
|
||||||
elif event == '-OUTPUT FILE LIST-':
|
elif event == '-OUTPUT FILE LIST-':
|
||||||
logging.debug(('event = ' + str(event) +
|
logging.debug(('event = ' + str(event) +
|
||||||
@@ -331,7 +329,7 @@ class Gui:
|
|||||||
raw_types = raw_types.replace(' ', '')
|
raw_types = raw_types.replace(' ', '')
|
||||||
types = raw_types.split(',')
|
types = raw_types.split(',')
|
||||||
except:
|
except:
|
||||||
sg.popup_error('You do not hit "Enter"')
|
sg.popup('You do not hit "Enter"')
|
||||||
|
|
||||||
if event == '-MODIFIER-':
|
if event == '-MODIFIER-':
|
||||||
raw_modifier = sg.popup_get_text('Enter customn modifier (public, private, ...): ', default_text=modifier)
|
raw_modifier = sg.popup_get_text('Enter customn modifier (public, private, ...): ', default_text=modifier)
|
||||||
@@ -339,7 +337,7 @@ class Gui:
|
|||||||
raw_modifier = raw_modifier.replace(' ', '')
|
raw_modifier = raw_modifier.replace(' ', '')
|
||||||
modifier = raw_modifier.split(',')
|
modifier = raw_modifier.split(',')
|
||||||
except:
|
except:
|
||||||
sg.popup_error('You do not hit "Enter"')
|
sg.popup('You do not hit "Enter"')
|
||||||
|
|
||||||
if event == '-COMMENTS-':
|
if event == '-COMMENTS-':
|
||||||
raw_comments = sg.popup_get_text('Enter customn comments (//, #, ...): ', default_text=comments)
|
raw_comments = sg.popup_get_text('Enter customn comments (//, #, ...): ', default_text=comments)
|
||||||
@@ -347,16 +345,16 @@ class Gui:
|
|||||||
raw_comments = raw_comments.replace(' ', '')
|
raw_comments = raw_comments.replace(' ', '')
|
||||||
comments = raw_comments.split(',')
|
comments = raw_comments.split(',')
|
||||||
except:
|
except:
|
||||||
sg.popup_error('You do not hit "Enter"')
|
sg.popup('You do not hit "Enter"')
|
||||||
# output view
|
# output view
|
||||||
|
|
||||||
if event == '-REFRESH-':
|
if event == '-REFRESH-':
|
||||||
try:
|
try:
|
||||||
fnames = output(values)
|
fnames = output(values['-OUTPUT FOLDER-'])
|
||||||
window['-OUTPUT FILE LIST-'].update(fnames)
|
window['-OUTPUT FILE LIST-'].update(fnames)
|
||||||
except NoPathError:
|
except NoPathError:
|
||||||
pass
|
pass
|
||||||
sg.popup_error('You dont set an output path. Try again.')
|
sg.popup('You dont set an output path. Try again.')
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ def nassi(input_path: str, output_path: str, outputname: str, types, remove_tags
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def output(values):
|
def output(output_path):
|
||||||
output_path = values['-OUTPUT FOLDER-']
|
|
||||||
if output_path == '':
|
if output_path == '':
|
||||||
raise NoPathError
|
raise NoPathError
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user