Added file filter for BiaCV files
[biacv.git] / biacv_mainwindow.py
index f9e79b3..a68652c 100644 (file)
@@ -78,7 +78,8 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow):
                                return
 
                # open file dialog
-               openfilename = PyQt4.QtGui.QFileDialog.getOpenFileName (self, lang.OPEN_TITLE)
+               openfilename = PyQt4.QtGui.QFileDialog.getOpenFileName (self, lang.OPEN_TITLE,
+                               filter = lang.BIACV_FILE_FILTER)
                # if no open file name then return
                if openfilename == "":
                        return
@@ -121,7 +122,7 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow):
        # function to save a file as a new document
        def on_file_save_as (self):
                savefilename = PyQt4.QtGui.QFileDialog.getSaveFileName (self,
-                       lang.SAVE_TITLE)
+                       lang.SAVE_TITLE, filter=lang.BIACV_FILE_FILTER)
 
                # if save file name is not none
                if savefilename <> "":
@@ -140,7 +141,7 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow):
                # if no current file get file name from file save dialog
                if self.currentfile is None:
                        savefilename = PyQt4.QtGui.QFileDialog.getSaveFileName (self,
-                               lang.SAVE_TITLE)
+                               lang.SAVE_TITLE, filter=lang.BIACV_FILE_FILTER)
 
                        if savefilename <> "":
                                mydata = self.get_document_data ()