1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2010 Thomas Martitz
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
29 #include "root_menu.h"
43 { PLUGIN_GAMES_DIR
, LANG_PLUGIN_GAMES
},
44 { PLUGIN_APPS_DIR
, LANG_PLUGIN_APPS
},
45 { PLUGIN_DEMOS_DIR
, LANG_PLUGIN_DEMOS
},
48 static int plugins_menu(void* param
)
50 intptr_t item
= (intptr_t)param
;
51 struct browse_context browse
;
54 browse_context_init(&browse
, SHOW_PLUGINS
, 0, str(items
[item
].id
),
55 Icon_Plugin
, items
[item
].path
, NULL
);
57 ret
= rockbox_browse(&browse
);
58 if (ret
== GO_TO_PREVIOUS
)
63 #define ITEM_FLAG (MENU_FUNC_USEPARAM|MENU_FUNC_CHECK_RETVAL)
65 MENUITEM_FUNCTION(games_item
, ITEM_FLAG
, ID2P(LANG_PLUGIN_GAMES
),
66 plugins_menu
, (void*)GAMES
, NULL
, Icon_Folder
);
67 MENUITEM_FUNCTION(apps_item
, ITEM_FLAG
, ID2P(LANG_PLUGIN_APPS
),
68 plugins_menu
, (void*)APPS
, NULL
, Icon_Folder
);
69 MENUITEM_FUNCTION(demos_item
, ITEM_FLAG
, ID2P(LANG_PLUGIN_DEMOS
),
70 plugins_menu
, (void*)DEMOS
, NULL
, Icon_Folder
);
72 MAKE_MENU(plugin_menu
, ID2P(LANG_PLUGINS
), NULL
,
74 &games_item
, &apps_item
, &demos_item
);