mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
[Feature] run .link shortcuts within menu shortcuts
Change-Id: Ifbc2b95ab367ae18fa51074a3f8ea551ad2ab6a8
This commit is contained in:
parent
b6ce98c55c
commit
40e685fb71
2 changed files with 16 additions and 2 deletions
|
@ -764,7 +764,6 @@ static int load_plugin_screen(char *key)
|
||||||
|
|
||||||
while(loops-- > 0) /* just to keep things from getting out of hand */
|
while(loops-- > 0) /* just to keep things from getting out of hand */
|
||||||
{
|
{
|
||||||
|
|
||||||
int opret = open_plugin_load_entry(key);
|
int opret = open_plugin_load_entry(key);
|
||||||
struct open_plugin_entry_t *op_entry = open_plugin_get_entry();
|
struct open_plugin_entry_t *op_entry = open_plugin_get_entry();
|
||||||
char *path = op_entry->path;
|
char *path = op_entry->path;
|
||||||
|
@ -773,7 +772,6 @@ static int load_plugin_screen(char *key)
|
||||||
param = NULL;
|
param = NULL;
|
||||||
if (path[0] == '\0' && key)
|
if (path[0] == '\0' && key)
|
||||||
path = P2STR((unsigned char *)key);
|
path = P2STR((unsigned char *)key);
|
||||||
|
|
||||||
int ret = plugin_load(path, param);
|
int ret = plugin_load(path, param);
|
||||||
|
|
||||||
if (ret == PLUGIN_USB_CONNECTED || ret == PLUGIN_ERROR)
|
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)
|
else if (ret == PLUGIN_GOTO_WPS)
|
||||||
ret_val = GO_TO_WPS;
|
ret_val = GO_TO_WPS;
|
||||||
else if (ret == PLUGIN_GOTO_PLUGIN)
|
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;
|
continue;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret_val = GO_TO_PREVIOUS;
|
ret_val = GO_TO_PREVIOUS;
|
||||||
|
|
|
@ -620,13 +620,21 @@ int do_shortcut_menu(void *ignored)
|
||||||
while (done == GO_TO_PREVIOUS)
|
while (done == GO_TO_PREVIOUS)
|
||||||
{
|
{
|
||||||
list.count = shortcut_count;
|
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))
|
if (simplelist_show_list(&list))
|
||||||
break; /* some error happened?! */
|
break; /* some error happened?! */
|
||||||
|
|
||||||
if (list.selection == -1)
|
if (list.selection == -1)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sc = get_shortcut(list.selection);
|
sc = get_shortcut(list.selection);
|
||||||
|
|
||||||
if (!sc)
|
if (!sc)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -668,6 +676,7 @@ int do_shortcut_menu(void *ignored)
|
||||||
if (sc->type == SHORTCUT_FILE)
|
if (sc->type == SHORTCUT_FILE)
|
||||||
browse.flags |= BROWSE_RUNFILE;
|
browse.flags |= BROWSE_RUNFILE;
|
||||||
done = rockbox_browse(&browse);
|
done = rockbox_browse(&browse);
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SHORTCUT_SETTING:
|
case SHORTCUT_SETTING:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue