Fix bugs in previous merges with icons and themes

This commit is contained in:
Tim Bentley 2009-11-08 13:56:25 +00:00
parent f3f3906ca0
commit 5b154b5941
4 changed files with 4 additions and 5 deletions

View File

@ -60,7 +60,7 @@ def file_to_xml(xmlfile):
file = open(xmlfile, u'r')
xml = file.read()
except IOError:
log.exception(u'Failed to open XML file')
print(u'Failed to open XML file')
finally:
if file:
file.close()

View File

@ -253,7 +253,7 @@ class RenderManager(object):
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):

View File

@ -219,7 +219,7 @@ class SlideController(QtGui.QWidget):
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 @@ class SlideController(QtGui.QWidget):
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)

View File

@ -271,7 +271,6 @@ class ThemeManager(QtGui.QWidget):
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')