diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index f2547d966..e3618c7a1 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -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 @@ def file_to_xml(xmlfile): file = open(xmlfile, u'r') xml = file.read() except IOError: - print(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() diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 6e24cbdb9..81ac48fe3 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -300,8 +300,14 @@ class Ui_MainWindow(object): # 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