Fix theme importing (Support 98)

This commit is contained in:
Jon Tibble 2011-02-08 03:25:50 +00:00
parent a97cd1bb9b
commit 0d6af789a0
1 changed files with 8 additions and 6 deletions

View File

@ -33,11 +33,14 @@ processing version 1 themes in OpenLP version 2.
from xml.etree.ElementTree import ElementTree, XML
from PyQt4 import QtGui
DELPHI_COLORS = {u'clRed': 0xFF0000,
u'clBlue': 0x0000FF,
u'clYellow': 0xFFFF00,
u'clBlack': 0x000000,
u'clWhite': 0xFFFFFF}
DELPHI_COLORS = {
u'clAqua': 0x00FFFF, u'clBlack': 0x000000, u'clBlue': 0x0000FF,
u'clFuchsia': 0xFF00FF, u'clGray': 0x808080, u'clGreen': 0x008000,
u'clLime': 0x00FF00, u'clMaroon': 0x800000, u'clNavy': 0x000080,
u'clOlive': 0x808000, u'clPurple': 0x800080, u'clRed': 0xFF0000,
u'clSilver': 0xC0C0C0, u'clTeal': 0x008080, u'clWhite': 0xFFFFFF,
u'clYellow': 0xFFFF00
}
BLANK_STYLE_XML = \
'''<?xml version="1.0" encoding="iso-8859-1"?>
@ -184,7 +187,6 @@ class Theme(object):
if element.tag != u'Theme':
element_text = element.text
val = 0
# easy!
if element_text is None:
val = element_text
# strings need special handling to sort the colours out