forked from openlp/openlp
Changed to static metod
This commit is contained in:
parent
0e155daaf6
commit
d42364671e
@ -41,7 +41,8 @@ from openlp.core.lib.ui import UiStrings
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
class FileDialog(QtGui.QFileDialog):
|
class FileDialog(QtGui.QFileDialog):
|
||||||
def getOpenFileNames(self, parent, title, path, filters):
|
@staticmethod
|
||||||
|
def getOpenFileNames(parent, title, path, filters):
|
||||||
files = QtGui.QFileDialog.getOpenFileNames(parent, title, path, filters)
|
files = QtGui.QFileDialog.getOpenFileNames(parent, title, path, filters)
|
||||||
file_list = QtCore.QStringList()
|
file_list = QtCore.QStringList()
|
||||||
for file in files:
|
for file in files:
|
||||||
|
@ -337,7 +337,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
Add a file to the list widget to make it available for showing
|
Add a file to the list widget to make it available for showing
|
||||||
"""
|
"""
|
||||||
files = FileDialog().getOpenFileNames(
|
files = FileDialog.getOpenFileNames(
|
||||||
self, self.onNewPrompt,
|
self, self.onNewPrompt,
|
||||||
SettingsManager.get_last_dir(self.settingsSection),
|
SettingsManager.get_last_dir(self.settingsSection),
|
||||||
self.onNewFileMasks)
|
self.onNewFileMasks)
|
||||||
|
@ -420,7 +420,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
attempting to extract OpenLP themes from those files. This process
|
attempting to extract OpenLP themes from those files. This process
|
||||||
will load both OpenLP version 1 and version 2 themes.
|
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'),
|
translate('OpenLP.ThemeManager', 'Select Theme Import File'),
|
||||||
SettingsManager.get_last_dir(self.settingsSection),
|
SettingsManager.get_last_dir(self.settingsSection),
|
||||||
unicode(translate('OpenLP.ThemeManager',
|
unicode(translate('OpenLP.ThemeManager',
|
||||||
|
@ -757,7 +757,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
Loads file(s) from the filesystem.
|
Loads file(s) from the filesystem.
|
||||||
"""
|
"""
|
||||||
filters = u'%s (*)' % UiStrings().AllFiles
|
filters = u'%s (*)' % UiStrings().AllFiles
|
||||||
filenames = FileDialog().getOpenFileNames(self,
|
filenames = FileDialog.getOpenFileNames(self,
|
||||||
translate('SongsPlugin.EditSongForm', 'Open File(s)'),
|
translate('SongsPlugin.EditSongForm', 'Open File(s)'),
|
||||||
QtCore.QString(), filters)
|
QtCore.QString(), filters)
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
|
@ -281,7 +281,7 @@ class SongImportForm(OpenLPWizard):
|
|||||||
if filters:
|
if filters:
|
||||||
filters += u';;'
|
filters += u';;'
|
||||||
filters += u'%s (*)' % UiStrings().AllFiles
|
filters += u'%s (*)' % UiStrings().AllFiles
|
||||||
filenames = FileDialog().getOpenFileNames(self, title,
|
filenames = FileDialog.getOpenFileNames(self, title,
|
||||||
SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
|
SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
|
||||||
filters)
|
filters)
|
||||||
if filenames:
|
if filenames:
|
||||||
|
Loading…
Reference in New Issue
Block a user