diff -u -r apps_o/action.h apps/action.h --- apps_o/action.h 2008-05-17 02:44:53.000000000 +0200 +++ apps/action.h 2008-05-17 14:17:47.171875000 +0200 @@ -139,6 +139,7 @@ ACTION_TREE_PGRIGHT,/* optional */ ACTION_TREE_STOP, ACTION_TREE_WPS, + ACTION_TREE_INSERT, /* radio */ ACTION_FM_MENU, Only in apps: action.h.orig diff -u -r apps_o/keymaps/keymap-gigabeat.c apps/keymaps/keymap-gigabeat.c --- apps_o/keymaps/keymap-gigabeat.c 2008-05-17 02:45:00.000000000 +0200 +++ apps/keymaps/keymap-gigabeat.c 2008-05-17 14:17:47.343750000 +0200 @@ -125,6 +125,7 @@ { ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE }, { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_INSERT, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) }; /* button_context_tree */ Only in apps/keymaps: keymap-gigabeat.c.orig diff -u -r apps_o/keymaps/keymap-h1x0_h3x0.c apps/keymaps/keymap-h1x0_h3x0.c --- apps_o/keymaps/keymap-h1x0_h3x0.c 2008-05-17 02:45:00.000000000 +0200 +++ apps/keymaps/keymap-h1x0_h3x0.c 2008-05-17 14:17:47.296875000 +0200 @@ -109,6 +109,7 @@ { ACTION_TREE_WPS, BUTTON_ON|BUTTON_REL, BUTTON_ON }, { ACTION_TREE_STOP, BUTTON_OFF, BUTTON_NONE }, { ACTION_TREE_STOP, BUTTON_OFF|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_INSERT, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) }; /* button_context_tree */ @@ -372,13 +373,14 @@ static const struct button_mapping button_context_tree_h100remote[] = { { ACTION_TREE_WPS, BUTTON_RC_ON, BUTTON_NONE }, - + { ACTION_TREE_INSERT, BUTTON_RC_REC, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST|CONTEXT_REMOTE) }; /* button_context_tree_h100remote */ static const struct button_mapping button_context_tree_h300lcdremote[] = { { ACTION_TREE_STOP, BUTTON_RC_STOP, BUTTON_NONE }, { ACTION_TREE_WPS, BUTTON_RC_ON, BUTTON_NONE }, + { ACTION_TREE_INSERT, BUTTON_RC_MENU|BUTTON_REL, BUTTON_RC_MENU }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST|CONTEXT_REMOTE) }; /* button_context_tree_h300lcdremote */ Only in apps/keymaps: keymap-h1x0_h3x0.c.orig diff -u -r apps_o/keymaps/keymap-ipod.c apps/keymaps/keymap-ipod.c --- apps_o/keymaps/keymap-ipod.c 2008-05-17 02:45:00.000000000 +0200 +++ apps/keymaps/keymap-ipod.c 2008-05-17 14:17:47.375000000 +0200 @@ -57,7 +57,7 @@ static const struct button_mapping button_context_tree[] = { { ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, { ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, - + { ACTION_TREE_INSERT, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_tree */ diff -u -r apps_o/keymaps/keymap-x5.c apps/keymaps/keymap-x5.c --- apps_o/keymaps/keymap-x5.c 2008-05-17 02:45:00.000000000 +0200 +++ apps/keymaps/keymap-x5.c 2008-05-17 14:17:47.328125000 +0200 @@ -264,6 +264,7 @@ { ACTION_NONE, BUTTON_PLAY, BUTTON_NONE }, { ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, { ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, + { ACTION_TREE_INSERT, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_tree */ Only in apps/keymaps: keymap-x5.c.orig diff -u -r apps_o/lang/english.lang apps/lang/english.lang --- apps_o/lang/english.lang 2008-05-17 02:45:01.000000000 +0200 +++ apps/lang/english.lang 2008-05-17 14:17:47.312500000 +0200 @@ -500,6 +500,34 @@ + id: LANG_CLICK_DEFAULT + desc: in click insert menu + user: + + *: "Original Behaviour" + + + *: "Original Behaviour" + + + *: "" + + + + id: LANG_CLICK_INSERT + desc: in playlist menu + user: + + *: "Click Insert Options" + + + *: "Click Insert Options" + + + *: "" + + + id: LANG_PLUGINS desc: in the main menu user: Only in apps/lang: english.lang.orig diff -u -r apps_o/menus/playlist_menu.c apps/menus/playlist_menu.c --- apps_o/menus/playlist_menu.c 2008-05-17 02:45:05.000000000 +0200 +++ apps/menus/playlist_menu.c 2008-05-17 14:17:47.234375000 +0200 @@ -62,6 +62,22 @@ return 0; } +static bool click_insert(void) +{ + static const struct opt_items names[] = { + { STR(LANG_CLICK_DEFAULT)}, + { STR(LANG_INSERT)}, + { STR(LANG_INSERT_LAST)}, + { STR(LANG_INSERT_SHUFFLED)}, + { STR(LANG_QUEUE) }, + { STR(LANG_QUEUE_LAST) }, + }; + + return set_option( str(LANG_CLICK_INSERT), + &global_settings.click_insert, INT, names, 6, + NULL ); +} + MENUITEM_FUNCTION(create_playlist_item, 0, ID2P(LANG_CREATE_PLAYLIST), (int(*)(void))create_playlist, NULL, NULL, Icon_NOICON); MENUITEM_FUNCTION(view_playlist, 0, ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), @@ -74,10 +90,11 @@ NULL, NULL, Icon_NOICON); MENUITEM_SETTING(recursive_dir_insert, &global_settings.recursive_dir_insert, NULL); MENUITEM_SETTING(warn_on_erase, &global_settings.warnon_erase_dynplaylist, NULL); +MENUITEM_FUNCTION(click_insert_item, 0, ID2P(LANG_CLICK_INSERT), (int(*)(void))click_insert, NULL, NULL, Icon_NOICON); MAKE_MENU(playlist_settings, ID2P(LANG_PLAYLISTS), NULL, Icon_Playlist, - &recursive_dir_insert, &warn_on_erase); + &recursive_dir_insert, &warn_on_erase, &click_insert_item); MAKE_MENU(playlist_options, ID2P(LANG_PLAYLISTS), NULL, Icon_Playlist, &create_playlist_item, &view_playlist, &save_playlist, &catalog); diff -u -r apps_o/onplay.c apps/onplay.c --- apps_o/onplay.c 2008-05-17 02:45:06.000000000 +0200 +++ apps/onplay.c 2008-05-17 14:17:47.203125000 +0200 @@ -55,6 +55,7 @@ #include "icons.h" #endif #include "sound_menu.h" +#include "filetree.h" #if CONFIG_CODEC == SWCODEC #include "menus/eq_menu.h" #endif @@ -1247,3 +1248,24 @@ return context == CONTEXT_WPS ? ONPLAY_OK : ONPLAY_RELOAD_DIR; } } +/*one click insert modification*/ + +int onplay_one_click(char* file, int attr, int from,struct tree_context* c){ + int ret=1; + context=from; + selected_file = file; + selected_file_attr = attr; + if(global_settings.click_insert==0) + ret=ft_enter(c); + else if(global_settings.click_insert==1) + add_to_playlist(PLAYLIST_INSERT, false); + else if(global_settings.click_insert==2) + add_to_playlist(PLAYLIST_INSERT_LAST, false); + else if(global_settings.click_insert==3) + add_to_playlist(PLAYLIST_INSERT_SHUFFLED, false); + else if(global_settings.click_insert==4) + add_to_playlist(PLAYLIST_INSERT, true); + else + add_to_playlist(PLAYLIST_INSERT_LAST, true); + return ret; +} Only in apps: onplay.c.orig diff -u -r apps_o/onplay.h apps/onplay.h --- apps_o/onplay.h 2008-05-17 02:45:06.000000000 +0200 +++ apps/onplay.h 2008-05-17 14:17:47.218750000 +0200 @@ -20,6 +20,7 @@ #define _ONPLAY_H_ int onplay(char* file, int attr, int from_screen); +int onplay_one_click(char* file, int attr, int from,struct tree_context* c); enum { ONPLAY_MAINMENU = -1, diff -u -r apps_o/settings.h apps/settings.h --- apps_o/settings.h 2008-05-17 02:45:30.000000000 +0200 +++ apps/settings.h 2008-05-17 14:17:47.250000000 +0200 @@ -402,6 +402,9 @@ int backlight_fade_in; /* backlight fade in timing: 0..3 */ int backlight_fade_out; /* backlight fade in timing: 0..7 */ #endif + int click_insert; /*setting for click behaviour in file tree: + 0:insert, 1:insert last,2:queue, + 3:queue last,4:insert shuffled*/ #ifdef HAVE_BACKLIGHT_BRIGHTNESS int brightness; #endif Only in apps: settings.h.orig diff -u -r apps_o/settings_list.c apps/settings_list.c --- apps_o/settings_list.c 2008-05-17 02:45:30.000000000 +0200 +++ apps/settings_list.c 2008-05-17 14:20:24.781250000 +0200 @@ -1086,6 +1086,7 @@ #ifdef HAVE_TC_RAMCACHE OFFON_SETTING(0,tagcache_ram,LANG_TAGCACHE_RAM,false,"tagcache_ram",NULL), #endif + {F_T_INT,&global_settings.click_insert,LANG_CLICK_INSERT,INT(0),"click insert setting","original,insert,insert last,insert shuffled,queue,queue last",UNUSED}, OFFON_SETTING(0, tagcache_autoupdate, LANG_TAGCACHE_AUTOUPDATE, false, "tagcache_autoupdate", NULL), #endif Only in apps: settings_list.c.orig Only in apps: settings_list.c.rej diff -u -r apps_o/tree.c apps/tree.c --- apps_o/tree.c 2008-05-17 02:45:30.000000000 +0200 +++ apps/tree.c 2008-05-17 14:17:47.281250000 +0200 @@ -679,6 +679,47 @@ restore = true; break; + case ACTION_TREE_INSERT: /* button insert modification */ + /* nothing to do if no files to display */ + if ( numentries == 0 ) + break; + + int i; + int attr = 0; + + if (id3db) + { + if (tagtree_get_attr(&tc) == FILE_ATTR_AUDIO) + { + attr = FILE_ATTR_AUDIO; + tagtree_get_filename(&tc, buf, sizeof(buf)); + } + else + attr = ATTR_DIRECTORY; + } + else + { + attr = dircache[tc.selected_item].attr; + if (currdir[1]) + snprintf(buf, sizeof buf, "%s/%s", + currdir, dircache[tc.selected_item].name); + else + snprintf(buf, sizeof buf, "/%s", + dircache[tc.selected_item].name); + } + i=onplay_one_click(buf, attr, curr_context,&tc); + + switch (i) + { + case 1: reload_dir = true; break; + case 2: start_wps = true; break; + case 3: exit_func = true; break; + default: break; + } + + restore = true; + break; + case ACTION_STD_CANCEL: if (*tc.dirfilter > NUM_FILTER_MODES && tc.dirlevel < 1) { exit_func = true; Only in apps: tree.c.orig