From 3382d86db989cea04c807dde519554d42fb9e320 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sun, 14 Dec 2008 19:50:17 +0000 Subject: [PATCH] Fixed new plugins not working, fixed up their images and their captions and things. Renamed a few methods to reflect their plugins correctly. bzr-revno: 221 --- .eric4project/openlp.org 2.0.e4q | 2 +- .eric4project/openlp.org 2.0.e4t | 2 +- openlp.org 2.0.e4p | 6 +- openlp/core/lib/plugin.py | 2 - openlp/core/ui/about.py | 2 +- openlp/plugins/images/imageplugin.py | 54 ++++++++--------- .../presentations/presentationplugin.py | 46 +++++++-------- openlp/plugins/videos/videoplugin.py | 59 ++++++++----------- 8 files changed, 78 insertions(+), 95 deletions(-) diff --git a/.eric4project/openlp.org 2.0.e4q b/.eric4project/openlp.org 2.0.e4q index 00b57d02c..ae7e4050a 100644 --- a/.eric4project/openlp.org 2.0.e4q +++ b/.eric4project/openlp.org 2.0.e4q @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/.eric4project/openlp.org 2.0.e4t b/.eric4project/openlp.org 2.0.e4t index 81450082a..5516db058 100644 --- a/.eric4project/openlp.org 2.0.e4t +++ b/.eric4project/openlp.org 2.0.e4t @@ -1,7 +1,7 @@ - + TODO: what is the tags for bridge, pre-chorus? diff --git a/openlp.org 2.0.e4p b/openlp.org 2.0.e4p index cab26168d..a67e668ae 100644 --- a/openlp.org 2.0.e4p +++ b/openlp.org 2.0.e4p @@ -1,7 +1,7 @@ - + Python @@ -91,6 +91,10 @@ openlp/plugins/presentations/lib/pptviewlib/ppttest.py openlp/plugins/presentations/__init__.py openlp/plugins/presentations/presentationplugin.py + openlp/plugins/videos/__init__.py + openlp/plugins/videos/videoplugin.py + openlp/plugins/images/__init__.py + openlp/plugins/images/imageplugin.py
resources/forms/bibleimport.ui
diff --git a/openlp/core/lib/plugin.py b/openlp/core/lib/plugin.py index e66659c0f..788afbfba 100644 --- a/openlp/core/lib/plugin.py +++ b/openlp/core/lib/plugin.py @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -__version__ = "$Revision: $" -# $Source$ import logging diff --git a/openlp/core/ui/about.py b/openlp/core/ui/about.py index 6198f68e2..c004db604 100644 --- a/openlp/core/ui/about.py +++ b/openlp/core/ui/about.py @@ -86,7 +86,7 @@ class AboutForm(object): self.CreditsTabLayout.setSpacing(0) # self.CreditsTabLayout.setMargin(8) # self.CreditsTabLayout.setObjectName("CreditsTabLayout") - self.CreditsTextEdit = QtGui.QPlainTextEdit(self.CreditsTab) + self.CreditsTextEdit = QtGui.QTextEdit(self.CreditsTab) self.CreditsTextEdit.setReadOnly(True) self.CreditsTextEdit.setObjectName("CreditsTextEdit") self.CreditsTabLayout.addWidget(self.CreditsTextEdit) diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py index abf78ef96..86cd78d30 100644 --- a/openlp/plugins/images/imageplugin.py +++ b/openlp/plugins/images/imageplugin.py @@ -27,50 +27,47 @@ class ImagePlugin(Plugin): def __init__(self): # Call the parent constructor Plugin.__init__(self, 'Images', '1.9.0') - self.Weight = -7 - - - def getMediaManagerItem(self): + self.weight = -7 # Create the plugin icon - self.Icon = QtGui.QIcon() - self.Icon.addPixmap(QtGui.QPixmap(':/media/media_song.png'), + self.icon = QtGui.QIcon() + self.icon.addPixmap(QtGui.QPixmap(':/media/media_image.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) + + + def get_media_manager_item(self): # Create the MediaManagerItem object - self.MediaManagerItem = MediaManagerItem(self.Icon, 'Images') + self.MediaManagerItem = MediaManagerItem(self.icon, 'Images') # Add a toolbar self.MediaManagerItem.addToolbar() # Create buttons for the toolbar ## New Song Button ## - self.MediaManagerItem.addToolbarButton('Update', 'Update Images', - ':/songs/song_new.png', self.onImagesNewClick, 'ImageNewItem') - ## Edit Song Button ## - self.MediaManagerItem.addToolbarButton('Edit Song', 'Edit the selected song', - ':/songs/song_edit.png', self.onSongEditClick, 'PresentationEditItem') + self.MediaManagerItem.addToolbarButton('Load Image', 'Load images into openlp.org', + ':/images/image_load.png', self.onImagesNewClick, 'ImageNewItem') ## Delete Song Button ## - self.MediaManagerItem.addToolbarButton('Delete Song', 'Delete the selected song', - ':/songs/song_delete.png', self.onSongDeleteClick, 'SongDeleteItem') + self.MediaManagerItem.addToolbarButton('Delete Image', 'Delete the selected image', + ':/images/image_delete.png', self.onImageDeleteClick, 'ImageDeleteItem') ## Separator Line ## self.MediaManagerItem.addToolbarSeparator() ## Preview Song Button ## - self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected song', - ':/system/system_preview.png', self.onSongPreviewClick, 'SongPreviewItem') + self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected image', + ':/system/system_preview.png', self.onImagePreviewClick, 'ImagePreviewItem') ## Live Song Button ## - self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected song live', - ':/system/system_live.png', self.onSongLiveClick, 'SongLiveItem') + self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected image live', + ':/system/system_live.png', self.onImageLiveClick, 'ImageLiveItem') ## Add Song Button ## - self.MediaManagerItem.addToolbarButton('Add Song To Service', - 'Add the selected song(s) to the service', ':/system/system_add.png', - self.onSongAddClick, 'SongAddItem') + self.MediaManagerItem.addToolbarButton('Add Image To Service', + 'Add the selected image(s) to the service', ':/system/system_add.png', + self.onImageAddClick, 'ImageAddItem') ## Add the songlist widget ## self.listView = QtGui.QListWidget() self.listView.setGeometry(QtCore.QRect(10, 100, 256, 591)) self.listView.setObjectName("listView") - self.MediaManagerItem.PageLayout.addWidget(self.listView) + self.MediaManagerItem.PageLayout.addWidget(self.listView) return self.MediaManagerItem - def initalise_ui(self): + def initialise(self): self.onImagesNewClick() def onImagesNewClick(self): @@ -79,17 +76,14 @@ class ImagePlugin(Plugin): for f in files: self.listView.addItem(f) - def onSongEditClick(self): - self.edit_song_form.show() - - def onSongDeleteClick(self): + def onImageDeleteClick(self): pass - def onSongPreviewClick(self): + def onImagePreviewClick(self): pass - def onSongLiveClick(self): + def onImageLiveClick(self): pass - def onSongAddClick(self): + def onImageAddClick(self): pass diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index 771450a8e..4a20e20a7 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -30,7 +30,7 @@ class PresentationPlugin(Plugin): self.weight = -8 # Create the plugin icon self.icon = QtGui.QIcon() - self.icon.addPixmap(QtGui.QPixmap(':/media/media_song.png'), + self.icon.addPixmap(QtGui.QPixmap(':/media/media_presentation.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) @@ -40,27 +40,24 @@ class PresentationPlugin(Plugin): # Add a toolbar self.MediaManagerItem.addToolbar() # Create buttons for the toolbar - ## New Song Button ## - self.MediaManagerItem.addToolbarButton('Update', 'Update Presentations', - ':/songs/song_new.png', self.onPresentationNewClick, 'PresentationNewItem') - ## Edit Song Button ## - self.MediaManagerItem.addToolbarButton('Edit Song', 'Edit the selected song', - ':/songs/song_edit.png', self.onSongEditClick, 'PresentationEditItem') - ## Delete Song Button ## - self.MediaManagerItem.addToolbarButton('Delete Song', 'Delete the selected song', - ':/songs/song_delete.png', self.onSongDeleteClick, 'SongDeleteItem') + ## Load Presentation Button ## + self.MediaManagerItem.addToolbarButton('Load', 'Load presentations into openlp.org', + ':/presentations/presentation_load.png', self.onPresentationLoadClick, 'PresentationLoadItem') + ## Delete Presentation Button ## + self.MediaManagerItem.addToolbarButton('Delete Presentation', 'Delete the selected presentation', + ':/presentations/presentation_delete.png', self.onPresentationDeleteClick, 'PresentationDeleteItem') ## Separator Line ## self.MediaManagerItem.addToolbarSeparator() ## Preview Song Button ## - self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected song', - ':/system/system_preview.png', self.onSongPreviewClick, 'SongPreviewItem') + self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected presentation', + ':/system/system_preview.png', self.onPresentationPreviewClick, 'PresentationPreviewItem') ## Live Song Button ## - self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected song live', - ':/system/system_live.png', self.onSongLiveClick, 'SongLiveItem') + self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected presentation live', + ':/system/system_live.png', self.onPresentationLiveClick, 'PresentationLiveItem') ## Add Song Button ## - self.MediaManagerItem.addToolbarButton('Add Song To Service', - 'Add the selected song(s) to the service', ':/system/system_add.png', - self.onSongAddClick, 'SongAddItem') + self.MediaManagerItem.addToolbarButton('Add Presentation To Service', + 'Add the selected presentation(s) to the service', ':/system/system_add.png', + self.onPresentationAddClick, 'PresentationAddItem') ## Add the songlist widget ## self.listView = QtGui.QListWidget() @@ -71,25 +68,22 @@ class PresentationPlugin(Plugin): return self.MediaManagerItem def initalise(self): - self.onPresentationNewClick() + self.onPresentationLoadClick() - def onPresentationNewClick(self): + def onPresentationLoadClick(self): files = self.config.get_files() self.listView.clear() for f in files: self.listView.addItem(f) - def onSongEditClick(self): - self.edit_song_form.show() - - def onSongDeleteClick(self): + def onPresentationDeleteClick(self): pass - def onSongPreviewClick(self): + def onPresentationPreviewClick(self): pass - def onSongLiveClick(self): + def onPresentationLiveClick(self): pass - def onSongAddClick(self): + def onPresentationAddClick(self): pass diff --git a/openlp/plugins/videos/videoplugin.py b/openlp/plugins/videos/videoplugin.py index b9c37976f..8267899fa 100644 --- a/openlp/plugins/videos/videoplugin.py +++ b/openlp/plugins/videos/videoplugin.py @@ -19,77 +19,70 @@ Place, Suite 330, Boston, MA 02111-1307 USA """ from PyQt4 import QtCore, QtGui + from openlp.core.resources import * from openlp.core.lib import Plugin, MediaManagerItem -#from forms import EditSongForm class VideoPlugin(Plugin): def __init__(self): # Call the parent constructor Plugin.__init__(self, 'Videos', '1.9.0') - self.Weight = -6 - - - def getMediaManagerItem(self): + self.weight = -6 # Create the plugin icon - self.Icon = QtGui.QIcon() - self.Icon.addPixmap(QtGui.QPixmap(':/media/media_song.png'), + self.icon = QtGui.QIcon() + self.icon.addPixmap(QtGui.QPixmap(':/media/media_video.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) + + def get_media_manager_item(self): # Create the MediaManagerItem object - self.MediaManagerItem = MediaManagerItem(self.Icon, 'Videos') + self.MediaManagerItem = MediaManagerItem(self.icon, 'Videos') # Add a toolbar self.MediaManagerItem.addToolbar() # Create buttons for the toolbar ## New Song Button ## - self.MediaManagerItem.addToolbarButton('Update', 'Update Videos', - ':/songs/song_new.png', self.onVideosNewClick, 'VideoNewItem') - ## Edit Song Button ## - self.MediaManagerItem.addToolbarButton('Edit Song', 'Edit the selected song', - ':/songs/song_edit.png', self.onSongEditClick, 'PresentationEditItem') + self.MediaManagerItem.addToolbarButton('Load Video', 'Load videos into openlp.org', + ':/videos/video_load.png', self.onVideoLoadClick, 'VideoLoadItem') ## Delete Song Button ## - self.MediaManagerItem.addToolbarButton('Delete Song', 'Delete the selected song', - ':/songs/song_delete.png', self.onSongDeleteClick, 'SongDeleteItem') + self.MediaManagerItem.addToolbarButton('Delete Video', 'Delete the selected video', + ':/videos/video_delete.png', self.onVideoDeleteClick, 'VideoDeleteItem') ## Separator Line ## self.MediaManagerItem.addToolbarSeparator() ## Preview Song Button ## - self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected song', - ':/system/system_preview.png', self.onSongPreviewClick, 'SongPreviewItem') + self.MediaManagerItem.addToolbarButton('Preview Video', 'Preview the selected video', + ':/system/system_preview.png', self.onVideoPreviewClick, 'VideoPreviewItem') ## Live Song Button ## - self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected song live', - ':/system/system_live.png', self.onSongLiveClick, 'SongLiveItem') + self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected video live', + ':/system/system_live.png', self.onVideoLiveClick, 'VideoLiveItem') ## Add Song Button ## - self.MediaManagerItem.addToolbarButton('Add Song To Service', - 'Add the selected song(s) to the service', ':/system/system_add.png', - self.onSongAddClick, 'SongAddItem') + self.MediaManagerItem.addToolbarButton('Add Video To Service', + 'Add the selected video(s) to the service', ':/system/system_add.png', + self.onVideoAddClick, 'VideoAddItem') ## Add the songlist widget ## self.listView = QtGui.QListWidget() self.listView.setGeometry(QtCore.QRect(10, 100, 256, 591)) self.listView.setObjectName("listView") - self.MediaManagerItem.PageLayout.addWidget(self.listView) + self.MediaManagerItem.PageLayout.addWidget(self.listView) return self.MediaManagerItem - def initalise(self): - self.onVideosNewClick() + def initialise(self): + self.onVideoLoadClick() - def onVideosNewClick(self): + def onVideoLoadClick(self): files = self.config.get_files() self.listView.clear() for f in files: self.listView.addItem(f) - def onSongEditClick(self): - self.edit_song_form.show() - - def onSongDeleteClick(self): + def onVideoDeleteClick(self): pass - def onSongPreviewClick(self): + def onVideoPreviewClick(self): pass - def onSongLiveClick(self): + def onVideoLiveClick(self): pass - def onSongAddClick(self): + def onVideoAddClick(self): pass