[prev in list] [next in list] [prev in thread] [next in thread]
List: rockbox-cvs
Subject: [Feature] run .link shortcuts within menu shortcuts
From: rockbox-gerrit-noreply--- via rockbox-cvs <rockbox-cvs () lists ! haxx ! se>
Date: 2023-11-25 7:50:19
Message-ID: 202311250750.3AP7oJel2035542 () archos ! rockbox ! org
[Download RAW message or body]
commit 40e685fb7138dbd56855769c3bcd5568f0819f3c
Author: William Wilgus <wilgus.william@gmail.com>
Date: Sat Nov 25 02:36:17 2023 -0500
[Feature] run .link shortcuts within menu shortcuts
Change-Id: Ifbc2b95ab367ae18fa51074a3f8ea551ad2ab6a8
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)
while(loops-- > 0) /* just to keep things from getting out of hand */
{
-
int opret = open_plugin_load_entry(key);
struct open_plugin_entry_t *op_entry = open_plugin_get_entry();
char *path = op_entry->path;
@@ -773,7 +772,6 @@ static int load_plugin_screen(char *key)
param = NULL;
if (path[0] == '\0' && key)
path = P2STR((unsigned char *)key);
-
int ret = plugin_load(path, param);
if (ret == PLUGIN_USB_CONNECTED || ret == PLUGIN_ERROR)
@@ -781,7 +779,14 @@ static int load_plugin_screen(char *key)
else if (ret == PLUGIN_GOTO_WPS)
ret_val = GO_TO_WPS;
else if (ret == PLUGIN_GOTO_PLUGIN)
+ {
+ if (key == ID2P(LANG_SHORTCUTS) &&
+ op_entry->lang_id == ID2P(LANG_OPEN_PLUGIN))
+ {
+ op_entry->lang_id = ID2P(LANG_SHORTCUTS);
+ }
continue;
+ }
else
{
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)
while (done == GO_TO_PREVIOUS)
{
list.count = shortcut_count;
+ if(tree_get_context()->out_of_tree > 0) /* a shortcut has been selected */
+ {
+ done = GO_TO_FILEBROWSER;
+ break;
+ }
+
if (simplelist_show_list(&list))
break; /* some error happened?! */
+
if (list.selection == -1)
break;
else
{
sc = get_shortcut(list.selection);
+
if (!sc)
continue;
@@ -668,6 +676,7 @@ int do_shortcut_menu(void *ignored)
if (sc->type == SHORTCUT_FILE)
browse.flags |= BROWSE_RUNFILE;
done = rockbox_browse(&browse);
+
}
break;
case SHORTCUT_SETTING:
--
rockbox-cvs mailing list
rockbox-cvs@lists.haxx.se
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic