← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/servicing into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/servicing into lp:openlp.

Requested reviews:
    openlp.org Core (openlp-core)

Fixes and New features
Renderer Page splits and ServiceItem is happy with that
fix PresentationTab (missing)
Add Alerts 
Add GeneralTab saving of settings.
Add GeneralTab to Screen Selection code.
-- 
https://code.launchpad.net/~trb143/openlp/servicing/+merge/6981
Your team openlp.org Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py	2009-05-30 18:44:16 +0000
+++ openlp/core/lib/renderer.py	2009-06-02 16:25:36 +0000
@@ -29,7 +29,7 @@
 class Renderer:
 
     global log
-    log=logging.getLogger(u'Renderer')
+    log = logging.getLogger(u'Renderer')
     log.info(u'Renderer Loaded')
     """All the functions for rendering a set of words onto a Device Context
 
@@ -44,7 +44,7 @@
     def __init__(self):
         self._rect = None
         self._debug = 0
-        self.words = None
+        #self.words = None
         self._right_margin = 64 # the amount of right indent
         self._shadow_offset = 5
         self._outline_offset = 2
@@ -103,38 +103,68 @@
         if self._bg_image_filename is not None:
             self.scale_bg_image()
         if self._bg_frame is None:
-            self._render_background()
+            self._generate_background_frame()
 
     def format_slide(self, words, footer):
         """
         External API to sort out the text to pe placed on the frame
         """
+        #print "########## Format Slide ##################"
         log.debug(u'format_slide %s', words)
         verses = []
-        words=words.replace("\r\n", "\n")
+        words = words.replace("\r\n", "\n")
         verses_text = words.split(u'\n\n')
+        text = []
         for verse in verses_text:
             lines = verse.split(u'\n')
-            verses.append(self.split_set_of_lines(lines, footer)[0])
-        self.words = verses
-        verses_text = []
-        for v in verses:
-            verses_text.append(u'\n'.join(v).lstrip()) # remove first \n
-        return verses_text
-
-    def render_screen(self, screennum):
-        log.debug(u'render screen\n %s %s ', screennum, self.words[screennum])
-        t = 0.0
-        words = self.words[screennum]
-        retval = self._render_lines(words)
-        return retval
+            for line in lines:
+                text.append(line)
+
+        split_text = self._split_set_of_lines(text, False)
+        #print "split text ", split_text
+        #print "text ", text
+        return split_text
+
+#    def render_screen(self, screennum):
+#        log.debug(u'render screen\n %s %s ', screennum, self.words[screennum])
+#        t = 0.0
+#        words = self.words[screennum]
+#        retval = self._render_lines(words)
+#        return retval
 
     def set_text_rectangle(self, rect_main, rect_footer):
-        """ Sets the rectangle within which text should be rendered"""
+        """
+        Sets the rectangle within which text should be rendered
+        """
         self._rect = rect_main
         self._rect_footer = rect_footer
 
-    def _render_background(self):
+    def generate_frame_from_lines(self, lines, footer_lines=None):
+        """
+        Render a set of lines according to the theme, return bounding box
+         """
+        #print "########## Generate frame from lines ##################"
+        log.debug(u'generate_frame_from_lines - Start')
+
+        #print "Render Lines ", lines
+
+        bbox = self._render_lines_unaligned(lines, False)
+        if footer_lines is not None:
+            bbox1 = self._render_lines_unaligned(footer_lines, True)
+
+        # reset the frame. first time do not worrk about what you paint on.
+        self._frame = QtGui.QPixmap(self._bg_frame)
+
+        x, y = self._correctAlignment(self._rect, bbox)
+        bbox = self._render_lines_unaligned(lines, False,  (x, y))
+
+        if footer_lines is not None:
+            bbox = self._render_lines_unaligned(footer_lines, True, (self._rect_footer.left(), self._rect_footer.top()) )
+        log.debug(u'generate_frame_from_lines - Finish')
+
+        return self._frame
+
+    def _generate_background_frame(self):
         """
         Generate a background frame to the same size as the frame to be used
         Results cached for performance reasons.
@@ -150,14 +180,14 @@
         elif self._theme.background_type == u'gradient' : # gradient
             gradient = None
             if self._theme.background_direction == u'horizontal':
-                w = int(self._frame.width())/2
+                w = int(self._frame.width()) / 2
                 gradient = QtGui.QLinearGradient(w, 0, w, self._frame.height()) # vertical
             elif self._theme.background_direction == u'vertical':
-                h = int(self._frame.height())/2
+                h = int(self._frame.height()) / 2
                 gradient = QtGui.QLinearGradient(0, h, self._frame.width(), h)   # Horizontal
             else:
-                w = int(self._frame.width())/2
-                h = int(self._frame.height())/2
+                w = int(self._frame.width()) / 2
+                h = int(self._frame.height()) / 2
                 gradient = QtGui.QRadialGradient(w, h, w) # Circular
 
             gradient.setColorAt(0, QtGui.QColor(self._theme.background_startColor))
@@ -177,10 +207,7 @@
             painter.drawPath(rectPath)
 
         elif self._theme.background_type== u'image': # image
-            #r = self._frame.rect()
-            #log.debug(u'Image size details %d %d %d %d ', r.x(), r.y(), r.width(),r.height())
             if self.bg_image is not None:
-                #painter.drawPixmap(self.background_offsetx,self.background_offsety, self.bg_image)
                 painter.drawPixmap(0 ,0 , self.bg_image)
             else:
                 painter.fillRect(self._frame.rect(), QtGui.QColor(u'#000000'))
@@ -189,69 +216,82 @@
         print "background time", bef, aft, aft-bef
         log.debug(u'render background finish')
 
