summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2021-03-09 08:21:20 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2021-03-09 13:26:56 +0000
commitf348d921b6abc7d164fa867939f55673bc6d102f (patch)
treea95ac822b0fed4a26bef9b7aa211e4b3238a82bd /apps
parentd0ab6b24dce36ab52b39e18a34a0177bed9c40ee (diff)
downloadrockbox-f348d921b6abc7d164fa867939f55673bc6d102f.tar.gz
rockbox-f348d921b6abc7d164fa867939f55673bc6d102f.zip
Shortcuts Menu -- Update2
make shortcuts menu drop back into WPS on exit different icons for plugins and files versus folders Change-Id: I1b590c223b63a6b6598c33e767738daaea1c8ad0
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/wps.c3
-rw-r--r--apps/shortcuts.c9
2 files changed, 10 insertions, 2 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index 78ab8dc8dd..b42e386a91 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -839,7 +839,8 @@ long gui_wps_show(void)
839 if (global_settings.shortcuts_replaces_qs) 839 if (global_settings.shortcuts_replaces_qs)
840 { 840 {
841 global_status.last_screen = GO_TO_SHORTCUTMENU; 841 global_status.last_screen = GO_TO_SHORTCUTMENU;
842 return quick_screen_quick(button); 842 int ret = quick_screen_quick(button);
843 return (ret == GO_TO_PREVIOUS ? GO_TO_WPS : ret);
843 } 844 }
844 else if (quick_screen_quick(button) > 0) 845 else if (quick_screen_quick(button) > 0)
845 return GO_TO_ROOT; 846 return GO_TO_ROOT;
diff --git a/apps/shortcuts.c b/apps/shortcuts.c
index 5322447b46..68a631dcf8 100644
--- a/apps/shortcuts.c
+++ b/apps/shortcuts.c
@@ -451,17 +451,22 @@ static int shortcut_menu_get_action(int action, struct gui_synclist *lists)
451static enum themable_icons shortcut_menu_get_icon(int selected_item, void * data) 451static enum themable_icons shortcut_menu_get_icon(int selected_item, void * data)
452{ 452{
453 (void)data; 453 (void)data;
454 int icon;
454 struct shortcut *sc = get_shortcut(selected_item); 455 struct shortcut *sc = get_shortcut(selected_item);
455 if (!sc) 456 if (!sc)
456 return Icon_NOICON; 457 return Icon_NOICON;
457 if (sc->icon == Icon_NOICON) 458 if (sc->icon == Icon_NOICON)
458 { 459 {
460
459 switch (sc->type) 461 switch (sc->type)
460 { 462 {
461 case SHORTCUT_FILE: 463 case SHORTCUT_FILE:
462 return filetype_get_icon(filetype_get_attr(sc->u.path)); 464 return filetype_get_icon(filetype_get_attr(sc->u.path));
463 case SHORTCUT_BROWSER: 465 case SHORTCUT_BROWSER:
464 return Icon_Plugin; 466 icon = filetype_get_icon(filetype_get_attr(sc->u.path));
467 if (icon <= 0)
468 icon = Icon_Folder;
469 return icon;
465 case SHORTCUT_SETTING: 470 case SHORTCUT_SETTING:
466 return Icon_Menu_setting; 471 return Icon_Menu_setting;
467 case SHORTCUT_DEBUGITEM: 472 case SHORTCUT_DEBUGITEM:
@@ -597,6 +602,7 @@ int do_shortcut_menu(void *ignored)
597 sc = get_shortcut(list.selection); 602 sc = get_shortcut(list.selection);
598 if (!sc) 603 if (!sc)
599 continue; 604 continue;
605 splashf(200, "%i", sc->type);
600 switch (sc->type) 606 switch (sc->type)
601 { 607 {
602 case SHORTCUT_PLAYLISTMENU: 608 case SHORTCUT_PLAYLISTMENU:
@@ -619,6 +625,7 @@ int do_shortcut_menu(void *ignored)
619 /* else fall through */ 625 /* else fall through */
620 case SHORTCUT_BROWSER: 626 case SHORTCUT_BROWSER:
621 { 627 {
628 splashf(200, "b %i %s", sc->type, sc->u.path);
622 if(open_plugin_add_path(ID2P(LANG_SHORTCUTS), sc->u.path, NULL) != 0) 629 if(open_plugin_add_path(ID2P(LANG_SHORTCUTS), sc->u.path, NULL) != 0)
623 { 630 {
624 done = GO_TO_PLUGIN; 631 done = GO_TO_PLUGIN;