Boolean check

main
Bob Mottram 2020-11-14 19:14:43 +00:00
parent 4978093e06
commit 7c833a177c
1 changed files with 8 additions and 5 deletions

View File

@ -198,19 +198,22 @@ def setThemeFromDict(baseDir: str, name: str,
css = cssfile.read() css = cssfile.read()
for paramName, paramValue in themeParams.items(): for paramName, paramValue in themeParams.items():
if paramName == 'newswire-publish-icon': if paramName == 'newswire-publish-icon':
setNewswirePublishAsIcon(baseDir, bool(paramValue)) setNewswirePublishAsIcon(baseDir,
paramValue.lower() == 'true')
continue continue
elif paramName == 'full-width-timeline-buttons': elif paramName == 'full-width-timeline-buttons':
setFullWidthTimelineButtonHeader(baseDir, bool(paramValue)) paramBool = paramValue.lower() == 'true'
setFullWidthTimelineButtonHeader(baseDir, paramBool)
continue continue
elif paramName == 'icons-as-buttons': elif paramName == 'icons-as-buttons':
setIconsAsButtons(baseDir, bool(paramValue)) setIconsAsButtons(baseDir, paramValue.lower() == 'true')
continue continue
elif paramName == 'rss-icon-at-top': elif paramName == 'rss-icon-at-top':
setRssIconAtTop(baseDir, bool(paramValue)) setRssIconAtTop(baseDir, paramValue.lower() == 'true')
continue continue
elif paramName == 'publish-button-at-top': elif paramName == 'publish-button-at-top':
setPublishButtonAtTop(baseDir, bool(paramValue)) setPublishButtonAtTop(baseDir,
paramValue.lower() == 'true')
continue continue
css = setCSSparam(css, paramName, paramValue) css = setCSSparam(css, paramName, paramValue)
filename = baseDir + '/' + filename filename = baseDir + '/' + filename