-    def split_set_of_lines(self, lines, footer):
-
-        """Given a list of lines, decide how to split them best if they don't all fit on the screen
+    def _split_set_of_lines(self, lines, footer):
+        """
+        Given a list of lines, decide how to split them best if they don't all fit on the screen
          - this is done by splitting at 1/2, 1/3 or 1/4 of the set
          If it doesn't fit, even at this size, just split at each opportunity
 
          We'll do this by getting the bounding box of each line, and then summing them appropriately
          Returns a list of [lists of lines], one set for each screenful
          """
-        log.debug(u'Split set of lines')
         bboxes = []
+        #print "lines ",  lines
+
         for line in lines:
-            bboxes.append(self._render_single_line(line, footer))
-            #print line,  bboxes
+            bboxes.append(self._render_and_wrap_single_line(line, footer))
+        #print "bboxes ", bboxes
 
         numlines = len(lines)
         bottom = self._rect.bottom()
-        #for ratio in (numlines): #, numlines/2, numlines/3, numlines/4):
-        ratio = numlines
-        good = 1
-        startline = 0
-        endline = startline + ratio
-        while (endline <= numlines):
-            by = 0
-            for (x, y) in bboxes[startline:endline]:
-                by += y
-                #print by
-            #print by , bottom
-            if by > bottom:
-                good=0
+
+        count = 0
+
+        for ratio in (numlines,  numlines/2, numlines/3, numlines/4):
+            good = 1
+            startline = 0
+            endline = startline + ratio
+            while (endline <= numlines and endline != 0):
+                count += 1
+                if count > 100:
+                    #print "busted"
+                    break
+                by = 0
+                for (x,y) in bboxes[startline:endline]:
+                    #print by, startline, endline, x, y, bottom
+                    by += y
+                #print "by ", by ,  bottom, startline,  endline, numlines, ratio
+                if by > bottom:
+                    good = 0
+                    break
+                startline += ratio
+                endline = startline + ratio
+            if good == 1:
                 break
-            startline += ratio
-            endline = startline+ratio
-#        if good == 1:
-#            break
-        #print "---------"
 
         retval = []
         numlines_per_page = ratio
+        #print "good ", good, ratio
         if good:
             c = 0
             thislines = []
             while c < numlines:
                 thislines.append(lines[c])
                 c += 1
+                #print "c ", c, len(thislines), numlines_per_page, thislines
                 if len(thislines) == numlines_per_page:
                     retval.append(thislines)
                     thislines = []
+            if len(thislines) > 0:
+                retval.append(thislines)
+            #print "extra ", thislines
         else:
-#             log.debug(u" "Just split where you can"
+#             print "Just split where you can"
             retval = []
             startline = 0
-            endline = startline+1
+            endline = startline + 1
             while (endline <= numlines):
                 by = 0
-                for (x, y) in bboxes[startline:endline]:
+                for (x,y) in bboxes[startline:endline]:
                     by += y
                 if by > bottom:
                     retval.append(lines[startline:endline-1])
                     startline = endline-1
-                    endline = startline # gets incremented below
+                    # gets incremented below
+                    endline = startline
                     by = 0
                 endline += 1
+        #print "retval ", retval
         return retval
 
     def _correctAlignment(self, rect, bbox):
@@ -259,32 +299,13 @@
         if int(self._theme.display_verticalAlign) == 0: # top align
             y = rect.top()
         elif int(self._theme.display_verticalAlign) == 2: # bottom align
-            y = rect.bottom()-bbox.height()
+            y = rect.bottom() - bbox.height()
         elif int(self._theme.display_verticalAlign) == 1: # centre align
-            y = rect.top()+(rect.height()-bbox.height())/2
+            y = rect.top() + (rect.height() - bbox.height()) / 2
         else:
-            assert(0, u'Invalid value for theme.VerticalAlign:%s' % self._theme.display_verticalAlign)
+            assert(0 , u'Invalid value for theme.VerticalAlign:%s' % self._theme.display_verticalAlign)
         return x, y
 
-    def render_lines(self, lines, footer_lines=None):
-        """render a set of lines according to the theme, return bounding box"""
-        log.debug(u'render_lines - Start')
-
-        bbox = self._render_lines_unaligned(lines, False) # Main font
-        if footer_lines is not None:
-            bbox1 = self._render_lines_unaligned(footer_lines, True) # Footer Font
-
-        self._frame = QtGui.QPixmap(self._bg_frame)
-
-        x, y = self._correctAlignment(self._rect, bbox)
-        bbox = self._render_lines_unaligned(lines, False,  (x, y))
-
-        if footer_lines is not None:
-            bbox = self._render_lines_unaligned(footer_lines, True, (self._rect_footer.left(), self._rect_footer.top()) )
-        log.debug(u'render_lines- Finish')
-
-        return self._frame
-
     def _render_lines_unaligned(self, lines,  footer,  tlcorner=(0,0)):
         """
         Given a list of lines to render, render each one in turn
@@ -301,7 +322,7 @@
         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_single_line(line, footer, (x , bry))
+            (thisx, bry) = self._render_and_wrap_single_line(line, footer, (x , bry))
             if (thisx > brx):
                 brx = thisx
         retval = QtCore.QRect(x, y,brx-x, bry-y)
@@ -314,7 +335,7 @@
         log.debug(u'render lines unaligned Finish')
         return  retval
 
-    def _render_single_line(self, line, footer, tlcorner=(0,0)):
+    def _render_and_wrap_single_line(self, line, footer, tlcorner=(0,0)):
         """
         Render a single line of words onto the DC, top left corner
         specified.
@@ -335,10 +356,10 @@
         lines = []
         maxx = self._rect.width();
         maxy = self._rect.height();
-        while (len(words)>0):
+        while (len(words) > 0):
             w , h = self._get_extent_and_render(thisline, footer)
             rhs = w + x
-            if rhs < maxx-self._right_margin:
+            if rhs < maxx - self._right_margin:
                 lines.append(thisline)
                 words = words[lastword:]
                 thisline = ' '.join(words)
@@ -373,10 +394,10 @@
                     x = rightextent - w
             elif align == 1: # right align
                 rightextent = maxx
-                x = maxx-w
+                x = maxx - w
             elif align == 2: # centre
-                x = (maxx-w) / 2;
-                rightextent = x+w
+                x = (maxx - w) / 2;
+                rightextent = x + w
             # now draw the text, and any outlines/shadows
             if self._theme.display_shadow:
                 self._get_extent_and_render(line, footer,tlcorner=(x+self._shadow_offset,y+self._shadow_offset),
@@ -441,7 +462,6 @@
                          QtGui.QFont.Normal, # weight
                          0)# italic
             font.setPixelSize(int(self._theme.font_main_proportion))
-        #log.debug(u'Font details %s %s %s %d', self._theme.font_main_name, self._theme.font_main_proportion,  font.family(), font.pointSize())
         painter.setFont(font)
         if color == None:
             if footer:
@@ -454,9 +474,9 @@
         metrics=QtGui.QFontMetrics(font)
         # xxx some fudges to make it exactly like wx!  Take 'em out later
         w = metrics.width(line)
-        h = metrics.height()-2
+        h = metrics.height() - 2
         if draw:
-            painter.drawText(x, y+metrics.height()-metrics.descent()-1, line)
+            painter.drawText(x, y + metrics.ascent() , line)
         painter.end()
         return (w, h)
 

=== modified file 'openlp/core/lib/rendermanager.py'
--- openlp/core/lib/rendermanager.py	2009-05-22 18:30:25 +0000
+++ openlp/core/lib/rendermanager.py	2009-06-01 17:50:37 +0000
@@ -136,10 +136,9 @@
         lines1.append(u'Amazing Grace (John Newton)' )
         lines1.append(u'Public Domain')
         lines1.append(u'CCLI xxx')
-        return self.renderer.render_lines(lines, lines1)
-
-
-    def format_slide(self, words, footer):
+        return self.renderer.generate_frame_from_lines(lines, lines1)
+
+    def format_slide(self, words):
         log.debug(u'format slide')
         self.calculate_default(self.screen_list[self.current_display]['size'])
         self.build_text_rectangle(self.themedata)
@@ -151,7 +150,7 @@
         self.calculate_default(self.screen_list[self.current_display]['size'])
         self.build_text_rectangle(self.themedata)
         self.renderer.set_frame_dest(self.width, self.height)
-        return self.renderer.render_lines(main_text, footer_text)
+        return self.renderer.generate_frame_from_lines(main_text, footer_text)
 
     def calculate_default(self, screen):
         log.debug(u'calculate default %s' , screen)

=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2009-05-22 18:30:25 +0000
+++ openlp/core/lib/serviceitem.py	2009-06-02 16:25:36 +0000
@@ -58,15 +58,17 @@
         """
         log.debug(u'Render called')
         if self.theme == None:
-            self.render_manager.set_override_theme(None)
+            self.plugin.render_manager.set_override_theme(None)
         else:
-            self.render_manager.set_override_theme(self.theme)
+            self.plugin.render_manager.set_override_theme(self.theme)
         log.debug(u'Formatting slides')
         if len(self.frames) == 0 and len(self.raw_slides) > 0 :
             for slide in self.raw_slides:
-                formated = self.render_manager.format_slide(slide, False)
-                frame = self.render_manager.generate_slide(formated, self.raw_footer)
-                self.frames.append({u'title': formated, u'image': frame})
+                formated = self.plugin.render_manager.format_slide(slide)
+                #print formated
+                for format in formated:
+                    frame = self.plugin.render_manager.generate_slide(format, self.raw_footer)
+                    self.frames.append({u'title': format, u'image': frame})
         else:
             if len(self.command_files) > 0:
                 pass

=== modified file 'openlp/core/ui/alertform.py'
--- openlp/core/ui/alertform.py	2009-05-20 20:17:20 +0000
+++ openlp/core/ui/alertform.py	2009-06-01 17:50:37 +0000
@@ -18,17 +18,19 @@
 Place, Suite 330, Boston, MA 02111-1307 USA
 """
 import logging
+
 from PyQt4 import QtCore, QtGui
 from openlp.core.lib import translate
 
 class AlertForm(QtGui.QDialog):
     global log
-    log=logging.getLogger(u'AlertForm')
+    log = logging.getLogger(u'AlertForm')
 
     def __init__(self, parent=None):
-        QtGui.QDialog.__init__(self, parent)
+        QtGui.QDialog.__init__(self, None)
+        self.parent = parent
         self.setupUi(self)
-        log.info(u'Defined')
+        log.debug(u'Defined')
 
     def setupUi(self, AlertForm):
         AlertForm.setObjectName("AlertForm")
@@ -92,7 +94,6 @@
         self.DisplayButton.setText(translate("AlertForm", u'Display'))
         self.CancelButton.setText(translate("AlertForm", u'Cancel'))
 
-
     def load_settings(self):
         pass
 
@@ -100,4 +101,4 @@
         pass
 
     def onDisplayClicked(self):
-        pass
+        self.parent.mainDisplay.alert(self.parent.settingsForm.AlertsTab, self.AlertEntryEditItem.text())

=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py	2009-05-20 20:17:20 +0000
+++ openlp/core/ui/generaltab.py	2009-06-01 17:50:37 +0000
@@ -20,7 +20,7 @@
 
 from PyQt4 import QtCore, QtGui
 
-from openlp.core.lib import SettingsTab,  translate
+from openlp.core.lib import SettingsTab,  translate,  str_to_bool
 
 class GeneralTab(SettingsTab):
     """
@@ -113,6 +113,19 @@
             QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
         self.GeneralRightLayout.addItem(self.GeneralRightSpacer)
         self.GeneralLayout.addWidget(self.GeneralRightWidget)
+        QtCore.QObject.connect(self.MonitorComboBox,
+            QtCore.SIGNAL("activated(int)"), self.onMonitorComboBoxChanged)
+        QtCore.QObject.connect(self.WarningCheckBox,
+            QtCore.SIGNAL("stateChanged(int)"), self.onWarningCheckBoxChanged)
+        QtCore.QObject.connect(self.AutoOpenCheckBox,
+            QtCore.SIGNAL("stateChanged(int)"), self.onAutoOpenCheckBoxChanged)
+        QtCore.QObject.connect(self.NumberEdit,
+            QtCore.SIGNAL("lostFocus()"), self.onNumberEditLostFocus)
+        QtCore.QObject.connect(self.UsernameEdit,
+            QtCore.SIGNAL("lostFocus()"), self.onUsernameEditLostFocus)
+        QtCore.QObject.connect(self.PasswordEdit,
+            QtCore.SIGNAL("lostFocus()"), self.onPasswordEditLostFocus)
+
 
     def retranslateUi(self):
         self.MonitorGroupBox.setTitle(translate(u'GeneralTab', u'Monitors'))
@@ -126,7 +139,29 @@
         self.UsernameLabel.setText(translate(u'GeneralTab', u'SongSelect Username:'))
         self.PasswordLabel.setText(translate(u'GeneralTab', u'SongSelect Password:'))
 
-    def initialise(self):
+    def onMonitorComboBoxChanged(self):
+        self.MonitorNumber = self.MonitorComboBox.currentIndex()
+
+    def onAutoOpenCheckBoxChanged(self, value):
+        self.AutoOpen = False
+        if value == 2: # we have a set value convert to True/False
+            self.AutoOpen = True
+
+    def onWarningCheckBoxChanged(self, value):
+        self.Warning = False
+        if value == 2: # we have a set value convert to True/False
+            self.Warning = True
+
+    def onNumberEditLostFocus(self):
+        self.CCLNumber = self.NumberEdit.displayText()
+
+    def onUsernameEditLostFocus(self):
+        self.Username = self.UsernameEdit.displayText()
+
+    def onPasswordEditLostFocus(self):
+        self.Password = self.PasswordEdit.displayText()
+
+    def load(self):
         for screen in self.screen_list:
             screen_name = translate(u'GeneralTab', u'Screen') + u' ' + \
                 str(screen['number'] + 1)
@@ -134,3 +169,25 @@
                 screen_name = screen_name + u' (' + \
                     translate(u'GeneralTab', u'primary') + u')'
             self.MonitorComboBox.addItem(screen_name)
+
+        self.MonitorNumber = int(self.config.get_config(u'Monitor', u'0'))
+        self.Warning = str_to_bool(self.config.get_config(u'Warning', u"False"))
+        self.AutoOpen = str_to_bool(self.config.get_config(u'Auto Open', u"False"))
+        self.CCLNumber = str(self.config.get_config('CCL Number', u'XXX'))
+        self.Username = str(self.config.get_config('User Name', u''))
+        self.Password = str(self.config.get_config('Password', u''))
+
+        self.MonitorComboBox.setCurrentIndex(self.MonitorNumber)
+        self.WarningCheckBox.setChecked(self.Warning)
+        self.AutoOpenCheckBox.setChecked(self.AutoOpen)
+        self.NumberEdit.setText(self.CCLNumber)
+        self.UsernameEdit.setText(self.Username)
+        self.PasswordEdit.setText(self.Password)
+
+    def save(self):
+        self.config.set_config(u'Monitor',str(self.MonitorNumber))
+        self.config.set_config(u'Warning', str(self.Warning))
+        self.config.set_config(u'Auto Open', str(self.AutoOpen))
+        self.config.set_config('CCL Number', str(self.CCLNumber))
+        self.config.set_config('User Name',str(self.Username))
+        self.config.set_config('Password', str(self.Password ))

=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2009-05-20 20:17:20 +0000
+++ openlp/core/ui/maindisplay.py	2009-06-01 17:50:37 +0000
@@ -18,8 +18,9 @@
 Place, Suite 330, Boston, MA 02111-1307 USA
 """
 
-from PyQt4 import QtCore, QtGui
+from PyQt4 import QtCore, QtGui, QtTest
 
+from time import sleep
 from openlp.core.lib import translate
 
 class MainDisplay(QtGui.QWidget):
@@ -32,6 +33,9 @@
         self.display.setScaledContents(True)
         self.displayBlank = False
         self.blankFrame= None
+        self.alertactive = False
+        self.alerttext = u''
+        self.alertTab = None
 
     def setup(self, screenNumber):
         """
@@ -55,19 +59,55 @@
             self.showMinimized()
 
         painter=QtGui.QPainter()
-        self.blankFrame = QtGui.QPixmap(800, 600)
+        self.blankFrame = QtGui.QPixmap(screen['size'].width(), screen['size'].height())
         painter.begin(self.blankFrame)
         painter.fillRect(self.blankFrame.rect(), QtGui.QColor(u'#000000'))
+        self.frameView(self.blankFrame)
 
     def frameView(self, frame):
         self.frame = frame
-        if self.displayBlank == False:
+        if not self.displayBlank:
             self.display.setPixmap(frame)
+        elif self.alertactive:
+            self.displayAlert()
 
     def blankDisplay(self):
-        if self.displayBlank == False:
+        if not self.displayBlank:
             self.displayBlank = True
             self.display.setPixmap(self.blankFrame)
         else:
             self.displayBlank = False
             self.frameView(self.frame)
+
+    def alert(self, alertTab, text):
+        """
+        Called from the Alert Tab
+        alertTab = details from AlertTab
+        text = display text
+        screen = screen number to be displayed on.
+        """
+        self.alerttext = text
+        self.alertTab = alertTab
+        if len(text) > 0:
+            self.alertactive = True
+            self.displayAlert()
+            self.alertactive = False
+
+    def displayAlert(self):
+        alertframe = QtGui.QPixmap(self.frame)
+        painter = QtGui.QPainter(alertframe)
+        top = alertframe.rect().height() * 0.9
+        painter.fillRect(QtCore.QRect(0, top , alertframe.rect().width(), alertframe.rect().height() - top), QtGui.QColor(self.alertTab.bg_color))
+        font = QtGui.QFont()
+        font.setFamily(self.alertTab.font_face)
+        font.setBold(True)
+        font.setPointSize(40)
+        painter.setFont(font)
+        painter.setPen(QtGui.QColor(self.alertTab.font_color))
+        x, y = (0, top)
+        metrics=QtGui.QFontMetrics(font)
+        painter.drawText(x, y+metrics.height()-metrics.descent()-1, self.alerttext)
+        painter.end()
+        self.display.setPixmap(alertframe)
+        QtTest.QTest.qWait(self.alertTab.timeout*1000)
+        self.display.setPixmap(self.frame)

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2009-06-01 19:47:05 +0000
+++ openlp/core/ui/mainwindow.py	2009-06-02 16:25:36 +0000
@@ -40,7 +40,7 @@
         self.mainDisplay = MainDisplay(None, screens)
         self.screenList = screens
         self.EventManager = EventManager()
