1
0
Fork 0
forked from josch/plakativ

remove leftover debugging stuff from opening and saving dialog

This commit is contained in:
Johannes 'josch' Schauer 2020-06-10 00:12:08 +02:00
parent 5564a723f5
commit d9c14aed59
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -1059,10 +1059,15 @@ class Application(tkinter.Frame):
def on_open_button(self): def on_open_button(self):
filename = tkinter.filedialog.askopenfilename( filename = tkinter.filedialog.askopenfilename(
parent=self.master, parent=self.master,
title="foobar", title="Open either a PDF or a raster image",
filetypes=[("pdf documents", "*.pdf"), ("all files", "*")], filetypes=[
initialdir="/home/josch/git/plakativ", ("pdf documents", "*.pdf"),
initialfile="test.pdf", ("png images", "*.png"),
("jpg images", "*.jpg"),
("all files", "*"),
],
# initialdir="/home/josch/git/plakativ",
# initialfile="test.pdf",
) )
if filename == (): if filename == ():
return return
@ -1102,10 +1107,10 @@ class Application(tkinter.Frame):
base, ext = os.path.splitext(os.path.basename(self.filename)) base, ext = os.path.splitext(os.path.basename(self.filename))
filename = tkinter.filedialog.asksaveasfilename( filename = tkinter.filedialog.asksaveasfilename(
parent=self.master, parent=self.master,
title="foobar", title="Save as PDF",
defaultextension=".pdf", defaultextension=".pdf",
filetypes=[("pdf documents", "*.pdf"), ("all files", "*")], filetypes=[("pdf documents", "*.pdf"), ("all files", "*")],
initialdir="/home/josch/git/plakativ", initialdir=os.path.dirname(self.filename),
initialfile=base + "_poster" + ext, initialfile=base + "_poster" + ext,
) )
if filename == "": if filename == "":