This commit is contained in:
Kovid Goyal 2014-07-13 07:58:36 +05:30
parent c75d9b55ee
commit f4bb217017

View File

@ -723,14 +723,14 @@ def choose_files(window, name, title,
filters=[], all_files=True, select_only_single_file=False): filters=[], all_files=True, select_only_single_file=False):
''' '''
Ask user to choose a bunch of files. Ask user to choose a bunch of files.
@param name: Unique dialog name used to store the opened directory :param name: Unique dialog name used to store the opened directory
@param title: Title to show in dialogs titlebar :param title: Title to show in dialogs titlebar
@param filters: list of allowable extensions. Each element of the list :param filters: list of allowable extensions. Each element of the list
must be a 2-tuple with first element a string describing must be a 2-tuple with first element a string describing
the type of files to be filtered and second element a list the type of files to be filtered and second element a list
of extensions. of extensions.
@param all_files: If True add All files to filters. :param all_files: If True add All files to filters.
@param select_only_single_file: If True only one file can be selected :param select_only_single_file: If True only one file can be selected
''' '''
mode = QFileDialog.ExistingFile if select_only_single_file else QFileDialog.ExistingFiles mode = QFileDialog.ExistingFile if select_only_single_file else QFileDialog.ExistingFiles
fd = FileDialog(title=title, name=name, filters=filters, fd = FileDialog(title=title, name=name, filters=filters,