-        self.alertForm = AlertForm()
+        self.alertForm = AlertForm(self)
         self.aboutForm = AboutForm()
         self.settingsForm = SettingsForm(self.screenList, self)
 
@@ -88,26 +88,9 @@
         self.plugin_manager.initialise_plugins()
 
         # Once all components are initialised load the Themes
-        log.info(u'Load Themes and Managers')
-        self.PreviewController.ServiceManager = self.ServiceManagerContents
-        self.LiveController.ServiceManager = self.ServiceManagerContents
-
-        self.ThemeManagerContents.EventManager = self.EventManager
-        self.ThemeManagerContents.RenderManager = self.RenderManager
-        self.ThemeManagerContents.ServiceManager = self.ServiceManagerContents
-        #self.ThemeManagerContents.ThemesTab = self.ServiceManagerContents.ThemesTab
-
-        self.ServiceManagerContents.RenderManager = self.RenderManager
-        self.ServiceManagerContents.EventManager = self.EventManager
-        self.ServiceManagerContents.LiveController = self.LiveController
-        self.ServiceManagerContents.PreviewController = self.PreviewController
-
+        log.info(u'Load Themes')
         self.ThemeManagerContents.loadThemes()
 
-        # Initialise SlideControllers
-        log.info(u'Set Up SlideControllers')
-        self.LiveController.mainDisplay = self.mainDisplay
-
     def onCloseEvent(self, event):
         """
         Hook to close the main window and display windows on exit
@@ -128,6 +111,7 @@
         main_icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'),
             QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.mainWindow.setWindowIcon(main_icon)
+
         self.MainContent = QtGui.QWidget(self.mainWindow)
         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
         sizePolicy.setHorizontalStretch(0)
@@ -144,8 +128,10 @@
         self.ControlSplitter.setOrientation(QtCore.Qt.Horizontal)
         self.ControlSplitter.setObjectName(u'ControlSplitter')
         self.MainContentLayout.addWidget(self.ControlSplitter)
-        self.PreviewController = SlideController(self.mainWindow, self.ControlSplitter, False)
-        self.LiveController = SlideController(self.mainWindow, self.ControlSplitter, True)
+
+        self.PreviewController = SlideController( self.ControlSplitter, self,  False)
+        self.LiveController = SlideController(self.ControlSplitter, self,  True)
+
         self.MenuBar = QtGui.QMenuBar(self.mainWindow)
         self.MenuBar.setGeometry(QtCore.QRect(0, 0, 1087, 27))
         self.MenuBar.setObjectName(u'MenuBar')
@@ -172,12 +158,13 @@
         self.StatusBar = QtGui.QStatusBar(self.mainWindow)
         self.StatusBar.setObjectName(u'StatusBar')
         self.mainWindow.setStatusBar(self.StatusBar)
+
         self.MediaManagerDock = QtGui.QDockWidget(self.mainWindow)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.MediaManagerDock.sizePolicy().hasHeightForWidth())
-        self.MediaManagerDock.setSizePolicy(sizePolicy)
+        #MmSizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+        #MmSizePolicy.setHorizontalStretch(0)
+        #MmSizePolicy.setVerticalStretch(0)
+        #MmSizePolicy.setHeightForWidth(self.MediaManagerDock.sizePolicy().hasHeightForWidth())
+        #self.MediaManagerDock.setSizePolicy(MmSizePolicy)
         icon = QtGui.QIcon()
         icon.addPixmap(QtGui.QPixmap(u':/system/system_mediamanager.png'),
             QtGui.QIcon.Normal, QtGui.QIcon.Off)
@@ -187,11 +174,11 @@
         self.MediaManagerDock.setObjectName(u'MediaManagerDock')
         self.MediaManagerDock.setMinimumWidth(250)
         self.MediaManagerContents = QtGui.QWidget()
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.MediaManagerContents.sizePolicy().hasHeightForWidth())
-        self.MediaManagerContents.setSizePolicy(sizePolicy)
+        #sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+        #sizePolicy.setHorizontalStretch(0)
+        #sizePolicy.setVerticalStretch(0)
+        #sizePolicy.setHeightForWidth(self.MediaManagerContents.sizePolicy().hasHeightForWidth())
+        #self.MediaManagerContents.setSizePolicy(sizePolicy)
         self.MediaManagerContents.setObjectName(u'MediaManagerContents')
         self.MediaManagerLayout = QtGui.QHBoxLayout(self.MediaManagerContents)
         self.MediaManagerLayout.setContentsMargins(0, 2, 0, 0)
@@ -202,6 +189,7 @@
         self.MediaManagerLayout.addWidget(self.MediaToolBox)
         self.MediaManagerDock.setWidget(self.MediaManagerContents)
         self.mainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock)
+
         #Sevice Manager Defined
         self.ServiceManagerDock = QtGui.QDockWidget(self.mainWindow)
         ServiceManagerIcon = QtGui.QIcon()
@@ -213,6 +201,7 @@
         self.ServiceManagerContents = ServiceManager(self)
         self.ServiceManagerDock.setWidget(self.ServiceManagerContents)
         self.mainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ServiceManagerDock)
+
         #Theme Manager Defined
         self.ThemeManagerDock = QtGui.QDockWidget(self.mainWindow)
         ThemeManagerIcon = QtGui.QIcon()
@@ -227,6 +216,7 @@
         self.ThemeManagerDock.setWidget(self.ThemeManagerContents)
         self.mainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ThemeManagerDock)
 
+        #Menu Items define
         self.FileNewItem = QtGui.QAction(self.mainWindow)
         self.FileNewItem.setIcon(
             self.ServiceManagerContents.Toolbar.getIconFromTitle(u'New Service'))
@@ -397,22 +387,7 @@
         self.HelpMenu.setTitle(translate(u'mainWindow', u'&Help'))
         self.MediaManagerDock.setWindowTitle(translate(u'mainWindow', u'Media Manager'))
         self.ServiceManagerDock.setWindowTitle(translate(u'mainWindow', u'Service Manager'))
-#        self.ServiceManagerContents.MoveTopButton.setText(translate(u'mainWindow', u'Move To Top'))
-#        self.ServiceManagerContents.MoveUpButton.setText(translate(u'mainWindow', u'Move Up'))
-#        self.ServiceManagerContents.MoveDownButton.setText(translate(u'mainWindow', u'Move Down'))
-#        self.ServiceManagerContents.MoveBottomButton.setText(translate(u'mainWindow', u'Move To Bottom'))
-#        self.ServiceManagerContents.NewItem.setText(translate(u'mainWindow', u'New Service'))
-#        self.ServiceManagerContents.OpenItem.setText(translate(u'mainWindow', u'Open Service'))
-#        self.ServiceManagerContents.SaveItem.setText(translate(u'mainWindow', u'Save Service'))
-#        self.ServiceManagerContents.ThemeComboBox.setItemText(0, translate(u'mainWindow', u'African Sunset'))
-#        self.ServiceManagerContents.ThemeComboBox.setItemText(1, translate(u'mainWindow', u'Snowy Mountains'))
-#        self.ServiceManagerContents.ThemeComboBox.setItemText(2, translate(u'mainWindow', u'Wilderness'))
         self.ThemeManagerDock.setWindowTitle(translate(u'mainWindow', u'Theme Manager'))
-#        self.ThemeNewItem.setText(translate(u'mainWindow', u'New Theme'))
-#        self.ThemeEditItem.setText(translate(u'mainWindow', u'Edit Theme'))
-#        self.ThemeDeleteButton.setText(translate(u'mainWindow', u'Delete Theme'))
-#        self.ThemeImportButton.setText(translate(u'mainWindow', u'Import Theme'))
-#        self.ThemeExportButton.setText(translate(u'mainWindow', u'Export Theme'))
         self.FileNewItem.setText(translate(u'mainWindow', u'&New'))
         self.FileNewItem.setToolTip(translate(u'mainWindow', u'New Service'))
         self.FileNewItem.setStatusTip(translate(u'mainWindow', u'Create a new Service'))
@@ -470,7 +445,7 @@
 
     def show(self):
         self.mainWindow.showMaximized()
-        self.mainDisplay.setup(0)
+        self.mainDisplay.setup(self.settingsForm.GeneralTab.MonitorNumber)
         self.mainDisplay.show()
 
     def onHelpAboutItemClicked(self):

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2009-05-22 18:30:25 +0000
+++ openlp/core/ui/servicemanager.py	2009-06-01 17:50:37 +0000
@@ -126,7 +126,7 @@
 
     def onThemeComboBoxSelected(self, currentIndex):
         self.service_theme = self.ThemeComboBox.currentText()
-        self.RenderManager.set_service_theme(self.service_theme)
+        self.parent.RenderManager.set_service_theme(self.service_theme)
         self.config.set_config(u'theme service theme', self.service_theme)
 
     def addServiceItem(self, item):
@@ -147,11 +147,11 @@
 
     def makePreview(self):
         item, count = self.findServiceItem()
-        self.PreviewController.addServiceManagerItem(self.serviceItems[item][u'data'], count)
+        self.parent.PreviewController.addServiceManagerItem(self.serviceItems[item][u'data'], count)
 
     def makeLive(self):
         item, count = self.findServiceItem()
-        self.LiveController.addServiceManagerItem(self.serviceItems[item][u'data'], count)
+        self.parent.LiveController.addServiceManagerItem(self.serviceItems[item][u'data'], count)
 
     def findServiceItem(self):
         items = self.ServiceManagerList.selectedItems()
@@ -182,7 +182,7 @@
         link = event.mimeData()
         if link.hasText():
             plugin = event.mimeData().text()
-            self.EventManager.post_event(Event(EventType.LoadServiceItem, plugin))
+            self.parent.EventManager.post_event(Event(EventType.LoadServiceItem, plugin))
 
     def oos_as_text(self):
         text=[]
@@ -218,4 +218,4 @@
             id = 0
             self.service_theme = u''
         self.ThemeComboBox.setCurrentIndex(id)
-        self.RenderManager.set_service_theme(self.service_theme)
+        self.parent.RenderManager.set_service_theme(self.service_theme)

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2009-06-01 19:47:05 +0000
+++ openlp/core/ui/slidecontroller.py	2009-06-02 16:25:36 +0000
@@ -98,11 +98,12 @@
 
 class SlideController(QtGui.QWidget):
     global log
-    log=logging.getLogger(u'SlideController')
+    log = logging.getLogger(u'SlideController')
 
-    def __init__(self, parent, control_splitter, isLive):
-        QtGui.QWidget.__init__(self, parent)
+    def __init__(self, control_splitter, parent, isLive):
+        QtGui.QWidget.__init__(self, parent.mainWindow)
         self.isLive = isLive
+        self.parent = parent
         self.Panel = QtGui.QWidget(control_splitter)
         self.Splitter = QtGui.QSplitter(self.Panel)
         self.Splitter.setOrientation(QtCore.Qt.Vertical)
@@ -127,6 +128,7 @@
         self.PreviewListView.setWrapping(False)
         self.PreviewListView.setModel(self.PreviewListData)
         #self.PreviewListView.setSelectionRectVisible(True)
+
         self.PreviewListView.setSpacing(0)
         self.PreviewListView.setObjectName("PreviewListView")
         self.ControllerLayout.addWidget(self.PreviewListView)
@@ -236,7 +238,7 @@
         if self.isLive:
             no = frame[1]
             LiveFrame = self.serviceitem.frames[no][u'image']
-            self.mainDisplay.frameView(LiveFrame)
+            self.parent.mainDisplay.frameView(LiveFrame)
 
     def addServiceItem(self, serviceitem):
         log.debug(u'addServiceItem')

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2009-05-22 05:14:55 +0000
+++ openlp/core/ui/thememanager.py	2009-06-01 17:50:37 +0000
@@ -215,8 +215,8 @@
             for name in files:
                 if name.endswith(u'.png'):
                     self.themeData.addRow(os.path.join(self.path, name))
-        self.EventManager.post_event(Event(EventType.ThemeListChanged))
-        self.ServiceManager.updateThemeList(self.getThemes())
+        self.parent.EventManager.post_event(Event(EventType.ThemeListChanged))
+        self.parent.ServiceManagerContents.updateThemeList(self.getThemes())
         self.parent.settingsForm.ThemesTab.updateThemeList(self.getThemes())
 
     def getThemes(self):
@@ -335,7 +335,7 @@
         outfile = open(theme_file, u'w')
         outfile.write(theme_xml)
         outfile.close()
-        if image_from is not None:
+        if image_from is not None and image_from != image_to:
             shutil.copyfile(image_from,  image_to)
         self.generateAndSaveImage(self.path, name, theme_xml)
         self.themeData.clearItems()
@@ -356,7 +356,7 @@
 
     def generateImage(self, themedata):
         log.debug(u'generateImage %s ', themedata)
-        frame = self.RenderManager.generate_preview(themedata)
+        frame = self.parent.RenderManager.generate_preview(themedata)
         return frame
 
     def getPreviewImage(self, theme):

=== modified file 'openlp/plugins/bibles/forms/bibleimportdialog.py'
--- openlp/plugins/bibles/forms/bibleimportdialog.py	2009-05-01 22:26:43 +0000
+++ openlp/plugins/bibles/forms/bibleimportdialog.py	2009-06-01 17:50:37 +0000
@@ -128,6 +128,7 @@
         self.PasswordLabel.setObjectName("PasswordLabel")
         self.ProxySettingsLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.PasswordLabel)
         self.PasswordEdit = QtGui.QLineEdit(self.ProxyGroupBox)
+        self.PasswordEdit.setEchoMode(QtGui.QLineEdit.Password)
         self.PasswordEdit.setObjectName("PasswordEdit")
         self.ProxySettingsLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.PasswordEdit)
         self.WebBibleLayout.addWidget(self.ProxyGroupBox)

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2009-05-22 19:36:16 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2009-06-01 17:50:37 +0000
@@ -345,21 +345,18 @@
     def onBibleLiveClick(self):
         service_item = ServiceItem(self.parent)
         service_item.addIcon( ":/media/media_verse.png")
-        service_item.render_manager = self.parent.render_manager
         self.generateSlideData(service_item)
         self.parent.live_controller.addServiceItem(service_item)
 
     def onBibleAddClick(self):
         service_item = ServiceItem(self.parent)
         service_item.addIcon( ":/media/media_verse.png")
-        service_item.render_manager = self.parent.render_manager
         self.generateSlideData(service_item)
         self.parent.service_manager.addServiceItem(service_item)
 
     def onBiblePreviewClick(self):
         service_item = ServiceItem(self.parent)
         service_item.addIcon( ":/media/media_verse.png")
-        service_item.render_manager = self.parent.render_manager
         self.generateSlideData(service_item)
         self.parent.preview_controller.addServiceItem(service_item)
 

=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py	2009-05-21 16:07:01 +0000
+++ openlp/plugins/custom/lib/mediaitem.py	2009-06-01 17:50:37 +0000
@@ -210,7 +210,6 @@
         log.debug(u'Custom Preview Requested')
         service_item = ServiceItem(self.parent)
         service_item.addIcon( ":/media/media_song.png")
-        service_item.render_manager = self.parent.render_manager
         self.generateSlideData(service_item)
         self.parent.preview_controller.addServiceItem(service_item)
 
@@ -218,7 +217,6 @@
         log.debug(u'Custom Live Requested')
         service_item = ServiceItem(self.parent)
         service_item.addIcon( ":/media/media_song.png")
-        service_item.render_manager = self.parent.render_manager
         self.generateSlideData(service_item)
         self.parent.live_controller.addServiceItem(service_item)
 
@@ -226,7 +224,6 @@
         log.debug(u'Custom Add Requested')
         service_item = ServiceItem(self.parent)
         service_item.addIcon( ":/media/media_song.png")
-        service_item.render_manager = self.parent.render_manager
         self.generateSlideData(service_item)
         self.parent.service_manager.addServiceItem(service_item)
 

=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py	2009-05-22 18:30:25 +0000
+++ openlp/plugins/images/lib/mediaitem.py	2009-06-01 17:50:37 +0000
@@ -159,7 +159,6 @@
         log.debug(u'Image Preview Requested')
         service_item = ServiceItem(self.parent)
         service_item.addIcon( ":/media/media_image.png")
-        service_item.render_manager = self.parent.render_manager
         self.generateSlideData(service_item)
         self.parent.preview_controller.addServiceItem(service_item)
 
@@ -167,7 +166,6 @@
         log.debug(u'Image Live Requested')
         service_item = ServiceItem(self.parent)
         service_item.addIcon( ":/media/media_image.png")
-        service_item.render_manager = self.parent.render_manager
         self.generateSlideData(service_item)
         self.parent.live_controller.addServiceItem(service_item)
 
@@ -175,6 +173,5 @@
         log.debug(u'Image Add Requested')
         service_item = ServiceItem(self.parent)
         service_item.addIcon( ":/media/media_image.png")
-        service_item.render_manager = self.parent.render_manager
         self.generateSlideData(service_item)
         self.parent.service_manager.addServiceItem(service_item)

=== added file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py	1970-01-01 00:00:00 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py	2009-06-01 18:37:06 +0000
@@ -0,0 +1,135 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+"""
+OpenLP - Open Source Lyrics Projection
+Copyright (c) 2008 Raoul Snyman
+Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley,
+
+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 Software
+Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+"""
+
+from PyQt4 import Qt, QtCore, QtGui
+
+from openlp.core.lib import SettingsTab, translate
+
+class PresentationTab(SettingsTab):
+    """
+    BiblesTab is the Bibles settings tab in the settings dialog.
+    """
+    def __init__(self):
+        SettingsTab.__init__(self, u'Presentation')
+
+    def setupUi(self):
+        self.setObjectName(u'BiblesTab')
+        self.BibleLayout = QtGui.QHBoxLayout(self)
+        self.BibleLayout.setSpacing(8)
+        self.BibleLayout.setMargin(8)
+        self.BibleLayout.setObjectName(u'BibleLayout')
+        self.BibleLeftWidget = QtGui.QWidget(self)
+        self.BibleLeftWidget.setObjectName(u'BibleLeftWidget')
+        self.BibleLeftLayout = QtGui.QVBoxLayout(self.BibleLeftWidget)
+        self.BibleLeftLayout.setObjectName(u'BibleLeftLayout')
+        self.BibleLeftLayout.setSpacing(8)
+        self.BibleLeftLayout.setMargin(0)
+
+        self.VerseDisplayGroupBox = QtGui.QGroupBox(self)
+        self.VerseDisplayGroupBox.setObjectName(u'VerseDisplayGroupBox')
+        self.VerseDisplayLayout = QtGui.QGridLayout(self.VerseDisplayGroupBox)
+        self.VerseDisplayLayout.setMargin(8)
+        self.VerseDisplayLayout.setObjectName(u'VerseDisplayLayout')
+        self.VerseTypeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
+        self.VerseTypeWidget.setObjectName(u'VerseTypeWidget')
+        self.VerseTypeLayout = QtGui.QHBoxLayout(self.VerseTypeWidget)
+        self.VerseTypeLayout.setSpacing(8)
+        self.VerseTypeLayout.setMargin(0)
+        self.VerseTypeLayout.setObjectName(u'VerseTypeLayout')
+
+        self.PowerpointCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
+        self.PowerpointCheckBox.setObjectName("PowerpointCheckBox")
+        self.VerseDisplayLayout.addWidget(self.PowerpointCheckBox, 0, 0, 1, 1)
+
+        self.PowerpointPath = QtGui.QLineEdit(self.VerseDisplayGroupBox)
+        self.PowerpointPath.setObjectName("PowerpointPath")
+        self.VerseDisplayLayout.addWidget(self.PowerpointPath, 1, 0, 1, 1)
+
+        self.ImpressCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
+        self.ImpressCheckBox.setObjectName("ImpressCheckBox")
+        self.VerseDisplayLayout.addWidget(self.ImpressCheckBox, 2, 0, 1, 1)
+
+        self.ImpressPath = QtGui.QLineEdit(self.VerseDisplayGroupBox)
+        self.ImpressPath.setObjectName("ImpressPath")
+        self.VerseDisplayLayout.addWidget(self.ImpressPath, 3, 0, 1, 1)
+
+        self.BibleThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
+        self.BibleThemeWidget.setObjectName(u'BibleThemeWidget')
+        self.BibleThemeLayout = QtGui.QHBoxLayout(self.BibleThemeWidget)
+        self.BibleThemeLayout.setSpacing(8)
+        self.BibleThemeLayout.setMargin(0)
+        self.BibleThemeLayout.setObjectName(u'BibleThemeLayout')
+
+        self.BibleLeftLayout.addWidget(self.VerseDisplayGroupBox)
+        self.BibleLeftSpacer = QtGui.QSpacerItem(40, 20,
+            QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+        self.BibleLeftLayout.addItem(self.BibleLeftSpacer)
+        self.BibleLayout.addWidget(self.BibleLeftWidget)
+
+        self.BibleRightWidget = QtGui.QWidget(self)
+        self.BibleRightWidget.setObjectName(u'BibleRightWidget')
+        self.BibleRightLayout = QtGui.QVBoxLayout(self.BibleRightWidget)
+        self.BibleRightLayout.setObjectName(u'BibleRightLayout')
+        self.BibleRightLayout.setSpacing(8)
+        self.BibleRightLayout.setMargin(0)
+        self.BibleRightSpacer = QtGui.QSpacerItem(50, 20,
+            QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+        self.BibleRightLayout.addItem(self.BibleRightSpacer)
+        self.BibleLayout.addWidget(self.BibleRightWidget)
+
+        # Signals and slots
+        #QtCore.QObject.connect(self.NewChaptersCheckBox,
+           # QtCore.SIGNAL("stateChanged(int)"), self.onNewChaptersCheckBoxChanged)
+
+    def retranslateUi(self):
+        self.PowerpointCheckBox.setText(translate('PresentationTab', 'Powerpoint available:'))
+        self.ImpressCheckBox.setText(translate('PresentationTab', 'Impress available:'))
+        self.PowerpointPath.setText(u'powerpoint.exe ')
+        self.ImpressPath.setText(u'openoffice.org -nologo -show ')
+
+    def onNewChaptersCheckBoxChanged(self):
+        check_state = self.NewChaptersCheckBox.checkState()
+        self.show_new_chapters = False
+        if check_state == 2: # we have a set value convert to True/False
+            self.show_new_chapters = True
+
+
+    def load(self):
+        pass
+#        self.paragraph_style = (self.config.get_config(u'paragraph style', u'True'))
+#        self.show_new_chapters = (self.config.get_config(u'display new chapter', u"False"))
+#        self.display_style = int(self.config.get_config(u'display brackets', u'0'))
+#        self.bible_theme = int(self.config.get_config(u'bible theme', u'0'))
+#        self.bible_search = (self.config.get_config(u'search as type', u'True'))
+#        if self.paragraph_style:
+#            self.ParagraphRadioButton.setChecked(True)
+#        else:
+#            self.VerseRadioButton.setChecked(True)
+#        self.NewChaptersCheckBox.setChecked(self.show_new_chapters)
+#        self.DisplayStyleComboBox.setCurrentIndex(self.display_style)
+#        self.BibleSearchCheckBox.setChecked(self.bible_search)
+
+    def save(self):
+        pass
+#        self.config.set_config(u'paragraph style', str(self.paragraph_style))
+#        self.config.set_config(u'display new chapter', str(self.show_new_chapters))
+#        self.config.set_config(u'display brackets', str(self.display_style))
+#        self.config.set_config(u'search as type', str(self.bible_search))
+#        self.config.set_config(u'bible theme', str(self.bible_theme))


Follow ups