This commit is contained in:
Tim Bentley 2010-05-10 20:48:29 +01:00
commit be85eb8999
6 changed files with 25 additions and 14 deletions

View File

@ -169,7 +169,7 @@ def main():
filename = os.path.join(log_path, u'openlp.log')
logfile = FileHandler(filename, u'w')
logfile.setFormatter(logging.Formatter(
u'%(asctime)s %(name)-20s %(levelname)-8s %(message)s'))
u'%(asctime)s %(name)-55s %(levelname)-8s %(message)s'))
log.addHandler(logfile)
logging.addLevelName(15, u'Timer')
# Parse command line options and deal with them.

View File

@ -53,7 +53,7 @@ class SettingsManager(object):
self.slidecontroller_image = self.slidecontroller - 50
self.showPreviewPanel = QtCore.QSettings().value(
u'user interface/preview panel', True).toBool()
u'user interface/preview panel', QtCore.QVariant(True)).toBool()
def togglePreviewPanel(self, isVisible):
QtCore.QSettings().setValue(u'user interface/preview panel',

View File

@ -118,7 +118,11 @@ class MainDisplay(DisplayWidget):
DisplayWidget.__init__(self, parent)
self.parent = parent
self.setWindowTitle(u'OpenLP Display')
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
# WA_TranslucentBackground is not available in QT4.4
try:
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
except AttributeError:
pass
self.screens = screens
self.display_image = QtGui.QLabel(self)
self.display_image.setScaledContents(True)
@ -340,8 +344,14 @@ class VideoDisplay(Phonon.VideoWidget):
self.audioObject = Phonon.AudioOutput(Phonon.VideoCategory)
Phonon.createPath(self.mediaObject, self)
Phonon.createPath(self.mediaObject, self.audioObject)
self.setWindowFlags(QtCore.Qt.WindowStaysOnBottomHint |
QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog)
flags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog
# WindowsStaysOnBottomHint is not available in QT4.4
try:
flags = flags | QtCore.Qt.WindowStaysOnBottomHint
except AttributeError:
pass
self.setWindowFlags(flags)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'maindisplay_hide'), self.mediaHide)
QtCore.QObject.connect(Receiver.get_receiver(),

View File

@ -337,13 +337,14 @@ class BibleMediaItem(MediaManagerItem):
# load bibles into the combo boxes
first = True
for bible in bibles:
self.QuickVersionComboBox.addItem(bible)
self.QuickSecondBibleComboBox.addItem(bible)
self.AdvancedVersionComboBox.addItem(bible)
self.AdvancedSecondBibleComboBox.addItem(bible)
if first:
first = False
self.initialiseBible(bible)
if bible:
self.QuickVersionComboBox.addItem(bible)
self.QuickSecondBibleComboBox.addItem(bible)
self.AdvancedVersionComboBox.addItem(bible)
self.AdvancedSecondBibleComboBox.addItem(bible)
if first:
first = False
self.initialiseBible(bible)
def onListViewResize(self, width, height):
self.SearchProgress.setGeometry(self.ListView.geometry().x(),

View File

@ -105,7 +105,7 @@ class PresentationController(object):
if self.available:
self.enabled = QtCore.QSettings().value(
self.settingsSection + u'/' + name,
QtCore.Qt.Unchecked).toInt()[0] == QtCore.Qt.Checked
QtCore.QVariant(QtCore.Qt.Unchecked)).toInt()[0] == QtCore.Qt.Checked
else:
self.enabled = False
self.thumbnailroot = os.path.join(

View File

@ -50,7 +50,7 @@ class SongManager():
settings.beginGroup(u'songs')
self.db_url = u''
db_type = unicode(
settings.value(u'songs/db type', u'sqlite').toString())
settings.value(u'songs/db type', QtCore.QVariant(u'sqlite')).toString())
if db_type == u'sqlite':
self.db_url = u'sqlite:///%s/songs.sqlite' % \
AppLocation.get_section_data_path(u'songs')