forked from openlp/openlp
Whitespace, linewrap and spelling fixes
This commit is contained in:
parent
d1139653c5
commit
cd3fe8b38f
@ -49,14 +49,15 @@ class ListWithPreviews(QtCore.QAbstractListModel):
|
||||
if preview is not None:
|
||||
w = self.maximagewidth;
|
||||
h = self.rowheight
|
||||
preview = preview.scaled(w, h, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
preview = preview.scaled(w, h, QtCore.Qt.KeepAspectRatio,
|
||||
QtCore.Qt.SmoothTransformation)
|
||||
realw = preview.width();
|
||||
realh = preview.height()
|
||||
# and move it to the centre of the preview space
|
||||
p = QtGui.QImage(w, h, QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
p.fill(QtCore.Qt.transparent)
|
||||
painter = QtGui.QPainter(p)
|
||||
painter.drawImage((w-realw) / 2 , (h-realh) / 2, preview)
|
||||
painter.drawImage((w-realw) / 2, (h-realh) / 2, preview)
|
||||
else:
|
||||
w = self.maximagewidth;
|
||||
h = self.rowheight
|
||||
@ -91,7 +92,8 @@ class ListWithPreviews(QtCore.QAbstractListModel):
|
||||
def data(self, index, role):
|
||||
row = index.row()
|
||||
if row > len(self.items):
|
||||
# if the last row is selected and deleted, we then get called with an empty row!
|
||||
# If the last row is selected and deleted, we then get called
|
||||
# with an empty row!
|
||||
return QtCore.QVariant()
|
||||
if role == QtCore.Qt.DisplayRole:
|
||||
retval = self.items[row][2]
|
||||
|
@ -132,7 +132,7 @@ class PluginConfig(object):
|
||||
list_count = 0
|
||||
list = []
|
||||
if list_count > 0:
|
||||
for counter in range(0 , list_count):
|
||||
for counter in range(0, list_count):
|
||||
item = unicode(self.get_config(u'%s %d' % (name, counter)))
|
||||
list.append(item)
|
||||
return list
|
||||
|
@ -96,17 +96,20 @@ class Renderer(object):
|
||||
preview = QtGui.QImage(self._bg_image_filename)
|
||||
width = self._frame.width()
|
||||
height = self._frame.height()
|
||||
preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio,
|
||||
QtCore.Qt.SmoothTransformation)
|
||||
realwidth = preview.width()
|
||||
realheight = preview.height()
|
||||
# and move it to the centre of the preview space
|
||||
self.bg_image = QtGui.QImage(width, height, QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
self.bg_image = QtGui.QImage(width, height,
|
||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
self.bg_image.fill(QtCore.Qt.black)
|
||||
painter = QtGui.QPainter()
|
||||
painter.begin(self.bg_image)
|
||||
self.background_offsetx = (width - realwidth) / 2
|
||||
self.background_offsety = (height - realheight) / 2
|
||||
painter.drawImage(self.background_offsetx, self.background_offsety, preview)
|
||||
painter.drawImage(self.background_offsetx, self.background_offsety,
|
||||
preview)
|
||||
painter.end()
|
||||
|
||||
def set_frame_dest(self, frame_width, frame_height, preview=False):
|
||||
@ -124,7 +127,8 @@ class Renderer(object):
|
||||
"""
|
||||
if preview == True:
|
||||
self._bg_frame = None
|
||||
log.debug(u'set frame dest (frame) w %d h %d', frame_width, frame_height)
|
||||
log.debug(u'set frame dest (frame) w %d h %d', frame_width,
|
||||
frame_height)
|
||||
self._frame = QtGui.QImage(frame_width, frame_height,
|
||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
if self._bg_image_filename is not None and self.bg_image is None:
|
||||
@ -174,12 +178,12 @@ class Renderer(object):
|
||||
split_lines = []
|
||||
count = 0
|
||||
for line in text:
|
||||
#print "C", line , len(line)
|
||||
#print "C", line, len(line)
|
||||
#Must be a blank line so keep it.
|
||||
if len(line) == 0:
|
||||
line = u' '
|
||||
while len(line) > 0:
|
||||
# print "C1", line , len(line)
|
||||
# print "C1", line, len(line)
|
||||
if len(line) > ave_line_width:
|
||||
pos = line.find(u' ', ave_line_width)
|
||||
split_text = line[:pos]
|
||||
@ -272,25 +276,30 @@ class Renderer(object):
|
||||
painter.fillRect(self._frame.rect(), QtCore.Qt.transparent)
|
||||
else:
|
||||
if self._theme.background_type == u'solid':
|
||||
painter.fillRect(self._frame.rect(), QtGui.QColor(self._theme.background_color))
|
||||
painter.fillRect(self._frame.rect(),
|
||||
QtGui.QColor(self._theme.background_color))
|
||||
elif self._theme.background_type == u'gradient':
|
||||
# gradient
|
||||
gradient = None
|
||||
if self._theme.background_direction == u'horizontal':
|
||||
w = int(self._frame.width()) / 2
|
||||
# vertical
|
||||
gradient = QtGui.QLinearGradient(w, 0, w, self._frame.height())
|
||||
gradient = QtGui.QLinearGradient(w, 0, w,
|
||||
self._frame.height())
|
||||
elif self._theme.background_direction == u'vertical':
|
||||
h = int(self._frame.height()) / 2
|
||||
# Horizontal
|
||||
gradient = QtGui.QLinearGradient(0, h, self._frame.width(), h)
|
||||
gradient = QtGui.QLinearGradient(0, h, self._frame.width(),
|
||||
h)
|
||||
else:
|
||||
w = int(self._frame.width()) / 2
|
||||
h = int(self._frame.height()) / 2
|
||||
# Circular
|
||||
gradient = QtGui.QRadialGradient(w, h, w)
|
||||
gradient.setColorAt(0, QtGui.QColor(self._theme.background_startColor))
|
||||
gradient.setColorAt(1, QtGui.QColor(self._theme.background_endColor))
|
||||
gradient.setColorAt(0,
|
||||
QtGui.QColor(self._theme.background_startColor))
|
||||
gradient.setColorAt(1,
|
||||
QtGui.QColor(self._theme.background_endColor))
|
||||
painter.setBrush(QtGui.QBrush(gradient))
|
||||
rectPath = QtGui.QPainterPath()
|
||||
max_x = self._frame.width()
|
||||
@ -305,10 +314,10 @@ class Renderer(object):
|
||||
# image
|
||||
painter.fillRect(self._frame.rect(), QtCore.Qt.black)
|
||||
if self.bg_image is not None:
|
||||
painter.drawImage(0 ,0 , self.bg_image)
|
||||
painter.drawImage(0, 0, self.bg_image)
|
||||
painter.end()
|
||||
self._bg_frame_small = self._bg_frame.scaled(QtCore.QSize(280, 210), QtCore.Qt.KeepAspectRatio,
|
||||
QtCore.Qt.SmoothTransformation)
|
||||
self._bg_frame_small = self._bg_frame.scaled(QtCore.QSize(280, 210),
|
||||
QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
log.debug(u'render background End')
|
||||
|
||||
def _correctAlignment(self, rect, bbox):
|
||||
@ -335,7 +344,8 @@ class Renderer(object):
|
||||
log.error(u'Invalid value for theme.VerticalAlign:%s' % self._theme.display_verticalAlign)
|
||||
return x, y
|
||||
|
||||
def _render_lines_unaligned(self, lines, footer, tlcorner=(0, 0), live=False):
|
||||
def _render_lines_unaligned(self, lines, footer, tlcorner=(0, 0),
|
||||
live=False):
|
||||
"""
|
||||
Given a list of lines to render, render each one in turn (using the
|
||||
``_render_single_line`` fn - which may result in going off the bottom).
|
||||
@ -362,7 +372,8 @@ class Renderer(object):
|
||||
for line in lines:
|
||||
# render after current bottom, but at original left edge
|
||||
# keep track of right edge to see which is biggest
|
||||
(thisx, bry) = self._render_and_wrap_single_line(line, footer, (x, bry), live)
|
||||
(thisx, bry) = self._render_and_wrap_single_line(line, footer,
|
||||
(x, bry), live)
|
||||
if (thisx > brx):
|
||||
brx = thisx
|
||||
retval = QtCore.QRect(x, y, brx - x, bry - y)
|
||||
@ -374,7 +385,8 @@ class Renderer(object):
|
||||
painter.end()
|
||||
return retval
|
||||
|
||||
def _render_and_wrap_single_line(self, line, footer, tlcorner=(0, 0), live=False):
|
||||
def _render_and_wrap_single_line(self, line, footer, tlcorner=(0, 0),
|
||||
live=False):
|
||||
"""
|
||||
Render a single line of words onto the DC, top left corner specified.
|
||||
If the line is too wide for the context, it wraps, but right-aligns
|
||||
@ -414,7 +426,8 @@ class Renderer(object):
|
||||
for linenum in range(len(lines)):
|
||||
line = lines[linenum]
|
||||
#find out how wide line is
|
||||
w , h = self._get_extent_and_render(line, footer, tlcorner=(x, y), draw=False)
|
||||
w, h = self._get_extent_and_render(line, footer, tlcorner=(x, y),
|
||||
draw=False)
|
||||
if self._theme.display_shadow:
|
||||
w += shadow_offset
|
||||
h += shadow_offset
|
||||
@ -427,7 +440,8 @@ class Renderer(object):
|
||||
rightextent = x + w
|
||||
# shift right from last line's rh edge
|
||||
if self._theme.display_wrapStyle == 1 and linenum != 0:
|
||||
rightextent = self._first_line_right_extent + self._right_margin
|
||||
rightextent = self._first_line_right_extent +
|
||||
self._right_margin
|
||||
if rightextent > maxx:
|
||||
rightextent = maxx
|
||||
x = rightextent - w
|
||||
@ -442,27 +456,41 @@ class Renderer(object):
|
||||
if live:
|
||||
# now draw the text, and any outlines/shadows
|
||||
if self._theme.display_shadow:
|
||||
self._get_extent_and_render(line, footer, tlcorner=(x + shadow_offset, y + shadow_offset),
|
||||
self._get_extent_and_render(line, footer,
|
||||
tlcorner=(x + shadow_offset, y + shadow_offset),
|
||||
draw=True, color = self._theme.display_shadow_color)
|
||||
if self._theme.display_outline:
|
||||
self._get_extent_and_render(line, footer, (x+self._outline_offset,y), draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer, (x, y+self._outline_offset), draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer, (x, y-self._outline_offset), draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer, (x-self._outline_offset,y), draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer,
|
||||
(x+self._outline_offset, y), draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer,
|
||||
(x, y+self._outline_offset), draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer,
|
||||
(x, y-self._outline_offset), draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer,
|
||||
(x-self._outline_offset, y), draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
if self._outline_offset > 1:
|
||||
self._get_extent_and_render(line, footer, (x+self._outline_offset,y+self._outline_offset), draw=True,
|
||||
self._get_extent_and_render(line, footer,
|
||||
(x+self._outline_offset, y+self._outline_offset),
|
||||
draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer, (x-self._outline_offset,y+self._outline_offset), draw=True,
|
||||
self._get_extent_and_render(line, footer,
|
||||
(x-self._outline_offset, y+self._outline_offset),
|
||||
draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer, (x+self._outline_offset,y-self._outline_offset), draw=True,
|
||||
self._get_extent_and_render(line, footer,
|
||||
(x+self._outline_offset, y-self._outline_offset),
|
||||
draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer, (x-self._outline_offset,y-self._outline_offset), draw=True,
|
||||
self._get_extent_and_render(line, footer,
|
||||
(x-self._outline_offset, y-self._outline_offset),
|
||||
draw=True,
|
||||
color = self._theme.display_outline_color)
|
||||
self._get_extent_and_render(line, footer,tlcorner=(x, y), draw=True)
|
||||
self._get_extent_and_render(line, footer,tlcorner=(x, y),
|
||||
draw=True)
|
||||
y += h
|
||||
if linenum == 0:
|
||||
self._first_line_right_extent = rightextent
|
||||
@ -471,9 +499,9 @@ class Renderer(object):
|
||||
painter = QtGui.QPainter()
|
||||
painter.begin(self._frame)
|
||||
painter.setPen(QtGui.QPen(QtGui.QColor(0,255,0)))
|
||||
painter.drawRect(startx , starty , rightextent-startx , y-starty)
|
||||
painter.drawRect(startx, starty, rightextent-startx, y-starty)
|
||||
painter.end()
|
||||
brcorner = (rightextent , y)
|
||||
brcorner = (rightextent, y)
|
||||
return brcorner
|
||||
|
||||
def _set_theme_font(self):
|
||||
@ -497,7 +525,8 @@ class Renderer(object):
|
||||
self._theme.font_main_italics)# italic
|
||||
self.mainFont.setPixelSize(int(self._theme.font_main_proportion))
|
||||
|
||||
def _get_extent_and_render(self, line, footer, tlcorner=(0, 0), draw=False, color=None):
|
||||
def _get_extent_and_render(self, line, footer, tlcorner=(0, 0), draw=False,
|
||||
color=None):
|
||||
"""
|
||||
Find bounding box of text - as render_single_line. If draw is set,
|
||||
actually draw the text to the current DC as well return width and
|
||||
@ -538,7 +567,7 @@ class Renderer(object):
|
||||
w = metrics.width(line)
|
||||
h = metrics.height() - 2
|
||||
if draw:
|
||||
painter.drawText(x, y + metrics.ascent() , line)
|
||||
painter.drawText(x, y + metrics.ascent(), line)
|
||||
painter.end()
|
||||
return (w, h)
|
||||
|
||||
|
@ -142,15 +142,19 @@ class RenderManager(object):
|
||||
main_rect = None
|
||||
footer_rect = None
|
||||
if theme.font_main_override == False:
|
||||
main_rect = QtCore.QRect(10,0, self.width - 1, self.footer_start - 20)
|
||||
main_rect = QtCore.QRect(10, 0, self.width - 1,
|
||||
self.footer_start - 20)
|
||||
else:
|
||||
main_rect = QtCore.QRect(int(theme.font_main_x) , int(theme.font_main_y),
|
||||
int(theme.font_main_width)-1, int(theme.font_main_height) - 1)
|
||||
main_rect = QtCore.QRect(int(theme.font_main_x),
|
||||
int(theme.font_main_y), int(theme.font_main_width)-1,
|
||||
int(theme.font_main_height) - 1)
|
||||
if theme.font_footer_override == False:
|
||||
footer_rect = QtCore.QRect(10,self.footer_start, self.width - 1, self.height-self.footer_start)
|
||||
footer_rect = QtCore.QRect(10,self.footer_start, self.width - 1,
|
||||
self.height-self.footer_start)
|
||||
else:
|
||||
footer_rect = QtCore.QRect(int(theme.font_footer_x),int(theme.font_footer_y),
|
||||
int(theme.font_footer_width)-1, int(theme.font_footer_height) - 1)
|
||||
footer_rect = QtCore.QRect(int(theme.font_footer_x),
|
||||
int(theme.font_footer_y), int(theme.font_footer_width)-1,
|
||||
int(theme.font_footer_height) - 1)
|
||||
self.renderer.set_text_rectangle(main_rect, footer_rect)
|
||||
|
||||
def generate_preview(self, themedata):
|
||||
@ -215,14 +219,15 @@ class RenderManager(object):
|
||||
preview = QtGui.QImage(image)
|
||||
w = self.width
|
||||
h = self.height
|
||||
preview = preview.scaled(w, h, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
preview = preview.scaled(w, h, QtCore.Qt.KeepAspectRatio,
|
||||
QtCore.Qt.SmoothTransformation)
|
||||
realw = preview.width();
|
||||
realh = preview.height()
|
||||
# and move it to the centre of the preview space
|
||||
newImage = QtGui.QImage(w, h, QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
newImage.fill(QtCore.Qt.transparent)
|
||||
painter = QtGui.QPainter(newImage)
|
||||
painter.drawImage((w-realw) / 2 , (h-realh) / 2, preview)
|
||||
painter.drawImage((w-realw) / 2, (h-realh) / 2, preview)
|
||||
return newImage
|
||||
|
||||
def calculate_default(self, screen):
|
||||
|
@ -92,13 +92,16 @@ class ServiceItem(object):
|
||||
for slide in self.service_frames:
|
||||
formated = self.RenderManager.format_slide(slide[u'raw_slide'])
|
||||
for format in formated:
|
||||
frame = self.RenderManager.generate_slide(format, self.raw_footer)
|
||||
self.frames.append({u'title': slide[u'title'], u'image': frame})
|
||||
frame = self.RenderManager.generate_slide(format,
|
||||
self.raw_footer)
|
||||
self.frames.append({u'title': slide[u'title'],
|
||||
u'image': frame})
|
||||
elif self.service_item_type == ServiceType.Command:
|
||||
self.frames = self.service_frames
|
||||
elif self.service_item_type == ServiceType.Image:
|
||||
for slide in self.service_frames:
|
||||
slide[u'image'] = self.RenderManager.resize_image(slide[u'image'])
|
||||
slide[u'image'] =
|
||||
self.RenderManager.resize_image(slide[u'image'])
|
||||
self.frames = self.service_frames
|
||||
else:
|
||||
log.error(u'Invalid value renderer :%s' % self.service_item_type)
|
||||
@ -132,9 +135,10 @@ class ServiceItem(object):
|
||||
"""
|
||||
self.service_item_type = ServiceType.Text
|
||||
frame_title = frame_title.split(u'\n')[0]
|
||||
self.service_frames.append({u'title': frame_title, u'raw_slide': raw_slide})
|
||||
self.service_frames.append({u'title': frame_title,
|
||||
u'raw_slide': raw_slide})
|
||||
|
||||
def add_from_command(self, path , frame_title):
|
||||
def add_from_command(self, path, frame_title):
|
||||
"""
|
||||
Add a slide from a command.
|
||||
|
||||
|
@ -340,9 +340,10 @@ class ThemeXML(object):
|
||||
for e in element.attrib.iteritems():
|
||||
if master == u'font_' and e[0] == u'type':
|
||||
master += e[1] + u'_'
|
||||
elif master == u'display_' and (element.tag == u'shadow' or element.tag == u'outline'):
|
||||
elif master == u'display_' and (element.tag == u'shadow' or
|
||||
element.tag == u'outline'):
|
||||
et = str_to_bool(element.text)
|
||||
setattr(self, master + element.tag , et)
|
||||
setattr(self, master + element.tag, et)
|
||||
setattr(self, master + element.tag + u'_'+ e[0], e[1])
|
||||
else:
|
||||
field = master + e[0]
|
||||
|
@ -64,10 +64,10 @@ class ServiceManagerList(QtGui.QTreeWidget):
|
||||
event.ignore()
|
||||
|
||||
class Iter(QtGui.QTreeWidgetItemIterator):
|
||||
def __init__(self, *args):
|
||||
def __init__(self, *args):
|
||||
QtGui.QTreeWidgetItemIterator.__init__(self, *args)
|
||||
|
||||
def next(self):
|
||||
def next(self):
|
||||
self.__iadd__(1)
|
||||
value = self.value()
|
||||
if value:
|
||||
@ -99,12 +99,15 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.Layout.setMargin(0)
|
||||
# Create the top toolbar
|
||||
self.Toolbar = OpenLPToolbar(self)
|
||||
self.Toolbar.addToolbarButton(u'New Service', u':/services/service_new.png',
|
||||
translate(u'ServiceManager', u'Create a new Service'), self.onNewService)
|
||||
self.Toolbar.addToolbarButton(u'Open Service', u':/services/service_open.png',
|
||||
translate(u'ServiceManager', u'Load Existing'), self.onLoadService)
|
||||
self.Toolbar.addToolbarButton(u'Save Service', u':/services/service_save.png',
|
||||
translate(u'ServiceManager', u'Save Service'), self.onSaveService)
|
||||
self.Toolbar.addToolbarButton(u'New Service',
|
||||
u':/services/service_new.png', translate(u'ServiceManager',
|
||||
u'Create a new Service'), self.onNewService)
|
||||
self.Toolbar.addToolbarButton(u'Open Service',
|
||||
u':/services/service_open.png', translate(u'ServiceManager',
|
||||
u'Load Existing'), self.onLoadService)
|
||||
self.Toolbar.addToolbarButton(u'Save Service',
|
||||
u':/services/service_save.png', translate(u'ServiceManager',
|
||||
u'Save Service'), self.onSaveService)
|
||||
self.Toolbar.addSeparator()
|
||||
self.ThemeComboBox = QtGui.QComboBox(self.Toolbar)
|
||||
self.ThemeComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
|
||||
@ -250,7 +253,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
temp = self.serviceItems[item]
|
||||
self.serviceItems.remove(self.serviceItems[item])
|
||||
self.serviceItems.insert(item - 1, temp)
|
||||
self.repaintServiceList(item - 1 , count)
|
||||
self.repaintServiceList(item - 1, count)
|
||||
self.parent.OosChanged(False, self.serviceName)
|
||||
|
||||
def onServiceDown(self):
|
||||
@ -263,7 +266,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
temp = self.serviceItems[item]
|
||||
self.serviceItems.remove(self.serviceItems[item])
|
||||
self.serviceItems.insert(item + 1, temp)
|
||||
self.repaintServiceList(item + 1 , count)
|
||||
self.repaintServiceList(item + 1, count)
|
||||
self.parent.OosChanged(False, self.serviceName)
|
||||
|
||||
def onServiceEnd(self):
|
||||
@ -315,13 +318,15 @@ class ServiceManager(QtGui.QWidget):
|
||||
treewidgetitem = QtGui.QTreeWidgetItem(self.ServiceManagerList)
|
||||
treewidgetitem.setText(0,serviceitem.title)
|
||||
treewidgetitem.setIcon(0,serviceitem.iconic_representation)
|
||||
treewidgetitem.setData(0, QtCore.Qt.UserRole, QtCore.QVariant(item[u'order']))
|
||||
treewidgetitem.setData(0, QtCore.Qt.UserRole,
|
||||
QtCore.QVariant(item[u'order']))
|
||||
treewidgetitem.setExpanded(item[u'expanded'])
|
||||
for count , frame in enumerate(serviceitem.frames):
|
||||
for count, frame in enumerate(serviceitem.frames):
|
||||
treewidgetitem1 = QtGui.QTreeWidgetItem(treewidgetitem)
|
||||
text = frame[u'title']
|
||||
treewidgetitem1.setText(0,text[:40])
|
||||
treewidgetitem1.setData(0, QtCore.Qt.UserRole,QtCore.QVariant(count))
|
||||
treewidgetitem1.setData(0, QtCore.Qt.UserRole,
|
||||
QtCore.QVariant(count))
|
||||
if serviceItem == itemcount and serviceItemCount == count:
|
||||
self.ServiceManagerList.setCurrentItem(treewidgetitem1)
|
||||
|
||||
@ -330,7 +335,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
Save the current service in a zip file
|
||||
This file contains
|
||||
* An ood which is a pickle of the service items
|
||||
* All image , presentation and video files needed to run the service.
|
||||
* All image, presentation and video files needed to run the service.
|
||||
"""
|
||||
filename = QtGui.QFileDialog.getSaveFileName(self, u'Save Order of Service',self.config.get_last_dir() )
|
||||
filename = unicode(filename)
|
||||
|
@ -105,9 +105,9 @@ class ThemesTab(SettingsTab):
|
||||
self.SongLevelRadioButton.setText(translate(u'ThemesTab', u'Song level'))
|
||||
self.SongLevelLabel.setText(translate(u'ThemesTab', u'Use the theme from each song in the database. If a song doesn\'t have a theme associated with it, then use the service\'s theme. If the service doesn\'t have a theme, then use the global theme.'))
|
||||
self.ServiceLevelRadioButton.setText(translate(u'ThemesTab', u'Service level'))
|
||||
self.ServiceLevelLabel.setText(translate(u'ThemesTab', u'Use the theme from the service , overriding any of the individual songs\' themes. If the service doesn\'t have a theme, then use the global theme.'))
|
||||
self.ServiceLevelLabel.setText(translate(u'ThemesTab', u'Use the theme from the service, overriding any of the individual songs\' themes. If the service doesn\'t have a theme, then use the global theme.'))
|
||||
self.GlobalLevelRadioButton.setText(translate(u'ThemesTab', u'Global level'))
|
||||
self.GlobalLevelLabel.setText(translate(u'ThemesTab', u'Use the global theme, overriding any themes associated wither either the service or the songs.'))
|
||||
self.GlobalLevelLabel.setText(translate(u'ThemesTab', u'Use the global theme, overriding any themes associated with either the service or the songs.'))
|
||||
|
||||
def load(self):
|
||||
self.global_style = self.config.get_config(u'theme global style', u'Global')
|
||||
|
@ -24,7 +24,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Working_with_Presentations
|
||||
# http://mail.python.org/pipermail/python-win32/2008-January/006676.html
|
||||
|
||||
import os , subprocess
|
||||
import os
|
||||
import subprocess
|
||||
import time
|
||||
import uno
|
||||
|
||||
|
@ -28,7 +28,7 @@ def sendData(options, message):
|
||||
try:
|
||||
UDPSock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
|
||||
UDPSock.sendto(message, addr)
|
||||
print u'message sent ', message , addr
|
||||
print u'message sent ', message, addr
|
||||
except:
|
||||
print u'Errow thrown ', sys.exc_info()[1]
|
||||
|
||||
|
@ -350,7 +350,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
|
||||
def accept(self):
|
||||
log.debug(u'accept')
|
||||
valid , message = self._validate_song()
|
||||
valid, message = self._validate_song()
|
||||
if not valid:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate(u'SongFormDialog', u'Error'), message,
|
||||
|
@ -305,7 +305,7 @@
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="ServiceLevelLabel">
|
||||
<property name="text">
|
||||
<string>Use the theme from the service , overriding any of the individual songs' themes. If the service doesn't have a theme, then use the global theme.</string>
|
||||
<string>Use the theme from the service, overriding any of the individual songs' themes. If the service doesn't have a theme, then use the global theme.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@ -325,7 +325,7 @@
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="GlobalLevelLabel">
|
||||
<property name="text">
|
||||
<string>Use the global theme, overriding any themes associated wither either the service or the songs.</string>
|
||||
<string>Use the global theme, overriding any themes associated with either the service or the songs.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
Loading…
Reference in New Issue
Block a user