Compare commits
No commits in common. "fc3feba657572ea3b5a4ada087bf8dc1b45d58ab" and "91a0eabc1e42991b7b1a9e2f65b5b87d98ee8d51" have entirely different histories.
fc3feba657
...
91a0eabc1e
@ -213,16 +213,8 @@ with col1:
|
|||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
root.withdraw()
|
root.withdraw()
|
||||||
root.wm_attributes('-topmost', 1)
|
root.wm_attributes('-topmost', 1)
|
||||||
root.after(10) # Add a small delay
|
|
||||||
# Create and run the main loop in a way that doesn't block
|
|
||||||
path_holder = []
|
|
||||||
def select_dir():
|
|
||||||
path = filedialog.askdirectory(title="Select Source Directory")
|
path = filedialog.askdirectory(title="Select Source Directory")
|
||||||
path_holder.append(path)
|
if path:
|
||||||
root.quit()
|
|
||||||
root.after(20, select_dir)
|
|
||||||
root.mainloop()
|
|
||||||
if path_holder and path_holder[0]:
|
|
||||||
st.session_state['source_dir_selected'] = path
|
st.session_state['source_dir_selected'] = path
|
||||||
st.rerun()
|
st.rerun()
|
||||||
root.destroy()
|
root.destroy()
|
||||||
@ -270,16 +262,8 @@ with col1:
|
|||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
root.withdraw()
|
root.withdraw()
|
||||||
root.wm_attributes('-topmost', 1)
|
root.wm_attributes('-topmost', 1)
|
||||||
root.after(10) # Add a small delay
|
|
||||||
# Create and run the main loop in a way that doesn't block
|
|
||||||
path_holder = []
|
|
||||||
def select_dir():
|
|
||||||
path = filedialog.askdirectory(title="Select Destination Directory")
|
path = filedialog.askdirectory(title="Select Destination Directory")
|
||||||
path_holder.append(path)
|
if path:
|
||||||
root.quit()
|
|
||||||
root.after(20, select_dir)
|
|
||||||
root.mainloop()
|
|
||||||
if path_holder and path_holder[0]:
|
|
||||||
st.session_state['dest_dir_selected'] = path
|
st.session_state['dest_dir_selected'] = path
|
||||||
st.rerun()
|
st.rerun()
|
||||||
root.destroy()
|
root.destroy()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user