and here is the patch

On 28/05/07, Jonathan Gordon <[EMAIL PROTECTED]> wrote:
hey all,
So there is two ways to fix the settings screen so the left button is
accept instead of cancel..
1) the way the attached patch does it - simple but obviously a hack
2) change the keymap file for every target - apart from the obvious
extra work to do this, it also puts us back in the problem of having 2
seperate contexts for the setting screens (one for this one, and one
for the colour picker/eq/time screens)

so, any major objections to this hacky way of doing it?

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)
             {

Reply via email to