Skip to content

Commit

Permalink
rujaion_main: set default file name
Browse files Browse the repository at this point in the history
  • Loading branch information
fukatani committed May 19, 2019
1 parent 2bd8b23 commit ba94718
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rujaion/rujaion_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def showFileDialog(self):
)[0]
self.openFile(fname)

def openFile(self, fname):
def openFile(self, fname: str):
if not fname:
return
self.editor.open_file(fname)
Expand Down Expand Up @@ -303,8 +303,9 @@ def saveFileAs(self):
default_dir = os.path.dirname(
self.settings.value("LastOpenedFile", type=str)
)
default_file_name = os.path.join(default_dir, "test1.rs")
savename = QtWidgets.QFileDialog.getSaveFileName(
self, "Save file", default_dir, "Rust Files (*.rs)"
self, "Save file", default_file_name, "Rust Files (*.rs)"
)[0]
if not savename:
return
Expand Down

0 comments on commit ba94718

Please sign in to comment.