generated from itdominator/Python-With-Gtk-Template
Fixed filechoser breakage from copy/paste action
This commit is contained in:
parent
ca016b1e36
commit
6fe58a39a2
|
@ -55,7 +55,7 @@ class SaveFileDialog:
|
|||
if current_filename == "":
|
||||
import os
|
||||
dlg.set_current_name("new.txt")
|
||||
filechooser.set_current_folder(os.path.expanduser('~'))
|
||||
dlg.set_current_folder(os.path.expanduser('~'))
|
||||
else:
|
||||
dlg.set_current_folder(current_file.get_parent().get_path())
|
||||
dlg.set_current_name(current_filename)
|
||||
|
@ -64,4 +64,4 @@ class SaveFileDialog:
|
|||
file = dlg.get_filename() if response == Gtk.ResponseType.OK else ""
|
||||
dlg.destroy()
|
||||
|
||||
return Gio.File.new_for_path(file) if not file == "" else None
|
||||
return Gio.File.new_for_path(file) if not file == "" else None
|
Loading…
Reference in New Issue