diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-08-06 13:42:52 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-08-06 13:42:52 +0000 |
| commit | fda7d720c05b4a756f045e0c0f4afe9630edb5c5 (patch) | |
| tree | 35bb19611d47bcb05a49529a73ccc5d66a50476e /apps/root_menu.c | |
| parent | 5b76936a44de3c7ecd568300f26b5e6421901285 (diff) | |
| download | rockbox-fda7d720c05b4a756f045e0c0f4afe9630edb5c5.zip rockbox-fda7d720c05b4a756f045e0c0f4afe9630edb5c5.tar.gz rockbox-fda7d720c05b4a756f045e0c0f4afe9630edb5c5.tar.bz2 rockbox-fda7d720c05b4a756f045e0c0f4afe9630edb5c5.tar.xz | |
Accept FS#5464 - organise the rocks directory.
If any plugins or "open with" optoins dont work please let me know...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14214 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/root_menu.c')
| -rw-r--r-- | apps/root_menu.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c index b2684ab..ad603db 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -279,6 +279,37 @@ static int load_bmarks(void* param) bookmark_mrb_load(); return GO_TO_PREVIOUS; } +static int plugins_menu(void* param) +{ + (void)param; + MENUITEM_STRINGLIST(plugins_menu_items, ID2P(LANG_PLUGINS), NULL, + ID2P(LANG_PLUGIN_GAMES), + ID2P(LANG_PLUGIN_APPS), ID2P(LANG_PLUGIN_DEMOS)); + char *folder; + int retval = GO_TO_PREVIOUS; + int selection = 0, current = 0; + while (retval == GO_TO_PREVIOUS) + { + selection = do_menu(&plugins_menu_items, ¤t); + switch (selection) + { + case 0: + folder = PLUGIN_GAMES_DIR; + break; + case 1: + folder = PLUGIN_APPS_DIR; + break; + case 2: + folder = PLUGIN_DEMOS_DIR; + break; + default: + return selection; + } + retval = rockbox_browse(folder, SHOW_PLUGINS); + } + return retval; +} + /* These are all static const'd from apps/menus/ *.c so little hack so we can use them */ extern struct menu_item_ex @@ -308,7 +339,7 @@ static const struct root_items items[] = { #endif [GO_TO_RECENTBMARKS] = { load_bmarks, NULL, &bookmark_settings_menu }, - [GO_TO_BROWSEPLUGINS] = { browser, (void*)GO_TO_BROWSEPLUGINS, NULL }, + [GO_TO_BROWSEPLUGINS] = { plugins_menu, NULL, NULL }, }; static const int nb_items = sizeof(items)/sizeof(*items); |