Index: apps/action.h
===================================================================
RCS file: /cvsroot/rockbox/apps/action.h,v
retrieving revision 1.15
diff -u -r1.15 action.h
--- apps/action.h	6 Nov 2006 09:19:36 -0000	1.15
+++ apps/action.h	11 Nov 2006 11:57:55 -0000
@@ -128,6 +128,7 @@
     ACTION_TREE_PGRIGHT,/* optional */
     ACTION_TREE_STOP,
     ACTION_TREE_WPS,
+    ACTION_TREE_INSERT,
     
     /* radio */
     ACTION_FM_MENU,
Index: apps/onplay.c
===================================================================
RCS file: /cvsroot/rockbox/apps/onplay.c,v
retrieving revision 1.90
diff -u -r1.90 onplay.c
--- apps/onplay.c	25 Oct 2006 10:17:53 -0000	1.90
+++ apps/onplay.c	11 Nov 2006 11:57:56 -0000
@@ -59,5 +59,6 @@
 #include "main_menu.h"
 #include "sound_menu.h"
+#include "filetree.h"
 #if CONFIG_CODEC == SWCODEC
 #include "eq_menu.h"
 #endif
@@ -1045,3 +1045,24 @@
 
    return onplay_result;
 }
+/*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;
+}
Index: apps/onplay.h
===================================================================
RCS file: /cvsroot/rockbox/apps/onplay.h,v
retrieving revision 1.3
diff -u -r1.3 onplay.h
--- apps/onplay.h	23 Jun 2005 01:31:25 -0000	1.3
+++ apps/onplay.h	11 Nov 2006 11:57:56 -0000
@@ -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_OK,
Index: apps/playlist_menu.c
===================================================================
RCS file: /cvsroot/rockbox/apps/menus/playlist_menu.c,v
retrieving revision 1.17
diff -u -r1.17 playlist_menu.c
--- apps/menus/playlist_menu.c	18 Jul 2006 13:54:12 -0000	1.17
+++ apps/menus/playlist_menu.c	11 Nov 2006 11:57:56 -0000
@@ -63,6 +63,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, ID2P(LANG_CREATE_PLAYLIST), 
                  (int(*)(void))create_playlist, NULL, NOICON);
 MENUITEM_FUNCTION(view_playlist, ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), 
@@ -73,8 +73,9 @@
 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, ID2P(LANG_CLICK_INSERT), (int(*)(void))click_insert, NULL, Icon_NOICON);

-MAKE_MENU(playlist_settings, ID2P(LANG_PLAYLIST_MENU), NULL,
-          Icon_Playlist,
-          &recursive_dir_insert, &warn_on_erase);
+MAKE_MENU(playlist_settings, ID2P(LANG_PLAYLIST_MENU), NULL,
+          Icon_Playlist,
+          &recursive_dir_insert, &warn_on_erase, &click_insert_item);
 MAKE_MENU(playlist_options, ID2P(LANG_PLAYLIST_MENU), NULL,
           Icon_Playlist,
Index: apps/settings_list.c
===================================================================
--- apps/settings_list.c
+++ apps/settings_list.c
@@ -777,6 +777,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
Index: apps/settings.h
===================================================================
RCS file: /cvsroot/rockbox/apps/settings.h,v
retrieving revision 1.253
diff -u -r1.253 settings.h
--- apps/settings.h	10 Nov 2006 08:03:20 -0000	1.253
+++ apps/settings.h	11 Nov 2006 11:58:02 -0000
@@ -414,6 +414,9 @@
 #ifdef HAVE_REMOTE_LCD
     unsigned char rwps_file[MAX_FILENAME+1];  /* last remote-wps */
 #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;         /* iriver h300: backlight PWM value: 2..15
                                 (0 and 1 are black) */
Index: apps/tree.c
===================================================================
RCS file: /cvsroot/rockbox/apps/tree.c,v
retrieving revision 1.454
diff -u -r1.454 tree.c
--- apps/tree.c	11 Nov 2006 05:32:56 -0000	1.454
+++ apps/tree.c	11 Nov 2006 11:58:02 -0000
@@ -702,6 +702,37 @@
                 restore = true;
                 break;
 
