mirror of https://gitlab.com/bashrc2/epicyon
Background file path
parent
1b33c20fd5
commit
10b9f2818d
14
theme.py
14
theme.py
|
@ -606,8 +606,10 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
||||||
searchBannerFilename = \
|
searchBannerFilename = \
|
||||||
baseDir + '/img/search_banner_' + themeNameLower + '.png'
|
baseDir + '/img/search_banner_' + themeNameLower + '.png'
|
||||||
|
|
||||||
for subdir, dirs, files in os.walk(baseDir +
|
backgroundNames = ('login', 'shares', 'delete', 'follow',
|
||||||
'/accounts'):
|
'options', 'block', 'search', 'calendar')
|
||||||
|
|
||||||
|
for subdir, dirs, files in os.walk(baseDir + '/accounts'):
|
||||||
for acct in dirs:
|
for acct in dirs:
|
||||||
if '@' not in acct:
|
if '@' not in acct:
|
||||||
continue
|
continue
|
||||||
|
@ -616,8 +618,6 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
||||||
accountDir = \
|
accountDir = \
|
||||||
os.path.join(baseDir + '/accounts', acct)
|
os.path.join(baseDir + '/accounts', acct)
|
||||||
|
|
||||||
backgroundNames = ('login', 'shares', 'delete', 'follow',
|
|
||||||
'options', 'block', 'search', 'calendar')
|
|
||||||
for backgroundType in backgroundNames:
|
for backgroundType in backgroundNames:
|
||||||
if themeNameLower == 'default':
|
if themeNameLower == 'default':
|
||||||
backgroundImageFilename = \
|
backgroundImageFilename = \
|
||||||
|
@ -630,14 +630,14 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
||||||
if os.path.isfile(backgroundImageFilename):
|
if os.path.isfile(backgroundImageFilename):
|
||||||
try:
|
try:
|
||||||
copyfile(backgroundImageFilename,
|
copyfile(backgroundImageFilename,
|
||||||
accountDir + '/' + backgroundType +
|
baseDir + '/accounts/' + backgroundType +
|
||||||
'-background.png')
|
'-background.png')
|
||||||
except BaseException:
|
except BaseException:
|
||||||
pass
|
pass
|
||||||
elif os.path.isfile(accountDir + '/' + backgroundType +
|
elif os.path.isfile(baseDir + '/accounts/' + backgroundType +
|
||||||
'-background.png'):
|
'-background.png'):
|
||||||
try:
|
try:
|
||||||
os.remove(accountDir + '/' + backgroundType +
|
os.remove(baseDir + '/accounts/' + backgroundType +
|
||||||
'-background.png')
|
'-background.png')
|
||||||
except BaseException:
|
except BaseException:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue