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:
|
Commit message
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Tim Bentley (trb143) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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 | """ |
7 | |
8 | from filelistdata import FileListData |
9 | -from videotab import VideoTab |
10 | -from mediaitem import VideoMediaItem |
11 | +from mediatab import MediaTab |
12 | +from mediaitem import MediaMediaItem |
13 | |
14 | -__all__ = ['VideoTab', 'VideoMediaItem', 'FileListData'] |
15 | +__all__ = ['MediaTab', 'MediaMediaItem', 'FileListData'] |
16 | |
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 | from openlp.core import translate |
22 | from openlp.core.lib import MediaManagerItem |
23 | |
24 | -from openlp.plugins.videos.lib import VideoTab |
25 | -from openlp.plugins.videos.lib import FileListData |
26 | +from openlp.plugins.media.lib import MediaTab |
27 | +from openlp.plugins.media.lib import FileListData |
28 | |
29 | -class VideoMediaItem(MediaManagerItem): |
30 | +class MediaMediaItem(MediaManagerItem): |
31 | """ |
32 | This is the custom media manager item for Custom Slides. |
33 | """ |
34 | global log |
35 | - log=logging.getLogger(u'VideoMediaItem') |
36 | - log.info(u'Video Media Item loaded') |
37 | + log=logging.getLogger(u'MediaMediaItem') |
38 | + log.info(u'Media Media Item loaded') |
39 | |
40 | def __init__(self, parent, icon, title): |
41 | MediaManagerItem.__init__(self, parent, icon, title) |
42 | @@ -43,93 +43,93 @@ |
43 | # Add a toolbar |
44 | self.addToolbar() |
45 | # Create buttons for the toolbar |
46 | - ## New Video Button ## |
47 | - self.addToolbarButton( |
48 | - translate('VideoMediaItem',u'New Video'), |
49 | - translate('VideoMediaItem',u'Load videos into openlp.org'), |
50 | - ':/videos/video_load.png', self.onVideoNewClick, 'VideoNewItem') |
51 | - ## Delete Video Button ## |
52 | - self.addToolbarButton( |
53 | - translate('VideoMediaItem',u'Delete Video'), |
54 | - translate('VideoMediaItem',u'Delete the selected video'), |
55 | - ':/videos/video_delete.png', self.onVideoDeleteClick, 'VideoDeleteItem') |
56 | + ## New Media Button ## |
57 | + self.addToolbarButton( |
58 | + translate('MediaMediaItem',u'New Media'), |
59 | + translate('MediaMediaItem',u'Load Media into openlp.org'), |
60 | + ':/videos/video_load.png', self.onMediaNewClick, 'MediaNewItem') |
61 | + ## Delete Media Button ## |
62 | + self.addToolbarButton( |
63 | + translate('MediaMediaItem',u'Delete Media'), |
64 | + translate('MediaMediaItem',u'Delete the selected Media item'), |
65 | + ':/videos/video_delete.png', self.onMediaDeleteClick, 'MediaDeleteItem') |
66 | ## Separator Line ## |
67 | self.addToolbarSeparator() |
68 | - ## Preview Video Button ## |
69 | - self.addToolbarButton( |
70 | - translate('VideoMediaItem',u'Preview Video'), |
71 | - translate('VideoMediaItem',u'Preview the selected video'), |
72 | - ':/system/system_preview.png', self.onVideoPreviewClick, 'VideoPreviewItem') |
73 | - ## Live Video Button ## |
74 | - self.addToolbarButton( |
75 | - translate('VideoMediaItem',u'Go Live'), |
76 | - translate('VideoMediaItem',u'Send the selected video live'), |
77 | - ':/system/system_live.png', self.onVideoLiveClick, 'VideoLiveItem') |
78 | - ## Add Video Button ## |
79 | - self.addToolbarButton( |
80 | - translate('VideoMediaItem',u'Add Video To Service'), |
81 | - translate('VideoMediaItem',u'Add the selected video(s) to the service'), |
82 | - ':/system/system_add.png',self.onVideoAddClick, 'VideoAddItem') |
83 | - ## Add the videolist widget ## |
84 | - |
85 | - self.VideoListView = QtGui.QListView() |
86 | - self.VideoListView.setAlternatingRowColors(True) |
87 | - self.VideoListData = FileListData() |
88 | - self.VideoListView.setModel(self.VideoListData) |
89 | - |
90 | - self.PageLayout.addWidget(self.VideoListView) |
91 | + ## Preview Media Button ## |
92 | + self.addToolbarButton( |
93 | + translate('MediaMediaItem',u'Preview Media'), |
94 | + translate('MediaMediaItem',u'Preview the selected Media item'), |
95 | + ':/system/system_preview.png', self.onMediaPreviewClick, 'MediaPreviewItem') |
96 | + ## Live Media Button ## |
97 | + self.addToolbarButton( |
98 | + translate('MediaMediaItem',u'Go Live'), |
99 | + translate('MediaMediaItem',u'Send the selected Media item live'), |
100 | + ':/system/system_live.png', self.onMediaLiveClick, 'MediaLiveItem') |
101 | + ## Add Media Button ## |
102 | + self.addToolbarButton( |
103 | + translate('MediaMediaItem',u'Add Media To Service'), |
104 | + translate('MediaMediaItem',u'Add the selected Media items(s) to the service'), |
105 | + ':/system/system_add.png',self.onMediaAddClick, 'MediaAddItem') |
106 | + ## Add the Medialist widget ## |
107 | + |
108 | + self.MediaListView = QtGui.QListView() |
109 | + self.MediaListView.setAlternatingRowColors(True) |
110 | + self.MediaListData = FileListData() |
111 | + self.MediaListView.setModel(self.MediaListData) |
112 | + |
113 | + self.PageLayout.addWidget(self.MediaListView) |
114 | |
115 | #define and add the context menu |
116 | - self.VideoListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) |
117 | + self.MediaListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) |
118 | |
119 | - self.VideoListView.addAction(self.contextMenuAction( |
120 | - self.VideoListView, ':/system/system_preview.png', |
121 | - translate('VideoMediaItem',u'&Preview Video'), self.onVideoPreviewClick)) |
122 | - self.VideoListView.addAction(self.contextMenuAction( |
123 | - self.VideoListView, ':/system/system_live.png', |
124 | - translate('VideoMediaItem',u'&Show Live'), self.onVideoLiveClick)) |
125 | - self.VideoListView.addAction(self.contextMenuAction( |
126 | - self.VideoListView, ':/system/system_add.png', |
127 | - translate('VideoMediaItem',u'&Add to Service'), self.onVideoAddClick)) |
128 | + self.MediaListView.addAction(self.contextMenuAction( |
129 | + self.MediaListView, ':/system/system_preview.png', |
130 | + translate('MediaMediaItem',u'&Preview Media'), self.onMediaPreviewClick)) |
131 | + self.MediaListView.addAction(self.contextMenuAction( |
132 | + self.MediaListView, ':/system/system_live.png', |
133 | + translate('MediaMediaItem',u'&Show Live'), self.onMediaLiveClick)) |
134 | + self.MediaListView.addAction(self.contextMenuAction( |
135 | + self.MediaListView, ':/system/system_add.png', |
136 | + translate('MediaMediaItem',u'&Add to Service'), self.onMediaAddClick)) |
137 | |
138 | def initialise(self): |
139 | - list = self.parent.config.load_list(u'videos') |
140 | - self.loadVideoList(list) |
141 | + list = self.parent.config.load_list(u'Medias') |
142 | + self.loadMediaList(list) |
143 | |
144 | - def onVideoNewClick(self): |
145 | + def onMediaNewClick(self): |
146 | files = QtGui.QFileDialog.getOpenFileNames(None, |
147 | - translate('VideoMediaItem', u'Select Video(s)'), |
148 | + translate('MediaMediaItem', u'Select Media(s) items'), |
149 | self.parent.config.get_last_dir(), u'Images (*.avi *.mpeg)') |
150 | if len(files) > 0: |
151 | - self.loadVideoList(files) |
152 | + self.loadMediaList(files) |
153 | dir, filename = os.path.split(str(files[0])) |
154 | self.parent.config.set_last_dir(dir) |
155 | - self.parent.config.set_list(u'videos', self.VideoListData.getFileList()) |
156 | + self.parent.config.set_list(u'media', self.MediaListData.getFileList()) |
157 | |
158 | def getFileList(self): |
159 | - filelist = [item[0] for item in self.VideoListView]; |
160 | + filelist = [item[0] for item in self.MediaListView]; |
161 | return filelist |
162 | |
163 | - def loadVideoList(self, list): |
164 | + def loadMediaList(self, list): |
165 | for files in list: |
166 | - self.VideoListData.addRow(files) |
167 | + self.MediaListData.addRow(files) |
168 | |
169 | - def onVideoDeleteClick(self): |
170 | - indexes = self.VideoListView.selectedIndexes() |
171 | + def onMediaDeleteClick(self): |
172 | + indexes = self.MediaListView.selectedIndexes() |
173 | for index in indexes: |
174 | current_row = int(index.row()) |
175 | - self.VideoListData.removeRow(current_row) |
176 | - self.parent.config.set_list(u'videos', self.VideoListData.getFileList()) |
177 | + self.MediaListData.removeRow(current_row) |
178 | + self.parent.config.set_list(u'media', self.MediaListData.getFileList()) |
179 | |
180 | - def onVideoPreviewClick(self): |
181 | - log.debug(u'Video Preview Button pressed') |
182 | - items = self.VideoListView.selectedIndexes() |
183 | + def onMediaPreviewClick(self): |
184 | + log.debug(u'Media Preview Button pressed') |
185 | + items = self.MediaListView.selectedIndexes() |
186 | for item in items: |
187 | - text = self.VideoListData.getValue(item) |
188 | + text = self.MediaListData.getValue(item) |
189 | print text |
190 | |
191 | - def onVideoLiveClick(self): |
192 | + def onMediaLiveClick(self): |
193 | pass |
194 | |
195 | - def onVideoAddClick(self): |
196 | + def onMediaAddClick(self): |
197 | pass |
198 | |
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 | from openlp import convertStringToBoolean |
204 | from openlp.core.lib import SettingsTab |
205 | |
206 | -class VideoTab(SettingsTab): |
207 | +class MediaTab(SettingsTab): |
208 | """ |
209 | - VideoTab is the video settings tab in the settings dialog. |
210 | + mediaTab is the media settings tab in the settings dialog. |
211 | """ |
212 | def __init__(self): |
213 | - SettingsTab.__init__(self, u'Videos') |
214 | + SettingsTab.__init__(self, u'Media') |
215 | |
216 | def setupUi(self): |
217 | - self.setObjectName(u'VideoTab') |
218 | - |
219 | - self.VideoLayout = QtGui.QFormLayout(self) |
220 | - self.VideoLayout.setObjectName("VideoLayout") |
221 | - |
222 | - self.VideoModeGroupBox = QtGui.QGroupBox(self) |
223 | - self.VideoModeGroupBox.setObjectName("VideoModeGroupBox") |
224 | - self.VideoModeLayout = QtGui.QVBoxLayout(self.VideoModeGroupBox) |
225 | - self.VideoModeLayout.setSpacing(8) |
226 | - self.VideoModeLayout.setMargin(8) |
227 | - self.VideoModeLayout.setObjectName("VideoModeLayout") |
228 | - self.UseVMRCheckBox = QtGui.QCheckBox(self.VideoModeGroupBox) |
229 | + self.setObjectName(u'MediaTab') |
230 | + |
231 | + self.MediaLayout = QtGui.QFormLayout(self) |
232 | + self.MediaLayout.setObjectName("MediaLayout") |
233 | + |
234 | + self.MediaModeGroupBox = QtGui.QGroupBox(self) |
235 | + self.MediaModeGroupBox.setObjectName("MediaModeGroupBox") |
236 | + self.MediaModeLayout = QtGui.QVBoxLayout(self.MediaModeGroupBox) |
237 | + self.MediaModeLayout.setSpacing(8) |
238 | + self.MediaModeLayout.setMargin(8) |
239 | + self.MediaModeLayout.setObjectName("MediaModeLayout") |
240 | + self.UseVMRCheckBox = QtGui.QCheckBox(self.MediaModeGroupBox) |
241 | self.UseVMRCheckBox.setObjectName("UseVMRCheckBox") |
242 | - self.VideoModeLayout.addWidget(self.UseVMRCheckBox) |
243 | - self.UseVMRLabel = QtGui.QLabel(self.VideoModeGroupBox) |
244 | + self.MediaModeLayout.addWidget(self.UseVMRCheckBox) |
245 | + self.UseVMRLabel = QtGui.QLabel(self.MediaModeGroupBox) |
246 | self.UseVMRLabel.setObjectName("UseVMRLabel") |
247 | - self.VideoModeLayout.addWidget(self.UseVMRLabel) |
248 | + self.MediaModeLayout.addWidget(self.UseVMRLabel) |
249 | |
250 | - self.VideoLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.VideoModeGroupBox) |
251 | + self.MediaLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.MediaModeGroupBox) |
252 | # Signals and slots |
253 | QtCore.QObject.connect(self.UseVMRCheckBox, |
254 | QtCore.SIGNAL("stateChanged(int)"), self.onVMRCheckBoxChanged) |
255 | |
256 | def retranslateUi(self): |
257 | - self.VideoModeGroupBox.setTitle(translate("SettingsForm", "Video Mode")) |
258 | + self.MediaModeGroupBox.setTitle(translate("SettingsForm", "Media Mode")) |
259 | self.UseVMRCheckBox.setText(translate("SettingsForm", "Use Video Mode Rendering")) |
260 | 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 | "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" |
262 | |
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 | |
268 | from openlp.core.resources import * |
269 | from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab |
270 | -from openlp.plugins.videos.lib import VideoTab, VideoMediaItem |
271 | +from openlp.plugins.media.lib import MediaTab,MediaMediaItem |
272 | |
273 | -class VideoPlugin(Plugin): |
274 | +class MediaPlugin(Plugin): |
275 | |
276 | def __init__(self, plugin_helpers): |
277 | # Call the parent constructor |
278 | - Plugin.__init__(self, u'Videos', u'1.9.0', plugin_helpers) |
279 | + Plugin.__init__(self, u'Media', u'1.9.0', plugin_helpers) |
280 | self.weight = -6 |
281 | # Create the plugin icon |
282 | self.icon = QtGui.QIcon() |
283 | @@ -36,11 +36,11 @@ |
284 | QtGui.QIcon.Normal, QtGui.QIcon.Off) |
285 | |
286 | def get_settings_tab(self): |
287 | - self.VideosTab = VideoTab() |
288 | - return self.VideosTab |
289 | + self.MediaTab = MediaTab() |
290 | + return self.MediaTab |
291 | |
292 | def get_media_manager_item(self): |
293 | # Create the MediaManagerItem object |
294 | - self.media_item = VideoMediaItem(self, self.icon, u'Videos') |
295 | - return self.media_item |
296 | - |
297 | + self.media_item = MediaMediaItem(self, self.icon, u'Media') |
298 | + return self.media_item |
299 | + |
Standalone patch to rename Video plugin to Media Plugin based on a discussion a few weeks ago.
No other changes are included for simplicity