forked from openlp/openlp
r1665
This commit is contained in:
commit
bb5d8f74c4
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Millar, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -9,8 +9,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -137,13 +137,12 @@ def image_to_byte(image):
|
||||
# convert to base64 encoding so does not get missed!
|
||||
return byte_array.toBase64()
|
||||
|
||||
def resize_image(image, width, height, background=QtCore.Qt.black):
|
||||
def resize_image(image_path, width, height, background=QtCore.Qt.black):
|
||||
"""
|
||||
Resize an image to fit on the current screen.
|
||||
|
||||
``image``
|
||||
The image to resize. It has to be either a ``QImage`` instance or the
|
||||
path to the image.
|
||||
``image_path``
|
||||
The path to the image to resize.
|
||||
|
||||
``width``
|
||||
The new image width.
|
||||
@ -155,16 +154,24 @@ def resize_image(image, width, height, background=QtCore.Qt.black):
|
||||
The background colour defaults to black.
|
||||
"""
|
||||
log.debug(u'resize_image - start')
|
||||
if isinstance(image, QtGui.QImage):
|
||||
preview = image
|
||||
reader = QtGui.QImageReader(image_path)
|
||||
# The image's ratio.
|
||||
image_ratio = float(reader.size().width()) / float(reader.size().height())
|
||||
resize_ratio = float(width) / float(height)
|
||||
# Figure out the size we want to resize the image to (keep aspect ratio).
|
||||
if image_ratio == resize_ratio:
|
||||
size = QtCore.QSize(width, height)
|
||||
elif image_ratio < resize_ratio:
|
||||
# Use the image's height as reference for the new size.
|
||||
size = QtCore.QSize(image_ratio * height, height)
|
||||
else:
|
||||
preview = QtGui.QImage(image)
|
||||
if not preview.isNull():
|
||||
# Only resize if different size
|
||||
if preview.width() == width and preview.height == height:
|
||||
return preview
|
||||
preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio,
|
||||
QtCore.Qt.SmoothTransformation)
|
||||
# Use the image's width as reference for the new size.
|
||||
size = QtCore.QSize(width, 1 / (image_ratio / width))
|
||||
reader.setScaledSize(size)
|
||||
preview = reader.read()
|
||||
if image_ratio == resize_ratio:
|
||||
# We neither need to centre the image nor add "bars" to the image.
|
||||
return preview
|
||||
realw = preview.width()
|
||||
realh = preview.height()
|
||||
# and move it to the centre of the preview space
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -257,11 +257,12 @@ sup {
|
||||
}
|
||||
|
||||
function show_text(newtext){
|
||||
var match = /-webkit-text-fill-color:[^;\"]+/gi;
|
||||
if(timer != null)
|
||||
clearTimeout(timer);
|
||||
text_fade('lyricsmain', newtext);
|
||||
text_fade('lyricsoutline', newtext);
|
||||
text_fade('lyricsshadow', newtext);
|
||||
text_fade('lyricsshadow', newtext.replace(match, ""));
|
||||
if(text_opacity()==1) return;
|
||||
timer = setTimeout(function(){
|
||||
show_text(newtext);
|
||||
@ -485,11 +486,11 @@ def build_lyrics_css(item, webkitvers):
|
||||
# Before 533.3 the webkit-text-fill colour wasn't displayed, only the
|
||||
# stroke (outline) color. So put stroke layer underneath the main text.
|
||||
#
|
||||
# Before 534.4 the webkit-text-stroke was sometimes out of alignment
|
||||
# Up to 534.3 the webkit-text-stroke was sometimes out of alignment
|
||||
# with the fill, or normal text. letter-spacing=1 is workaround
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=44403
|
||||
#
|
||||
# Before 534.4 the text-shadow didn't get displayed when
|
||||
# Up to 534.3 the text-shadow didn't get displayed when
|
||||
# webkit-text-stroke was used. So use an offset text layer underneath.
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=19728
|
||||
if webkitvers >= 533.3:
|
||||
@ -497,7 +498,7 @@ def build_lyrics_css(item, webkitvers):
|
||||
else:
|
||||
outline = build_lyrics_outline_css(theme)
|
||||
if theme.font_main_shadow:
|
||||
if theme.font_main_outline and webkitvers < 534.3:
|
||||
if theme.font_main_outline and webkitvers <= 534.3:
|
||||
shadow = u'padding-left: %spx; padding-top: %spx;' % \
|
||||
(int(theme.font_main_shadow_size) +
|
||||
(int(theme.font_main_outline_size) * 2),
|
||||
@ -563,7 +564,7 @@ def build_lyrics_format_css(theme, width, height):
|
||||
theme.font_main_color, 100 + int(theme.font_main_line_adjustment),
|
||||
left_margin, width, height)
|
||||
if theme.font_main_outline:
|
||||
if webkit_version() < 534.3:
|
||||
if webkit_version() <= 534.3:
|
||||
lyrics += u' letter-spacing: 1px;'
|
||||
if theme.font_main_italics:
|
||||
lyrics += u' font-style:italic; '
|
||||
@ -587,7 +588,7 @@ def build_lyrics_html(item, webkitvers):
|
||||
# display:table/display:table-cell are required for each lyric block.
|
||||
lyrics = u''
|
||||
theme = item.themedata
|
||||
if webkitvers < 534.4 and theme and theme.font_main_outline:
|
||||
if webkitvers <= 534.3 and theme and theme.font_main_outline:
|
||||
lyrics += u'<div class="lyricstable">' \
|
||||
u'<div id="lyricsshadow" style="opacity:1" ' \
|
||||
u'class="lyricscell lyricsshadow"></div></div>'
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -32,6 +32,7 @@ to wait for the conversion to happen.
|
||||
"""
|
||||
import logging
|
||||
import time
|
||||
import Queue
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
@ -42,8 +43,8 @@ log = logging.getLogger(__name__)
|
||||
|
||||
class ImageThread(QtCore.QThread):
|
||||
"""
|
||||
A special Qt thread class to speed up the display of text based frames.
|
||||
This is threaded so it loads the frames in background
|
||||
A special Qt thread class to speed up the display of images. This is
|
||||
threaded so it loads the frames and generates byte stream in background.
|
||||
"""
|
||||
def __init__(self, manager):
|
||||
QtCore.QThread.__init__(self, None)
|
||||
@ -53,15 +54,75 @@ class ImageThread(QtCore.QThread):
|
||||
"""
|
||||
Run the thread.
|
||||
"""
|
||||
self.imageManager.process()
|
||||
self.imageManager._process()
|
||||
|
||||
|
||||
class Priority(object):
|
||||
"""
|
||||
Enumeration class for different priorities.
|
||||
|
||||
``Lowest``
|
||||
Only the image's byte stream has to be generated. But neither the
|
||||
``QImage`` nor the byte stream has been requested yet.
|
||||
|
||||
``Low``
|
||||
Only the image's byte stream has to be generated. Because the image's
|
||||
``QImage`` has been requested previously it is reasonable to assume that
|
||||
the byte stream will be needed before the byte stream of other images
|
||||
whose ``QImage`` were not generated due to a request.
|
||||
|
||||
``Normal``
|
||||
The image's byte stream as well as the image has to be generated.
|
||||
Neither the ``QImage`` nor the byte stream has been requested yet.
|
||||
|
||||
``High``
|
||||
The image's byte stream as well as the image has to be generated. The
|
||||
``QImage`` for this image has been requested.
|
||||
**Note**, this priority is only set when the ``QImage`` has not been
|
||||
generated yet.
|
||||
|
||||
``Urgent``
|
||||
The image's byte stream as well as the image has to be generated. The
|
||||
byte stream for this image has been requested.
|
||||
**Note**, this priority is only set when the byte stream has not been
|
||||
generated yet.
|
||||
"""
|
||||
Lowest = 4
|
||||
Low = 3
|
||||
Normal = 2
|
||||
High = 1
|
||||
Urgent = 0
|
||||
|
||||
|
||||
class Image(object):
|
||||
name = ''
|
||||
path = ''
|
||||
dirty = True
|
||||
image = None
|
||||
image_bytes = None
|
||||
"""
|
||||
This class represents an image. To mark an image as *dirty* set the instance
|
||||
variables ``image`` and ``image_bytes`` to ``None`` and add the image object
|
||||
to the queue of images to process.
|
||||
"""
|
||||
def __init__(self, name='', path=''):
|
||||
self.name = name
|
||||
self.path = path
|
||||
self.image = None
|
||||
self.image_bytes = None
|
||||
self.priority = Priority.Normal
|
||||
|
||||
|
||||
class PriorityQueue(Queue.PriorityQueue):
|
||||
"""
|
||||
Customised ``Queue.PriorityQueue``.
|
||||
"""
|
||||
def remove(self, item):
|
||||
"""
|
||||
Removes the given ``item`` from the queue.
|
||||
|
||||
``item``
|
||||
The item to remove. This should be a tuple::
|
||||
|
||||
``(Priority, Image)``
|
||||
"""
|
||||
if item in self.queue:
|
||||
self.queue.remove(item)
|
||||
|
||||
|
||||
class ImageManager(QtCore.QObject):
|
||||
@ -76,96 +137,120 @@ class ImageManager(QtCore.QObject):
|
||||
self.width = current_screen[u'size'].width()
|
||||
self.height = current_screen[u'size'].height()
|
||||
self._cache = {}
|
||||
self._thread_running = False
|
||||
self._cache_dirty = False
|
||||
self.image_thread = ImageThread(self)
|
||||
self._imageThread = ImageThread(self)
|
||||
self._conversion_queue = PriorityQueue()
|
||||
|
||||
def update_display(self):
|
||||
"""
|
||||
Screen has changed size so rebuild the cache to new size
|
||||
Screen has changed size so rebuild the cache to new size.
|
||||
"""
|
||||
log.debug(u'update_display')
|
||||
current_screen = ScreenList.get_instance().current
|
||||
self.width = current_screen[u'size'].width()
|
||||
self.height = current_screen[u'size'].height()
|
||||
# mark the images as dirty for a rebuild
|
||||
for key in self._cache.keys():
|
||||
image = self._cache[key]
|
||||
image.dirty = True
|
||||
image.image = resize_image(image.path, self.width, self.height)
|
||||
self._cache_dirty = True
|
||||
# only one thread please
|
||||
if not self._thread_running:
|
||||
self.image_thread.start()
|
||||
# Mark the images as dirty for a rebuild by setting the image and byte
|
||||
# stream to None.
|
||||
self._conversion_queue = PriorityQueue()
|
||||
for key, image in self._cache.iteritems():
|
||||
image.priority = Priority.Normal
|
||||
image.image = None
|
||||
image.image_bytes = None
|
||||
self._conversion_queue.put((image.priority, image))
|
||||
# We want only one thread.
|
||||
if not self._imageThread.isRunning():
|
||||
self._imageThread.start()
|
||||
|
||||
def get_image(self, name):
|
||||
"""
|
||||
Return the Qimage from the cache
|
||||
Return the ``QImage`` from the cache. If not present wait for the
|
||||
background thread to process it.
|
||||
"""
|
||||
log.debug(u'get_image %s' % name)
|
||||
return self._cache[name].image
|
||||
image = self._cache[name]
|
||||
if image.image is None:
|
||||
self._conversion_queue.remove((image.priority, image))
|
||||
image.priority = Priority.High
|
||||
self._conversion_queue.put((image.priority, image))
|
||||
while image.image is None:
|
||||
log.debug(u'get_image - waiting')
|
||||
time.sleep(0.1)
|
||||
return image.image
|
||||
|
||||
def get_image_bytes(self, name):
|
||||
"""
|
||||
Returns the byte string for an image
|
||||
If not present wait for the background thread to process it.
|
||||
Returns the byte string for an image. If not present wait for the
|
||||
background thread to process it.
|
||||
"""
|
||||
log.debug(u'get_image_bytes %s' % name)
|
||||
if not self._cache[name].image_bytes:
|
||||
while self._cache[name].dirty:
|
||||
image = self._cache[name]
|
||||
if image.image_bytes is None:
|
||||
self._conversion_queue.remove((image.priority, image))
|
||||
image.priority = Priority.Urgent
|
||||
self._conversion_queue.put((image.priority, image))
|
||||
while image.image_bytes is None:
|
||||
log.debug(u'get_image_bytes - waiting')
|
||||
time.sleep(0.1)
|
||||
return self._cache[name].image_bytes
|
||||
return image.image_bytes
|
||||
|
||||
def del_image(self, name):
|
||||
"""
|
||||
Delete the Image from the Cache
|
||||
Delete the Image from the cache.
|
||||
"""
|
||||
log.debug(u'del_image %s' % name)
|
||||
if name in self._cache:
|
||||
self._conversion_queue.remove(
|
||||
(self._cache[name].priority, self._cache[name]))
|
||||
del self._cache[name]
|
||||
|
||||
def add_image(self, name, path):
|
||||
"""
|
||||
Add image to cache if it is not already there
|
||||
Add image to cache if it is not already there.
|
||||
"""
|
||||
log.debug(u'add_image %s:%s' % (name, path))
|
||||
if not name in self._cache:
|
||||
image = Image()
|
||||
image.name = name
|
||||
image.path = path
|
||||
image.image = resize_image(path, self.width, self.height)
|
||||
image = Image(name, path)
|
||||
self._cache[name] = image
|
||||
self._conversion_queue.put((image.priority, image))
|
||||
else:
|
||||
log.debug(u'Image in cache %s:%s' % (name, path))
|
||||
self._cache_dirty = True
|
||||
# only one thread please
|
||||
if not self._thread_running:
|
||||
self.image_thread.start()
|
||||
# We want only one thread.
|
||||
if not self._imageThread.isRunning():
|
||||
self._imageThread.start()
|
||||
|
||||
def process(self):
|
||||
def _process(self):
|
||||
"""
|
||||
Controls the processing called from a QThread
|
||||
Controls the processing called from a ``QtCore.QThread``.
|
||||
"""
|
||||
log.debug(u'process - started')
|
||||
self._thread_running = True
|
||||
self.clean_cache()
|
||||
# data loaded since we started ?
|
||||
while self._cache_dirty:
|
||||
log.debug(u'process - recycle')
|
||||
self.clean_cache()
|
||||
self._thread_running = False
|
||||
log.debug(u'process - ended')
|
||||
log.debug(u'_process - started')
|
||||
while not self._conversion_queue.empty():
|
||||
self._process_cache()
|
||||
log.debug(u'_process - ended')
|
||||
|
||||
def clean_cache(self):
|
||||
def _process_cache(self):
|
||||
"""
|
||||
Actually does the work.
|
||||
"""
|
||||
log.debug(u'clean_cache')
|
||||
# we will clean the cache now
|
||||
self._cache_dirty = False
|
||||
for key in self._cache.keys():
|
||||
image = self._cache[key]
|
||||
if image.dirty:
|
||||
image.image_bytes = image_to_byte(image.image)
|
||||
image.dirty = False
|
||||
log.debug(u'_process_cache')
|
||||
image = self._conversion_queue.get()[1]
|
||||
# Generate the QImage for the image.
|
||||
if image.image is None:
|
||||
image.image = resize_image(image.path, self.width, self.height)
|
||||
# Set the priority to Lowest and stop here as we need to process
|
||||
# more important images first.
|
||||
if image.priority == Priority.Normal:
|
||||
self._conversion_queue.remove((image.priority, image))
|
||||
image.priority = Priority.Lowest
|
||||
self._conversion_queue.put((image.priority, image))
|
||||
return
|
||||
# For image with high priority we set the priority to Low, as the
|
||||
# byte stream might be needed earlier the byte stream of image with
|
||||
# Normal priority. We stop here as we need to process more important
|
||||
# images first.
|
||||
elif image.priority == Priority.High:
|
||||
self._conversion_queue.remove((image.priority, image))
|
||||
image.priority = Priority.Low
|
||||
self._conversion_queue.put((image.priority, image))
|
||||
return
|
||||
# Generate the byte stream for the image.
|
||||
if image.image_bytes is None:
|
||||
image.image_bytes = image_to_byte(image.image)
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -90,7 +90,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
"""
|
||||
Constructor to create the media manager item.
|
||||
"""
|
||||
QtGui.QWidget.__init__(self, parent)
|
||||
QtGui.QWidget.__init__(self)
|
||||
self.hide()
|
||||
self.whitespace = re.compile(r'[\W_]+', re.UNICODE)
|
||||
self.plugin = plugin
|
||||
@ -341,8 +341,8 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
critical_error_message_box(
|
||||
UiStrings().Duplicate,
|
||||
unicode(translate('OpenLP.MediaManagerItem',
|
||||
'Duplicate file name %s.\nFilename already exists in '
|
||||
'list')) % filename)
|
||||
'Duplicate filename %s.\nThis filename is already in '
|
||||
'the list')) % filename)
|
||||
else:
|
||||
newFiles.append(file)
|
||||
self.loadList(newFiles)
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -354,6 +354,7 @@ class ServiceItem(object):
|
||||
replace an original version.
|
||||
"""
|
||||
self._uuid = other._uuid
|
||||
self.notes = other.notes
|
||||
|
||||
def __eq__(self, other):
|
||||
"""
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -29,6 +29,7 @@ import re
|
||||
try:
|
||||
import enchant
|
||||
from enchant import DictNotFoundError
|
||||
from enchant.errors import Error
|
||||
ENCHANT_AVAILABLE = True
|
||||
except ImportError:
|
||||
ENCHANT_AVAILABLE = False
|
||||
@ -56,7 +57,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||
self.dictionary = enchant.Dict()
|
||||
self.highlighter = Highlighter(self.document())
|
||||
self.highlighter.spellingDictionary = self.dictionary
|
||||
except DictNotFoundError:
|
||||
except Error, DictNotFoundError:
|
||||
ENCHANT_AVAILABLE = False
|
||||
log.debug(u'Could not load default dictionary')
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -178,10 +178,6 @@ class HorizontalType(object):
|
||||
Center = 2
|
||||
|
||||
Names = [u'left', u'right', u'center']
|
||||
TranslatedNames = [
|
||||
translate('OpenLP.ThemeWizard', 'Left'),
|
||||
translate('OpenLP.ThemeWizard', 'Right'),
|
||||
translate('OpenLP.ThemeWizard', 'Center')]
|
||||
|
||||
|
||||
class VerticalType(object):
|
||||
@ -193,7 +189,6 @@ class VerticalType(object):
|
||||
Bottom = 2
|
||||
|
||||
Names = [u'top', u'middle', u'bottom']
|
||||
TranslatedNames = [UiStrings().Top, UiStrings().Middle, UiStrings().Bottom]
|
||||
|
||||
|
||||
BOOLEAN_LIST = [u'bold', u'italics', u'override', u'outline', u'shadow',
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -64,6 +64,7 @@ class UiStrings(object):
|
||||
self.Cancel = translate('OpenLP.Ui', 'Cancel')
|
||||
self.CCLINumberLabel = translate('OpenLP.Ui', 'CCLI number:')
|
||||
self.CreateService = translate('OpenLP.Ui', 'Create a new service.')
|
||||
self.ConfirmDelete = translate('OpenLP.Ui', 'Confirm Delete')
|
||||
self.Continuous = translate('OpenLP.Ui', 'Continuous')
|
||||
self.Default = unicode(translate('OpenLP.Ui', 'Default'))
|
||||
self.Delete = translate('OpenLP.Ui', '&Delete')
|
||||
@ -85,7 +86,6 @@ class UiStrings(object):
|
||||
self.LengthTime = unicode(translate('OpenLP.Ui', 'Length %s'))
|
||||
self.Live = translate('OpenLP.Ui', 'Live')
|
||||
self.LiveBGError = translate('OpenLP.Ui', 'Live Background Error')
|
||||
self.LivePanel = translate('OpenLP.Ui', 'Live Panel')
|
||||
self.LiveToolbar = translate('OpenLP.Ui', 'Live Toolbar')
|
||||
self.Load = translate('OpenLP.Ui', 'Load')
|
||||
self.Minutes = translate('OpenLP.Ui', 'm',
|
||||
@ -102,14 +102,13 @@ class UiStrings(object):
|
||||
self.OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
|
||||
self.OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. '
|
||||
'Do you wish to continue?')
|
||||
self.OpenService = translate('OpenLP.Ui', 'Open Service')
|
||||
self.OpenService = translate('OpenLP.Ui', 'Open service.')
|
||||
self.Preview = translate('OpenLP.Ui', 'Preview')
|
||||
self.PreviewPanel = translate('OpenLP.Ui', 'Preview Panel')
|
||||
self.PrintServiceOrder = translate('OpenLP.Ui', 'Print Service Order')
|
||||
self.PrintService = translate('OpenLP.Ui', 'Print Service')
|
||||
self.ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
|
||||
self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace Live Background')
|
||||
self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace live background.')
|
||||
self.ResetBG = translate('OpenLP.Ui', 'Reset Background')
|
||||
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset Live Background')
|
||||
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.')
|
||||
self.Seconds = translate('OpenLP.Ui', 's',
|
||||
'The abbreviated unit for seconds')
|
||||
self.SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview')
|
||||
@ -121,6 +120,9 @@ class UiStrings(object):
|
||||
self.Settings = translate('OpenLP.Ui', 'Settings')
|
||||
self.SaveService = translate('OpenLP.Ui', 'Save Service')
|
||||
self.Service = translate('OpenLP.Ui', 'Service')
|
||||
self.Split = translate('OpenLP.Ui', '&Split')
|
||||
self.SplitToolTip = translate('OpenLP.Ui', 'Split a slide into two '
|
||||
'only if it does not fit on the screen as one slide.')
|
||||
self.StartTimeCode = unicode(translate('OpenLP.Ui', 'Start %s'))
|
||||
self.Theme = translate('OpenLP.Ui', 'Theme', 'Singular')
|
||||
self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
|
||||
@ -322,8 +324,9 @@ def shortcut_action(parent, name, shortcuts, function, icon=None, checked=None,
|
||||
if checked is not None:
|
||||
action.setCheckable(True)
|
||||
action.setChecked(checked)
|
||||
action.setShortcuts(shortcuts)
|
||||
action.setShortcutContext(context)
|
||||
if shortcuts:
|
||||
action.setShortcuts(shortcuts)
|
||||
action.setShortcutContext(context)
|
||||
action_list = ActionList.get_instance()
|
||||
action_list.add_action(action, category)
|
||||
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered(bool)'), function)
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -118,8 +118,8 @@ class Ui_AboutDialog(object):
|
||||
u'Armin "orangeshirt" K\xf6hler', u'Joshua "milleja46" Miller',
|
||||
u'Stevan "StevanP" Pettit', u'Mattias "mahfiaz" P\xf5ldaru',
|
||||
u'Christian "crichter" Richter', u'Philip "Phill" Ridout',
|
||||
u'Jeffrey "whydoubt" Smith', u'Maikel Stuivenberg',
|
||||
u'Frode "frodus" Woldsund']
|
||||
u'Simon "samscudder" Scudder', u'Jeffrey "whydoubt" Smith',
|
||||
u'Maikel Stuivenberg', u'Frode "frodus" Woldsund']
|
||||
testers = [u'Philip "Phill" Ridout', u'Wesley "wrst" Stout',
|
||||
u'John "jseagull1" Cegalis (lead)']
|
||||
packagers = ['Thomas "tabthorpe" Abthorpe (FreeBSD)',
|
||||
@ -231,8 +231,9 @@ class Ui_AboutDialog(object):
|
||||
u'Tim Bentley, Jonathan Corwin, Michael Gorven, Gerald Britton, '
|
||||
u'Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin K\xf6hler, '
|
||||
u'Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias '
|
||||
u'P\xf5ldaru, Christian Richter, Philip Ridout, Jeffrey Smith, '
|
||||
u'Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund')
|
||||
u'P\xf5ldaru, Christian Richter, Philip Ridout, Simon Scudder, '
|
||||
u'Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, '
|
||||
u'Frode Woldsund')
|
||||
licence = translate('OpenLP.AboutForm',
|
||||
'This program is free software; you can redistribute it and/or '
|
||||
'modify it under the terms of the GNU General Public License as '
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -35,13 +35,10 @@ class Ui_DisplayTagDialog(object):
|
||||
def setupUi(self, displayTagDialog):
|
||||
displayTagDialog.setObjectName(u'displayTagDialog')
|
||||
displayTagDialog.resize(725, 548)
|
||||
self.widget = QtGui.QWidget(displayTagDialog)
|
||||
self.widget.setGeometry(QtCore.QRect(10, 10, 701, 521))
|
||||
self.widget.setObjectName(u'widget')
|
||||
self.listdataGridLayout = QtGui.QGridLayout(self.widget)
|
||||
self.listdataGridLayout.setMargin(0)
|
||||
self.listdataGridLayout = QtGui.QGridLayout(displayTagDialog)
|
||||
self.listdataGridLayout.setMargin(8)
|
||||
self.listdataGridLayout.setObjectName(u'listdataGridLayout')
|
||||
self.tagTableWidget = QtGui.QTableWidget(self.widget)
|
||||
self.tagTableWidget = QtGui.QTableWidget(displayTagDialog)
|
||||
self.tagTableWidget.setHorizontalScrollBarPolicy(
|
||||
QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.tagTableWidget.setEditTriggers(
|
||||
@ -55,6 +52,7 @@ class Ui_DisplayTagDialog(object):
|
||||
self.tagTableWidget.setObjectName(u'tagTableWidget')
|
||||
self.tagTableWidget.setColumnCount(4)
|
||||
self.tagTableWidget.setRowCount(0)
|
||||
self.tagTableWidget.horizontalHeader().setStretchLastSection(True)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
@ -69,11 +67,11 @@ class Ui_DisplayTagDialog(object):
|
||||
spacerItem = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem)
|
||||
self.deletePushButton = QtGui.QPushButton(self.widget)
|
||||
self.deletePushButton = QtGui.QPushButton(displayTagDialog)
|
||||
self.deletePushButton.setObjectName(u'deletePushButton')
|
||||
self.horizontalLayout.addWidget(self.deletePushButton)
|
||||
self.listdataGridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
|
||||
self.editGroupBox = QtGui.QGroupBox(self.widget)
|
||||
self.editGroupBox = QtGui.QGroupBox(displayTagDialog)
|
||||
self.editGroupBox.setObjectName(u'editGroupBox')
|
||||
self.dataGridLayout = QtGui.QGridLayout(self.editGroupBox)
|
||||
self.dataGridLayout.setObjectName(u'dataGridLayout')
|
||||
@ -115,9 +113,8 @@ class Ui_DisplayTagDialog(object):
|
||||
self.dataGridLayout.addWidget(self.savePushButton, 4, 2, 1, 1)
|
||||
self.listdataGridLayout.addWidget(self.editGroupBox, 2, 0, 1, 1)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(displayTagDialog)
|
||||
closeButton = QtGui.QDialogButtonBox.Close
|
||||
self.buttonBox.setObjectName('displayTagDialogButtonBox')
|
||||
self.buttonBox.setStandardButtons(closeButton)
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
|
||||
self.listdataGridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(displayTagDialog)
|
||||
@ -148,6 +145,5 @@ class Ui_DisplayTagDialog(object):
|
||||
self.tagTableWidget.horizontalHeaderItem(3).setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'End HTML'))
|
||||
self.tagTableWidget.setColumnWidth(0, 120)
|
||||
self.tagTableWidget.setColumnWidth(1, 40)
|
||||
self.tagTableWidget.setColumnWidth(2, 240)
|
||||
self.tagTableWidget.setColumnWidth(3, 240)
|
||||
self.tagTableWidget.setColumnWidth(1, 80)
|
||||
self.tagTableWidget.setColumnWidth(2, 330)
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -128,7 +128,7 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
|
||||
tag = {
|
||||
u'desc': translate('OpenLP.DisplayTagTab', 'New Tag'),
|
||||
u'start tag': u'{n}',
|
||||
u'start html': translate('OpenLP.DisplayTagTab', '<Html_here>'),
|
||||
u'start html': translate('OpenLP.DisplayTagTab', '<HTML here>'),
|
||||
u'end tag': u'{/n}',
|
||||
u'end html': translate('OpenLP.DisplayTagTab', '</and here>'),
|
||||
u'protected': False
|
||||
@ -138,6 +138,7 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
|
||||
# Highlight new row
|
||||
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
|
||||
self.onRowSelected()
|
||||
self.tagTableWidget.scrollToBottom()
|
||||
|
||||
def onDeletePushed(self):
|
||||
"""
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -200,15 +200,14 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
||||
"""
|
||||
Prepare the UI for the process.
|
||||
"""
|
||||
# We start on 2 for plugins status setting plus a "finished" point.
|
||||
max_progress = 2
|
||||
self.max_progress = 0
|
||||
# Loop through the songs list and increase for each selected item
|
||||
for i in xrange(self.songsListWidget.count()):
|
||||
item = self.songsListWidget.item(i)
|
||||
if item.checkState() == QtCore.Qt.Checked:
|
||||
filename = item.data(QtCore.Qt.UserRole).toString()
|
||||
size = self._getFileSize(u'%s%s' % (self.web, filename))
|
||||
max_progress += size
|
||||
self.max_progress += size
|
||||
# Loop through the Bibles list and increase for each selected item
|
||||
iterator = QtGui.QTreeWidgetItemIterator(self.biblesTreeWidget)
|
||||
while iterator.value():
|
||||
@ -216,7 +215,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
||||
if item.parent() and item.checkState(0) == QtCore.Qt.Checked:
|
||||
filename = item.data(0, QtCore.Qt.UserRole).toString()
|
||||
size = self._getFileSize(u'%s%s' % (self.web, filename))
|
||||
max_progress += size
|
||||
self.max_progress += size
|
||||
iterator += 1
|
||||
# Loop through the themes list and increase for each selected item
|
||||
for i in xrange(self.themesListWidget.count()):
|
||||
@ -224,23 +223,40 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
||||
if item.checkState() == QtCore.Qt.Checked:
|
||||
filename = item.data(QtCore.Qt.UserRole).toString()
|
||||
size = self._getFileSize(u'%s%s' % (self.web, filename))
|
||||
max_progress += size
|
||||
self.max_progress += size
|
||||
self.finishButton.setVisible(False)
|
||||
self.progressBar.setValue(0)
|
||||
self.progressBar.setMinimum(0)
|
||||
self.progressBar.setMaximum(max_progress)
|
||||
if self.max_progress:
|
||||
# Add on 2 for plugins status setting plus a "finished" point.
|
||||
self.max_progress = self.max_progress + 2
|
||||
self.progressBar.setValue(0)
|
||||
self.progressBar.setMinimum(0)
|
||||
self.progressBar.setMaximum(self.max_progress)
|
||||
self.progressPage.setTitle(translate('OpenLP.FirstTimeWizard',
|
||||
'Setting Up And Downloading'))
|
||||
self.progressPage.setSubTitle(translate('OpenLP.FirstTimeWizard',
|
||||
'Please wait while OpenLP is set up '
|
||||
'and your data is downloaded.'))
|
||||
else:
|
||||
self.progressBar.setVisible(False)
|
||||
self.progressPage.setTitle(translate('OpenLP.FirstTimeWizard',
|
||||
'Setting Up'))
|
||||
self.progressPage.setSubTitle(u'Setup complete.')
|
||||
|
||||
def _postWizard(self):
|
||||
"""
|
||||
Clean up the UI after the process has finished.
|
||||
"""
|
||||
self.progressBar.setValue(self.progressBar.maximum())
|
||||
if self.max_progress:
|
||||
self.progressBar.setValue(self.progressBar.maximum())
|
||||
self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
|
||||
'Download complete. Click the finish button to start OpenLP.'))
|
||||
else:
|
||||
self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
|
||||
'Click the finish button to start OpenLP.'))
|
||||
self.finishButton.setVisible(True)
|
||||
self.finishButton.setEnabled(True)
|
||||
self.cancelButton.setVisible(False)
|
||||
self.nextButton.setVisible(False)
|
||||
self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
|
||||
'Download complete. Click the finish button to start OpenLP.'))
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
|
||||
def _performWizard(self):
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -254,10 +254,6 @@ class Ui_FirstTimeWizard(object):
|
||||
'Default Settings'))
|
||||
self.defaultsPage.setSubTitle(translate('OpenLP.FirstTimeWizard',
|
||||
'Set up default settings to be used by OpenLP.'))
|
||||
self.progressPage.setTitle(translate('OpenLP.FirstTimeWizard',
|
||||
'Setting Up And Importing'))
|
||||
self.progressPage.setSubTitle(translate('OpenLP.FirstTimeWizard',
|
||||
'Please wait while OpenLP is set up and your data is imported.'))
|
||||
self.displayLabel.setText(translate('OpenLP.FirstTimeWizard',
|
||||
'Default output display:'))
|
||||
self.themeLabel.setText(translate('OpenLP.FirstTimeWizard',
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -49,7 +49,10 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||
This is the display screen.
|
||||
"""
|
||||
def __init__(self, parent, image_manager, live):
|
||||
QtGui.QGraphicsView.__init__(self, parent)
|
||||
if live:
|
||||
QtGui.QGraphicsView.__init__(self)
|
||||
else:
|
||||
QtGui.QGraphicsView.__init__(self, parent)
|
||||
self.isLive = live
|
||||
self.image_manager = image_manager
|
||||
self.screens = ScreenList.get_instance()
|
||||
@ -62,7 +65,8 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||
self.firstTime = True
|
||||
self.setStyleSheet(u'border: 0px; margin: 0px; padding: 0px;')
|
||||
self.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.Tool |
|
||||
QtCore.Qt.WindowStaysOnTopHint)
|
||||
QtCore.Qt.WindowStaysOnTopHint |
|
||||
QtCore.Qt.X11BypassWindowManagerHint)
|
||||
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
|
||||
if self.isLive:
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -27,6 +27,7 @@
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
from tempfile import gettempdir
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
@ -92,6 +93,8 @@ class Ui_MainWindow(object):
|
||||
self.previewController.panel.setVisible(previewVisible)
|
||||
liveVisible = QtCore.QSettings().value(u'user interface/live panel',
|
||||
QtCore.QVariant(True)).toBool()
|
||||
panelLocked = QtCore.QSettings().value(u'user interface/lock panel',
|
||||
QtCore.QVariant(False)).toBool()
|
||||
self.liveController.panel.setVisible(liveVisible)
|
||||
# Create menu
|
||||
self.menuBar = QtGui.QMenuBar(mainWindow)
|
||||
@ -212,11 +215,15 @@ class Ui_MainWindow(object):
|
||||
self.viewLivePanel = shortcut_action(mainWindow, u'viewLivePanel',
|
||||
[QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility,
|
||||
checked=liveVisible, category=UiStrings().View)
|
||||
action_list.add_category(UiStrings().ViewMode, CategoryOrder.standardMenu)
|
||||
self.lockPanel = shortcut_action(mainWindow, u'lockPanel',
|
||||
None, self.setLockPanel,
|
||||
checked=panelLocked, category=None)
|
||||
action_list.add_category(UiStrings().ViewMode,
|
||||
CategoryOrder.standardMenu)
|
||||
self.modeDefaultItem = checkable_action(
|
||||
mainWindow, u'modeDefaultItem', category=UiStrings().ViewMode)
|
||||
self.modeSetupItem = checkable_action(
|
||||
mainWindow, u'modeLiveItem', category=UiStrings().ViewMode)
|
||||
mainWindow, u'modeSetupItem', category=UiStrings().ViewMode)
|
||||
self.modeLiveItem = checkable_action(
|
||||
mainWindow, u'modeLiveItem', True, UiStrings().ViewMode)
|
||||
self.modeGroup = QtGui.QActionGroup(mainWindow)
|
||||
@ -232,7 +239,8 @@ class Ui_MainWindow(object):
|
||||
category=UiStrings().Tools)
|
||||
self.updateThemeImages = base_action(mainWindow,
|
||||
u'updateThemeImages', category=UiStrings().Tools)
|
||||
action_list.add_category(UiStrings().Settings, CategoryOrder.standardMenu)
|
||||
action_list.add_category(UiStrings().Settings,
|
||||
CategoryOrder.standardMenu)
|
||||
self.settingsPluginListItem = shortcut_action(mainWindow,
|
||||
u'settingsPluginListItem', [QtGui.QKeySequence(u'Alt+F7')],
|
||||
self.onPluginItemClicked, u':/system/settings_plugin_list.png',
|
||||
@ -287,14 +295,22 @@ class Ui_MainWindow(object):
|
||||
add_actions(self.viewMenu, (self.viewModeMenu.menuAction(),
|
||||
None, self.viewMediaManagerItem, self.viewServiceManagerItem,
|
||||
self.viewThemeManagerItem, None, self.viewPreviewPanel,
|
||||
self.viewLivePanel))
|
||||
self.viewLivePanel, None, self.lockPanel))
|
||||
# i18n add Language Actions
|
||||
add_actions(self.settingsLanguageMenu, (self.autoLanguageItem, None))
|
||||
add_actions(self.settingsLanguageMenu, self.languageGroup.actions())
|
||||
add_actions(self.settingsMenu, (self.settingsPluginListItem,
|
||||
self.settingsLanguageMenu.menuAction(), None,
|
||||
self.displayTagItem, self.settingsShortcutsItem,
|
||||
self.settingsConfigureItem))
|
||||
# Order things differently in OS X so that Preferences menu item in the
|
||||
# app menu is correct (this gets picked up automatically by Qt).
|
||||
if sys.platform == u'darwin':
|
||||
add_actions(self.settingsMenu, (self.settingsPluginListItem,
|
||||
self.settingsLanguageMenu.menuAction(), None,
|
||||
self.settingsConfigureItem, self.settingsShortcutsItem,
|
||||
self.displayTagItem))
|
||||
else:
|
||||
add_actions(self.settingsMenu, (self.settingsPluginListItem,
|
||||
self.settingsLanguageMenu.menuAction(), None,
|
||||
self.displayTagItem, self.settingsShortcutsItem,
|
||||
self.settingsConfigureItem))
|
||||
add_actions(self.toolsMenu, (self.toolsAddToolItem, None))
|
||||
add_actions(self.toolsMenu, (self.toolsOpenDataFolder, None))
|
||||
add_actions(self.toolsMenu, [self.updateThemeImages])
|
||||
@ -316,6 +332,7 @@ class Ui_MainWindow(object):
|
||||
self.importLanguageItem.setVisible(False)
|
||||
self.exportLanguageItem.setVisible(False)
|
||||
self.helpDocumentationItem.setVisible(False)
|
||||
self.setLockPanel(panelLocked)
|
||||
|
||||
def retranslateUi(self, mainWindow):
|
||||
"""
|
||||
@ -356,9 +373,9 @@ class Ui_MainWindow(object):
|
||||
translate('OpenLP.MainWindow', 'Save Service As'))
|
||||
self.fileSaveAsItem.setStatusTip(translate('OpenLP.MainWindow',
|
||||
'Save the current service under a new name.'))
|
||||
self.printServiceOrderItem.setText(UiStrings().PrintServiceOrder)
|
||||
self.printServiceOrderItem.setText(UiStrings().PrintService)
|
||||
self.printServiceOrderItem.setStatusTip(translate('OpenLP.MainWindow',
|
||||
'Print the current Service Order.'))
|
||||
'Print the current service.'))
|
||||
self.fileExitItem.setText(
|
||||
translate('OpenLP.MainWindow', 'E&xit'))
|
||||
self.fileExitItem.setStatusTip(
|
||||
@ -405,6 +422,10 @@ class Ui_MainWindow(object):
|
||||
translate('OpenLP.MainWindow', '&Live Panel'))
|
||||
self.viewLivePanel.setToolTip(
|
||||
translate('OpenLP.MainWindow', 'Toggle Live Panel'))
|
||||
self.lockPanel.setText(
|
||||
translate('OpenLP.MainWindow', 'L&ock Panels'))
|
||||
self.lockPanel.setStatusTip(
|
||||
translate('OpenLP.MainWindow', 'Prevent the panels being moved.'))
|
||||
self.viewLivePanel.setStatusTip(translate('OpenLP.MainWindow',
|
||||
'Toggle the visibility of the live panel.'))
|
||||
self.settingsPluginListItem.setText(translate('OpenLP.MainWindow',
|
||||
@ -483,7 +504,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
pluginpath = AppLocation.get_directory(AppLocation.PluginsDir)
|
||||
self.pluginManager = PluginManager(pluginpath)
|
||||
self.pluginHelpers = {}
|
||||
self.image_manager = ImageManager()
|
||||
self.imageManager = ImageManager()
|
||||
# Set up the interface
|
||||
self.setupUi(self)
|
||||
# Load settings after setupUi so default UI sizes are overwritten
|
||||
@ -552,7 +573,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
# warning cyclic dependency
|
||||
# renderer needs to call ThemeManager and
|
||||
# ThemeManager needs to call Renderer
|
||||
self.renderer = Renderer(self.image_manager, self.themeManagerContents)
|
||||
self.renderer = Renderer(self.imageManager, self.themeManagerContents)
|
||||
# Define the media Dock Manager
|
||||
self.mediaDockManager = MediaDockManager(self.mediaToolBox)
|
||||
log.info(u'Load Plugins')
|
||||
@ -598,6 +619,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
# Once all components are initialised load the Themes
|
||||
log.info(u'Load Themes')
|
||||
self.themeManagerContents.loadThemes(True)
|
||||
# Hide/show the theme combobox on the service manager
|
||||
self.serviceManagerContents.themeChange()
|
||||
# Reset the cursor
|
||||
Receiver.send_message(u'cursor_normal')
|
||||
|
||||
def setAutoLanguage(self, value):
|
||||
@ -641,7 +665,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
QtCore.QVariant(False)).toBool():
|
||||
self.serviceManagerContents.loadLastFile()
|
||||
view_mode = QtCore.QSettings().value(u'%s/view mode' % \
|
||||
self.generalSettingsSection, u'default')
|
||||
self.generalSettingsSection, u'default').toString()
|
||||
if view_mode == u'default':
|
||||
self.modeDefaultItem.setChecked(True)
|
||||
elif view_mode == u'setup':
|
||||
@ -652,13 +676,14 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.modeLiveItem.setChecked(True)
|
||||
|
||||
def appStartup(self):
|
||||
# Give all the plugins a chance to perform some tasks at startup
|
||||
"""
|
||||
Give all the plugins a chance to perform some tasks at startup
|
||||
"""
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
for plugin in self.pluginManager.plugins:
|
||||
if plugin.isActive():
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
plugin.appStartup()
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
|
||||
def firstTime(self):
|
||||
# Import themes if first time
|
||||
@ -809,7 +834,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
"""
|
||||
log.debug(u'screenChanged')
|
||||
Receiver.send_message(u'cursor_busy')
|
||||
self.image_manager.update_display()
|
||||
self.imageManager.update_display()
|
||||
self.renderer.update_display()
|
||||
self.previewController.screenSizeChanged()
|
||||
self.liveController.screenSizeChanged()
|
||||
@ -923,7 +948,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.mediaManagerDock.setVisible(not self.mediaManagerDock.isVisible())
|
||||
|
||||
def toggleServiceManager(self):
|
||||
self.serviceManagerDock.setVisible(not self.serviceManagerDock.isVisible())
|
||||
self.serviceManagerDock.setVisible(
|
||||
not self.serviceManagerDock.isVisible())
|
||||
|
||||
def toggleThemeManager(self):
|
||||
self.themeManagerDock.setVisible(not self.themeManagerDock.isVisible())
|
||||
@ -943,6 +969,37 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
QtCore.QVariant(visible))
|
||||
self.viewPreviewPanel.setChecked(visible)
|
||||
|
||||
def setLockPanel(self, lock):
|
||||
"""
|
||||
Sets the ability to stop the toolbars being changed.
|
||||
"""
|
||||
if lock:
|
||||
self.themeManagerDock.setFeatures(
|
||||
QtGui.QDockWidget.NoDockWidgetFeatures)
|
||||
self.serviceManagerDock.setFeatures(
|
||||
QtGui.QDockWidget.NoDockWidgetFeatures)
|
||||
self.mediaManagerDock.setFeatures(
|
||||
QtGui.QDockWidget.NoDockWidgetFeatures)
|
||||
self.viewMediaManagerItem.setEnabled(False)
|
||||
self.viewServiceManagerItem.setEnabled(False)
|
||||
self.viewThemeManagerItem.setEnabled(False)
|
||||
self.viewPreviewPanel.setEnabled(False)
|
||||
self.viewLivePanel.setEnabled(False)
|
||||
else:
|
||||
self.themeManagerDock.setFeatures(
|
||||
QtGui.QDockWidget.AllDockWidgetFeatures)
|
||||
self.serviceManagerDock.setFeatures(
|
||||
QtGui.QDockWidget.AllDockWidgetFeatures)
|
||||
self.mediaManagerDock.setFeatures(
|
||||
QtGui.QDockWidget.AllDockWidgetFeatures)
|
||||
self.viewMediaManagerItem.setEnabled(True)
|
||||
self.viewServiceManagerItem.setEnabled(True)
|
||||
self.viewThemeManagerItem.setEnabled(True)
|
||||
self.viewPreviewPanel.setEnabled(True)
|
||||
self.viewLivePanel.setEnabled(True)
|
||||
QtCore.QSettings().setValue(u'user interface/lock panel',
|
||||
QtCore.QVariant(lock))
|
||||
|
||||
def setLivePanelVisibility(self, visible):
|
||||
"""
|
||||
Sets the visibility of the live panel including saving the setting and
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -114,7 +114,7 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||
self._clearDetails()
|
||||
return
|
||||
plugin_name_singular = \
|
||||
self.pluginListWidget.currentItem().text().split(u' ')[0]
|
||||
self.pluginListWidget.currentItem().text().split(u'(')[0][:-1]
|
||||
self.activePlugin = None
|
||||
for plugin in self.parent().pluginManager.plugins:
|
||||
if plugin.nameStrings[u'singular'] == plugin_name_singular:
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -41,11 +41,6 @@ class ZoomSize(object):
|
||||
Fifty = 4
|
||||
TwentyFive = 5
|
||||
|
||||
Sizes = [
|
||||
translate('OpenLP.PrintServiceDialog', 'Fit Page'),
|
||||
translate('OpenLP.PrintServiceDialog', 'Fit Width'),
|
||||
u'100%', u'75%', u'50%', u'25%']
|
||||
|
||||
|
||||
class Ui_PrintServiceDialog(object):
|
||||
def setupUi(self, printServiceDialog):
|
||||
@ -59,18 +54,14 @@ class Ui_PrintServiceDialog(object):
|
||||
self.toolbar.setIconSize(QtCore.QSize(22, 22))
|
||||
self.toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
|
||||
self.printButton = self.toolbar.addAction(
|
||||
build_icon(u':/general/general_print.png'), 'Print')
|
||||
build_icon(u':/general/general_print.png'),
|
||||
translate('OpenLP.PrintServiceForm', 'Print'))
|
||||
self.optionsButton = QtGui.QToolButton(self.toolbar)
|
||||
self.optionsButton.setText(translate('OpenLP.PrintServiceForm',
|
||||
'Options'))
|
||||
self.optionsButton.setToolButtonStyle(
|
||||
QtCore.Qt.ToolButtonTextBesideIcon)
|
||||
self.optionsButton.setIcon(build_icon(u':/system/system_configure.png'))
|
||||
self.optionsButton.setCheckable(True)
|
||||
self.toolbar.addWidget(self.optionsButton)
|
||||
self.closeButton = self.toolbar.addAction(
|
||||
build_icon(u':/system/system_close.png'),
|
||||
translate('OpenLP.PrintServiceForm', 'Close'))
|
||||
self.toolbar.addSeparator()
|
||||
self.plainCopy = self.toolbar.addAction(
|
||||
build_icon(u':/system/system_edit_copy.png'),
|
||||
@ -81,24 +72,18 @@ class Ui_PrintServiceDialog(object):
|
||||
self.toolbar.addSeparator()
|
||||
self.zoomInButton = QtGui.QToolButton(self.toolbar)
|
||||
self.zoomInButton.setIcon(build_icon(u':/general/general_zoom_in.png'))
|
||||
self.zoomInButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||
'Zoom In'))
|
||||
self.zoomInButton.setObjectName(u'zoomInButton')
|
||||
self.zoomInButton.setIconSize(QtCore.QSize(22, 22))
|
||||
self.toolbar.addWidget(self.zoomInButton)
|
||||
self.zoomOutButton = QtGui.QToolButton(self.toolbar)
|
||||
self.zoomOutButton.setIcon(
|
||||
build_icon(u':/general/general_zoom_out.png'))
|
||||
self.zoomOutButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||
'Zoom Out'))
|
||||
self.zoomOutButton.setObjectName(u'zoomOutButton')
|
||||
self.zoomOutButton.setIconSize(QtCore.QSize(22, 22))
|
||||
self.toolbar.addWidget(self.zoomOutButton)
|
||||
self.zoomOriginalButton = QtGui.QToolButton(self.toolbar)
|
||||
self.zoomOriginalButton.setIcon(
|
||||
build_icon(u':/general/general_zoom_original.png'))
|
||||
self.zoomOriginalButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||
'Zoom Original'))
|
||||
self.zoomOriginalButton.setObjectName(u'zoomOriginalButton')
|
||||
self.zoomOriginalButton.setIconSize(QtCore.QSize(22, 22))
|
||||
self.toolbar.addWidget(self.zoomOriginalButton)
|
||||
@ -116,20 +101,17 @@ class Ui_PrintServiceDialog(object):
|
||||
self.optionsLayout.setContentsMargins(8, 8, 8, 8)
|
||||
self.titleLabel = QtGui.QLabel(self.optionsWidget)
|
||||
self.titleLabel.setObjectName(u'titleLabel')
|
||||
self.titleLabel.setText(u'Title:')
|
||||
self.optionsLayout.addWidget(self.titleLabel)
|
||||
self.titleLineEdit = QtGui.QLineEdit(self.optionsWidget)
|
||||
self.titleLineEdit.setObjectName(u'titleLineEdit')
|
||||
self.optionsLayout.addWidget(self.titleLineEdit)
|
||||
self.footerLabel = QtGui.QLabel(self.optionsWidget)
|
||||
self.footerLabel.setObjectName(u'footerLabel')
|
||||
self.footerLabel.setText(u'Custom Footer Text:')
|
||||
self.optionsLayout.addWidget(self.footerLabel)
|
||||
self.footerTextEdit = SpellTextEdit(self.optionsWidget)
|
||||
self.footerTextEdit.setObjectName(u'footerTextEdit')
|
||||
self.optionsLayout.addWidget(self.footerTextEdit)
|
||||
self.optionsGroupBox = QtGui.QGroupBox(
|
||||
translate('OpenLP.PrintServiceForm','Other Options'))
|
||||
self.optionsGroupBox = QtGui.QGroupBox()
|
||||
self.groupLayout = QtGui.QVBoxLayout()
|
||||
self.slideTextCheckBox = QtGui.QCheckBox()
|
||||
self.groupLayout.addWidget(self.slideTextCheckBox)
|
||||
@ -149,7 +131,20 @@ class Ui_PrintServiceDialog(object):
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.toggleOptions)
|
||||
|
||||
def retranslateUi(self, printServiceDialog):
|
||||
printServiceDialog.setWindowTitle(UiStrings().PrintServiceOrder)
|
||||
printServiceDialog.setWindowTitle(UiStrings().PrintService)
|
||||
self.zoomOutButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||
'Zoom Out'))
|
||||
self.zoomOriginalButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||
'Zoom Original'))
|
||||
self.zoomInButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||
'Zoom In'))
|
||||
self.optionsButton.setText(translate('OpenLP.PrintServiceForm',
|
||||
'Options'))
|
||||
self.titleLabel.setText(translate('OpenLP.PrintServiceForm', 'Title:'))
|
||||
self.footerLabel.setText(translate('OpenLP.PrintServiceForm',
|
||||
'Custom Footer Text:'))
|
||||
self.optionsGroupBox.setTitle(
|
||||
translate('OpenLP.PrintServiceForm','Other Options'))
|
||||
self.slideTextCheckBox.setText(translate('OpenLP.PrintServiceForm',
|
||||
'Include slide text if available'))
|
||||
self.pageBreakAfterText.setText(translate('OpenLP.PrintServiceForm',
|
||||
@ -159,11 +154,14 @@ class Ui_PrintServiceDialog(object):
|
||||
self.metaDataCheckBox.setText(translate('OpenLP.PrintServiceForm',
|
||||
'Include play length of media items'))
|
||||
self.titleLineEdit.setText(translate('OpenLP.PrintServiceForm',
|
||||
'Service Order Sheet'))
|
||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Page])
|
||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Width])
|
||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.OneHundred])
|
||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.SeventyFive])
|
||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Fifty])
|
||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.TwentyFive])
|
||||
'Service Sheet'))
|
||||
# Do not change the order.
|
||||
self.zoomComboBox.addItems([
|
||||
translate('OpenLP.PrintServiceDialog', 'Fit Page'),
|
||||
translate('OpenLP.PrintServiceDialog', 'Fit Width'),
|
||||
u'100%',
|
||||
u'75%',
|
||||
u'50%',
|
||||
u'25%']
|
||||
)
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -137,8 +137,6 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
||||
# Signals
|
||||
QtCore.QObject.connect(self.printButton,
|
||||
QtCore.SIGNAL(u'triggered()'), self.printServiceOrder)
|
||||
QtCore.QObject.connect(self.closeButton,
|
||||
QtCore.SIGNAL(u'triggered()'), self.accept)
|
||||
QtCore.QObject.connect(self.zoomOutButton,
|
||||
QtCore.SIGNAL(u'clicked()'), self.zoomOut)
|
||||
QtCore.QObject.connect(self.zoomInButton,
|
||||
@ -326,8 +324,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
||||
"""
|
||||
Copies the display text to the clipboard as plain text
|
||||
"""
|
||||
self.mainWindow.clipboard.setText(
|
||||
self.document.toPlainText())
|
||||
self.mainWindow.clipboard.setText(self.document.toPlainText())
|
||||
|
||||
def copyHtmlText(self):
|
||||
"""
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -629,7 +629,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('OpenLP.ServiceManager', 'Corrupt File'),
|
||||
translate('OpenLP.ServiceManager', 'This file is either '
|
||||
'corrupt or not an OpenLP 2.0 service file.'))
|
||||
'corrupt or it is not an OpenLP 2.0 service file.'))
|
||||
return
|
||||
finally:
|
||||
if fileTo:
|
||||
@ -1077,16 +1077,16 @@ class ServiceManager(QtGui.QWidget):
|
||||
Using the service item passed replace the one with the same edit id
|
||||
if found.
|
||||
"""
|
||||
newItem.render()
|
||||
for itemcount, item in enumerate(self.serviceItems):
|
||||
if item[u'service_item'].edit_id == newItem.edit_id and \
|
||||
item[u'service_item'].name == newItem.name:
|
||||
newItem.render()
|
||||
newItem.merge(item[u'service_item'])
|
||||
item[u'service_item'] = newItem
|
||||
self.repaintServiceList(itemcount + 1, 0)
|
||||
self.mainwindow.liveController.replaceServiceManagerItem(
|
||||
newItem)
|
||||
self.setModified()
|
||||
self.setModified()
|
||||
|
||||
def addServiceItem(self, item, rebuild=False, expand=None, replace=False,
|
||||
repaint=True, selected=False):
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -42,6 +42,10 @@ class ServiceNoteForm(QtGui.QDialog):
|
||||
self.setupUi()
|
||||
self.retranslateUi()
|
||||
|
||||
def exec_(self):
|
||||
self.textEdit.setFocus()
|
||||
return QtGui.QDialog.exec_(self)
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'serviceNoteEdit')
|
||||
self.dialogLayout = QtGui.QVBoxLayout(self)
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -98,6 +98,9 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
||||
if event.modifiers() & QtCore.Qt.ShiftModifier == \
|
||||
QtCore.Qt.ShiftModifier:
|
||||
key_string = u'Shift+' + key_string
|
||||
if event.modifiers() & QtCore.Qt.MetaModifier == \
|
||||
QtCore.Qt.MetaModifier:
|
||||
key_string = u'Meta+' + key_string
|
||||
key_sequence = QtGui.QKeySequence(key_string)
|
||||
if self._validiate_shortcut(self._currentItemAction(), key_sequence):
|
||||
if self.primaryPushButton.isChecked():
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -63,7 +63,7 @@ class SlideController(QtGui.QWidget):
|
||||
self.screens = ScreenList.get_instance()
|
||||
self.ratio = float(self.screens.current[u'size'].width()) / \
|
||||
float(self.screens.current[u'size'].height())
|
||||
self.image_manager = self.parent().image_manager
|
||||
self.imageManager = self.parent().imageManager
|
||||
self.loopList = [
|
||||
u'Play Slides Menu',
|
||||
u'Loop Separator',
|
||||
@ -425,7 +425,7 @@ class SlideController(QtGui.QWidget):
|
||||
# rebuild display as screen size changed
|
||||
if self.display:
|
||||
self.display.close()
|
||||
self.display = MainDisplay(self, self.image_manager, self.isLive)
|
||||
self.display = MainDisplay(self, self.imageManager, self.isLive)
|
||||
self.display.alertTab = self.alertTab
|
||||
self.display.setup()
|
||||
if self.isLive:
|
||||
@ -500,7 +500,9 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
Allows the live toolbar to be customised
|
||||
"""
|
||||
self.toolbar.setVisible(True)
|
||||
# Work-around for OS X, hide and then show the toolbar
|
||||
# See bug #791050
|
||||
self.toolbar.hide()
|
||||
self.mediabar.setVisible(False)
|
||||
self.toolbar.makeWidgetsInvisible([u'Song Menu'])
|
||||
self.toolbar.makeWidgetsInvisible(self.loopList)
|
||||
@ -515,12 +517,18 @@ class SlideController(QtGui.QWidget):
|
||||
if item.is_media():
|
||||
self.toolbar.setVisible(False)
|
||||
self.mediabar.setVisible(True)
|
||||
else:
|
||||
# Work-around for OS X, hide and then show the toolbar
|
||||
# See bug #791050
|
||||
self.toolbar.show()
|
||||
|
||||
def enablePreviewToolBar(self, item):
|
||||
"""
|
||||
Allows the Preview toolbar to be customised
|
||||
"""
|
||||
self.toolbar.setVisible(True)
|
||||
# Work-around for OS X, hide and then show the toolbar
|
||||
# See bug #791050
|
||||
self.toolbar.hide()
|
||||
self.mediabar.setVisible(False)
|
||||
self.toolbar.makeWidgetsInvisible(self.songEditList)
|
||||
if item.is_capable(ItemCapabilities.AllowsEdit) and item.from_plugin:
|
||||
@ -529,6 +537,10 @@ class SlideController(QtGui.QWidget):
|
||||
self.toolbar.setVisible(False)
|
||||
self.mediabar.setVisible(True)
|
||||
self.volumeSlider.setAudioOutput(self.audio)
|
||||
if not item.is_media():
|
||||
# Work-around for OS X, hide and then show the toolbar
|
||||
# See bug #791050
|
||||
self.toolbar.show()
|
||||
|
||||
def refreshServiceItem(self):
|
||||
"""
|
||||
@ -625,15 +637,13 @@ class SlideController(QtGui.QWidget):
|
||||
label.setMargin(4)
|
||||
label.setScaledContents(True)
|
||||
if self.serviceItem.is_command():
|
||||
image = resize_image(frame[u'image'],
|
||||
self.parent().renderer.width,
|
||||
self.parent().renderer.height)
|
||||
image = QtGui.QImage(frame[u'image'])
|
||||
else:
|
||||
# If current slide set background to image
|
||||
if framenumber == slideno:
|
||||
self.serviceItem.bg_image_bytes = \
|
||||
self.image_manager.get_image_bytes(frame[u'title'])
|
||||
image = self.image_manager.get_image(frame[u'title'])
|
||||
self.imageManager.get_image_bytes(frame[u'title'])
|
||||
image = self.imageManager.get_image(frame[u'title'])
|
||||
label.setPixmap(QtGui.QPixmap.fromImage(image))
|
||||
self.previewListWidget.setCellWidget(framenumber, 0, label)
|
||||
slideHeight = width * self.parent().renderer.screen_ratio
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -74,14 +74,14 @@ class StartTimeForm(QtGui.QDialog, Ui_StartTimeDialog):
|
||||
title=translate('OpenLP.StartTimeForm',
|
||||
'Time Validation Error'),
|
||||
message=translate('OpenLP.StartTimeForm',
|
||||
'End time is set after the end of the media item'))
|
||||
'Finish time is set after the end of the media item'))
|
||||
return
|
||||
elif start > end:
|
||||
critical_error_message_box(
|
||||
title=translate('OpenLP.StartTimeForm',
|
||||
'Time Validation Error'),
|
||||
message=translate('OpenLP.StartTimeForm',
|
||||
'Start time is after the End Time of the media item'))
|
||||
'Start time is after the finish time of the media item'))
|
||||
return
|
||||
self.item[u'service_item'].start_time = start
|
||||
self.item[u'service_item'].end_time = end
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -298,7 +298,10 @@ class ThemeManager(QtGui.QWidget):
|
||||
Copies an existing theme to a new name
|
||||
"""
|
||||
item = self.themeListWidget.currentItem()
|
||||
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
oldThemeName = unicode(
|
||||
translate('OpenLP.ThemeManager', 'Copy of %s',
|
||||
'Copy of <theme name>')) % unicode(
|
||||
item.data(QtCore.Qt.UserRole).toString())
|
||||
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
||||
if self.fileRenameForm.exec_(True):
|
||||
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -190,6 +190,14 @@ class OpenLPWizard(QtGui.QWizard):
|
||||
self.preWizard()
|
||||
self.performWizard()
|
||||
self.postWizard()
|
||||
else:
|
||||
self.customPageChanged(pageId)
|
||||
|
||||
def customPageChanged(self, pageId):
|
||||
"""
|
||||
Called when changing to a page other than the progress page
|
||||
"""
|
||||
pass
|
||||
|
||||
def onErrorCopyToButtonClicked(self):
|
||||
"""
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -81,11 +81,11 @@ class BiblePlugin(Plugin):
|
||||
Perform tasks on application starup
|
||||
"""
|
||||
if len(self.manager.old_bible_databases):
|
||||
if QtGui.QMessageBox.information(self.formparent,
|
||||
if QtGui.QMessageBox.information(self.formparent,
|
||||
translate('OpenLP', 'Information'), translate('OpenLP',
|
||||
'Bible format has changed.\nYou have to upgrade your '
|
||||
'existing Bibles.\nShould OpenLP upgrade now?'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
|
||||
'existing Bibles.\nShould OpenLP upgrade now?'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
|
||||
QtGui.QMessageBox.No)) == QtGui.QMessageBox.Yes:
|
||||
self.onToolsUpgradeItemTriggered()
|
||||
|
||||
@ -120,7 +120,7 @@ class BiblePlugin(Plugin):
|
||||
translate('BiblePlugin', '&Upgrade older Bibles'))
|
||||
self.toolsUpgradeItem.setStatusTip(
|
||||
translate('BiblePlugin', 'Upgrade the Bible databases to the '
|
||||
'latest format'))
|
||||
'latest format.'))
|
||||
tools_menu.addAction(self.toolsUpgradeItem)
|
||||
QtCore.QObject.connect(self.toolsUpgradeItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onToolsUpgradeItemTriggered)
|
||||
@ -131,7 +131,7 @@ class BiblePlugin(Plugin):
|
||||
Upgrade older bible databases.
|
||||
"""
|
||||
if not hasattr(self, u'upgrade_wizard'):
|
||||
self.upgrade_wizard = BibleUpgradeForm(self.formparent,
|
||||
self.upgrade_wizard = BibleUpgradeForm(self.formparent,
|
||||
self.manager, self)
|
||||
# If the import was not cancelled then reload.
|
||||
if self.upgrade_wizard.exec_():
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -139,7 +139,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
self.plugin.settingsSection, 1)))
|
||||
if filename:
|
||||
self.backupDirectoryEdit.setText(filename)
|
||||
SettingsManager.set_last_dir(self.plugin.settingsSection,
|
||||
SettingsManager.set_last_dir(self.plugin.settingsSection,
|
||||
filename, 1)
|
||||
|
||||
def onNoBackupCheckBoxToggled(self, checked):
|
||||
@ -211,7 +211,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
self.backupBrowseButton.setIcon(self.openIcon)
|
||||
self.backupBrowseButton.setObjectName(u'BackupBrowseButton')
|
||||
self.backupDirectoryLayout.addWidget(self.backupBrowseButton)
|
||||
self.formLayout.addRow(self.backupDirectoryLabel,
|
||||
self.formLayout.addRow(self.backupDirectoryLabel,
|
||||
self.backupDirectoryLayout)
|
||||
self.backupLayout.addLayout(self.formLayout)
|
||||
self.noBackupCheckBox = QtGui.QCheckBox(self.backupPage)
|
||||
@ -282,7 +282,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
self.verticalWidget[number])
|
||||
versionInfoLabelName = u'versionInfoLabel[%d]' % number
|
||||
self.versionInfoLabel[number].setObjectName(versionInfoLabelName)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
|
||||
QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
@ -304,12 +304,12 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
self.versionNameLabel[number] = QtGui.QLabel(
|
||||
self.formWidget[number])
|
||||
self.versionNameLabel[number].setObjectName(u'VersionNameLabel')
|
||||
self.formLayoutAttention[number].setWidget(0,
|
||||
self.formLayoutAttention[number].setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.versionNameLabel[number])
|
||||
self.versionNameEdit[number] = QtGui.QLineEdit(
|
||||
self.formWidget[number])
|
||||
self.versionNameEdit[number].setObjectName(u'VersionNameEdit')
|
||||
self.formLayoutAttention[number].setWidget(0,
|
||||
self.formLayoutAttention[number].setWidget(0,
|
||||
QtGui.QFormLayout.FieldRole, self.versionNameEdit[number])
|
||||
self.versionNameEdit[number].setText(bible.get_name())
|
||||
self.formLayout.addWidget(self.formWidget[number])
|
||||
@ -346,13 +346,13 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
self.versionNameEdit[number].setParent(None)
|
||||
self.formLayout.removeWidget(self.formWidget[number])
|
||||
self.formWidget[number].setParent(None)
|
||||
self.formLayout.removeItem(self.spacerItem)
|
||||
self.formLayout.removeItem(self.spacerItem)
|
||||
|
||||
def retranslateUi(self):
|
||||
"""
|
||||
Allow for localisation of the bible import wizard.
|
||||
"""
|
||||
self.setWindowTitle(translate('BiblesPlugin.UpgradeWizardForm',
|
||||
self.setWindowTitle(translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'Bible Upgrade Wizard'))
|
||||
self.titleLabel.setText(WizardStrings.HeaderStyle %
|
||||
translate('OpenLP.Ui', 'Welcome to the Bible Upgrade Wizard'))
|
||||
@ -379,7 +379,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
self.backupDirectoryLabel.setText(
|
||||
translate('BiblesPlugin.UpgradeWizardForm', 'Backup Directory:'))
|
||||
self.noBackupCheckBox.setText(
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'There is no need to backup my Bibles'))
|
||||
self.selectPage.setTitle(
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
@ -423,8 +423,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'The backup was not successful.\nTo backup your '
|
||||
'Bibles you need permission to write to the given '
|
||||
'directory. If you have write permissions and this '
|
||||
'error still occurs, please report a bug.'))
|
||||
'directory.'))
|
||||
return False
|
||||
return True
|
||||
elif self.currentPage() == self.selectPage:
|
||||
@ -440,7 +439,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
return False
|
||||
elif self.manager.exists(version_name):
|
||||
critical_error_message_box(
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'Bible Exists'),
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'This Bible already exists. Please upgrade '
|
||||
@ -451,15 +450,15 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
elif os.path.exists(os.path.join(self.path, clean_filename(
|
||||
version_name))) and version_name == filename[1]:
|
||||
newfilename = u'old_database_%s' % filename[0]
|
||||
if not os.path.exists(os.path.join(self.path,
|
||||
if not os.path.exists(os.path.join(self.path,
|
||||
newfilename)):
|
||||
os.rename(os.path.join(self.path, filename[0]),
|
||||
os.rename(os.path.join(self.path, filename[0]),
|
||||
os.path.join(self.path, newfilename))
|
||||
self.files[number] = [newfilename, filename[1]]
|
||||
continue
|
||||
else:
|
||||
critical_error_message_box(
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'Bible Exists'),
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'This Bible already exists. Please upgrade '
|
||||
@ -469,10 +468,10 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
self.formWidget[number].show()
|
||||
self.versionNameEdit[number].setFocus()
|
||||
return False
|
||||
elif os.path.exists(os.path.join(self.path,
|
||||
elif os.path.exists(os.path.join(self.path,
|
||||
clean_filename(version_name))):
|
||||
critical_error_message_box(
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'Bible Exists'),
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'This Bible already exists. Please upgrade '
|
||||
@ -521,7 +520,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
OpenLPWizard.preWizard(self)
|
||||
self.progressLabel.setText(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Starting upgrading Bible(s)...'))
|
||||
'Starting Bible upgrade...'))
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
|
||||
def performWizard(self):
|
||||
@ -550,21 +549,21 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
if not self.checkBox[biblenumber].checkState() == QtCore.Qt.Checked:
|
||||
continue
|
||||
self.progressBar.reset()
|
||||
oldbible = OldBibleDB(self.mediaItem, path=self.path,
|
||||
oldbible = OldBibleDB(self.mediaItem, path=self.path,
|
||||
file=filename[0])
|
||||
name = filename[1]
|
||||
if name is None:
|
||||
delete_file(os.path.join(self.path, filename[0]))
|
||||
self.incrementProgressBar(unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
(number + 1, self.maxBibles, name),
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
(number + 1, self.maxBibles, name),
|
||||
self.progressBar.maximum() - self.progressBar.value())
|
||||
number += 1
|
||||
continue
|
||||
self.progressLabel.setText(unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nUpgrading ...')) %
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nUpgrading ...')) %
|
||||
(number + 1, self.maxBibles, name))
|
||||
if os.path.exists(os.path.join(self.path, filename[0])):
|
||||
name = unicode(self.versionNameEdit[biblenumber].text())
|
||||
@ -596,26 +595,25 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
if not books:
|
||||
log.error(u'Upgrading books from %s - download '\
|
||||
u'name: "%s" failed' % (
|
||||
meta_data[u'download source'],
|
||||
meta_data[u'download source'],
|
||||
meta_data[u'download name']))
|
||||
delete_database(self.path, clean_filename(name))
|
||||
delete_database(self.path, clean_filename(name))
|
||||
del self.newbibles[number]
|
||||
critical_error_message_box(
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'Download Error'),
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
translate('BiblesPlugin.UpgradeWizardForm',
|
||||
'To upgrade your Web Bibles an Internet connection is '
|
||||
'required. If you have a working Internet connection '
|
||||
'and this error still occurs, please report a bug.'))
|
||||
'required.'))
|
||||
self.incrementProgressBar(unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
(number + 1, self.maxBibles, name),
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
(number + 1, self.maxBibles, name),
|
||||
self.progressBar.maximum() - self.progressBar.value())
|
||||
number += 1
|
||||
continue
|
||||
bible = BiblesResourcesDB.get_webbible(
|
||||
meta_data[u'download name'],
|
||||
meta_data[u'download name'],
|
||||
meta_data[u'download source'].lower())
|
||||
if bible and bible[u'language_id']:
|
||||
language_id = bible[u'language_id']
|
||||
@ -628,8 +626,8 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
delete_database(self.path, clean_filename(name))
|
||||
del self.newbibles[number]
|
||||
self.incrementProgressBar(unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
(number + 1, self.maxBibles, name),
|
||||
self.progressBar.maximum() - self.progressBar.value())
|
||||
number += 1
|
||||
@ -640,23 +638,23 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
bible_failed = True
|
||||
break
|
||||
self.incrementProgressBar(unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\n'
|
||||
'Upgrading %s ...')) %
|
||||
'Upgrading %s ...')) %
|
||||
(number + 1, self.maxBibles, name, book))
|
||||
book_ref_id = self.newbibles[number].\
|
||||
get_book_ref_id_by_name(book, len(books), language_id)
|
||||
if not book_ref_id:
|
||||
log.warn(u'Upgrading books from %s - download '\
|
||||
u'name: "%s" aborted by user' % (
|
||||
meta_data[u'download source'],
|
||||
meta_data[u'download source'],
|
||||
meta_data[u'download name']))
|
||||
delete_database(self.path, clean_filename(name))
|
||||
del self.newbibles[number]
|
||||
bible_failed = True
|
||||
break
|
||||
book_details = BiblesResourcesDB.get_book_by_id(book_ref_id)
|
||||
db_book = self.newbibles[number].create_book(book,
|
||||
db_book = self.newbibles[number].create_book(book,
|
||||
book_ref_id, book_details[u'testament_id'])
|
||||
# Try to import still downloaded verses
|
||||
oldbook = oldbible.get_book(book)
|
||||
@ -670,8 +668,8 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
if self.stop_import_flag:
|
||||
bible_failed = True
|
||||
break
|
||||
self.newbibles[number].create_verse(db_book.id,
|
||||
int(verse[u'chapter']),
|
||||
self.newbibles[number].create_verse(db_book.id,
|
||||
int(verse[u'chapter']),
|
||||
int(verse[u'verse']), unicode(verse[u'text']))
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
self.newbibles[number].session.commit()
|
||||
@ -685,9 +683,9 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
delete_database(self.path, clean_filename(name))
|
||||
del self.newbibles[number]
|
||||
self.incrementProgressBar(unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
(number + 1, self.maxBibles, name),
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
(number + 1, self.maxBibles, name),
|
||||
self.progressBar.maximum() - self.progressBar.value())
|
||||
number += 1
|
||||
continue
|
||||
@ -698,12 +696,12 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
bible_failed = True
|
||||
break
|
||||
self.incrementProgressBar(unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\n'
|
||||
'Upgrading %s ...')) %
|
||||
'Upgrading %s ...')) %
|
||||
(number + 1, self.maxBibles, name, book[u'name']))
|
||||
book_ref_id = self.newbibles[number].\
|
||||
get_book_ref_id_by_name(book[u'name'], len(books),
|
||||
get_book_ref_id_by_name(book[u'name'], len(books),
|
||||
language_id)
|
||||
if not book_ref_id:
|
||||
log.warn(u'Upgrading books from %s " '\
|
||||
@ -725,25 +723,26 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
if self.stop_import_flag:
|
||||
bible_failed = True
|
||||
break
|
||||
self.newbibles[number].create_verse(db_book.id,
|
||||
int(verse[u'chapter']),
|
||||
self.newbibles[number].create_verse(db_book.id,
|
||||
int(verse[u'chapter']),
|
||||
int(verse[u'verse']), unicode(verse[u'text']))
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
self.newbibles[number].session.commit()
|
||||
if not bible_failed:
|
||||
self.newbibles[number].create_meta(u'Version', name)
|
||||
oldbible.close_connection()
|
||||
delete_file(os.path.join(self.path, filename[0]))
|
||||
self.incrementProgressBar(unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\n'
|
||||
'Done')) %
|
||||
'Complete')) %
|
||||
(number + 1, self.maxBibles, name))
|
||||
self.success[biblenumber] = True
|
||||
else:
|
||||
self.incrementProgressBar(unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
(number + 1, self.maxBibles, name),
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'Upgrading Bible %s of %s: "%s"\nFailed')) %
|
||||
(number + 1, self.maxBibles, name),
|
||||
self.progressBar.maximum() - self.progressBar.value())
|
||||
delete_database(self.path, clean_filename(name))
|
||||
number += 1
|
||||
@ -761,7 +760,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
failed_import += 1
|
||||
if failed_import > 0:
|
||||
failed_import_text = unicode(translate(
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
'BiblesPlugin.UpgradeWizardForm',
|
||||
', %s failed')) % failed_import
|
||||
else:
|
||||
failed_import_text = u''
|
||||
@ -769,14 +768,14 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
if self.include_webbible:
|
||||
self.progressLabel.setText(unicode(
|
||||
translate('BiblesPlugin.UpgradeWizardForm', 'Upgrading '
|
||||
'Bible(s): %s successful%s\nPlease note, that verses from '
|
||||
'Web Bibles will be downloaded\non demand and so an '
|
||||
'Internet connection is required.')) %
|
||||
'Bible(s): %s successful%s\nPlease note that verses from '
|
||||
'Web Bibles will be downloaded on demand and so an '
|
||||
'Internet connection is required.')) %
|
||||
(successful_import, failed_import_text))
|
||||
else:
|
||||
self.progressLabel.setText(unicode(
|
||||
translate('BiblesPlugin.UpgradeWizardForm', 'Upgrading '
|
||||
'Bible(s): %s successful%s')) % (successful_import,
|
||||
'Bible(s): %s successful%s')) % (successful_import,
|
||||
failed_import_text))
|
||||
else:
|
||||
self.progressLabel.setText(
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -1101,3 +1101,7 @@ class OldBibleDB(QtCore.QObject, Manager):
|
||||
]
|
||||
else:
|
||||
return None
|
||||
|
||||
def close_connection(self):
|
||||
self.cursor.close()
|
||||
self.connection.close()
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -695,7 +695,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('BiblePlugin.MediaItem', 'Information'),
|
||||
unicode(translate('BiblePlugin.MediaItem',
|
||||
'The second Bibles does not contain all the verses '
|
||||
'The second Bible does not contain all the verses '
|
||||
'that are in the main Bible. Only verses found in both '
|
||||
'Bibles will be shown. %d verses have not been '
|
||||
'included in the results.')) % count,
|
||||
@ -984,7 +984,6 @@ class BibleMediaItem(MediaManagerItem):
|
||||
"""
|
||||
bible = unicode(self.quickVersionComboBox.currentText())
|
||||
search_results = self.plugin.manager.get_verses(bible, string, False, False)
|
||||
results = []
|
||||
if search_results:
|
||||
versetext = u' '.join([verse.text for verse in search_results])
|
||||
return [[string, versetext]]
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
@ -54,11 +54,11 @@ class CustomPlugin(Plugin):
|
||||
self.icon = build_icon(self.icon_path)
|
||||
|
||||
def about(self):
|
||||
about_text = translate('CustomPlugin', '<strong>Custom Plugin</strong>'
|
||||
'<br />The custom plugin provides the ability to set up custom '
|
||||
'text slides that can be displayed on the screen the same way '
|
||||
'songs are. This plugin provides greater freedom over the songs '
|
||||
'plugin.')
|
||||
about_text = translate('CustomPlugin', '<strong>Custom Slide Plugin'
|
||||
'</strong><br />The custom slide plugin provides the ability to '
|
||||
'set up custom text slides that can be displayed on the screen '
|
||||
'the same way songs are. This plugin provides greater freedom '
|
||||
'over the songs plugin.')
|
||||
return about_text
|
||||
|
||||
def usesTheme(self, theme):
|
||||
@ -95,27 +95,31 @@ class CustomPlugin(Plugin):
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('CustomsPlugin', 'Custom', 'name singular'),
|
||||
u'plural': translate('CustomsPlugin', 'Customs', 'name plural')
|
||||
u'singular': translate('CustomPlugin', 'Custom Slide',
|
||||
'name singular'),
|
||||
u'plural': translate('CustomPlugin', 'Custom Slides',
|
||||
'name plural')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('CustomsPlugin', 'Custom', 'container title')
|
||||
u'title': translate('CustomPlugin', 'Custom Slides',
|
||||
'container title')
|
||||
}
|
||||
# Middle Header Bar
|
||||
tooltips = {
|
||||
u'load': translate('CustomsPlugin', 'Load a new Custom.'),
|
||||
u'import': translate('CustomsPlugin', 'Import a Custom.'),
|
||||
u'new': translate('CustomsPlugin', 'Add a new Custom.'),
|
||||
u'edit': translate('CustomsPlugin', 'Edit the selected Custom.'),
|
||||
u'delete': translate('CustomsPlugin',
|
||||
'Delete the selected Custom.'),
|
||||
u'preview': translate('CustomsPlugin',
|
||||
'Preview the selected Custom.'),
|
||||
u'live': translate('CustomsPlugin',
|
||||
'Send the selected Custom live.'),
|
||||
u'service': translate('CustomsPlugin',
|
||||
'Add the selected Custom to the service.')
|
||||
u'load': translate('CustomPlugin', 'Load a new custom slide.'),
|
||||
u'import': translate('CustomPlugin', 'Import a custom slide.'),
|
||||
u'new': translate('CustomPlugin', 'Add a new custom slide.'),
|
||||
u'edit': translate('CustomPlugin',
|
||||
'Edit the selected custom slide.'),
|
||||
u'delete': translate('CustomPlugin',
|
||||
'Delete the selected custom slide.'),
|
||||
u'preview': translate('CustomPlugin',
|
||||
'Preview the selected custom slide.'),
|
||||
u'live': translate('CustomPlugin',
|
||||
'Send the selected custom slide live.'),
|
||||
u'service': translate('CustomPlugin',
|
||||
'Add the selected custom slide to the service.')
|
||||
}
|
||||
self.setPluginUiTextStrings(tooltips)
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -8,8 +8,8 @@
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
|
||||
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user