@@ -182,42 +182,33 @@ def scan_apps():
182182 # sort alphabetically without uppercase/lowercase discrimination:
183183 app_names .sort (key = lambda element : element .lower ())
184184
185- # add an appname for builtin file browser
186- app_names .append ("Files" )
187- # mh_if frozen:
188- # app_paths["Files"] = ".frozen/launcher/files"
189- # mh_else:
190- app_paths ["Files" ] = "/launcher/files"
191- # mh_end_if
192-
193- # add an appname for Micropython Terminal
194- app_names .append ("Terminal" )
195- # mh_if frozen:
196- # app_paths["Terminal"] = ".frozen/launcher/terminal"
197- # mh_else:
198- app_paths ["Terminal" ] = "/launcher/terminal"
199- # mh_end_if
200-
201- # add an appname for 'getapps' app
202- app_names .append ('Get Apps' )
203- # mh_if frozen:
204- # app_paths['Get Apps'] = ".frozen/launcher/getapps"
205- # mh_else:
206- app_paths ['Get Apps' ] = "/launcher/getapps"
207- # mh_end_if
208-
209- # add an appname to refresh the app list
210- app_names .append ("Reload Apps" )
211- # add an appname to control the beeps
212- app_names .append ("UI Sound" )
213-
214- # add an appname to open settings app
215- app_names .append ("Settings" )
185+ # add built-in app names
186+ app_names += [
187+ "Files" ,
188+ "Terminal" ,
189+ "Reload Apps" ,
190+ "UI Sound" ,
191+ "Settings" ,
192+ "Get Apps" ,
193+ ]
194+
195+ # add paths for built-in apps
216196 # mh_if frozen:
217- # app_paths["Settings"] = ".frozen/launcher/settings"
197+ # app_paths.update({
198+ # "Files": ".frozen/launcher/files",
199+ # "Terminal": ".frozen/launcher/terminal",
200+ # "Settings": ".frozen/launcher/settings",
201+ # "Get Apps": ".frozen/launcher/getapps",
202+ # })
218203 # mh_else:
219- app_paths ["Settings" ] = "/launcher/settings"
204+ app_paths .update ({
205+ "Files" : "/launcher/files" ,
206+ "Terminal" : "/launcher/terminal" ,
207+ "Settings" : "/launcher/settings" ,
208+ "Get Apps" : "/launcher/getapps" ,
209+ })
220210 # mh_end_if
211+
221212
222213 APP_NAMES = app_names
223214 APP_PATHS = app_paths
@@ -453,9 +444,23 @@ def __init__(self):
453444 # buffer for storing one custom icon
454445 self .buf = bytearray (32 * 32 // 8 )
455446 self .fbuf = framebuf .FrameBuffer (self .buf , 32 , 32 , framebuf .MONO_HLSB )
447+
448+ # mh_if spi_ram:
449+ # # Construct a framebuffer palette by manually setting the 4 color bytes
450+ # self.icon_palette = framebuf.FrameBuffer(
451+ # bytearray([
452+ # CONFIG.palette[2] >> 8,
453+ # CONFIG.palette[2] & 0xff,
454+ # CONFIG.palette[8] >> 8,
455+ # CONFIG.palette[8] & 0xff,
456+ # ]),
457+ # 2, 1,
458+ # framebuf.RGB565,
459+ # )
460+ # mh_else:
456461 # 40 == bg color and ui color as one byte (2, 8)
457462 self .icon_palette = framebuf .FrameBuffer (bytearray ([40 ]), 2 , 1 , framebuf .GS4_HMSB )
458-
463+ # mh_end_if
459464
460465 def force_update (self ):
461466 draw_scrollbar ()
0 commit comments