From ef815729b6c2732a4ccc530402c4336a5a3e83b9 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 5 Aug 2007 12:14:07 +0000 Subject: Accept FS#7486 - shortcuts plugin. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14191 a1c6a512-1295-4272-9138-f99709370657 --- apps/onplay.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'apps/onplay.c') diff --git a/apps/onplay.c b/apps/onplay.c index f09913e312..eb03b0781b 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -1077,7 +1077,15 @@ static bool set_recdir(void) MENUITEM_FUNCTION(set_recdir_item, 0, ID2P(LANG_SET_AS_REC_DIR), set_recdir, NULL, clipboard_callback, Icon_Recording); #endif - +static bool add_to_faves(void) +{ + if(PLUGIN_USB_CONNECTED == filetype_load_plugin("shortcuts", + selected_file)) + onplay_result = ONPLAY_RELOAD_DIR; + return false; +} +MENUITEM_FUNCTION(add_to_faves_item, 0, ID2P(LANG_ADD_TO_FAVES), + add_to_faves, NULL, clipboard_callback, Icon_NOICON); static int clipboard_callback(int action,const struct menu_item_ex *this_item) @@ -1096,7 +1104,8 @@ static int clipboard_callback(int action,const struct menu_item_ex *this_item) (this_item == &properties_item) || (this_item == &rename_file_item) || (this_item == &clipboard_cut_item) || - (this_item == &clipboard_copy_item) + (this_item == &clipboard_copy_item) || + (this_item == &add_to_faves_item) ) { /* always visible */ @@ -1177,6 +1186,7 @@ MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), #ifdef HAVE_RECORDING &set_recdir_item, #endif + &add_to_faves_item, ); int onplay(char* file, int attr, int from) { -- cgit v1.2.3