← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/servicing into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/servicing into lp:openlp.

Requested reviews:
    openlp.org Core (openlp-core)

Standalone patch to rename Video plugin to Media Plugin based on a discussion a few weeks ago.
No other changes are included for simplicity
-- 
https://code.launchpad.net/~trb143/openlp/servicing/+merge/6619
Your team openlp.org Core is subscribed to branch lp:openlp.
=== renamed directory 'openlp/plugins/videos' => 'openlp/plugins/media'
=== modified file 'openlp/plugins/media/lib/__init__.py'
--- openlp/plugins/videos/lib/__init__.py	2009-03-15 19:31:33 +0000
+++ openlp/plugins/media/lib/__init__.py	2009-05-15 05:15:53 +0000
@@ -19,7 +19,7 @@
 """
 
 from filelistdata import FileListData
-from videotab import VideoTab
-from mediaitem import VideoMediaItem
+from mediatab import MediaTab
+from mediaitem import MediaMediaItem
 
-__all__ = ['VideoTab', 'VideoMediaItem', 'FileListData']
+__all__ = ['MediaTab', 'MediaMediaItem', 'FileListData']

=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/videos/lib/mediaitem.py	2009-04-25 06:11:15 +0000
+++ openlp/plugins/media/lib/mediaitem.py	2009-05-15 05:15:53 +0000
@@ -25,16 +25,16 @@
 from openlp.core import translate
 from openlp.core.lib import MediaManagerItem
 
-from openlp.plugins.videos.lib import VideoTab
-from openlp.plugins.videos.lib import FileListData
+from openlp.plugins.media.lib import MediaTab
+from openlp.plugins.media.lib import FileListData
 
-class VideoMediaItem(MediaManagerItem):
+class MediaMediaItem(MediaManagerItem):
     """
     This is the custom media manager item for Custom Slides.
     """
     global log
-    log=logging.getLogger(u'VideoMediaItem')
-    log.info(u'Video Media Item loaded')
+    log=logging.getLogger(u'MediaMediaItem')
+    log.info(u'Media Media Item loaded')
 
     def __init__(self, parent, icon, title):
         MediaManagerItem.__init__(self, parent, icon, title)
@@ -43,93 +43,93 @@
                 # Add a toolbar
         self.addToolbar()
         # Create buttons for the toolbar
-        ## New Video Button ##
-        self.addToolbarButton(
-            translate('VideoMediaItem',u'New Video'),
-            translate('VideoMediaItem',u'Load videos into openlp.org'),
-            ':/videos/video_load.png', self.onVideoNewClick, 'VideoNewItem')
-        ## Delete Video Button ##
-        self.addToolbarButton(
-            translate('VideoMediaItem',u'Delete Video'),
-            translate('VideoMediaItem',u'Delete the selected video'),
-            ':/videos/video_delete.png', self.onVideoDeleteClick, 'VideoDeleteItem')
+        ## New Media Button ##
+        self.addToolbarButton(
+            translate('MediaMediaItem',u'New Media'),
+            translate('MediaMediaItem',u'Load Media into openlp.org'),
+            ':/videos/video_load.png', self.onMediaNewClick, 'MediaNewItem')
+        ## Delete Media Button ##
+        self.addToolbarButton(
+            translate('MediaMediaItem',u'Delete Media'),
+            translate('MediaMediaItem',u'Delete the selected Media item'),
+            ':/videos/video_delete.png', self.onMediaDeleteClick, 'MediaDeleteItem')
         ## Separator Line ##
         self.addToolbarSeparator()
-        ## Preview Video Button ##
-        self.addToolbarButton(
-            translate('VideoMediaItem',u'Preview Video'),
-            translate('VideoMediaItem',u'Preview the selected video'),
-            ':/system/system_preview.png', self.onVideoPreviewClick, 'VideoPreviewItem')
-        ## Live Video Button ##
-        self.addToolbarButton(
-            translate('VideoMediaItem',u'Go Live'),
-            translate('VideoMediaItem',u'Send the selected video live'),
-            ':/system/system_live.png', self.onVideoLiveClick, 'VideoLiveItem')
-        ## Add Video Button ##
-        self.addToolbarButton(
-            translate('VideoMediaItem',u'Add Video To Service'),
-            translate('VideoMediaItem',u'Add the selected video(s) to the service'),
-            ':/system/system_add.png',self.onVideoAddClick, 'VideoAddItem')
-        ## Add the videolist widget ##
-
-        self.VideoListView = QtGui.QListView()
-        self.VideoListView.setAlternatingRowColors(True)
-        self.VideoListData = FileListData()
-        self.VideoListView.setModel(self.VideoListData)
-
-        self.PageLayout.addWidget(self.VideoListView)
+        ## Preview Media Button ##
+        self.addToolbarButton(
+            translate('MediaMediaItem',u'Preview Media'),
+            translate('MediaMediaItem',u'Preview the selected Media item'),
+            ':/system/system_preview.png', self.onMediaPreviewClick, 'MediaPreviewItem')
+        ## Live Media Button ##
+        self.addToolbarButton(
+            translate('MediaMediaItem',u'Go Live'),
+            translate('MediaMediaItem',u'Send the selected Media item live'),
+            ':/system/system_live.png', self.onMediaLiveClick, 'MediaLiveItem')
+        ## Add Media Button ##
+        self.addToolbarButton(
+            translate('MediaMediaItem',u'Add Media To Service'),
+            translate('MediaMediaItem',u'Add the selected Media items(s) to the service'),
+            ':/system/system_add.png',self.onMediaAddClick, 'MediaAddItem')
+        ## Add the Medialist widget ##
+
+        self.MediaListView = QtGui.QListView()
+        self.MediaListView.setAlternatingRowColors(True)
+        self.MediaListData = FileListData()
+        self.MediaListView.setModel(self.MediaListData)
+
+        self.PageLayout.addWidget(self.MediaListView)
 
         #define and add the context menu
-        self.VideoListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
+        self.MediaListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
 
-        self.VideoListView.addAction(self.contextMenuAction(
-            self.VideoListView, ':/system/system_preview.png',
-            translate('VideoMediaItem',u'&Preview Video'), self.onVideoPreviewClick))
-        self.VideoListView.addAction(self.contextMenuAction(
-            self.VideoListView, ':/system/system_live.png',
-            translate('VideoMediaItem',u'&Show Live'), self.onVideoLiveClick))
-        self.VideoListView.addAction(self.contextMenuAction(
-            self.VideoListView, ':/system/system_add.png',
-            translate('VideoMediaItem',u'&Add to Service'), self.onVideoAddClick))
+        self.MediaListView.addAction(self.contextMenuAction(
+            self.MediaListView, ':/system/system_preview.png',
+            translate('MediaMediaItem',u'&Preview Media'), self.onMediaPreviewClick))
+        self.MediaListView.addAction(self.contextMenuAction(
+            self.MediaListView, ':/system/system_live.png',
+            translate('MediaMediaItem',u'&Show Live'), self.onMediaLiveClick))
+        self.MediaListView.addAction(self.contextMenuAction(
+            self.MediaListView, ':/system/system_add.png',
+            translate('MediaMediaItem',u'&Add to Service'), self.onMediaAddClick))
 
     def initialise(self):
-        list = self.parent.config.load_list(u'videos')
-        self.loadVideoList(list)
+        list = self.parent.config.load_list(u'Medias')
+        self.loadMediaList(list)
 
-    def onVideoNewClick(self):
+    def onMediaNewClick(self):
         files = QtGui.QFileDialog.getOpenFileNames(None,
-            translate('VideoMediaItem', u'Select Video(s)'),
+            translate('MediaMediaItem', u'Select Media(s) items'),
             self.parent.config.get_last_dir(), u'Images (*.avi *.mpeg)')
         if len(files) > 0:
-            self.loadVideoList(files)
+            self.loadMediaList(files)
             dir, filename = os.path.split(str(files[0]))
             self.parent.config.set_last_dir(dir)
-            self.parent.config.set_list(u'videos', self.VideoListData.getFileList())
+            self.parent.config.set_list(u'media', self.MediaListData.getFileList())
 
     def getFileList(self):
-        filelist = [item[0] for item in self.VideoListView];
+        filelist = [item[0] for item in self.MediaListView];
         return filelist
 
-    def loadVideoList(self, list):
+    def loadMediaList(self, list):
         for files in list:
-            self.VideoListData.addRow(files)
+            self.MediaListData.addRow(files)
 
-    def onVideoDeleteClick(self):
-        indexes = self.VideoListView.selectedIndexes()
+    def onMediaDeleteClick(self):
+        indexes = self.MediaListView.selectedIndexes()
         for index in indexes:
             current_row = int(index.row())
-            self.VideoListData.removeRow(current_row)
-        self.parent.config.set_list(u'videos', self.VideoListData.getFileList())
+            self.MediaListData.removeRow(current_row)
+        self.parent.config.set_list(u'media', self.MediaListData.getFileList())
 
-    def onVideoPreviewClick(self):
-        log.debug(u'Video Preview Button pressed')
-        items = self.VideoListView.selectedIndexes()
+    def onMediaPreviewClick(self):
+        log.debug(u'Media Preview Button pressed')
+        items = self.MediaListView.selectedIndexes()
         for item in items:
-            text = self.VideoListData.getValue(item)
+            text = self.MediaListData.getValue(item)
             print text
 
-    def onVideoLiveClick(self):
+    def onMediaLiveClick(self):
         pass
 
-    def onVideoAddClick(self):
+    def onMediaAddClick(self):
         pass

=== renamed file 'openlp/plugins/videos/lib/videotab.py' => 'openlp/plugins/media/lib/mediatab.py'
--- openlp/plugins/videos/lib/videotab.py	2009-04-15 04:58:51 +0000
+++ openlp/plugins/media/lib/mediatab.py	2009-05-15 05:15:53 +0000
@@ -24,39 +24,39 @@
 from openlp import convertStringToBoolean
 from openlp.core.lib import SettingsTab
 
-class VideoTab(SettingsTab):
+class MediaTab(SettingsTab):
     """
