mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
fixed file select cancel, updated lite
This commit is contained in:
parent
0f6fa6be93
commit
346c1a97de
2 changed files with 163 additions and 14 deletions
|
@ -1268,9 +1268,11 @@ def show_new_gui():
|
|||
def makefileentry(parent, text, searchtext, var, row=0, width=200, filetypes=[], onchoosefile=None, singlerow=False, tooltiptxt=""):
|
||||
makelabel(parent, text, row,0,tooltiptxt)
|
||||
def getfilename(var, text):
|
||||
var.set(askopenfilename(title=text,filetypes=filetypes))
|
||||
if onchoosefile:
|
||||
onchoosefile(var.get())
|
||||
fnam = askopenfilename(title=text,filetypes=filetypes)
|
||||
if fnam:
|
||||
var.set(fnam)
|
||||
if onchoosefile:
|
||||
onchoosefile(var.get())
|
||||
entry = ctk.CTkEntry(parent, width, textvariable=var)
|
||||
button = ctk.CTkButton(parent, 50, text="Browse", command= lambda a=var,b=searchtext:getfilename(a,b))
|
||||
if singlerow:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue