X-Git-Url: https://harishankar.org/repos/?p=biacv.git;a=blobdiff_plain;f=biacv_mainwindow.py;fp=biacv_mainwindow.py;h=681469d52baa28871d8809c05745b2a590abe533;hp=4a98c2d3167e0cda708d8686aeedf4602fcfbcb1;hb=41ec06537e95d26566994964b79ad50afa232be5;hpb=bb028ebabf00111ec146cdd64b5cb5c8563bf09b diff --git a/biacv_mainwindow.py b/biacv_mainwindow.py index 4a98c2d..681469d 100644 --- a/biacv_mainwindow.py +++ b/biacv_mainwindow.py @@ -62,6 +62,19 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow): # set the window title self.setWindowTitle ("BiaCV - " + self.currentfile) + # function to save a file as a new document + def on_file_save_as (self): + savefilename = PyQt4.QtGui.QFileDialog.getSaveFileName (self, + lang.SAVE_TITLE) + + # if save file name is not none + if savefilename <> "": + mydata = self.get_document_data () + mydata.save_data (savefilename) + self.ismodified = False + self.currentfile = savefilename + self.setWindowTitle ("BiaCV - " + self.currentfile) + # function to save a file def on_file_save (self): # only save modified file @@ -75,7 +88,7 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow): if savefilename <> "": mydata = self.get_document_data () - mydata.save_data (self.currentfile) + mydata.save_data (savefilename) self.ismodified = False self.currentfile = savefilename self.setWindowTitle ("BiaCV - " + self.currentfile)