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
This commit is contained in:
Raoul Snyman 2008-12-14 19:50:17 +00:00
parent f90cdd27be
commit 3382d86db9
8 changed files with 78 additions and 95 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd"> <!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
<!-- eric4 user project file for project openlp.org 2.0 --> <!-- eric4 user project file for project openlp.org 2.0 -->
<!-- Saved: 2008-12-14, 17:46:43 --> <!-- Saved: 2008-12-14, 21:47:18 -->
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org --> <!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
<UserProject version="4.0"> <UserProject version="4.0">
</UserProject> </UserProject>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd"> <!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
<!-- eric4 tasks file for project openlp.org 2.0 --> <!-- eric4 tasks file for project openlp.org 2.0 -->
<!-- Saved: 2008-12-14, 17:46:43 --> <!-- Saved: 2008-12-14, 21:47:18 -->
<Tasks version="4.2"> <Tasks version="4.2">
<Task priority="1" completed="False" bugfix="False"> <Task priority="1" completed="False" bugfix="False">
<Summary>TODO: what is the tags for bridge, pre-chorus?</Summary> <Summary>TODO: what is the tags for bridge, pre-chorus?</Summary>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Project SYSTEM "Project-4.4.dtd"> <!DOCTYPE Project SYSTEM "Project-4.4.dtd">
<!-- eric4 project file for project openlp.org 2.0 --> <!-- eric4 project file for project openlp.org 2.0 -->
<!-- Saved: 2008-12-13, 19:19:42 --> <!-- Saved: 2008-12-14, 21:47:18 -->
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org --> <!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
<Project version="4.4"> <Project version="4.4">
<ProgLanguage mixed="0">Python</ProgLanguage> <ProgLanguage mixed="0">Python</ProgLanguage>
@ -91,6 +91,10 @@
<Source>openlp/plugins/presentations/lib/pptviewlib/ppttest.py</Source> <Source>openlp/plugins/presentations/lib/pptviewlib/ppttest.py</Source>
<Source>openlp/plugins/presentations/__init__.py</Source> <Source>openlp/plugins/presentations/__init__.py</Source>
<Source>openlp/plugins/presentations/presentationplugin.py</Source> <Source>openlp/plugins/presentations/presentationplugin.py</Source>
<Source>openlp/plugins/videos/__init__.py</Source>
<Source>openlp/plugins/videos/videoplugin.py</Source>
<Source>openlp/plugins/images/__init__.py</Source>
<Source>openlp/plugins/images/imageplugin.py</Source>
</Sources> </Sources>
<Forms> <Forms>
<Form>resources/forms/bibleimport.ui</Form> <Form>resources/forms/bibleimport.ui</Form>

View File

@ -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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA Place, Suite 330, Boston, MA 02111-1307 USA
""" """
__version__ = "$Revision: $"
# $Source$
import logging import logging

View File

@ -86,7 +86,7 @@ class AboutForm(object):
self.CreditsTabLayout.setSpacing(0) # self.CreditsTabLayout.setSpacing(0) #
self.CreditsTabLayout.setMargin(8) # self.CreditsTabLayout.setMargin(8) #
self.CreditsTabLayout.setObjectName("CreditsTabLayout") self.CreditsTabLayout.setObjectName("CreditsTabLayout")
self.CreditsTextEdit = QtGui.QPlainTextEdit(self.CreditsTab) self.CreditsTextEdit = QtGui.QTextEdit(self.CreditsTab)
self.CreditsTextEdit.setReadOnly(True) self.CreditsTextEdit.setReadOnly(True)
self.CreditsTextEdit.setObjectName("CreditsTextEdit") self.CreditsTextEdit.setObjectName("CreditsTextEdit")
self.CreditsTabLayout.addWidget(self.CreditsTextEdit) self.CreditsTabLayout.addWidget(self.CreditsTextEdit)

View File

