forked from josch/plakativ
remove leftover debugging stuff from opening and saving dialog
This commit is contained in:
parent
5564a723f5
commit
d9c14aed59
1 changed files with 11 additions and 6 deletions
17
plakativ.py
17
plakativ.py
|
@ -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 == "":
|
||||||
|
|
Loading…
Reference in a new issue