mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 02:08:50 +01:00
ReunionPagesIcons combines 20_Retro Games now
This commit is contained in:
parent
f2bd7423e4
commit
0b8331d3d0
@ -154,8 +154,8 @@ class RomListPage(Page):
|
||||
bname = os.path.basename(v) ### filter extension
|
||||
if len(bname)> 1:
|
||||
is_excluded = False
|
||||
for exclude_pattern in self._Emulator["EXCLUDE"]:
|
||||
if re.match(exclude_pattern, bname):
|
||||
for exclude_ext in self._Emulator["EXCLUDE"]:## only compares filename endswith ext in EXCLUDE,splited by ,
|
||||
if len(exclude_ext) > 1 and bname.endswith(exclude_ext):
|
||||
is_excluded = True
|
||||
break
|
||||
|
||||
|
||||
@ -406,6 +406,27 @@ class MainScreen(object):
|
||||
|
||||
tmp.append(tup)
|
||||
tmp = sorted(tmp, key=itemgetter(0))
|
||||
|
||||
retro_games_idx = []
|
||||
for i,x in enumerate(tmp):
|
||||
if "20_Retro Games" in x[0]:
|
||||
retro_games_idx.append(x[1])
|
||||
|
||||
if len(retro_games_idx) > 1:
|
||||
for i in range(1,len(retro_games_idx)):
|
||||
p._Icons[retro_games_idx[0]]._LinkPage._Icons.extend( p._Icons[retro_games_idx[i]]._LinkPage._Icons)
|
||||
#p._Icons[ retro_games_idx[0]]._LinkPage._Icons.extend( tmp[ retro_games_idx[i] ]._LinkPage._Icons )
|
||||
|
||||
|
||||
tmp_swap = []
|
||||
for i, x in enumerate(tmp):
|
||||
if "20_Retro Games" not in x[0]:
|
||||
tmp_swap.append(x)
|
||||
if "20_Retro Games" in x[0] and i == retro_games_idx[0]:
|
||||
tmp_swap.append(x)
|
||||
|
||||
tmp = tmp_swap
|
||||
|
||||
#print(tmp)
|
||||
new_icons = []
|
||||
for x in tmp:
|
||||
|
||||
@ -16,6 +16,10 @@ import config
|
||||
def SkinMap(orig_file_or_dir):
|
||||
DefaultSkin = "default"
|
||||
|
||||
#doing a wrapper for items under /home/cpi/apps/Menu/*, to be like Menu/GameShell/*
|
||||
if orig_file_or_dir.startswith("/home/cpi/apps/Menu"):
|
||||
orig_file_or_dir = orig_file_or_dir.replace("/home/cpi/apps/Menu/","../Menu/GameShell/")
|
||||
|
||||
if orig_file_or_dir.startswith(".."):
|
||||
ret = orig_file_or_dir.replace("..","../skin/"+config.SKIN)
|
||||
if FileExists(ret) == False:
|
||||
@ -24,7 +28,7 @@ def SkinMap(orig_file_or_dir):
|
||||
ret = "../skin/"+config.SKIN+"/sys.py/"+orig_file_or_dir
|
||||
if FileExists(ret) == False:
|
||||
ret = "../skin/"+DefaultSkin+"/sys.py/"+orig_file_or_dir
|
||||
|
||||
|
||||
if FileExists( ret ):
|
||||
return ret
|
||||
else: ## if not existed both in default or custom skin ,return where it is
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user