Allow user to change and save output directory within the Gui

This commit is contained in:
codemann8
2023-10-24 05:29:52 -05:00
parent c04040cb3e
commit 2d004fbe63
2 changed files with 8 additions and 2 deletions

View File

@@ -154,6 +154,12 @@ def bottom_frame(self, parent, args=None):
open_file(output_path('.'))
def select_output():
from tkinter import filedialog
folder_selected = filedialog.askdirectory()
if folder_selected is not None:
args.outputpath = parent.settings["outputpath"] = folder_selected
## Output Button
# widget ID
widget = "outputdir"
@@ -168,7 +174,7 @@ def bottom_frame(self, parent, args=None):
# button
self.widgets[widget].type = "button"
self.widgets[widget].pieces["button"] = Button(self, text='Open Output Directory', command=open_output)
self.widgets[widget].pieces["button"] = Button(self, text='Open Output Directory', command=select_output)
# button: pack
self.widgets[widget].pieces["button"].pack(side=RIGHT)