Copy text mode banner when changing theme

merge-requests/16/head
Bob Mottram 2021-02-05 19:39:21 +00:00
parent 83e1190b0a
commit d63aa8763f
1 changed files with 9 additions and 0 deletions

View File

@ -439,6 +439,15 @@ def _setThemeImages(baseDir: str, name: str) -> None:
rightColImageFilename = \
baseDir + '/theme/' + themeNameLower + '/right_col_image.png'
textModeBannerFilename = \
baseDir + '/theme/' + themeNameLower + '/banner.txt'
if os.path.isfile(textModeBannerFilename):
try:
copyfile(textModeBannerFilename,
baseDir + '/accounts/banner.txt')
except BaseException:
pass
backgroundNames = ('login', 'shares', 'delete', 'follow',
'options', 'block', 'search', 'calendar')
extensions = getImageExtensions()