diff options
author | William Wilgus <wilgus.william@gmail.com> | 2023-11-25 02:36:17 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2023-11-25 02:48:49 -0500 |
commit | 40e685fb7138dbd56855769c3bcd5568f0819f3c (patch) | |
tree | 94545efe522276e787dcd42a4a8b0af19a9ddacf | |
parent | b6ce98c55c31039fdc8189b4cbe0bb7e56eaf894 (diff) | |
download | rockbox-40e685fb7138dbd56855769c3bcd5568f0819f3c.tar.gz rockbox-40e685fb7138dbd56855769c3bcd5568f0819f3c.zip |
[Feature] run .link shortcuts within menu shortcuts
Change-Id: Ifbc2b95ab367ae18fa51074a3f8ea551ad2ab6a8
-rw-r--r-- | apps/root_menu.c | 9 | ||||
-rw-r--r-- | apps/shortcuts.c | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c index 762f5b2961..360f8ae8ce 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -764,7 +764,6 @@ static int load_plugin_screen(char *key) | |||
764 | 764 | ||
765 | while(loops-- > 0) /* just to keep things from getting out of hand */ | 765 | while(loops-- > 0) /* just to keep things from getting out of hand */ |
766 | { | 766 | { |
767 | |||
768 | int opret = open_plugin_load_entry(key); | 767 | int opret = open_plugin_load_entry(key); |
769 | struct open_plugin_entry_t *op_entry = open_plugin_get_entry(); | 768 | struct open_plugin_entry_t *op_entry = open_plugin_get_entry(); |
770 | char *path = op_entry->path; | 769 | char *path = op_entry->path; |
@@ -773,7 +772,6 @@ static int load_plugin_screen(char *key) | |||
773 | param = NULL; | 772 | param = NULL; |
774 | if (path[0] == '\0' && key) | 773 | if (path[0] == '\0' && key) |
775 | path = P2STR((unsigned char *)key); | 774 | path = P2STR((unsigned char *)key); |
776 | |||
777 | int ret = plugin_load(path, param); | 775 | int ret = plugin_load(path, param); |
778 | 776 | ||
779 | if (ret == PLUGIN_USB_CONNECTED || ret == PLUGIN_ERROR) | 777 | if (ret == PLUGIN_USB_CONNECTED || ret == PLUGIN_ERROR) |
@@ -781,7 +779,14 @@ static int load_plugin_screen(char *key) | |||
781 | else if (ret == PLUGIN_GOTO_WPS) | 779 | else if (ret == PLUGIN_GOTO_WPS) |
782 | ret_val = GO_TO_WPS; | 780 | ret_val = GO_TO_WPS; |
783 | else if (ret == PLUGIN_GOTO_PLUGIN) | 781 | else if (ret == PLUGIN_GOTO_PLUGIN) |
782 | { | ||
783 | if (key == ID2P(LANG_SHORTCUTS) && | ||
784 | op_entry->lang_id == ID2P(LANG_OPEN_PLUGIN)) | ||
785 | { | ||
786 | op_entry->lang_id = ID2P(LANG_SHORTCUTS); | ||
787 | } | ||
784 | continue; | 788 | continue; |
789 | } | ||
785 | else | 790 | else |
786 | { | 791 | { |
787 | ret_val = GO_TO_PREVIOUS; | 792 | ret_val = GO_TO_PREVIOUS; |
diff --git a/apps/shortcuts.c b/apps/shortcuts.c index b52ff4a741..2ac3ceb3a0 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c | |||
@@ -620,13 +620,21 @@ int do_shortcut_menu(void *ignored) | |||
620 | while (done == GO_TO_PREVIOUS) | 620 | while (done == GO_TO_PREVIOUS) |
621 | { | 621 | { |
622 | list.count = shortcut_count; | 622 | list.count = shortcut_count; |
623 | if(tree_get_context()->out_of_tree > 0) /* a shortcut has been selected */ | ||
624 | { | ||
625 | done = GO_TO_FILEBROWSER; | ||
626 | break; | ||
627 | } | ||
628 | |||
623 | if (simplelist_show_list(&list)) | 629 | if (simplelist_show_list(&list)) |
624 | break; /* some error happened?! */ | 630 | break; /* some error happened?! */ |
631 | |||
625 | if (list.selection == -1) | 632 | if (list.selection == -1) |
626 | break; | 633 | break; |
627 | else | 634 | else |
628 | { | 635 | { |
629 | sc = get_shortcut(list.selection); | 636 | sc = get_shortcut(list.selection); |
637 | |||
630 | if (!sc) | 638 | if (!sc) |
631 | continue; | 639 | continue; |
632 | 640 | ||
@@ -668,6 +676,7 @@ int do_shortcut_menu(void *ignored) | |||
668 | if (sc->type == SHORTCUT_FILE) | 676 | if (sc->type == SHORTCUT_FILE) |
669 | browse.flags |= BROWSE_RUNFILE; | 677 | browse.flags |= BROWSE_RUNFILE; |
670 | done = rockbox_browse(&browse); | 678 | done = rockbox_browse(&browse); |
679 | |||
671 | } | 680 | } |
672 | break; | 681 | break; |
673 | case SHORTCUT_SETTING: | 682 | case SHORTCUT_SETTING: |