Status: | Merged |
---|---|
Merge reported by: | Tim Bentley |
Merged at revision: | not available |
Proposed branch: | lp:~trb143/openlp/servicing |
Merge into: | lp:openlp |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~trb143/openlp/servicing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Bentley | Approve | ||
Raoul Snyman | Approve | ||
Martin Thompson (community) | Approve | ||
Review via email: mp+6619@code.launchpad.net |
Commit message
Description of the change
Tim Bentley (trb143) wrote : | # |
Martin Thompson (mjthompson) wrote : | # |
Two or three of suggestions:
Line 147
- Does it need to be MediaMediaItem - looks a bit weird?
- Also, should be Select Media item(s)' - the (s) in the wrong place :)
Line 149
- should be something like self.parent.
line 271
- MediaMediaItem as well
and line 297
Raoul Snyman (raoul-snyman) wrote : | # |
I see the marks of Find & Replace! I'd suggest just going through the code and fixing the odd place where it says (for instance), "Medias".
- 455. By Tim Bentley
-
Close display window on exit
Performance improvements in renderer
Performance improvements in Thememanager
Fix review comments from last few reviews
Add new media types to media plugin_helpers
Code format cleanups.
Tim Bentley (trb143) : | # |
- 456. By Tim Bentley
-
More code cleanups
- 457. By Tim Bentley
-
Add Images to the themes
Fix MainDisplay to record change of frame when blanked out. - 458. By Tim Bentley
-
Rendering fixes
- 459. By Tim Bentley
-
hook up themes to combo boxes
- 460. By Tim Bentley
-
Corrections to Renderer to handle slides not lines
Fixes to Bibleplugin to renderer multiple verses per slide
Pass Bible Theme to RenderManager
Preview Diff
1 | === renamed directory 'openlp/plugins/videos' => 'openlp/plugins/media' | |||
2 | === modified file 'openlp/plugins/media/lib/__init__.py' | |||
3 | --- openlp/plugins/videos/lib/__init__.py 2009-03-15 19:31:33 +0000 | |||
4 | +++ openlp/plugins/media/lib/__init__.py 2009-05-15 05:15:53 +0000 | |||
5 | @@ -19,7 +19,7 @@ | |||
6 | 19 | """ | 19 | """ |
7 | 20 | 20 | ||
8 | 21 | from filelistdata import FileListData | 21 | from filelistdata import FileListData |
11 | 22 | from videotab import VideoTab | 22 | from mediatab import MediaTab |
12 | 23 | from mediaitem import VideoMediaItem | 23 | from mediaitem import MediaMediaItem |
13 | 24 | 24 | ||
15 | 25 | __all__ = ['VideoTab', 'VideoMediaItem', 'FileListData'] | 25 | __all__ = ['MediaTab', 'MediaMediaItem', 'FileListData'] |
16 | 26 | 26 | ||
17 | === modified file 'openlp/plugins/media/lib/mediaitem.py' | |||
18 | --- openlp/plugins/videos/lib/mediaitem.py 2009-04-25 06:11:15 +0000 | |||
19 | +++ openlp/plugins/media/lib/mediaitem.py 2009-05-15 05:15:53 +0000 | |||
20 | @@ -25,16 +25,16 @@ | |||
21 | 25 | from openlp.core import translate | 25 | from openlp.core import translate |
22 | 26 | from openlp.core.lib import MediaManagerItem | 26 | from openlp.core.lib import MediaManagerItem |
23 | 27 | 27 | ||
26 | 28 | from openlp.plugins.videos.lib import VideoTab | 28 | from openlp.plugins.media.lib import MediaTab |
27 | 29 | from openlp.plugins.videos.lib import FileListData | 29 | from openlp.plugins.media.lib import FileListData |
28 | 30 | 30 | ||
30 | 31 | class VideoMediaItem(MediaManagerItem): | 31 | class MediaMediaItem(MediaManagerItem): |
31 | 32 | """ | 32 | """ |
32 | 33 | This is the custom media manager item for Custom Slides. | 33 | This is the custom media manager item for Custom Slides. |
33 | 34 | """ | 34 | """ |
34 | 35 | global log | 35 | global log |
37 | 36 | log=logging.getLogger(u'VideoMediaItem') | 36 | log=logging.getLogger(u'MediaMediaItem') |
38 | 37 | log.info(u'Video Media Item loaded') | 37 | log.info(u'Media Media Item loaded') |
39 | 38 | 38 | ||
40 | 39 | def __init__(self, parent, icon, title): | 39 | def __init__(self, parent, icon, title): |
41 | 40 | MediaManagerItem.__init__(self, parent, icon, title) | 40 | MediaManagerItem.__init__(self, parent, icon, title) |
42 | @@ -43,93 +43,93 @@ | |||
43 | 43 | # Add a toolbar | 43 | # Add a toolbar |
44 | 44 | self.addToolbar() | 44 | self.addToolbar() |
45 | 45 | # Create buttons for the toolbar | 45 | # Create buttons for the toolbar |
56 | 46 | ## New Video Button ## | 46 | ## New Media Button ## |
57 | 47 | self.addToolbarButton( | 47 | self.addToolbarButton( |
58 | 48 | translate('VideoMediaItem',u'New Video'), | 48 | translate('MediaMediaItem',u'New Media'), |
59 | 49 | translate('VideoMediaItem',u'Load videos into openlp.org'), | 49 | translate('MediaMediaItem',u'Load Media into openlp.org'), |
60 | 50 | ':/videos/video_load.png', self.onVideoNewClick, 'VideoNewItem') | 50 | ':/videos/video_load.png', self.onMediaNewClick, 'MediaNewItem') |
61 | 51 | ## Delete Video Button ## | 51 | ## Delete Media Button ## |
62 | 52 | self.addToolbarButton( | 52 | self.addToolbarButton( |
63 | 53 | translate('VideoMediaItem',u'Delete Video'), | 53 | translate('MediaMediaItem',u'Delete Media'), |
64 | 54 | translate('VideoMediaItem',u'Delete the selected video'), | 54 | translate('MediaMediaItem',u'Delete the selected Media item'), |
65 | 55 | ':/videos/video_delete.png', self.onVideoDeleteClick, 'VideoDeleteItem') | 55 | ':/videos/video_delete.png', self.onMediaDeleteClick, 'MediaDeleteItem') |
66 | 56 | ## Separator Line ## | 56 | ## Separator Line ## |
67 | 57 | self.addToolbarSeparator() | 57 | self.addToolbarSeparator() |
91 | 58 | ## Preview Video Button ## | 58 | ## Preview Media Button ## |
92 | 59 | self.addToolbarButton( | 59 | self.addToolbarButton( |
93 | 60 | translate('VideoMediaItem',u'Preview Video'), | 60 | translate('MediaMediaItem',u'Preview Media'), |
94 | 61 | translate('VideoMediaItem',u'Preview the selected video'), | 61 | translate('MediaMediaItem',u'Preview the selected Media item'), |
95 | 62 | ':/system/system_preview.png', self.onVideoPreviewClick, 'VideoPreviewItem') | 62 | ':/system/system_preview.png', self.onMediaPreviewClick, 'MediaPreviewItem') |
96 | 63 | ## Live Video Button ## | 63 | ## Live Media Button ## |
97 | 64 | self.addToolbarButton( | 64 | self.addToolbarButton( |
98 | 65 | translate('VideoMediaItem',u'Go Live'), | 65 | translate('MediaMediaItem',u'Go Live'), |
99 | 66 | translate('VideoMediaItem',u'Send the selected video live'), | 66 | translate('MediaMediaItem',u'Send the selected Media item live'), |
100 | 67 | ':/system/system_live.png', self.onVideoLiveClick, 'VideoLiveItem') | 67 | ':/system/system_live.png', self.onMediaLiveClick, 'MediaLiveItem') |
101 | 68 | ## Add Video Button ## | 68 | ## Add Media Button ## |
102 | 69 | self.addToolbarButton( | 69 | self.addToolbarButton( |
103 | 70 | translate('VideoMediaItem',u'Add Video To Service'), | 70 | translate('MediaMediaItem',u'Add Media To Service'), |
104 | 71 | translate('VideoMediaItem',u'Add the selected video(s) to the service'), | 71 | translate('MediaMediaItem',u'Add the selected Media items(s) to the service'), |
105 | 72 | ':/system/system_add.png',self.onVideoAddClick, 'VideoAddItem') | 72 | ':/system/system_add.png',self.onMediaAddClick, 'MediaAddItem') |
106 | 73 | ## Add the videolist widget ## | 73 | ## Add the Medialist widget ## |
107 | 74 | 74 | ||
108 | 75 | self.VideoListView = QtGui.QListView() | 75 | self.MediaListView = QtGui.QListView() |
109 | 76 | self.VideoListView.setAlternatingRowColors(True) | 76 | self.MediaListView.setAlternatingRowColors(True) |
110 | 77 | self.VideoListData = FileListData() | 77 | self.MediaListData = FileListData() |
111 | 78 | self.VideoListView.setModel(self.VideoListData) | 78 | self.MediaListView.setModel(self.MediaListData) |
112 | 79 | 79 | ||
113 | 80 | self.PageLayout.addWidget(self.VideoListView) | 80 | self.PageLayout.addWidget(self.MediaListView) |
114 | 81 | 81 | ||
115 | 82 | #define and add the context menu | 82 | #define and add the context menu |
117 | 83 | self.VideoListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) | 83 | self.MediaListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) |
118 | 84 | 84 | ||
128 | 85 | self.VideoListView.addAction(self.contextMenuAction( | 85 | self.MediaListView.addAction(self.contextMenuAction( |
129 | 86 | self.VideoListView, ':/system/system_preview.png', | 86 | self.MediaListView, ':/system/system_preview.png', |
130 | 87 | translate('VideoMediaItem',u'&Preview Video'), self.onVideoPreviewClick)) | 87 | translate('MediaMediaItem',u'&Preview Media'), self.onMediaPreviewClick)) |
131 | 88 | self.VideoListView.addAction(self.contextMenuAction( | 88 | self.MediaListView.addAction(self.contextMenuAction( |
132 | 89 | self.VideoListView, ':/system/system_live.png', | 89 | self.MediaListView, ':/system/system_live.png', |
133 | 90 | translate('VideoMediaItem',u'&Show Live'), self.onVideoLiveClick)) | 90 | translate('MediaMediaItem',u'&Show Live'), self.onMediaLiveClick)) |
134 | 91 | self.VideoListView.addAction(self.contextMenuAction( | 91 | self.MediaListView.addAction(self.contextMenuAction( |
135 | 92 | self.VideoListView, ':/system/system_add.png', | 92 | self.MediaListView, ':/system/system_add.png', |
136 | 93 | translate('VideoMediaItem',u'&Add to Service'), self.onVideoAddClick)) | 93 | translate('MediaMediaItem',u'&Add to Service'), self.onMediaAddClick)) |
137 | 94 | 94 | ||
138 | 95 | def initialise(self): | 95 | def initialise(self): |
141 | 96 | list = self.parent.config.load_list(u'videos') | 96 | list = self.parent.config.load_list(u'Medias') |
142 | 97 | self.loadVideoList(list) | 97 | self.loadMediaList(list) |
143 | 98 | 98 | ||
145 | 99 | def onVideoNewClick(self): | 99 | def onMediaNewClick(self): |
146 | 100 | files = QtGui.QFileDialog.getOpenFileNames(None, | 100 | files = QtGui.QFileDialog.getOpenFileNames(None, |
148 | 101 | translate('VideoMediaItem', u'Select Video(s)'), | 101 | translate('MediaMediaItem', u'Select Media(s) items'), |
149 | 102 | self.parent.config.get_last_dir(), u'Images (*.avi *.mpeg)') | 102 | self.parent.config.get_last_dir(), u'Images (*.avi *.mpeg)') |
150 | 103 | if len(files) > 0: | 103 | if len(files) > 0: |
152 | 104 | self.loadVideoList(files) | 104 | self.loadMediaList(files) |
153 | 105 | dir, filename = os.path.split(str(files[0])) | 105 | dir, filename = os.path.split(str(files[0])) |
154 | 106 | self.parent.config.set_last_dir(dir) | 106 | self.parent.config.set_last_dir(dir) |
156 | 107 | self.parent.config.set_list(u'videos', self.VideoListData.getFileList()) | 107 | self.parent.config.set_list(u'media', self.MediaListData.getFileList()) |
157 | 108 | 108 | ||
158 | 109 | def getFileList(self): | 109 | def getFileList(self): |
160 | 110 | filelist = [item[0] for item in self.VideoListView]; | 110 | filelist = [item[0] for item in self.MediaListView]; |
161 | 111 | return filelist | 111 | return filelist |
162 | 112 | 112 | ||
164 | 113 | def loadVideoList(self, list): | 113 | def loadMediaList(self, list): |
165 | 114 | for files in list: | 114 | for files in list: |
167 | 115 | self.VideoListData.addRow(files) | 115 | self.MediaListData.addRow(files) |
168 | 116 | 116 | ||
171 | 117 | def onVideoDeleteClick(self): | 117 | def onMediaDeleteClick(self): |
172 | 118 | indexes = self.VideoListView.selectedIndexes() | 118 | indexes = self.MediaListView.selectedIndexes() |
173 | 119 | for index in indexes: | 119 | for index in indexes: |
174 | 120 | current_row = int(index.row()) | 120 | current_row = int(index.row()) |
177 | 121 | self.VideoListData.removeRow(current_row) | 121 | self.MediaListData.removeRow(current_row) |
178 | 122 | self.parent.config.set_list(u'videos', self.VideoListData.getFileList()) | 122 | self.parent.config.set_list(u'media', self.MediaListData.getFileList()) |
179 | 123 | 123 | ||
183 | 124 | def onVideoPreviewClick(self): | 124 | def onMediaPreviewClick(self): |
184 | 125 | log.debug(u'Video Preview Button pressed') | 125 | log.debug(u'Media Preview Button pressed') |
185 | 126 | items = self.VideoListView.selectedIndexes() | 126 | items = self.MediaListView.selectedIndexes() |
186 | 127 | for item in items: | 127 | for item in items: |
188 | 128 | text = self.VideoListData.getValue(item) | 128 | text = self.MediaListData.getValue(item) |
189 | 129 | print text | 129 | print text |
190 | 130 | 130 | ||
192 | 131 | def onVideoLiveClick(self): | 131 | def onMediaLiveClick(self): |
193 | 132 | pass | 132 | pass |
194 | 133 | 133 | ||
196 | 134 | def onVideoAddClick(self): | 134 | def onMediaAddClick(self): |
197 | 135 | pass | 135 | pass |
198 | 136 | 136 | ||
199 | === renamed file 'openlp/plugins/videos/lib/videotab.py' => 'openlp/plugins/media/lib/mediatab.py' | |||
200 | --- openlp/plugins/videos/lib/videotab.py 2009-04-15 04:58:51 +0000 | |||
201 | +++ openlp/plugins/media/lib/mediatab.py 2009-05-15 05:15:53 +0000 | |||
202 | @@ -24,39 +24,39 @@ | |||
203 | 24 | from openlp import convertStringToBoolean | 24 | from openlp import convertStringToBoolean |
204 | 25 | from openlp.core.lib import SettingsTab | 25 | from openlp.core.lib import SettingsTab |
205 | 26 | 26 | ||
207 | 27 | class VideoTab(SettingsTab): | 27 | class MediaTab(SettingsTab): |
208 | 28 | """ | 28 | """ |
210 | 29 | VideoTab is the video settings tab in the settings dialog. | 29 | mediaTab is the media settings tab in the settings dialog. |
211 | 30 | """ | 30 | """ |
212 | 31 | def __init__(self): | 31 | def __init__(self): |
214 | 32 | SettingsTab.__init__(self, u'Videos') | 32 | SettingsTab.__init__(self, u'Media') |
215 | 33 | 33 | ||
216 | 34 | def setupUi(self): | 34 | def setupUi(self): |
229 | 35 | self.setObjectName(u'VideoTab') | 35 | self.setObjectName(u'MediaTab') |
230 | 36 | 36 | ||
231 | 37 | self.VideoLayout = QtGui.QFormLayout(self) | 37 | self.MediaLayout = QtGui.QFormLayout(self) |
232 | 38 | self.VideoLayout.setObjectName("VideoLayout") | 38 | self.MediaLayout.setObjectName("MediaLayout") |
233 | 39 | 39 | ||
234 | 40 | self.VideoModeGroupBox = QtGui.QGroupBox(self) | 40 | self.MediaModeGroupBox = QtGui.QGroupBox(self) |
235 | 41 | self.VideoModeGroupBox.setObjectName("VideoModeGroupBox") | 41 | self.MediaModeGroupBox.setObjectName("MediaModeGroupBox") |
236 | 42 | self.VideoModeLayout = QtGui.QVBoxLayout(self.VideoModeGroupBox) | 42 | self.MediaModeLayout = QtGui.QVBoxLayout(self.MediaModeGroupBox) |
237 | 43 | self.VideoModeLayout.setSpacing(8) | 43 | self.MediaModeLayout.setSpacing(8) |
238 | 44 | self.VideoModeLayout.setMargin(8) | 44 | self.MediaModeLayout.setMargin(8) |
239 | 45 | self.VideoModeLayout.setObjectName("VideoModeLayout") | 45 | self.MediaModeLayout.setObjectName("MediaModeLayout") |
240 | 46 | self.UseVMRCheckBox = QtGui.QCheckBox(self.VideoModeGroupBox) | 46 | self.UseVMRCheckBox = QtGui.QCheckBox(self.MediaModeGroupBox) |
241 | 47 | self.UseVMRCheckBox.setObjectName("UseVMRCheckBox") | 47 | self.UseVMRCheckBox.setObjectName("UseVMRCheckBox") |
244 | 48 | self.VideoModeLayout.addWidget(self.UseVMRCheckBox) | 48 | self.MediaModeLayout.addWidget(self.UseVMRCheckBox) |
245 | 49 | self.UseVMRLabel = QtGui.QLabel(self.VideoModeGroupBox) | 49 | self.UseVMRLabel = QtGui.QLabel(self.MediaModeGroupBox) |
246 | 50 | self.UseVMRLabel.setObjectName("UseVMRLabel") | 50 | self.UseVMRLabel.setObjectName("UseVMRLabel") |
248 | 51 | self.VideoModeLayout.addWidget(self.UseVMRLabel) | 51 | self.MediaModeLayout.addWidget(self.UseVMRLabel) |
249 | 52 | 52 | ||
251 | 53 | self.VideoLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.VideoModeGroupBox) | 53 | self.MediaLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.MediaModeGroupBox) |
252 | 54 | # Signals and slots | 54 | # Signals and slots |
253 | 55 | QtCore.QObject.connect(self.UseVMRCheckBox, | 55 | QtCore.QObject.connect(self.UseVMRCheckBox, |
254 | 56 | QtCore.SIGNAL("stateChanged(int)"), self.onVMRCheckBoxChanged) | 56 | QtCore.SIGNAL("stateChanged(int)"), self.onVMRCheckBoxChanged) |
255 | 57 | 57 | ||
256 | 58 | def retranslateUi(self): | 58 | def retranslateUi(self): |
258 | 59 | self.VideoModeGroupBox.setTitle(translate("SettingsForm", "Video Mode")) | 59 | self.MediaModeGroupBox.setTitle(translate("SettingsForm", "Media Mode")) |
259 | 60 | self.UseVMRCheckBox.setText(translate("SettingsForm", "Use Video Mode Rendering")) | 60 | self.UseVMRCheckBox.setText(translate("SettingsForm", "Use Video Mode Rendering")) |
260 | 61 | self.UseVMRLabel.setText(translate("SettingsForm", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" | 61 | self.UseVMRLabel.setText(translate("SettingsForm", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" |
261 | 62 | "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" | 62 | "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" |
262 | 63 | 63 | ||
263 | === renamed file 'openlp/plugins/videos/videoplugin.py' => 'openlp/plugins/media/mediaplugin.py' | |||
264 | --- openlp/plugins/videos/videoplugin.py 2009-03-22 07:13:34 +0000 | |||
265 | +++ openlp/plugins/media/mediaplugin.py 2009-05-15 05:15:53 +0000 | |||
266 | @@ -22,13 +22,13 @@ | |||
267 | 22 | 22 | ||
268 | 23 | from openlp.core.resources import * | 23 | from openlp.core.resources import * |
269 | 24 | from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab | 24 | from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab |
271 | 25 | from openlp.plugins.videos.lib import VideoTab, VideoMediaItem | 25 | from openlp.plugins.media.lib import MediaTab,MediaMediaItem |
272 | 26 | 26 | ||
274 | 27 | class VideoPlugin(Plugin): | 27 | class MediaPlugin(Plugin): |
275 | 28 | 28 | ||
276 | 29 | def __init__(self, plugin_helpers): | 29 | def __init__(self, plugin_helpers): |
277 | 30 | # Call the parent constructor | 30 | # Call the parent constructor |
279 | 31 | Plugin.__init__(self, u'Videos', u'1.9.0', plugin_helpers) | 31 | Plugin.__init__(self, u'Media', u'1.9.0', plugin_helpers) |
280 | 32 | self.weight = -6 | 32 | self.weight = -6 |
281 | 33 | # Create the plugin icon | 33 | # Create the plugin icon |
282 | 34 | self.icon = QtGui.QIcon() | 34 | self.icon = QtGui.QIcon() |
283 | @@ -36,11 +36,11 @@ | |||
284 | 36 | QtGui.QIcon.Normal, QtGui.QIcon.Off) | 36 | QtGui.QIcon.Normal, QtGui.QIcon.Off) |
285 | 37 | 37 | ||
286 | 38 | def get_settings_tab(self): | 38 | def get_settings_tab(self): |
289 | 39 | self.VideosTab = VideoTab() | 39 | self.MediaTab = MediaTab() |
290 | 40 | return self.VideosTab | 40 | return self.MediaTab |
291 | 41 | 41 | ||
292 | 42 | def get_media_manager_item(self): | 42 | def get_media_manager_item(self): |
293 | 43 | # Create the MediaManagerItem object | 43 | # Create the MediaManagerItem object |
297 | 44 | self.media_item = VideoMediaItem(self, self.icon, u'Videos') | 44 | self.media_item = MediaMediaItem(self, self.icon, u'Media') |
298 | 45 | return self.media_item | 45 | return self.media_item |
299 | 46 | 46 |
Standalone patch to rename Video plugin to Media Plugin based on a discussion a few weeks ago.
No other changes are included for simplicity