summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-08-05 12:14:07 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-08-05 12:14:07 +0000
commitef815729b6c2732a4ccc530402c4336a5a3e83b9 (patch)
tree399f3aec796764ae8fcf4bae3c6573e510becb82 /apps/onplay.c
parentf8c6801fdd74b0d2a8d6143c455b61e33306a794 (diff)
downloadrockbox-ef815729b6c2732a4ccc530402c4336a5a3e83b9.tar.gz
rockbox-ef815729b6c2732a4ccc530402c4336a5a3e83b9.zip
Accept FS#7486 - shortcuts plugin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14191 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c14
1 files changed, 12 insertions, 2 deletions
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)
1077MENUITEM_FUNCTION(set_recdir_item, 0, ID2P(LANG_SET_AS_REC_DIR), 1077MENUITEM_FUNCTION(set_recdir_item, 0, ID2P(LANG_SET_AS_REC_DIR),
1078 set_recdir, NULL, clipboard_callback, Icon_Recording); 1078 set_recdir, NULL, clipboard_callback, Icon_Recording);
1079#endif 1079#endif
1080 1080static bool add_to_faves(void)
1081{
1082 if(PLUGIN_USB_CONNECTED == filetype_load_plugin("shortcuts",
1083 selected_file))
1084 onplay_result = ONPLAY_RELOAD_DIR;
1085 return false;
1086}
1087MENUITEM_FUNCTION(add_to_faves_item, 0, ID2P(LANG_ADD_TO_FAVES),
1088 add_to_faves, NULL, clipboard_callback, Icon_NOICON);
1081 1089
1082 1090
1083static int clipboard_callback(int action,const struct menu_item_ex *this_item) 1091static 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)
1096 (this_item == &properties_item) || 1104 (this_item == &properties_item) ||
1097 (this_item == &rename_file_item) || 1105 (this_item == &rename_file_item) ||
1098 (this_item == &clipboard_cut_item) || 1106 (this_item == &clipboard_cut_item) ||
1099 (this_item == &clipboard_copy_item) 1107 (this_item == &clipboard_copy_item) ||
1108 (this_item == &add_to_faves_item)
1100 ) 1109 )
1101 { 1110 {
1102 /* always visible */ 1111 /* always visible */
@@ -1177,6 +1186,7 @@ MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
1177#ifdef HAVE_RECORDING 1186#ifdef HAVE_RECORDING
1178 &set_recdir_item, 1187 &set_recdir_item,
1179#endif 1188#endif
1189 &add_to_faves_item,
1180 ); 1190 );
1181int onplay(char* file, int attr, int from) 1191int onplay(char* file, int attr, int from)
1182{ 1192{