reinstate the caption call

This commit is contained in:
Miguel Jacq 2017-05-29 13:50:46 +10:00
parent 8f79fc392d
commit 63745f4d8e
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -209,7 +209,7 @@ class FileSelection(QtWidgets.QVBoxLayout):
""" """
Add button clicked. Add button clicked.
""" """
file_dialog = FileDialog() #caption=strings._('gui_choose_items', True)) file_dialog = FileDialog(caption=strings._('gui_choose_items', True))
if file_dialog.exec_() == QtWidgets.QDialog.Accepted: if file_dialog.exec_() == QtWidgets.QDialog.Accepted:
for filename in file_dialog.selectedFiles(): for filename in file_dialog.selectedFiles():
self.file_list.add_file(filename) self.file_list.add_file(filename)
@ -258,8 +258,8 @@ class FileDialog(QtWidgets.QFileDialog):
Overridden version of QFileDialog which allows us to select Overridden version of QFileDialog which allows us to select
folders as well as, or instead of, files. folders as well as, or instead of, files.
""" """
def __init__(self, *args): def __init__(self, *args, **kwargs):
QtWidgets.QFileDialog.__init__(self, *args) QtWidgets.QFileDialog.__init__(self, *args, **kwargs)
self.setOption(self.DontUseNativeDialog, True) self.setOption(self.DontUseNativeDialog, True)
self.setOption(self.ReadOnly, True) self.setOption(self.ReadOnly, True)
self.setOption(self.ShowDirsOnly, False) self.setOption(self.ShowDirsOnly, False)