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

    Requested reviews:
    Raoul Snyman (raoul-snyman): 

-- 
https://code.launchpad.net/~trb143/openlp/fixes/+merge/14621
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py	2009-11-03 18:14:25 +0000
+++ openlp/core/lib/__init__.py	2009-11-08 14:20:24 +0000
@@ -26,11 +26,13 @@
 The :mod:`lib` module contains most of the components and libraries that make
 OpenLP work.
 """
-
+import logging
 import types
 
 from PyQt4 import QtCore, QtGui
 
+log = logging.getLogger(__name__)
+
 def translate(context, text):
     """
     A special shortcut method to wrap around the Qt4 translation functions.
@@ -60,7 +62,9 @@
         file = open(xmlfile, u'r')
         xml = file.read()
     except IOError:
-        log.exception(u'Failed to open XML file')
+        #This may not be an error as this is also used to check
+        #that a file exist
+        log.error(u'Failed to open XML file %s' % xmlfile)
     finally:
         if file:
             file.close()

=== modified file 'openlp/core/lib/rendermanager.py'
--- openlp/core/lib/rendermanager.py	2009-11-04 01:16:15 +0000
+++ openlp/core/lib/rendermanager.py	2009-11-08 14:20:24 +0000
@@ -253,7 +253,7 @@
         newImage = QtGui.QImage(w, h, QtGui.QImage.Format_ARGB32_Premultiplied)
         newImage.fill(QtCore.Qt.black)
         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):

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2009-11-05 17:33:38 +0000
+++ openlp/core/ui/mainwindow.py	2009-11-08 14:20:24 +0000
@@ -300,8 +300,14 @@
         # Connect up some signals and slots
         QtCore.QObject.connect(self.FileExitItem,
             QtCore.SIGNAL(u'triggered()'), MainWindow.close)
+        QtCore.QObject.connect(self.ControlSplitter,
+            QtCore.SIGNAL(u'splitterMoved(int, int)'), self.trackSplitter)
         QtCore.QMetaObject.connectSlotsByName(MainWindow)
 
+    def trackSplitter(self, tab, pos):
+        #print tab,  pos
+        pass
+
     def retranslateUi(self, MainWindow):
         """
         Set up the translation system

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2009-11-08 09:09:23 +0000
+++ openlp/core/ui/slidecontroller.py	2009-11-08 14:20:24 +0000
@@ -219,7 +219,7 @@
         self.PreviewFrame = QtGui.QFrame(self.Splitter)
         self.PreviewFrame.setGeometry(QtCore.QRect(0, 0, 300, 225))
         self.PreviewFrame.setSizePolicy(QtGui.QSizePolicy(
-            QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum))
+            QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Label))
         self.PreviewFrame.setFrameShape(QtGui.QFrame.StyledPanel)
         self.PreviewFrame.setFrameShadow(QtGui.QFrame.Sunken)
         self.PreviewFrame.setObjectName(u'PreviewFrame')
@@ -319,7 +319,7 @@
                 if item.verse_order:
                     verses = item.verse_order.split(u' ')
                     for verse in verses:
-                        if int(verse) > 12:
+                        if not verse or int(verse) > 12:
                             break
                         try:
                             self.Songbar.actions[verse].setVisible(True)

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2009-11-07 06:45:25 +0000
+++ openlp/core/ui/thememanager.py	2009-11-08 14:20:24 +0000
@@ -271,7 +271,6 @@
         return self.themelist
 
     def getThemeData(self, themename):
-        assert(themename)
         log.debug(u'getthemedata for theme %s', themename)
         xml_file = os.path.join(self.path, unicode(themename),
             unicode(themename) + u'.xml')

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to