@ -27,40 +27,37 @@ class ImagePlugin(Plugin):
def __init__(self): def __init__(self):
# Call the parent constructor # Call the parent constructor
Plugin.__init__(self, 'Images', '1.9.0') Plugin.__init__(self, 'Images', '1.9.0')
self.Weight = -7 self.weight = -7
def getMediaManagerItem(self):
# Create the plugin icon # Create the plugin icon
self.Icon = QtGui.QIcon() self.icon = QtGui.QIcon()
self.Icon.addPixmap(QtGui.QPixmap(':/media/media_song.png'), self.icon.addPixmap(QtGui.QPixmap(':/media/media_image.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off) QtGui.QIcon.Normal, QtGui.QIcon.Off)
def get_media_manager_item(self):
# Create the MediaManagerItem object # Create the MediaManagerItem object
self.MediaManagerItem = MediaManagerItem(self.Icon, 'Images') self.MediaManagerItem = MediaManagerItem(self.icon, 'Images')
# Add a toolbar # Add a toolbar
self.MediaManagerItem.addToolbar() self.MediaManagerItem.addToolbar()
# Create buttons for the toolbar # Create buttons for the toolbar
## New Song Button ## ## New Song Button ##
self.MediaManagerItem.addToolbarButton('Update', 'Update Images', self.MediaManagerItem.addToolbarButton('Load Image', 'Load images into openlp.org',
':/songs/song_new.png', self.onImagesNewClick, 'ImageNewItem') ':/images/image_load.png', self.onImagesNewClick, 'ImageNewItem')
## Edit Song Button ##
self.MediaManagerItem.addToolbarButton('Edit Song', 'Edit the selected song',
':/songs/song_edit.png', self.onSongEditClick, 'PresentationEditItem')
## Delete Song Button ## ## Delete Song Button ##
self.MediaManagerItem.addToolbarButton('Delete Song', 'Delete the selected song', self.MediaManagerItem.addToolbarButton('Delete Image', 'Delete the selected image',
':/songs/song_delete.png', self.onSongDeleteClick, 'SongDeleteItem') ':/images/image_delete.png', self.onImageDeleteClick, 'ImageDeleteItem')
## Separator Line ## ## Separator Line ##
self.MediaManagerItem.addToolbarSeparator() self.MediaManagerItem.addToolbarSeparator()
## Preview Song Button ## ## Preview Song Button ##
self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected song', self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected image',
':/system/system_preview.png', self.onSongPreviewClick, 'SongPreviewItem') ':/system/system_preview.png', self.onImagePreviewClick, 'ImagePreviewItem')
## Live Song Button ## ## Live Song Button ##
self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected song live', self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected image live',
':/system/system_live.png', self.onSongLiveClick, 'SongLiveItem') ':/system/system_live.png', self.onImageLiveClick, 'ImageLiveItem')
## Add Song Button ## ## Add Song Button ##
self.MediaManagerItem.addToolbarButton('Add Song To Service', self.MediaManagerItem.addToolbarButton('Add Image To Service',
'Add the selected song(s) to the service', ':/system/system_add.png', 'Add the selected image(s) to the service', ':/system/system_add.png',
self.onSongAddClick, 'SongAddItem') self.onImageAddClick, 'ImageAddItem')
## Add the songlist widget ## ## Add the songlist widget ##
self.listView = QtGui.QListWidget() self.listView = QtGui.QListWidget()
@ -70,7 +67,7 @@ class ImagePlugin(Plugin):
return self.MediaManagerItem return self.MediaManagerItem
def initalise_ui(self): def initialise(self):
self.onImagesNewClick() self.onImagesNewClick()
def onImagesNewClick(self): def onImagesNewClick(self):
@ -79,17 +76,14 @@ class ImagePlugin(Plugin):
for f in files: for f in files:
self.listView.addItem(f) self.listView.addItem(f)
def onSongEditClick(self): def onImageDeleteClick(self):
self.edit_song_form.show()
def onSongDeleteClick(self):
pass pass
def onSongPreviewClick(self): def onImagePreviewClick(self):
pass pass
def onSongLiveClick(self): def onImageLiveClick(self):
pass pass
def onSongAddClick(self): def onImageAddClick(self):
pass pass

View File