+            case ACTION_TREE_INSERT: /* button insert modification */
+                /* nothing to do if no files to display */
+                if ( numentries == 0 )
+                    break;
+
+                int i;
+
+                if (id3db)
+                    i = tagtree_enter(&tc);
+                else  
+               {
+                    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, dircache[tc.selected_item].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;
Index: apps/keymaps/keymap-h1x0_h3x0.c
===================================================================
--- apps/keymaps/keymap-h1x0_h3x0.c.orig
+++ apps/keymaps/keymap-h1x0_h3x0.c
@@ -109,6 +109,7 @@ const struct button_mapping button_conte
     { ACTION_TREE_STOP,   BUTTON_OFF,                   BUTTON_NONE },
     { ACTION_TREE_STOP,   BUTTON_OFF|BUTTON_REL,        BUTTON_OFF },
     { 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 */
@@ -374,7 +374,7 @@
 
 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 */

@@ -380,6 +382,7 @@ const struct button_mapping button_conte
 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 */

Index: apps/lang/english.lang
===================================================================
RCS file: /cvsroot/rockbox/apps/lang/english.lang,v
retrieving revision 1.297
diff -u -r1.297 english.lang
--- apps/lang/english.lang	11 Nov 2006 01:18:57 -0000	1.297
+++ apps/lang/english.lang	11 Nov 2006 11:58:13 -0000
@@ -324,6 +324,34 @@
   </voice>
 </phrase>
 <phrase>
+  id: LANG_CLICK_DEFAULT
+  desc: in click insert menu
+  user:
+  <source>
+    *: "Original Behaviour"
+  </source>
+  <dest>
+    *: "Original Behaviour"
+  </dest>
+  <voice>
+    *: ""
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_CLICK_INSERT
+  desc: in playlist menu
+  user:
+  <source>
+    *: "Click Insert Options"
+  </source>
+  <dest>
+    *: "Click Insert Options"
+  </dest>
+  <voice>
+    *: ""
+  </voice>
+</phrase>
+<phrase>
   id: LANG_PLUGINS
   desc: in the main menu
   user:
Index: apps/keymaps/keymap-x5.c
===================================================================
--- apps/keymaps/keymap-x5.change 2006-12-12 00:56:13.000000000 -0700
+++ apps/keymaps/keymap-x5.c    2006-12-30 00:20:44.000000000 -0700
@@ -256,6 +256,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 */
Index: apps/keymaps/keymap-gigabeat.c
===================================================================
--- apps/keymaps/keymap-gigabeat.change 2006-12-12 00:56:13.000000000 -0700
+++ apps/keymaps/keymap-gigabeat.c    2006-12-30 00:20:44.000000000 -0700
@@ -107,6 +107,7 @@
     { ACTION_TREE_STOP,   BUTTON_A,                   BUTTON_NONE },
     { ACTION_TREE_STOP,   BUTTON_A|BUTTON_REL,        BUTTON_A },
     { ACTION_TREE_STOP,   BUTTON_A|BUTTON_REPEAT,     BUTTON_NONE },
+    { ACTION_TREE_INSERT, BUTTON_SELECT|BUTTON_REL,     BUTTON_SELECT },       
 
     LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
 }; /* button_context_tree */
Index: apps/keymaps/keymap-ipod.c
===================================================================
--- apps/keymaps/keymap-ipod.c	2007-01-29 21:48:02.000000000 -0700
+++ apps/keypaps/keymap-ipodinsert.c	2007-02-04 20:02:35.000000000 -0700
@@ -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 */

Index: wps/WPSLIST
===================================================================
RCS file: /cvsroot/rockbox/wps/WPSLIST,v
retrieving revision 1.30
diff -u -r1.30 WPSLIST
--- wps/WPSLIST	18 Sep 2006 19:17:58 -0000	1.30
+++ wps/WPSLIST	11 Nov 2006 11:58:18 -0000
@@ -131,6 +131,21 @@
 </rwps>
 
 <wps>
+Name: Classalt.wps
+RWPS: Classalt.rwps
+Author: Mmmm
+Font: courB08.fnt
+Statusbar: on
+</wps>
+
+<rwps>
+Name: Classalt.rwps
+Author: Mmmm
+Font: courB08.fnt
+Statusbar: on
+</rwps>
+
+<wps>
 Name: iCatcher.wps
 RWPS: iCatcher.rwps
 Author: Ioannis Koutoulakis
