forked from openlp/openlp
renamed var, removed some uneeded ()'s
This commit is contained in:
parent
2ceb165901
commit
49c9663dcf
@ -305,7 +305,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
"""
|
||||
Add a file to the list widget to make it available for showing
|
||||
"""
|
||||
files = FileDialog().getOpenFileNames(self, self.on_new_prompt,
|
||||
files = FileDialog.getOpenFileNames(self, self.on_new_prompt,
|
||||
Settings().value(self.settings_section + u'/last directory'), self.on_new_file_masks)
|
||||
log.info(u'New files(s) %s', files)
|
||||
if files:
|
||||
|
@ -374,7 +374,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
Opens a file dialog to select the theme file(s) to import before attempting to extract OpenLP themes from
|
||||
those files. This process will load both OpenLP version 1 and version 2 themes.
|
||||
"""
|
||||
files = FileDialog().getOpenFileNames(self,
|
||||
files = FileDialog.getOpenFileNames(self,
|
||||
translate('OpenLP.ThemeManager', 'Select Theme Import File'),
|
||||
Settings().value(self.settings_section + u'/last directory import'),
|
||||
translate('OpenLP.ThemeManager', 'OpenLP Themes (*.theme *.otz)'))
|
||||
|
@ -753,7 +753,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
Loads file(s) from the filesystem.
|
||||
"""
|
||||
filters = u'%s (*)' % UiStrings().AllFiles
|
||||
filenames = FileDialog().getOpenFileNames(self,
|
||||
filenames = FileDialog.getOpenFileNames(self,
|
||||
translate('SongsPlugin.EditSongForm', 'Open File(s)'), u'', filters)
|
||||
for filename in filenames:
|
||||
item = QtGui.QListWidgetItem(os.path.split(unicode(filename))[1])
|
||||
|
@ -244,7 +244,7 @@ class SongImportForm(OpenLPWizard):
|
||||
if filters:
|
||||
filters += u';;'
|
||||
filters += u'%s (*)' % UiStrings().AllFiles
|
||||
filenames = FileDialog().getOpenFileNames(self, title,
|
||||
filenames = FileDialog.getOpenFileNames(self, title,
|
||||
Settings().value(self.plugin.settings_section + u'/last directory import'), filters)
|
||||
if filenames:
|
||||
listbox.addItems(filenames)
|
||||
|
@ -66,6 +66,6 @@ class TestFileDialog(TestCase):
|
||||
# called. The returned result should corrilate with the input.
|
||||
self.mocked_os.path.exists.assert_has_calls([call(u'/Valid File'), call(u'/url%20encoded%20file%20%231'),
|
||||
call(u'/url encoded file #1'), call(u'/non-existing'), call(u'/non-existing')])
|
||||
self.mocked_qt_gui.QmessageBox.information.called_with(self.mocked_parent, UiStrings().FNFT,
|
||||
UiStrings().FNF % u'/non-existing')
|
||||
self.mocked_qt_gui.QmessageBox.information.called_with(self.mocked_parent, UiStrings().FileNotFound,
|
||||
UiStrings().FileNotFoundMessage % u'/non-existing')
|
||||
self.assertEqual(result, [u'/Valid File', u'/url encoded file #1'], u'The returned file list is incorrect')
|
Loading…
Reference in New Issue
Block a user