@ -30,7 +30,7 @@ class PresentationPlugin(Plugin):
self.weight = -8 self.weight = -8
# Create the plugin icon # Create the plugin icon
self.icon = QtGui.QIcon() 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) QtGui.QIcon.Normal, QtGui.QIcon.Off)
@ -40,27 +40,24 @@ class PresentationPlugin(Plugin):
# Add a toolbar # Add a toolbar
self.MediaManagerItem.addToolbar() self.MediaManagerItem.addToolbar()
# Create buttons for the toolbar # Create buttons for the toolbar
## New Song Button ## ## Load Presentation Button ##
self.MediaManagerItem.addToolbarButton('Update', 'Update Presentations', self.MediaManagerItem.addToolbarButton('Load', 'Load presentations into openlp.org',
':/songs/song_new.png', self.onPresentationNewClick, 'PresentationNewItem') ':/presentations/presentation_load.png', self.onPresentationLoadClick, 'PresentationLoadItem')
## Edit Song Button ## ## Delete Presentation Button ##
self.MediaManagerItem.addToolbarButton('Edit Song', 'Edit the selected song', self.MediaManagerItem.addToolbarButton('Delete Presentation', 'Delete the selected presentation',
':/songs/song_edit.png', self.onSongEditClick, 'PresentationEditItem') ':/presentations/presentation_delete.png', self.onPresentationDeleteClick, 'PresentationDeleteItem')
## Delete Song Button ##
self.MediaManagerItem.addToolbarButton('Delete Song', 'Delete the selected song',
':/songs/song_delete.png', self.onSongDeleteClick, 'SongDeleteItem')
## Separator Line ## ## Separator Line ##
self.MediaManagerItem.addToolbarSeparator() self.MediaManagerItem.addToolbarSeparator()
## Preview Song Button ## ## Preview Song Button ##
self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected song', self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected presentation',
':/system/system_preview.png', self.onSongPreviewClick, 'SongPreviewItem') ':/system/system_preview.png', self.onPresentationPreviewClick, 'PresentationPreviewItem')
## Live Song Button ## ## Live Song Button ##
self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected song live', self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected presentation live',
':/system/system_live.png', self.onSongLiveClick, 'SongLiveItem') ':/system/system_live.png', self.onPresentationLiveClick, 'PresentationLiveItem')
## Add Song Button ## ## Add Song Button ##
self.MediaManagerItem.addToolbarButton('Add Song To Service', self.MediaManagerItem.addToolbarButton('Add Presentation To Service',
'Add the selected song(s) to the service', ':/system/system_add.png', 'Add the selected presentation(s) to the service', ':/system/system_add.png',
self.onSongAddClick, 'SongAddItem') self.onPresentationAddClick, 'PresentationAddItem')
## Add the songlist widget ## ## Add the songlist widget ##
self.listView = QtGui.QListWidget() self.listView = QtGui.QListWidget()
@ -71,25 +68,22 @@ class PresentationPlugin(Plugin):
return self.MediaManagerItem return self.MediaManagerItem
def initalise(self): def initalise(self):
self.onPresentationNewClick() self.onPresentationLoadClick()
def onPresentationNewClick(self): def onPresentationLoadClick(self):
files = self.config.get_files() files = self.config.get_files()
self.listView.clear() self.listView.clear()
for f in files: for f in files:
self.listView.addItem(f) self.listView.addItem(f)
def onSongEditClick(self): def onPresentationDeleteClick(self):
self.edit_song_form.show()
def onSongDeleteClick(self):
pass pass
def onSongPreviewClick(self): def onPresentationPreviewClick(self):
pass pass
def onSongLiveClick(self): def onPresentationLiveClick(self):
pass pass
def onSongAddClick(self): def onPresentationAddClick(self):
pass pass

View File

