attached are two patches inspired by the devcon decisions for te left
button and rec button.

left_button.patch was discussed already but a decision never came
about. It checks for the BUTTON_LEFT code (simplest way to do it) in
the setting screen and accepts the new value if it gets it.

The part where the argument came in is that some people disagree with
makeing the ACTION_STD_MENU cancel. I tihnk this has to be done,
because getting rid of left means some targets have no way to cancel
(which is nesaccery imho).


rec_btn.diff makes a short press of the REC button (sansa only because
i was lazy) goto the rec screen from the tree, menus and wps.
I am very against configurabl button there, because the simplest
method is allowing the user to choose from the start menu items. This
is OK, but then we will be bombarded with requests to have it
configurable for different items in every single screen.. (massive
PITA to do, and bin increase for sure.)

The reason I went short press is because holding down the button is
annoying, and its not all that easy to press accidently anyway (even
on the irivers), and also because it really is no big deal if you find
yourself in the rec screen accidently anyway, it doesnt start
recording untill you press rec/play/whatever anyway.

So, anyone want to step up and play evil dictator and make a desicion?
or shall I just commit both?

Jonathan
Index: apps/settings.c
===================================================================
--- apps/settings.c	(revision 13500)
+++ apps/settings.c	(working copy)
@@ -1083,7 +1083,7 @@
                            struct value_setting_data *cb_data,
                            void (*function)(int))
 {
-    int action;
+    int action, button;
     bool done = false;
     struct gui_synclist lists;
     int oldvalue;
@@ -1117,6 +1117,12 @@
     {
 
         action = get_action(CONTEXT_LIST,TIMEOUT_BLOCK);
+        if (((get_action_statuscode(&button)&ACTION_IGNORING) == 0) &&
+            (button&BUTTON_LEFT))
+        {
+            action = ACTION_STD_OK;
+        }
+        
         if (action == ACTION_NONE)
             continue;
         if (gui_synclist_do_button(&lists,action,
@@ -1144,7 +1150,8 @@
                 *(bool*)variable = gui_synclist_get_sel_pos(&lists) ? true : false;
             else *(int*)variable = gui_synclist_get_sel_pos(&lists);
         }
-        else if (action == ACTION_STD_CANCEL)
+        else if ((action == ACTION_STD_CANCEL) ||
+                 (action == ACTION_STD_MENU))
         {
             if (cb_data->type == INT)
             {
Index: tree.c
===================================================================
--- tree.c	(revision 13569)
+++ tree.c	(working copy)
@@ -615,6 +615,12 @@
             case ACTION_STD_MENU:
                 return GO_TO_ROOT;
                 break;
+                
+#ifdef HAVE_RECORDING
+            case ACTION_STD_RECSCRN:
+                return GO_TO_RECSCREEN;
+                break;
+#endif
 
             case ACTION_TREE_WPS:
                 return GO_TO_PREVIOUS_MUSIC;
Index: action.h
===================================================================
--- action.h	(revision 13569)
+++ action.h	(working copy)
@@ -89,6 +89,7 @@
     ACTION_STD_CANCEL,
     ACTION_STD_CONTEXT,
     ACTION_STD_MENU,
+    ACTION_STD_RECSCRN,
     ACTION_STD_QUICKSCREEN,
     ACTION_STD_KEYLOCK,
     
Index: keymaps/keymap-e200.c
===================================================================
--- keymaps/keymap-e200.c	(revision 13569)
+++ keymaps/keymap-e200.c	(working copy)
@@ -37,10 +37,12 @@
     { ACTION_STD_NEXTREPEAT,  BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
 
     { ACTION_STD_MENU,        BUTTON_POWER|BUTTON_REL,          BUTTON_POWER },
+    { ACTION_STD_RECSCRN,     BUTTON_REC|BUTTON_REL,            BUTTON_REC },
 
     { ACTION_STD_OK,          BUTTON_SELECT|BUTTON_REL,         BUTTON_SELECT },
     { ACTION_STD_OK,          BUTTON_RIGHT,                     BUTTON_NONE },
     { ACTION_STD_CANCEL,      BUTTON_LEFT,                      BUTTON_NONE },
+    
 
     { ACTION_STD_QUICKSCREEN, BUTTON_DOWN|BUTTON_REPEAT,        BUTTON_NONE },
     { ACTION_STD_CONTEXT,     BUTTON_DOWN|BUTTON_REL,           BUTTON_NONE },
Index: gui/gwps.c
===================================================================
--- gui/gwps.c	(revision 13569)
+++ gui/gwps.c	(working copy)
@@ -505,6 +505,13 @@
                 return GO_TO_ROOT;
                 break;
 
+#ifdef HAVE_RECORDING
+            case ACTION_STD_RECSCRN:
+                FOR_NB_SCREENS(i)
+                    gui_wps[i].display->stop_scroll();
+                return GO_TO_RECSCREEN;
+                break;
+#endif
 
 #ifdef HAVE_QUICKSCREEN
             case ACTION_WPS_QUICKSCREEN:
Index: menu.c
===================================================================
--- menu.c	(revision 13569)
+++ menu.c	(working copy)
@@ -453,6 +453,13 @@
             ret = GO_TO_ROOTITEM_CONTEXT;
             done = true;
         } 
+#ifdef HAVE_RECORDING
+        else if (action == ACTION_STD_RECSCRN)
+        {
+           ret = GO_TO_RECSCREEN;
+           done = true;
+        }
+#endif
         else if (action == ACTION_STD_MENU)
         {
             if (menu != &root_menu_)

Reply via email to