Merge lp:~raoul-snyman/openlp/dualdisplay2 into lp:openlp
- dualdisplay2
- Merge into trunk
Proposed by
Raoul Snyman
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~raoul-snyman/openlp/dualdisplay2 |
Merge into: | lp:openlp |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~raoul-snyman/openlp/dualdisplay2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Bentley | Approve | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Raoul Snyman (raoul-snyman) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'openlp/core/lib/pluginconfig.py' |
2 | --- openlp/core/lib/pluginconfig.py 2009-05-20 20:17:20 +0000 |
3 | +++ openlp/core/lib/pluginconfig.py 2009-06-05 18:53:50 +0000 |
4 | @@ -56,10 +56,8 @@ |
5 | safe_name = self.section.replace(u' ',u'-') |
6 | plugin_data = self.get_config(u'data path', safe_name) |
7 | path = os.path.join(app_data, plugin_data) |
8 | - |
9 | if not os.path.exists(path): |
10 | os.makedirs(path) |
11 | - |
12 | return path |
13 | |
14 | def set_data_path(self, path): |
15 | @@ -74,8 +72,8 @@ |
16 | if suffix != None: |
17 | return_files = [] |
18 | for f in files: |
19 | - if f.find('.') != -1: |
20 | - nme = f.split('.') |
21 | + if f.find(u'.') != -1: |
22 | + nme = f.split(u'.') |
23 | bname = nme[0] |
24 | sfx = nme[1].lower() |
25 | sfx = sfx.lower() |
26 | @@ -127,7 +125,7 @@ |
27 | name = u'last directory' |
28 | last_dir = self.get_config(name) |
29 | if last_dir is None: |
30 | - last_dir = '' |
31 | + last_dir = u'' |
32 | return last_dir |
33 | |
34 | def set_last_dir(self, directory, num=None): |
35 | |
36 | === modified file 'openlp/core/lib/renderer.py' |
37 | --- openlp/core/lib/renderer.py 2009-06-03 15:38:14 +0000 |
38 | +++ openlp/core/lib/renderer.py 2009-06-05 18:53:50 +0000 |
39 | @@ -27,11 +27,8 @@ |
40 | from copy import copy |
41 | |
42 | class Renderer: |
43 | - |
44 | - global log |
45 | - log = logging.getLogger(u'Renderer') |
46 | - log.info(u'Renderer Loaded') |
47 | - """All the functions for rendering a set of words onto a Device Context |
48 | + """ |
49 | + All the functions for rendering a set of words onto a Device Context |
50 | |
51 | How to use: |
52 | set the words to be displayed with a call to format_slide() - this returns an array of screenfuls of data |
53 | @@ -39,8 +36,11 @@ |
54 | tell it which DC to render to with set_DC() |
55 | set the borders of where you want the text (if not the whole DC) with set_text_rectangle() |
56 | tell it to render a particular screenfull with render_screen(n) |
57 | + """ |
58 | + global log |
59 | + log = logging.getLogger(u'Renderer') |
60 | + log.info(u'Renderer Loaded') |
61 | |
62 | - """ |
63 | def __init__(self): |
64 | self._rect = None |
65 | self._debug = 0 |
66 | @@ -119,19 +119,11 @@ |
67 | lines = verse.split(u'\n') |
68 | for line in lines: |
69 | text.append(line) |
70 | - |
71 | split_text = self._split_set_of_lines(text, False) |
72 | print "split text ", split_text |
73 | print "text ", text |
74 | return split_text |
75 | |
76 | -# def render_screen(self, screennum): |
77 | -# log.debug(u'render screen\n %s %s ', screennum, self.words[screennum]) |
78 | -# t = 0.0 |
79 | -# words = self.words[screennum] |
80 | -# retval = self._render_lines(words) |
81 | -# return retval |
82 | - |
83 | def set_text_rectangle(self, rect_main, rect_footer): |
84 | """ |
85 | Sets the rectangle within which text should be rendered |
86 | @@ -145,23 +137,17 @@ |
87 | """ |
88 | #print "########## Generate frame from lines ##################" |
89 | log.debug(u'generate_frame_from_lines - Start') |
90 | - |
91 | #print "Render Lines ", lines |
92 | - |
93 | bbox = self._render_lines_unaligned(lines, False) |
94 | if footer_lines is not None: |
95 | bbox1 = self._render_lines_unaligned(footer_lines, True) |
96 | - |
97 | # reset the frame. first time do not worrk about what you paint on. |
98 | self._frame = QtGui.QPixmap(self._bg_frame) |
99 | - |
100 | x, y = self._correctAlignment(self._rect, bbox) |
101 | bbox = self._render_lines_unaligned(lines, False, (x, y)) |
102 | - |
103 | if footer_lines is not None: |
104 | bbox = self._render_lines_unaligned(footer_lines, True, (self._rect_footer.left(), self._rect_footer.top()) ) |
105 | log.debug(u'generate_frame_from_lines - Finish') |
106 | - |
107 | return self._frame |
108 | |
109 | def _generate_background_frame(self): |
110 | @@ -189,23 +175,18 @@ |
111 | w = int(self._frame.width()) / 2 |
112 | h = int(self._frame.height()) / 2 |
113 | gradient = QtGui.QRadialGradient(w, h, w) # Circular |
114 | - |
115 | gradient.setColorAt(0, QtGui.QColor(self._theme.background_startColor)) |
116 | gradient.setColorAt(1, QtGui.QColor(self._theme.background_endColor)) |
117 | - |
118 | painter.setBrush(QtGui.QBrush(gradient)) |
119 | rectPath = QtGui.QPainterPath() |
120 | - |
121 | max_x = self._frame.width() |
122 | max_y = self._frame.height() |
123 | rectPath.moveTo(0, 0) |
124 | rectPath.lineTo(0, max_y) |
125 | rectPath.lineTo(max_x, max_y) |
126 | rectPath.lineTo(max_x, 0) |
127 | - |
128 | rectPath.closeSubpath() |
129 | painter.drawPath(rectPath) |
130 | - |
131 | elif self._theme.background_type== u'image': # image |
132 | if self.bg_image is not None: |
133 | painter.drawPixmap(0 ,0 , self.bg_image) |
134 | @@ -219,24 +200,19 @@ |
135 | def _split_set_of_lines(self, lines, footer): |
136 | """ |
137 | Given a list of lines, decide how to split them best if they don't all fit on the screen |
138 | - - this is done by splitting at 1/2, 1/3 or 1/4 of the set |
139 | - If it doesn't fit, even at this size, just split at each opportunity |
140 | - |
141 | - We'll do this by getting the bounding box of each line, and then summing them appropriately |
142 | - Returns a list of [lists of lines], one set for each screenful |
143 | - """ |
144 | + - this is done by splitting at 1/2, 1/3 or 1/4 of the set |
145 | + If it doesn't fit, even at this size, just split at each opportunity. |
146 | + We'll do this by getting the bounding box of each line, and then summing them appropriately |
147 | + Returns a list of [lists of lines], one set for each screenful |
148 | + """ |
149 | bboxes = [] |
150 | #print "lines ", lines |
151 | - |
152 | for line in lines: |
153 | bboxes.append(self._render_and_wrap_single_line(line, footer)) |
154 | #print "bboxes ", bboxes |
155 | - |
156 | numlines = len(lines) |
157 | bottom = self._rect.bottom() |
158 | - |
159 | count = 0 |
160 | - |
161 | for ratio in (numlines, numlines/2, numlines/3, numlines/4): |
162 | good = 1 |
163 | startline = 0 |
164 | @@ -258,7 +234,6 @@ |
165 | endline = startline + ratio |
166 | if good == 1: |
167 | break |
168 | - |
169 | retval = [] |
170 | numlines_per_page = ratio |
171 | #print "good ", good, ratio |
172 | @@ -276,7 +251,7 @@ |
173 | retval.append(thislines) |
174 | #print "extra ", thislines |
175 | else: |
176 | -# print "Just split where you can" |
177 | + # print "Just split where you can" |
178 | retval = [] |
179 | startline = 0 |
180 | endline = startline + 1 |
181 | @@ -312,7 +287,6 @@ |
182 | (using the _render_single_line fn - which may result in going |
183 | off the bottom) They are expected to be pre-arranged to less |
184 | than a screenful (eg. by using split_set_of_lines) |
185 | - |
186 | Returns the bounding box of the text as QRect |
187 | """ |
188 | log.debug(u'render lines unaligned Start') |
189 | @@ -339,10 +313,8 @@ |
190 | """ |
191 | Render a single line of words onto the DC, top left corner |
192 | specified. |
193 | - |
194 | If the line is too wide for the context, it wraps, but |
195 | right-aligns the surplus words in the manner of song lyrics |
196 | - |
197 | Returns the bottom-right corner (of what was rendered) as a tuple(x, y). |
198 | """ |
199 | log.debug(u'Render single line %s @ %s '%( line, tlcorner)) |
200 | @@ -374,7 +346,6 @@ |
201 | align = 0 |
202 | else: |
203 | align = int(self._theme .display_horizontalAlign) |
204 | - |
205 | for linenum in range(len(lines)): |
206 | line = lines[linenum] |
207 | #find out how wide line is |
208 | @@ -420,7 +391,6 @@ |
209 | color = self._theme.display_outline_color) |
210 | self._get_extent_and_render(line, footer,(x-self._outline_offset,y-self._outline_offset), draw=True, |
211 | color = self._theme.display_outline_color) |
212 | - |
213 | self._get_extent_and_render(line, footer,tlcorner=(x, y), draw=True) |
214 | y += h |
215 | if linenum == 0: |
216 | @@ -432,7 +402,6 @@ |
217 | painter.setPen(QtGui.QPen(QtGui.QColor(0,255,0))) |
218 | painter.drawRect(startx , starty , rightextent-startx , y-starty) |
219 | painter.end() |
220 | - |
221 | brcorner = (rightextent , y) |
222 | log.debug(u'Render single line Finish') |
223 | return brcorner |
224 | @@ -489,3 +458,10 @@ |
225 | if image2 is not None: |
226 | im = image2.toImage() |
227 | im.save("renderer2.png", "png") |
228 | + |
229 | +# def render_screen(self, screennum): |
230 | +# log.debug(u'render screen\n %s %s ', screennum, self.words[screennum]) |
231 | +# t = 0.0 |
232 | +# words = self.words[screennum] |
233 | +# retval = self._render_lines(words) |
234 | +# return retval |
235 | |
236 | === modified file 'openlp/core/lib/rendermanager.py' |
237 | --- openlp/core/lib/rendermanager.py 2009-06-01 17:50:37 +0000 |
238 | +++ openlp/core/lib/rendermanager.py 2009-06-05 18:53:50 +0000 |
239 | @@ -54,17 +54,25 @@ |
240 | log=logging.getLogger(u'RenderManager') |
241 | log.info(u'RenderManager Loaded') |
242 | |
243 | - def __init__(self, theme_manager, screen_list): |
244 | + def __init__(self, theme_manager, screen_list, screen_number=0): |
245 | log.debug(u'Initilisation started') |
246 | self.screen_list = screen_list |
247 | self.theme_manager = theme_manager |
248 | self.displays = len(screen_list) |
249 | - self.current_display = 0 |
250 | + self.current_display = screen_number |
251 | self.renderer = Renderer() |
252 | self.calculate_default(self.screen_list[self.current_display]['size']) |
253 | self.theme = u'' |
254 | self.service_theme = u'' |
255 | |
256 | + def update_display(self, screen_number): |
257 | + """ |
258 | + Updates the render manager's information about the current screen. |
259 | + """ |
260 | + if self.current_display != screen_number: |
261 | + self.current_display = screen_number |
262 | + self.calculate_default(self.screen_list[self.current_display]['size']) |
263 | + |
264 | def set_global_theme(self, global_theme, global_style = u'Global'): |
265 | self.global_theme = global_theme |
266 | self.global_style = global_style |
267 | @@ -95,7 +103,7 @@ |
268 | if self.theme is not self.renderer.theme_name: |
269 | log.debug(u'theme is now %s', self.theme) |
270 | self.themedata = self.theme_manager.getThemeData(self.theme) |
271 | - self.calculate_default(self.screen_list[self.current_display]['size']) |
272 | + self.calculate_default(self.screen_list[self.current_display][u'size']) |
273 | self.renderer.set_theme(self.themedata) |
274 | self.build_text_rectangle(self.themedata) |
275 | |
276 | @@ -140,14 +148,14 @@ |
277 | |
278 | def format_slide(self, words): |
279 | log.debug(u'format slide') |
280 | - self.calculate_default(self.screen_list[self.current_display]['size']) |
281 | + self.calculate_default(self.screen_list[self.current_display][u'size']) |
282 | self.build_text_rectangle(self.themedata) |
283 | self.renderer.set_frame_dest(self.width, self.height) |
284 | return self.renderer.format_slide(words, False) |
285 | |
286 | def generate_slide(self,main_text, footer_text): |
287 | log.debug(u'generate slide') |
288 | - self.calculate_default(self.screen_list[self.current_display]['size']) |
289 | + self.calculate_default(self.screen_list[self.current_display][u'size']) |
290 | self.build_text_rectangle(self.themedata) |
291 | self.renderer.set_frame_dest(self.width, self.height) |
292 | return self.renderer.generate_frame_from_lines(main_text, footer_text) |
293 | |
294 | === modified file 'openlp/core/lib/settingstab.py' |
295 | --- openlp/core/lib/settingstab.py 2009-05-01 11:50:09 +0000 |
296 | +++ openlp/core/lib/settingstab.py 2009-06-05 18:53:50 +0000 |
297 | @@ -25,7 +25,7 @@ |
298 | """ |
299 | SettingsTab is a helper widget for plugins to define Tabs for the settings dialog. |
300 | """ |
301 | - def __init__(self, title=None): |
302 | + def __init__(self, title=None, section=None): |
303 | """ |
304 | Constructor to create the Steetings tab item. |
305 | """ |
306 | @@ -34,10 +34,10 @@ |
307 | self.setupUi() |
308 | self.retranslateUi() |
309 | self.initialise() |
310 | - if title == None: |
311 | - self.config = PluginConfig(u'Main') |
312 | + if section == None: |
313 | + self.config = PluginConfig(title) |
314 | else: |
315 | - self.config = PluginConfig(str(title)) |
316 | + self.config = PluginConfig(section) |
317 | self.load() |
318 | |
319 | def setTitle(self, title): |
320 | |
321 | === modified file 'openlp/core/ui/alertstab.py' |
322 | --- openlp/core/ui/alertstab.py 2009-05-20 20:17:20 +0000 |
323 | +++ openlp/core/ui/alertstab.py 2009-06-05 18:53:50 +0000 |
324 | @@ -29,7 +29,7 @@ |
325 | def __init__(self): |
326 | self.font_color = '#ffffff' |
327 | self.bg_color = '#660000' |
328 | - SettingsTab.__init__(self, u'Alerts') |
329 | + SettingsTab.__init__(self, translate(u'AlertsTab', u'Alerts'), u'Alerts') |
330 | |
331 | def setupUi(self): |
332 | self.setObjectName(u'AlertsTab') |
333 | @@ -130,13 +130,13 @@ |
334 | self.AlertsLayout.addWidget(self.AlertRightColumn) |
335 | # Signals and slots |
336 | QtCore.QObject.connect(self.BackgroundColorButton, |
337 | - QtCore.SIGNAL("pressed()"), self.onBackgroundColorButtonClicked) |
338 | + QtCore.SIGNAL(u'pressed()'), self.onBackgroundColorButtonClicked) |
339 | QtCore.QObject.connect(self.FontColorButton, |
340 | - QtCore.SIGNAL("pressed()"), self.onFontColorButtonClicked) |
341 | + QtCore.SIGNAL(u'pressed()'), self.onFontColorButtonClicked) |
342 | QtCore.QObject.connect(self.FontComboBox, |
343 | - QtCore.SIGNAL("activated(int)"), self.onFontComboBoxClicked) |
344 | + QtCore.SIGNAL(u'activated(int)'), self.onFontComboBoxClicked) |
345 | QtCore.QObject.connect(self.TimeoutSpinBox, |
346 | - QtCore.SIGNAL("valueChanged(int)"), self.onTimeoutSpinBoxChanged) |
347 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onTimeoutSpinBoxChanged) |
348 | |
349 | def retranslateUi(self): |
350 | self.FontGroupBox.setTitle(translate(u'AlertsTab', u'Font')) |
351 | @@ -146,13 +146,13 @@ |
352 | self.TimeoutLabel.setText(translate(u'AlertsTab', u'Alert timeout:')) |
353 | self.TimeoutSpinBox.setSuffix(translate(u'AlertsTab', u's')) |
354 | self.PreviewGroupBox.setTitle(translate(u'AlertsTab', u'Preview')) |
355 | - self.FontPreview.setText(translate(u'AlertsTab', 'openlp.org 2.0 rocks!')) |
356 | + self.FontPreview.setText(translate(u'AlertsTab', u'openlp.org 2.0 rocks!')) |
357 | |
358 | def onBackgroundColorButtonClicked(self): |
359 | self.bg_color = QtGui.QColorDialog.getColor( |
360 | - QColor(self.bg_color), self).name() |
361 | + QtGui.QColor(self.bg_color), self).name() |
362 | self.BackgroundColorButton.setStyleSheet( |
363 | - 'background-color: %s' % self.bg_color) |
364 | + u'background-color: %s' % self.bg_color) |
365 | self.updateDisplay() |
366 | |
367 | def onFontComboBoxClicked(self): |
368 | @@ -160,22 +160,22 @@ |
369 | |
370 | def onFontColorButtonClicked(self): |
371 | self.font_color = QtGui.QColorDialog.getColor( |
372 | - QColor(self.font_color), self).name() |
373 | + QtGui.QColor(self.font_color), self).name() |
374 | self.FontColorButton.setStyleSheet( |
375 | - 'background-color: %s' % self.font_color) |
376 | + u'background-color: %s' % self.font_color) |
377 | self.updateDisplay() |
378 | |
379 | def onTimeoutSpinBoxChanged(self): |
380 | self.timeout = self.TimeoutSpinBox.value() |
381 | |
382 | def load(self): |
383 | - self.timeout = int(self.config.get_config('timeout', 5)) |
384 | - self.font_color = str(self.config.get_config('font color', u'#ffffff')) |
385 | - self.bg_color = str(self.config.get_config('background color', u'#660000')) |
386 | - self.font_face = str(self.config.get_config('font face', QtGui.QFont().family())) |
387 | + self.timeout = int(self.config.get_config(u'timeout', 5)) |
388 | + self.font_color = str(self.config.get_config(u'font color', u'#ffffff')) |
389 | + self.bg_color = str(self.config.get_config(u'background color', u'#660000')) |
390 | + self.font_face = str(self.config.get_config(u'font face', QtGui.QFont().family())) |
391 | self.TimeoutSpinBox.setValue(self.timeout) |
392 | - self.FontColorButton.setStyleSheet('background-color: %s' % self.font_color) |
393 | - self.BackgroundColorButton.setStyleSheet('background-color: %s' % self.bg_color) |
394 | + self.FontColorButton.setStyleSheet(u'background-color: %s' % self.font_color) |
395 | + self.BackgroundColorButton.setStyleSheet(u'background-color: %s' % self.bg_color) |
396 | font = QtGui.QFont() |
397 | font.setFamily(self.font_face) |
398 | self.FontComboBox.setCurrentFont(font) |
399 | @@ -183,10 +183,10 @@ |
400 | |
401 | def save(self): |
402 | self.font_face = self.FontComboBox.currentFont().family() |
403 | - self.config.set_config('background color', str(self.bg_color)) |
404 | - self.config.set_config('font color', str(self.font_color)) |
405 | - self.config.set_config('font face', str(self.font_face)) |
406 | - self.config.set_config('timeout', str(self.timeout)) |
407 | + self.config.set_config(u'background color', str(self.bg_color)) |
408 | + self.config.set_config(u'font color', str(self.font_color)) |
409 | + self.config.set_config(u'font face', str(self.font_face)) |
410 | + self.config.set_config(u'timeout', str(self.timeout)) |
411 | |
412 | def updateDisplay(self): |
413 | font = QtGui.QFont() |
414 | @@ -195,4 +195,4 @@ |
415 | font.setPointSize(16) |
416 | self.FontPreview.setFont(font) |
417 | self.FontPreview.setStyleSheet( |
418 | - 'background-color: %s; color: %s' % (self.bg_color, self.font_color)) |
419 | + u'background-color: %s; color: %s' % (self.bg_color, self.font_color)) |
420 | |
421 | === modified file 'openlp/core/ui/generaltab.py' |
422 | --- openlp/core/ui/generaltab.py 2009-06-01 17:50:37 +0000 |
423 | +++ openlp/core/ui/generaltab.py 2009-06-05 18:53:50 +0000 |
424 | @@ -28,7 +28,7 @@ |
425 | """ |
426 | def __init__(self, screen_list): |
427 | self.screen_list = screen_list |
428 | - SettingsTab.__init__(self, translate(u'GeneralTab', u'General')) |
429 | + SettingsTab.__init__(self, translate(u'GeneralTab', u'General'), u'General') |
430 | |
431 | def setupUi(self): |
432 | self.setObjectName(u'GeneralTab') |
433 | @@ -114,18 +114,17 @@ |
434 | self.GeneralRightLayout.addItem(self.GeneralRightSpacer) |
435 | self.GeneralLayout.addWidget(self.GeneralRightWidget) |
436 | QtCore.QObject.connect(self.MonitorComboBox, |
437 | - QtCore.SIGNAL("activated(int)"), self.onMonitorComboBoxChanged) |
438 | + QtCore.SIGNAL(u'activated(int)'), self.onMonitorComboBoxChanged) |
439 | QtCore.QObject.connect(self.WarningCheckBox, |
440 | - QtCore.SIGNAL("stateChanged(int)"), self.onWarningCheckBoxChanged) |
441 | + QtCore.SIGNAL(u'stateChanged(int)'), self.onWarningCheckBoxChanged) |
442 | QtCore.QObject.connect(self.AutoOpenCheckBox, |
443 | - QtCore.SIGNAL("stateChanged(int)"), self.onAutoOpenCheckBoxChanged) |
444 | + QtCore.SIGNAL(u'stateChanged(int)'), self.onAutoOpenCheckBoxChanged) |
445 | QtCore.QObject.connect(self.NumberEdit, |
446 | - QtCore.SIGNAL("lostFocus()"), self.onNumberEditLostFocus) |
447 | + QtCore.SIGNAL(u'lostFocus()'), self.onNumberEditLostFocus) |
448 | QtCore.QObject.connect(self.UsernameEdit, |
449 | - QtCore.SIGNAL("lostFocus()"), self.onUsernameEditLostFocus) |
450 | + QtCore.SIGNAL(u'lostFocus()'), self.onUsernameEditLostFocus) |
451 | QtCore.QObject.connect(self.PasswordEdit, |
452 | - QtCore.SIGNAL("lostFocus()"), self.onPasswordEditLostFocus) |
453 | - |
454 | + QtCore.SIGNAL(u'lostFocus()'), self.onPasswordEditLostFocus) |
455 | |
456 | def retranslateUi(self): |
457 | self.MonitorGroupBox.setTitle(translate(u'GeneralTab', u'Monitors')) |
458 | @@ -144,12 +143,14 @@ |
459 | |
460 | def onAutoOpenCheckBoxChanged(self, value): |
461 | self.AutoOpen = False |
462 | - if value == 2: # we have a set value convert to True/False |
463 | + if value == 2: |
464 | + # we have a set value convert to True/False |
465 | self.AutoOpen = True |
466 | |
467 | def onWarningCheckBoxChanged(self, value): |
468 | self.Warning = False |
469 | - if value == 2: # we have a set value convert to True/False |
470 | + if value == 2: |
471 | + # we have a set value convert to True/False |
472 | self.Warning = True |
473 | |
474 | def onNumberEditLostFocus(self): |
475 | @@ -164,19 +165,19 @@ |
476 | def load(self): |
477 | for screen in self.screen_list: |
478 | screen_name = translate(u'GeneralTab', u'Screen') + u' ' + \ |
479 | - str(screen['number'] + 1) |
480 | - if screen['primary']: |
481 | + str(screen[u'number'] + 1) |
482 | + if screen[u'primary']: |
483 | screen_name = screen_name + u' (' + \ |
484 | translate(u'GeneralTab', u'primary') + u')' |
485 | self.MonitorComboBox.addItem(screen_name) |
486 | - |
487 | + # Get the configs |
488 | self.MonitorNumber = int(self.config.get_config(u'Monitor', u'0')) |
489 | - self.Warning = str_to_bool(self.config.get_config(u'Warning', u"False")) |
490 | - self.AutoOpen = str_to_bool(self.config.get_config(u'Auto Open', u"False")) |
491 | - self.CCLNumber = str(self.config.get_config('CCL Number', u'XXX')) |
492 | - self.Username = str(self.config.get_config('User Name', u'')) |
493 | - self.Password = str(self.config.get_config('Password', u'')) |
494 | - |
495 | + self.Warning = str_to_bool(self.config.get_config(u'Warning', u'False')) |
496 | + self.AutoOpen = str_to_bool(self.config.get_config(u'Auto Open', u'False')) |
497 | + self.CCLNumber = str(self.config.get_config(u'CCL Number', u'XXX')) |
498 | + self.Username = str(self.config.get_config(u'User Name', u'')) |
499 | + self.Password = str(self.config.get_config(u'Password', u'')) |
500 | + # Set a few things up |
501 | self.MonitorComboBox.setCurrentIndex(self.MonitorNumber) |
502 | self.WarningCheckBox.setChecked(self.Warning) |
503 | self.AutoOpenCheckBox.setChecked(self.AutoOpen) |
504 | @@ -185,9 +186,9 @@ |
505 | self.PasswordEdit.setText(self.Password) |
506 | |
507 | def save(self): |
508 | - self.config.set_config(u'Monitor',str(self.MonitorNumber)) |
509 | - self.config.set_config(u'Warning', str(self.Warning)) |
510 | - self.config.set_config(u'Auto Open', str(self.AutoOpen)) |
511 | - self.config.set_config('CCL Number', str(self.CCLNumber)) |
512 | - self.config.set_config('User Name',str(self.Username)) |
513 | - self.config.set_config('Password', str(self.Password )) |
514 | + self.config.set_config(u'Monitor', self.MonitorNumber) |
515 | + self.config.set_config(u'Warning', self.Warning) |
516 | + self.config.set_config(u'Auto Open', self.AutoOpen) |
517 | + self.config.set_config(u'CCL Number', self.CCLNumber) |
518 | + self.config.set_config(u'User Name', self.Username) |
519 | + self.config.set_config(u'Password', self.Password) |
520 | |
521 | === modified file 'openlp/core/ui/maindisplay.py' |
522 | --- openlp/core/ui/maindisplay.py 2009-06-01 17:50:37 +0000 |
523 | +++ openlp/core/ui/maindisplay.py 2009-06-05 18:53:50 +0000 |
524 | @@ -29,8 +29,13 @@ |
525 | QtGui.QWidget.__init__(self, parent) |
526 | self.setWindowTitle(u'OpenLP Display') |
527 | self.screens = screens |
528 | + self.layout = QtGui.QVBoxLayout(self) |
529 | + self.layout.setSpacing(0) |
530 | + self.layout.setMargin(0) |
531 | + self.layout.setObjectName(u'layout') |
532 | self.display = QtGui.QLabel(self) |
533 | self.display.setScaledContents(True) |
534 | + self.layout.addWidget(self.display) |
535 | self.displayBlank = False |
536 | self.blankFrame= None |
537 | self.alertactive = False |
538 | @@ -43,23 +48,21 @@ |
539 | @param (integer) screen This is the screen number. |
540 | """ |
541 | screen = self.screens[screenNumber] |
542 | - if screen['number'] != screenNumber: |
543 | + if screen[u'number'] != screenNumber: |
544 | # We will most probably never actually hit this bit, but just in |
545 | # case the index in the list doesn't match the screen number, we |
546 | # search for it. |
547 | for scrn in self.screens: |
548 | - if scrn['number'] == screenNumber: |
549 | + if scrn[u'number'] == screenNumber: |
550 | screen = scrn |
551 | break |
552 | - self.setGeometry(screen['size']) |
553 | - self.display.setGeometry(screen['size']) |
554 | - if not screen['primary']: |
555 | + self.setGeometry(screen[u'size']) |
556 | + if not screen[u'primary']: |
557 | self.showFullScreen() |
558 | else: |
559 | - self.showMinimized() |
560 | - |
561 | - painter=QtGui.QPainter() |
562 | - self.blankFrame = QtGui.QPixmap(screen['size'].width(), screen['size'].height()) |
563 | + self.hide() |
564 | + painter = QtGui.QPainter() |
565 | + self.blankFrame = QtGui.QPixmap(screen[u'size'].width(), screen[u'size'].height()) |
566 | painter.begin(self.blankFrame) |
567 | painter.fillRect(self.blankFrame.rect(), QtGui.QColor(u'#000000')) |
568 | self.frameView(self.blankFrame) |
569 | |
570 | === modified file 'openlp/core/ui/mainwindow.py' |
571 | --- openlp/core/ui/mainwindow.py 2009-06-02 19:02:12 +0000 |
572 | +++ openlp/core/ui/mainwindow.py 2009-06-05 18:53:50 +0000 |
573 | @@ -25,7 +25,7 @@ |
574 | from openlp.core.ui import AboutForm, SettingsForm, AlertForm, ServiceManager, \ |
575 | ThemeManager, MainDisplay, SlideController |
576 | from openlp.core.lib import translate, Plugin, MediaManagerItem, SettingsTab, \ |
577 | - EventManager, RenderManager |
578 | + EventManager, RenderManager, PluginConfig |
579 | from openlp.core import PluginManager |
580 | |
581 | class MainWindow(object): |
582 | @@ -46,6 +46,7 @@ |
583 | self.mainDisplay = MainDisplay(None, screens) |
584 | self.screenList = screens |
585 | self.EventManager = EventManager() |
586 | + self.generalConfig = PluginConfig(u'General') |
587 | self.alertForm = AlertForm(self) |
588 | self.aboutForm = AboutForm() |
589 | self.settingsForm = SettingsForm(self.screenList, self) |
590 | @@ -60,7 +61,8 @@ |
591 | #warning cyclic dependency |
592 | #RenderManager needs to call ThemeManager and |
593 | #ThemeManager needs to call RenderManager |
594 | - self.RenderManager = RenderManager(self.ThemeManagerContents, self.screenList) |
595 | + self.RenderManager = RenderManager(self.ThemeManagerContents, |
596 | + self.screenList, int(self.generalConfig.get_config(u'Monitor', 0))) |
597 | log.info(u'Load Plugins') |
598 | self.plugin_helpers[u'preview'] = self.PreviewController |
599 | self.plugin_helpers[u'live'] = self.LiveController |
600 | @@ -91,6 +93,43 @@ |
601 | log.info(u'Load Themes') |
602 | self.ThemeManagerContents.loadThemes() |
603 | |
604 | + def show(self): |
605 | + """ |
606 | + Show the main form, as well as the display form |
607 | + """ |
608 | + self.mainWindow.showMaximized() |
609 | + self.mainDisplay.setup(self.settingsForm.GeneralTab.MonitorNumber) |
610 | + self.mainDisplay.show() |
611 | + #self.mainWindow.setFocus(QtCore.Qt.OtherFocusReason) |
612 | + |
613 | + def onHelpAboutItemClicked(self): |
614 | + """ |
615 | + Show the About form |
616 | + """ |
617 | + self.aboutForm.exec_() |
618 | + |
619 | + def onToolsAlertItemClicked(self): |
620 | + """ |
621 | + Show the Alert form |
622 | + """ |
623 | + self.alertForm.exec_() |
624 | + |
625 | + def onOptionsSettingsItemClicked(self): |
626 | + """ |
627 | + Show the Settings dialog |
628 | + """ |
629 | + self.settingsForm.exec_() |
630 | + screen_number = int(self.generalConfig.get_config(u'Monitor', 0)) |
631 | + self.RenderManager.update_display(screen_number) |
632 | + self.mainDisplay.setup(screen_number) |
633 | + |
634 | + def onCloseEvent(self, event): |
635 | + """ |
636 | + Hook to close the main window and display windows on exit |
637 | + """ |
638 | + self.mainDisplay.close() |
639 | + event.accept() |
640 | + |
641 | def setupUi(self): |
642 | """ |
643 | Set up the user interface |
644 | @@ -459,36 +498,3 @@ |
645 | self.action_Preview_Panel.setText( |
646 | translate(u'mainWindow', u'&Preview Pane')) |
647 | self.ModeLiveItem.setText(translate(u'mainWindow', u'&Live')) |
648 | - |
649 | - def show(self): |
650 | - """ |
651 | - Show the main form, as well as the display form |
652 | - """ |
653 | - self.mainWindow.showMaximized() |
654 | - self.mainDisplay.setup(self.settingsForm.GeneralTab.MonitorNumber) |
655 | - self.mainDisplay.show() |
656 | - |
657 | - def onHelpAboutItemClicked(self): |
658 | - """ |
659 | - Show the About form |
660 | - """ |
661 | - self.aboutForm.exec_() |
662 | - |
663 | - def onToolsAlertItemClicked(self): |
664 | - """ |
665 | - Show the Alert form |
666 | - """ |
667 | - self.alertForm.exec_() |
668 | - |
669 | - def onOptionsSettingsItemClicked(self): |
670 | - """ |
671 | - Show the Settings dialog |
672 | - """ |
673 | - self.settingsForm.exec_() |
674 | - |
675 | - def onCloseEvent(self, event): |
676 | - """ |
677 | - Hook to close the main window and display windows on exit |
678 | - """ |
679 | - self.mainDisplay.close() |
680 | - event.accept() |
681 | |
682 | === modified file 'openlp/core/ui/themestab.py' |
683 | --- openlp/core/ui/themestab.py 2009-05-20 20:17:20 +0000 |
684 | +++ openlp/core/ui/themestab.py 2009-06-05 18:53:50 +0000 |
685 | @@ -28,7 +28,7 @@ |
686 | """ |
687 | def __init__(self, parent): |
688 | self.parent = parent |
689 | - SettingsTab.__init__(self, u'Themes') |
690 | + SettingsTab.__init__(self, translate(u'ThemesTab', u'Themes'), u'Themes') |
691 | |
692 | def setupUi(self): |
693 | self.setObjectName(u'ThemesTab') |
694 | @@ -90,11 +90,11 @@ |
695 | self.ThemesTabLayout.addWidget(self.LevelGroupBox) |
696 | |
697 | QtCore.QObject.connect(self.SongLevelRadioButton, |
698 | - QtCore.SIGNAL("pressed()"), self.onSongLevelButtonPressed) |
699 | + QtCore.SIGNAL(u'pressed()'), self.onSongLevelButtonPressed) |
700 | QtCore.QObject.connect(self.ServiceLevelRadioButton, |
701 | - QtCore.SIGNAL("pressed()"), self.onServiceLevelButtonPressed) |
702 | + QtCore.SIGNAL(u'pressed()'), self.onServiceLevelButtonPressed) |
703 | QtCore.QObject.connect(self.GlobalLevelRadioButton, |
704 | - QtCore.SIGNAL("pressed()"), self.onGlobalLevelButtonPressed) |
705 | + QtCore.SIGNAL(u'pressed()'), self.onGlobalLevelButtonPressed) |
706 | |
707 | QtCore.QObject.connect(self.DefaultComboBox, |
708 | QtCore.SIGNAL("activated(int)"), self.onDefaultComboBoxChanged) |
709 | |
710 | === modified file 'openlp/core/utils/registry.py' |
711 | --- openlp/core/utils/registry.py 2009-06-04 16:53:49 +0000 |
712 | +++ openlp/core/utils/registry.py 2009-06-05 18:53:50 +0000 |
713 | @@ -28,8 +28,8 @@ |
714 | """ |
715 | def __init__(self, dir): |
716 | self.config = SafeConfigParser() |
717 | - self.file_name = os.path.join(dir, 'openlp.conf') |
718 | - self.config.read(self.file_name) |
719 | + self.file_name = os.path.join(dir, u'openlp.conf') |
720 | + self._load() |
721 | |
722 | def has_value(self, section, key): |
723 | """ |
724 | @@ -95,14 +95,24 @@ |
725 | except: |
726 | return False |
727 | |
728 | + def _load(self): |
729 | + try: |
730 | + if not os.path.isfile(self.file_name): |
731 | + return False |
732 | + file_handle = open(self.file_name, u'r') |
733 | + self.config.readfp(file_handle) |
734 | + file_handle.close() |
735 | + return True |
736 | + except: |
737 | + return False |
738 | + |
739 | def _save(self): |
740 | try: |
741 | if not os.path.exists(os.path.dirname(self.file_name)): |
742 | os.makedirs(os.path.dirname(self.file_name)) |
743 | - file_handle = open(self.file_name, 'w') |
744 | + file_handle = open(self.file_name, u'w') |
745 | self.config.write(file_handle) |
746 | - close(file_handle) |
747 | - self.config.read(self.file_name) |
748 | - return True |
749 | + file_handle.close() |
750 | + return self._load() |
751 | except: |
752 | return False |
753 | |
754 | === modified file 'openlp/plugins/bibles/lib/biblestab.py' |
755 | --- openlp/plugins/bibles/lib/biblestab.py 2009-05-21 05:15:51 +0000 |
756 | +++ openlp/plugins/bibles/lib/biblestab.py 2009-06-05 18:53:50 +0000 |
757 | @@ -32,7 +32,7 @@ |
758 | self.show_new_chapters = False |
759 | self.display_style = 0 |
760 | self.bible_search = True |
761 | - SettingsTab.__init__(self, u'Bibles') |
762 | + SettingsTab.__init__(self, translate(u'BiblesTab', u'Bibles'), u'Bibles') |
763 | |
764 | def setupUi(self): |
765 | self.setObjectName(u'BiblesTab') |
766 | @@ -134,32 +134,32 @@ |
767 | self.BibleLayout.addWidget(self.BibleRightWidget) |
768 | # Signals and slots |
769 | QtCore.QObject.connect(self.NewChaptersCheckBox, |
770 | - QtCore.SIGNAL("stateChanged(int)"), self.onNewChaptersCheckBoxChanged) |
771 | + QtCore.SIGNAL(u'stateChanged(int)'), self.onNewChaptersCheckBoxChanged) |
772 | QtCore.QObject.connect(self.BibleSearchCheckBox, |
773 | - QtCore.SIGNAL("stateChanged(int)"), self.onBibleSearchCheckBoxChanged) |
774 | + QtCore.SIGNAL(u'stateChanged(int)'), self.onBibleSearchCheckBoxChanged) |
775 | QtCore.QObject.connect(self.VerseRadioButton, |
776 | - QtCore.SIGNAL("pressed()"), self.onVerseRadioButtonPressed) |
777 | + QtCore.SIGNAL(u'pressed()'), self.onVerseRadioButtonPressed) |
778 | QtCore.QObject.connect(self.ParagraphRadioButton, |
779 | - QtCore.SIGNAL("pressed()"), self.onParagraphRadioButtonPressed) |
780 | + QtCore.SIGNAL(u'pressed()'), self.onParagraphRadioButtonPressed) |
781 | QtCore.QObject.connect(self.DisplayStyleComboBox, |
782 | - QtCore.SIGNAL("activated(int)"), self.onDisplayStyleComboBoxChanged) |
783 | + QtCore.SIGNAL(u'activated(int)'), self.onDisplayStyleComboBoxChanged) |
784 | QtCore.QObject.connect(self.BibleThemeComboBox, |
785 | - QtCore.SIGNAL("activated(int)"), self.onBibleThemeComboBoxChanged) |
786 | + QtCore.SIGNAL(u'activated(int)'), self.onBibleThemeComboBoxChanged) |
787 | |
788 | def retranslateUi(self): |
789 | - self.VerseDisplayGroupBox.setTitle(translate('SettingsForm', 'Verse Display')) |
790 | - self.VerseRadioButton.setText(translate('SettingsForm', 'Verse style')) |
791 | - self.ParagraphRadioButton.setText(translate('SettingsForm','Paragraph style')) |
792 | - self.NewChaptersCheckBox.setText(translate('SettingsForm', 'Only show new chapter numbers')) |
793 | - self.DisplayStyleLabel.setText(translate('SettingsForm', 'Display Style:')) |
794 | - self.BibleThemeLabel.setText(translate('SettingsForm', 'Bible Theme:')) |
795 | - self.DisplayStyleComboBox.setItemText(0, translate('SettingsForm', 'No brackets')) |
796 | - self.DisplayStyleComboBox.setItemText(1, translate('SettingsForm', '( and )')) |
797 | - self.DisplayStyleComboBox.setItemText(2, translate('SettingsForm', '{ and }')) |
798 | - self.DisplayStyleComboBox.setItemText(3, translate('SettingsForm', '[ and ]')) |
799 | - self.ChangeNoteLabel.setText(translate('SettingsForm', 'Note:\nChanges don\'t affect verses already in the service')) |
800 | - self.BibleSearchGroupBox.setTitle(translate('SettingsForm', 'Search')) |
801 | - self.BibleSearchCheckBox.setText(translate('SettingsForm', 'Search-as-you-type')) |
802 | + self.VerseDisplayGroupBox.setTitle(translate(u'SettingsForm', u'Verse Display')) |
803 | + self.VerseRadioButton.setText(translate(u'SettingsForm', u'Verse style')) |
804 | + self.ParagraphRadioButton.setText(translate(u'SettingsForm', u'Paragraph style')) |
805 | + self.NewChaptersCheckBox.setText(translate(u'SettingsForm', u'Only show new chapter numbers')) |
806 | + self.DisplayStyleLabel.setText(translate(u'SettingsForm', u'Display Style:')) |
807 | + self.BibleThemeLabel.setText(translate(u'SettingsForm', u'Bible Theme:')) |
808 | + self.DisplayStyleComboBox.setItemText(0, translate(u'SettingsForm', u'No brackets')) |
809 | + self.DisplayStyleComboBox.setItemText(1, translate(u'SettingsForm', u'( and )')) |
810 | + self.DisplayStyleComboBox.setItemText(2, translate(u'SettingsForm', u'{ and }')) |
811 | + self.DisplayStyleComboBox.setItemText(3, translate(u'SettingsForm', u'[ and ]')) |
812 | + self.ChangeNoteLabel.setText(translate(u'SettingsForm', u'Note:\nChanges don\'t affect verses already in the service')) |
813 | + self.BibleSearchGroupBox.setTitle(translate(u'SettingsForm', u'Search')) |
814 | + self.BibleSearchCheckBox.setText(translate(u'SettingsForm', u'Search-as-you-type')) |
815 | |
816 | def onBibleThemeComboBoxChanged(self): |
817 | self.bible_theme = self.BibleThemeComboBox.currentText() |
818 | @@ -187,7 +187,7 @@ |
819 | |
820 | def load(self): |
821 | self.paragraph_style = str_to_bool(self.config.get_config(u'paragraph style', u'True')) |
822 | - self.show_new_chapters = str_to_bool(self.config.get_config(u'display new chapter', u"False")) |
823 | + self.show_new_chapters = str_to_bool(self.config.get_config(u'display new chapter', u'False')) |
824 | self.display_style = int(self.config.get_config(u'display brackets', u'0')) |
825 | self.bible_theme = self.config.get_config(u'bible theme', u'0') |
826 | self.bible_search = str_to_bool(self.config.get_config(u'search as type', u'True')) |
827 | @@ -216,6 +216,7 @@ |
828 | self.BibleThemeComboBox.addItem(theme) |
829 | id = self.BibleThemeComboBox.findText(str(self.bible_theme), QtCore.Qt.MatchExactly) |
830 | if id == -1: |
831 | - id = 0 # Not Found |
832 | + # Not Found |
833 | + id = 0 |
834 | self.bible_theme = u'' |
835 | self.BibleThemeComboBox.setCurrentIndex(id) |
836 | |
837 | === modified file 'openlp/plugins/custom/lib/customtab.py' |
838 | --- openlp/plugins/custom/lib/customtab.py 2009-05-21 16:07:01 +0000 |
839 | +++ openlp/plugins/custom/lib/customtab.py 2009-06-05 18:53:50 +0000 |
840 | @@ -27,7 +27,7 @@ |
841 | SongsTab is the songs settings tab in the settings dialog. |
842 | """ |
843 | def __init__(self): |
844 | - SettingsTab.__init__(self, u'Custom') |
845 | + SettingsTab.__init__(self, translate(u'CustomTab', u'Custom'), u'Custom') |
846 | |
847 | def setupUi(self): |
848 | self.setObjectName(u'CustomTab') |
849 | |
850 | === modified file 'openlp/plugins/media/lib/mediatab.py' |
851 | --- openlp/plugins/media/lib/mediatab.py 2009-05-21 05:15:51 +0000 |
852 | +++ openlp/plugins/media/lib/mediatab.py 2009-06-05 18:53:50 +0000 |
853 | @@ -27,40 +27,38 @@ |
854 | mediaTab is the media settings tab in the settings dialog. |
855 | """ |
856 | def __init__(self): |
857 | - SettingsTab.__init__(self, u'Media') |
858 | + SettingsTab.__init__(self, translate(u'MediaTab', u'Media'), u'Media') |
859 | |
860 | def setupUi(self): |
861 | self.setObjectName(u'MediaTab') |
862 | - |
863 | self.MediaLayout = QtGui.QFormLayout(self) |
864 | - self.MediaLayout.setObjectName("MediaLayout") |
865 | - |
866 | + self.MediaLayout.setObjectName(u'MediaLayout') |
867 | self.MediaModeGroupBox = QtGui.QGroupBox(self) |
868 | - self.MediaModeGroupBox.setObjectName("MediaModeGroupBox") |
869 | + self.MediaModeGroupBox.setObjectName(u'MediaModeGroupBox') |
870 | self.MediaModeLayout = QtGui.QVBoxLayout(self.MediaModeGroupBox) |
871 | self.MediaModeLayout.setSpacing(8) |
872 | self.MediaModeLayout.setMargin(8) |
873 | - self.MediaModeLayout.setObjectName("MediaModeLayout") |
874 | + self.MediaModeLayout.setObjectName(u'MediaModeLayout') |
875 | self.UseVMRCheckBox = QtGui.QCheckBox(self.MediaModeGroupBox) |
876 | - self.UseVMRCheckBox.setObjectName("UseVMRCheckBox") |
877 | + self.UseVMRCheckBox.setObjectName(u'UseVMRCheckBox') |
878 | self.MediaModeLayout.addWidget(self.UseVMRCheckBox) |
879 | self.UseVMRLabel = QtGui.QLabel(self.MediaModeGroupBox) |
880 | - self.UseVMRLabel.setObjectName("UseVMRLabel") |
881 | + self.UseVMRLabel.setObjectName(u'UseVMRLabel') |
882 | self.MediaModeLayout.addWidget(self.UseVMRLabel) |
883 | |
884 | self.MediaLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.MediaModeGroupBox) |
885 | # Signals and slots |
886 | QtCore.QObject.connect(self.UseVMRCheckBox, |
887 | - QtCore.SIGNAL("stateChanged(int)"), self.onVMRCheckBoxChanged) |
888 | + QtCore.SIGNAL(u'stateChanged(int)'), self.onVMRCheckBoxChanged) |
889 | |
890 | def retranslateUi(self): |
891 | - self.MediaModeGroupBox.setTitle(translate("SettingsForm", "Media Mode")) |
892 | - self.UseVMRCheckBox.setText(translate("SettingsForm", "Use Video Mode Rendering")) |
893 | - self.UseVMRLabel.setText(translate("SettingsForm", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" |
894 | -"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" |
895 | -"p, li { white-space: pre-wrap; }\n" |
896 | -"</style></head><body style=\" font-family:\'DejaVu Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n" |
897 | -"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">No video preview available with VMR enabled</span></p></body></html>")) |
898 | + self.MediaModeGroupBox.setTitle(translate(u'MediaTab', u'Media Mode')) |
899 | + self.UseVMRCheckBox.setText(translate(u'MediaTab', u'Use Video Mode Rendering')) |
900 | + self.UseVMRLabel.setText(translate(u'MediaTab', u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">\n' |
901 | + u'<html><head><meta name="qrichtext" content="1" /><style type="text/css">\n' |
902 | + u'p, li { white-space: pre-wrap; }\n' |
903 | + u'</style></head><body style="font-family:\'DejaVu Sans\'; font-size:10pt; font-weight:400; font-style:normal;">\n' |
904 | + u'<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">No video preview available with VMR enabled</span></p></body></html>')) |
905 | |
906 | def onVMRCheckBoxChanged(self): |
907 | use_vmr_mode = self.UseVMRCheckBox.checkState() |
908 | |
909 | === modified file 'openlp/plugins/presentations/lib/presentationtab.py' |
910 | --- openlp/plugins/presentations/lib/presentationtab.py 2009-06-01 18:37:06 +0000 |
911 | +++ openlp/plugins/presentations/lib/presentationtab.py 2009-06-05 18:53:50 +0000 |
912 | @@ -24,23 +24,23 @@ |
913 | |
914 | class PresentationTab(SettingsTab): |
915 | """ |
916 | - BiblesTab is the Bibles settings tab in the settings dialog. |
917 | + PresentationsTab is the Presentations settings tab in the settings dialog. |
918 | """ |
919 | def __init__(self): |
920 | - SettingsTab.__init__(self, u'Presentation') |
921 | + SettingsTab.__init__(self, translate(u'PresentationTab', u'Presentation'), u'Presentation') |
922 | |
923 | def setupUi(self): |
924 | - self.setObjectName(u'BiblesTab') |
925 | - self.BibleLayout = QtGui.QHBoxLayout(self) |
926 | - self.BibleLayout.setSpacing(8) |
927 | - self.BibleLayout.setMargin(8) |
928 | - self.BibleLayout.setObjectName(u'BibleLayout') |
929 | - self.BibleLeftWidget = QtGui.QWidget(self) |
930 | - self.BibleLeftWidget.setObjectName(u'BibleLeftWidget') |
931 | - self.BibleLeftLayout = QtGui.QVBoxLayout(self.BibleLeftWidget) |
932 | - self.BibleLeftLayout.setObjectName(u'BibleLeftLayout') |
933 | - self.BibleLeftLayout.setSpacing(8) |
934 | - self.BibleLeftLayout.setMargin(0) |
935 | + self.setObjectName(u'PresentationTab') |
936 | + self.PresentationLayout = QtGui.QHBoxLayout(self) |
937 | + self.PresentationLayout.setSpacing(8) |
938 | + self.PresentationLayout.setMargin(8) |
939 | + self.PresentationLayout.setObjectName(u'PresentationLayout') |
940 | + self.PresentationLeftWidget = QtGui.QWidget(self) |
941 | + self.PresentationLeftWidget.setObjectName(u'PresentationLeftWidget') |
942 | + self.PresentationLeftLayout = QtGui.QVBoxLayout(self.PresentationLeftWidget) |
943 | + self.PresentationLeftLayout.setObjectName(u'PresentationLeftLayout') |
944 | + self.PresentationLeftLayout.setSpacing(8) |
945 | + self.PresentationLeftLayout.setMargin(0) |
946 | |
947 | self.VerseDisplayGroupBox = QtGui.QGroupBox(self) |
948 | self.VerseDisplayGroupBox.setObjectName(u'VerseDisplayGroupBox') |
949 | @@ -70,29 +70,29 @@ |
950 | self.ImpressPath.setObjectName("ImpressPath") |
951 | self.VerseDisplayLayout.addWidget(self.ImpressPath, 3, 0, 1, 1) |
952 | |
953 | - self.BibleThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox) |
954 | - self.BibleThemeWidget.setObjectName(u'BibleThemeWidget') |
955 | - self.BibleThemeLayout = QtGui.QHBoxLayout(self.BibleThemeWidget) |
956 | - self.BibleThemeLayout.setSpacing(8) |
957 | - self.BibleThemeLayout.setMargin(0) |
958 | - self.BibleThemeLayout.setObjectName(u'BibleThemeLayout') |
959 | - |
960 | - self.BibleLeftLayout.addWidget(self.VerseDisplayGroupBox) |
961 | - self.BibleLeftSpacer = QtGui.QSpacerItem(40, 20, |
962 | - QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
963 | - self.BibleLeftLayout.addItem(self.BibleLeftSpacer) |
964 | - self.BibleLayout.addWidget(self.BibleLeftWidget) |
965 | - |
966 | - self.BibleRightWidget = QtGui.QWidget(self) |
967 | - self.BibleRightWidget.setObjectName(u'BibleRightWidget') |
968 | - self.BibleRightLayout = QtGui.QVBoxLayout(self.BibleRightWidget) |
969 | - self.BibleRightLayout.setObjectName(u'BibleRightLayout') |
970 | - self.BibleRightLayout.setSpacing(8) |
971 | - self.BibleRightLayout.setMargin(0) |
972 | - self.BibleRightSpacer = QtGui.QSpacerItem(50, 20, |
973 | - QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
974 | - self.BibleRightLayout.addItem(self.BibleRightSpacer) |
975 | - self.BibleLayout.addWidget(self.BibleRightWidget) |
976 | + self.PresentationThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox) |
977 | + self.PresentationThemeWidget.setObjectName(u'PresentationThemeWidget') |
978 | + self.PresentationThemeLayout = QtGui.QHBoxLayout(self.PresentationThemeWidget) |
979 | + self.PresentationThemeLayout.setSpacing(8) |
980 | + self.PresentationThemeLayout.setMargin(0) |
981 | + self.PresentationThemeLayout.setObjectName(u'PresentationThemeLayout') |
982 | + |
983 | + self.PresentationLeftLayout.addWidget(self.VerseDisplayGroupBox) |
984 | + self.PresentationLeftSpacer = QtGui.QSpacerItem(40, 20, |
985 | + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
986 | + self.PresentationLeftLayout.addItem(self.PresentationLeftSpacer) |
987 | + self.PresentationLayout.addWidget(self.PresentationLeftWidget) |
988 | + |
989 | + self.PresentationRightWidget = QtGui.QWidget(self) |
990 | + self.PresentationRightWidget.setObjectName(u'PresentationRightWidget') |
991 | + self.PresentationRightLayout = QtGui.QVBoxLayout(self.PresentationRightWidget) |
992 | + self.PresentationRightLayout.setObjectName(u'PresentationRightLayout') |
993 | + self.PresentationRightLayout.setSpacing(8) |
994 | + self.PresentationRightLayout.setMargin(0) |
995 | + self.PresentationRightSpacer = QtGui.QSpacerItem(50, 20, |
996 | + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
997 | + self.PresentationRightLayout.addItem(self.PresentationRightSpacer) |
998 | + self.PresentationLayout.addWidget(self.PresentationRightWidget) |
999 | |
1000 | # Signals and slots |
1001 | #QtCore.QObject.connect(self.NewChaptersCheckBox, |
1002 | @@ -116,20 +116,20 @@ |
1003 | # self.paragraph_style = (self.config.get_config(u'paragraph style', u'True')) |
1004 | # self.show_new_chapters = (self.config.get_config(u'display new chapter', u"False")) |
1005 | # self.display_style = int(self.config.get_config(u'display brackets', u'0')) |
1006 | -# self.bible_theme = int(self.config.get_config(u'bible theme', u'0')) |
1007 | -# self.bible_search = (self.config.get_config(u'search as type', u'True')) |
1008 | +# self.Presentation_theme = int(self.config.get_config(u'Presentation theme', u'0')) |
1009 | +# self.Presentation_search = (self.config.get_config(u'search as type', u'True')) |
1010 | # if self.paragraph_style: |
1011 | # self.ParagraphRadioButton.setChecked(True) |
1012 | # else: |
1013 | # self.VerseRadioButton.setChecked(True) |
1014 | # self.NewChaptersCheckBox.setChecked(self.show_new_chapters) |
1015 | # self.DisplayStyleComboBox.setCurrentIndex(self.display_style) |
1016 | -# self.BibleSearchCheckBox.setChecked(self.bible_search) |
1017 | +# self.PresentationSearchCheckBox.setChecked(self.Presentation_search) |
1018 | |
1019 | def save(self): |
1020 | pass |
1021 | # self.config.set_config(u'paragraph style', str(self.paragraph_style)) |
1022 | # self.config.set_config(u'display new chapter', str(self.show_new_chapters)) |
1023 | # self.config.set_config(u'display brackets', str(self.display_style)) |
1024 | -# self.config.set_config(u'search as type', str(self.bible_search)) |
1025 | -# self.config.set_config(u'bible theme', str(self.bible_theme)) |
1026 | +# self.config.set_config(u'search as type', str(self.Presentation_search)) |
1027 | +# self.config.set_config(u'Presentation theme', str(self.Presentation_theme)) |
1028 | |
1029 | === modified file 'openlp/plugins/songs/lib/songstab.py' |
1030 | --- openlp/plugins/songs/lib/songstab.py 2009-05-21 16:07:01 +0000 |
1031 | +++ openlp/plugins/songs/lib/songstab.py 2009-06-05 18:53:50 +0000 |
1032 | @@ -20,14 +20,14 @@ |
1033 | |
1034 | from PyQt4 import QtCore, QtGui |
1035 | |
1036 | -from openlp.core.lib import SettingsTab, translate |
1037 | +from openlp.core.lib import SettingsTab, translate |
1038 | |
1039 | class SongsTab(SettingsTab): |
1040 | """ |
1041 | SongsTab is the songs settings tab in the settings dialog. |
1042 | """ |
1043 | def __init__(self): |
1044 | - SettingsTab.__init__(self, u'Songs') |
1045 | + SettingsTab.__init__(self, translate(u'SongsTab', u'Songs'), u'Songs') |
1046 | |
1047 | def setupUi(self): |
1048 | self.setObjectName(u'SongsTab') |
Fixed displaying of "display" label on the display form.
Display form is displayed on the correct screen at startup.
Display form switches to active non-primary screen or hidden on primary screen after set in the settings dialog.
A few syntax tidy-ups.
Made the loading and saving of things to the "registry" better.