@ -19,48 +19,44 @@ Place, Suite 330, Boston, MA 02111-1307 USA
""" """
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.resources import * from openlp.core.resources import *
from openlp.core.lib import Plugin, MediaManagerItem from openlp.core.lib import Plugin, MediaManagerItem
#from forms import EditSongForm
class VideoPlugin(Plugin): class VideoPlugin(Plugin):
def __init__(self): def __init__(self):
# Call the parent constructor # Call the parent constructor
Plugin.__init__(self, 'Videos', '1.9.0') Plugin.__init__(self, 'Videos', '1.9.0')
self.Weight = -6 self.weight = -6
def getMediaManagerItem(self):
# Create the plugin icon # Create the plugin icon
self.Icon = QtGui.QIcon() self.icon = QtGui.QIcon()
self.Icon.addPixmap(QtGui.QPixmap(':/media/media_song.png'), self.icon.addPixmap(QtGui.QPixmap(':/media/media_video.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off) QtGui.QIcon.Normal, QtGui.QIcon.Off)
def get_media_manager_item(self):
# Create the MediaManagerItem object # Create the MediaManagerItem object
self.MediaManagerItem = MediaManagerItem(self.Icon, 'Videos') self.MediaManagerItem = MediaManagerItem(self.icon, 'Videos')
# Add a toolbar # Add a toolbar
self.MediaManagerItem.addToolbar() self.MediaManagerItem.addToolbar()
# Create buttons for the toolbar # Create buttons for the toolbar
## New Song Button ## ## New Song Button ##
self.MediaManagerItem.addToolbarButton('Update', 'Update Videos', self.MediaManagerItem.addToolbarButton('Load Video', 'Load videos into openlp.org',
':/songs/song_new.png', self.onVideosNewClick, 'VideoNewItem') ':/videos/video_load.png', self.onVideoLoadClick, 'VideoLoadItem')
## Edit Song Button ##
self.MediaManagerItem.addToolbarButton('Edit Song', 'Edit the selected song',
':/songs/song_edit.png', self.onSongEditClick, 'PresentationEditItem')
## Delete Song Button ## ## Delete Song Button ##
self.MediaManagerItem.addToolbarButton('Delete Song', 'Delete the selected song', self.MediaManagerItem.addToolbarButton('Delete Video', 'Delete the selected video',
':/songs/song_delete.png', self.onSongDeleteClick, 'SongDeleteItem') ':/videos/video_delete.png', self.onVideoDeleteClick, 'VideoDeleteItem')
## Separator Line ## ## Separator Line ##
self.MediaManagerItem.addToolbarSeparator() self.MediaManagerItem.addToolbarSeparator()
## Preview Song Button ## ## Preview Song Button ##
self.MediaManagerItem.addToolbarButton('Preview Song', 'Preview the selected song', self.MediaManagerItem.addToolbarButton('Preview Video', 'Preview the selected video',
':/system/system_preview.png', self.onSongPreviewClick, 'SongPreviewItem') ':/system/system_preview.png', self.onVideoPreviewClick, 'VideoPreviewItem')
## Live Song Button ## ## Live Song Button ##
self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected song live', self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected video live',
':/system/system_live.png', self.onSongLiveClick, 'SongLiveItem') ':/system/system_live.png', self.onVideoLiveClick, 'VideoLiveItem')
## Add Song Button ## ## Add Song Button ##
self.MediaManagerItem.addToolbarButton('Add Song To Service', self.MediaManagerItem.addToolbarButton('Add Video To Service',
'Add the selected song(s) to the service', ':/system/system_add.png', 'Add the selected video(s) to the service', ':/system/system_add.png',
self.onSongAddClick, 'SongAddItem') self.onVideoAddClick, 'VideoAddItem')
## Add the songlist widget ## ## Add the songlist widget ##
self.listView = QtGui.QListWidget() self.listView = QtGui.QListWidget()
@ -70,26 +66,23 @@ class VideoPlugin(Plugin):
return self.MediaManagerItem return self.MediaManagerItem
def initalise(self): def initialise(self):
self.onVideosNewClick() self.onVideoLoadClick()
def onVideosNewClick(self): def onVideoLoadClick(self):
files = self.config.get_files() files = self.config.get_files()
self.listView.clear() self.listView.clear()
for f in files: for f in files:
self.listView.addItem(f) self.listView.addItem(f)
def onSongEditClick(self): def onVideoDeleteClick(self):
self.edit_song_form.show()
def onSongDeleteClick(self):
pass pass
def onSongPreviewClick(self): def onVideoPreviewClick(self):
pass pass
def onSongLiveClick(self): def onVideoLiveClick(self):
pass pass
def onSongAddClick(self): def onVideoAddClick(self):
pass pass