-    VideoTab is the video settings tab in the settings dialog.
+    mediaTab is the media settings tab in the settings dialog.
     """
     def __init__(self):
-        SettingsTab.__init__(self, u'Videos')
+        SettingsTab.__init__(self, u'Media')
 
     def setupUi(self):
-        self.setObjectName(u'VideoTab')
-
-        self.VideoLayout = QtGui.QFormLayout(self)
-        self.VideoLayout.setObjectName("VideoLayout")
-
-        self.VideoModeGroupBox = QtGui.QGroupBox(self)
-        self.VideoModeGroupBox.setObjectName("VideoModeGroupBox")
-        self.VideoModeLayout = QtGui.QVBoxLayout(self.VideoModeGroupBox)
-        self.VideoModeLayout.setSpacing(8)
-        self.VideoModeLayout.setMargin(8)
-        self.VideoModeLayout.setObjectName("VideoModeLayout")
-        self.UseVMRCheckBox = QtGui.QCheckBox(self.VideoModeGroupBox)
+        self.setObjectName(u'MediaTab')
+
+        self.MediaLayout = QtGui.QFormLayout(self)
+        self.MediaLayout.setObjectName("MediaLayout")
+
+        self.MediaModeGroupBox = QtGui.QGroupBox(self)
+        self.MediaModeGroupBox.setObjectName("MediaModeGroupBox")
+        self.MediaModeLayout = QtGui.QVBoxLayout(self.MediaModeGroupBox)
+        self.MediaModeLayout.setSpacing(8)
+        self.MediaModeLayout.setMargin(8)
+        self.MediaModeLayout.setObjectName("MediaModeLayout")
+        self.UseVMRCheckBox = QtGui.QCheckBox(self.MediaModeGroupBox)
         self.UseVMRCheckBox.setObjectName("UseVMRCheckBox")
-        self.VideoModeLayout.addWidget(self.UseVMRCheckBox)
-        self.UseVMRLabel = QtGui.QLabel(self.VideoModeGroupBox)
+        self.MediaModeLayout.addWidget(self.UseVMRCheckBox)
+        self.UseVMRLabel = QtGui.QLabel(self.MediaModeGroupBox)
         self.UseVMRLabel.setObjectName("UseVMRLabel")
-        self.VideoModeLayout.addWidget(self.UseVMRLabel)
+        self.MediaModeLayout.addWidget(self.UseVMRLabel)
 
-        self.VideoLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.VideoModeGroupBox)
+        self.MediaLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.MediaModeGroupBox)
         # Signals and slots
         QtCore.QObject.connect(self.UseVMRCheckBox,
             QtCore.SIGNAL("stateChanged(int)"), self.onVMRCheckBoxChanged)
 
     def retranslateUi(self):
-        self.VideoModeGroupBox.setTitle(translate("SettingsForm", "Video Mode"))
+        self.MediaModeGroupBox.setTitle(translate("SettingsForm", "Media Mode"))
         self.UseVMRCheckBox.setText(translate("SettingsForm", "Use Video Mode Rendering"))
         self.UseVMRLabel.setText(translate("SettingsForm", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\";>\n"
 "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"

=== renamed file 'openlp/plugins/videos/videoplugin.py' => 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/videos/videoplugin.py	2009-03-22 07:13:34 +0000
+++ openlp/plugins/media/mediaplugin.py	2009-05-15 05:15:53 +0000
@@ -22,13 +22,13 @@
 
 from openlp.core.resources import *
 from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab
-from openlp.plugins.videos.lib import VideoTab, VideoMediaItem
+from openlp.plugins.media.lib import MediaTab,MediaMediaItem
 
-class VideoPlugin(Plugin):
+class MediaPlugin(Plugin):
 
     def __init__(self, plugin_helpers):
         # Call the parent constructor
-        Plugin.__init__(self, u'Videos', u'1.9.0', plugin_helpers)
+        Plugin.__init__(self, u'Media', u'1.9.0', plugin_helpers)
         self.weight = -6
         # Create the plugin icon
         self.icon = QtGui.QIcon()
@@ -36,11 +36,11 @@
             QtGui.QIcon.Normal, QtGui.QIcon.Off)
 
     def get_settings_tab(self):
-        self.VideosTab = VideoTab()
-        return self.VideosTab
+        self.MediaTab = MediaTab()
+        return self.MediaTab
 
     def get_media_manager_item(self):
         # Create the MediaManagerItem object
-        self.media_item = VideoMediaItem(self, self.icon, u'Videos')
-        return self.media_item        
- 
+        self.media_item = MediaMediaItem(self, self.icon, u'Media')
+        return self.media_item
+


Follow ups