From 49ed24a69b689e10ab74eb4c948034e7ea7309e5 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Thu, 5 Feb 2009 19:18:43 +0000 Subject: [PATCH] Move QFileInput to plugins. bzr-revno: 298 --- openlp/core/lib/mediamanageritem.py | 10 ---------- openlp/plugins/images/imageplugin.py | 2 +- openlp/plugins/presentations/presentationplugin.py | 2 +- openlp/plugins/videos/videoplugin.py | 2 +- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index ffb7fd3f5..49504cd07 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -82,13 +82,3 @@ class MediaManagerItem(QtGui.QWidget): A very simple method to add a separator to the toolbar. """ self.Toolbar.addSeparator() - - def getInputFile(self, dialogname, dialoglocation, dialogfilter): - return QtGui.QFileDialog.getOpenFileName(self, dialogname, - dialoglocation, dialogfilter) - - def getInputFiles(self, dialogname, dialoglocation, dialogfilter): - return QtGui.QFileDialog.getOpenFileNames(self, dialogname, - dialoglocation, dialogfilter) - - diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py index 44bd9abac..452d76966 100644 --- a/openlp/plugins/images/imageplugin.py +++ b/openlp/plugins/images/imageplugin.py @@ -86,7 +86,7 @@ class ImagePlugin(Plugin, PluginUtils): self._load_image_list(list) def onImagesNewClick(self): - files = self.MediaManagerItem.getInputFiles("Select Image(s)", self._get_last_dir(), "Images (*.jpg *.gif *.png *.bmp)") + files = QtGui.QFileDialog.getOpenFileNames(None, "Select Image(s)", self._get_last_dir(), "Images (*.jpg *.gif *.png *.bmp)") if len(files) > 0: self._load_image_list(files) self._save_last_directory(files[0]) diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index 115a78cee..7edeeff02 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -89,7 +89,7 @@ class PresentationPlugin(Plugin, PluginUtils): self._load_presentation_list(list) def onPresentationLoadClick(self): - files = self.MediaManagerItem.getInputFiles("Select Presentation(s)", self._get_last_dir(), "Images (*.ppt *.pps *.odi)") + files = QtGui.QFileDialog.getOpenFileNames(None, "Select Presentation(s)", self._get_last_dir(), "Images (*.ppt *.pps *.odi)") if len(files) > 0: self._load_presentation_list(files) self._save_last_directory(files[0]) diff --git a/openlp/plugins/videos/videoplugin.py b/openlp/plugins/videos/videoplugin.py index 9d606692a..eaf4f805b 100644 --- a/openlp/plugins/videos/videoplugin.py +++ b/openlp/plugins/videos/videoplugin.py @@ -84,7 +84,7 @@ class VideoPlugin(Plugin, PluginUtils): self._load_video_list(list) def onVideoNewClick(self): - files = self.MediaManagerItem.getInputFiles("Select Image(s)", self._get_last_dir(), "Images (*.avi *.mpeg)") + files = QtGui.QFileDialog.getOpenFileNames(None, "Select Image(s)", self._get_last_dir(), "Images (*.avi *.mpeg)") if len(files) > 0: self._load_video_list(files) self._save_last_directory(files[0])