]> git.decadent.org.uk Git - ion3.git/commitdiff
Changed to ignore all missing keys based on upstream opinion.
authorBen Hutchings <ben@decadent.org.uk>
Wed, 23 Jul 2008 23:22:31 +0000 (23:22 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 2 Nov 2008 12:48:43 +0000 (12:48 +0000)
debian/patches/101_ignore-mising-keys.diff

index 9e37c8d3328c486ac1753305301995205bac623a..3e9094948f9a756e59a84013bfe96434dbbefe68 100644 (file)
---- trunk.orig/etc/cfg_menu.lua
-+++ trunk/etc/cfg_menu.lua
-@@ -9,14 +9,14 @@
- defbindings("WMenu", {
-     bdoc("Close the menu."),
--    kpress("Escape", "WMenu.cancel(_)"),
-+    kpress("Escape", "WMenu.cancel(_)", nil, true),
-     kpress("Control+G", "WMenu.cancel(_)"),
-     kpress("Control+C", "WMenu.cancel(_)"),
-     kpress("Left", "WMenu.cancel(_)"),
-     
-     bdoc("Activate current menu entry."),
-     kpress("Return",  "WMenu.finish(_)"),
--    kpress("KP_Enter", "WMenu.finish(_)"),
-+    kpress("KP_Enter", "WMenu.finish(_)", nil, true),
-     kpress("Control+M", "WMenu.finish(_)"),
-     kpress("Right", "WMenu.finish(_)"),
-     
---- trunk.orig/etc/cfg_query.lua
-+++ trunk/etc/cfg_query.lua
-@@ -17,8 +17,8 @@
-     bdoc("Go to end/beginning."),
-     kpress("Control+E", "WEdln.eol(_)"),
-     kpress("Control+A", "WEdln.bol(_)"),
--    kpress("End", "WEdln.eol(_)"),
--    kpress("Home", "WEdln.bol(_)"),
-+    kpress("End", "WEdln.eol(_)", nil, true),
-+    kpress("Home", "WEdln.bol(_)", nil, true),
-     
-     bdoc("Skip one word forward/backward."),
-     kpress("Control+X", "WEdln.skip_word(_)"),
-@@ -26,7 +26,7 @@
-     bdoc("Delete next character."),
-     kpress("Control+D", "WEdln.delete(_)"),
--    kpress("Delete", "WEdln.delete(_)"),
-+    kpress("Delete", "WEdln.delete(_)", nil, true),
-     
-     bdoc("Delete previous character."),
-     kpress("BackSpace", "WEdln.backspace(_)"),
-@@ -87,21 +87,21 @@
-     bdoc("Close the query and execute bound action."),
-     kpress("Control+M", "WEdln.finish(_)"),
-     kpress("Return", "WEdln.finish(_)"),
--    kpress("KP_Enter", "WEdln.finish(_)"),
-+    kpress("KP_Enter", "WEdln.finish(_)", nil, true),
- })
- defbindings("WInput", {
-     bdoc("Close the query/message box, not executing bound actions."),
--    kpress("Escape", "WInput.cancel(_)"),
-+    kpress("Escape", "WInput.cancel(_)", nil, true),
-     kpress("Control+G", "WInput.cancel(_)"),
-     kpress("Control+C", "WInput.cancel(_)"),
-     
-     bdoc("Scroll the message or completions up/down."),
-     kpress("Control+U", "WInput.scrollup(_)"),
-     kpress("Control+V", "WInput.scrolldown(_)"),
--    kpress("Page_Up", "WInput.scrollup(_)"),
--    kpress("Page_Down", "WInput.scrolldown(_)"),
-+    kpress("Page_Up", "WInput.scrollup(_)", nil, true),
-+    kpress("Page_Down", "WInput.scrolldown(_)", nil, true),
- })
---- trunk.orig/ioncore/conf-bindings.c
-+++ trunk/ioncore/conf-bindings.c
-@@ -55,7 +55,7 @@
- bool ioncore_parse_keybut(const char *str, uint *mod_ret, uint *ksb_ret,
--                          bool button, bool init_any)
-+                          bool button, bool init_any, bool quiet_absent)
- {
-     char *str2, *p, *p2;
-     int keysym=NoSymbol, i;
-@@ -94,7 +94,8 @@
+--- ion3.orig/ioncore/conf-bindings.c
++++ ion3/ioncore/conf-bindings.c
+@@ -94,7 +94,7 @@
                  break;
              }
              if(XKeysymToKeycode(ioncore_g.dpy, keysym)==0){
 -                warn_obj(str, TR("Could not convert keysym to keycode."));
-+                if(!quiet_absent)
-+                    warn_obj(str, TR("Could not convert keysym to keycode."));
++                /* It is not an error for a keymap to lack some keys */
                  break;
              }
              *ksb_ret=keysym;
-@@ -256,6 +257,7 @@
-     ExtlFn func;
-     bool wr=FALSE;
-     int area=0;
-+    bool extra;
-     
-     if(!extl_table_gets_s(tab, "action", &action_str)){
-         warn(TR("Binding type not set."));
-@@ -277,9 +279,12 @@
-         if(!extl_table_gets_s(tab, "kcb", &ksb_str))
-             goto fail;
-+        if(!extl_table_gets_b(tab, "extra", &extra))
-+            extra=FALSE;
-+
-         if(!ioncore_parse_keybut(ksb_str, &mod, &ksb,
-                                  (action!=BINDING_KEYPRESS && action!=-1), 
--                                 init_any)){
-+                                 init_any, extra)){
-             goto fail;
-         }
-     }
---- trunk.orig/ioncore/ioncore_bindings.lua
-+++ trunk/ioncore/ioncore_bindings.lua
-@@ -125,9 +125,12 @@
- -- Creates a binding description table for the action of pressing a key given 
- -- by \var{keyspec} (with possible modifiers) to the function \var{cmd}.
- -- The \var{guard} controls when the binding can be called.
-+-- The \var{extra} flag signals whether the binding is a non-critical extra
-+-- binding.  If this is true and a named key does not exist, the binding will
-+-- be quietly ignored.
- -- For more informationp see Section \ref{sec:bindings}.
--function ioncore.kpress(keyspec, cmd, guard)
--    return putcmd(cmd, guard, {action = "kpress", kcb = keyspec})
-+function ioncore.kpress(keyspec, cmd, guard, extra)
-+    return putcmd(cmd, guard, {action = "kpress", kcb = keyspec, extra = extra})
- end
- --DOC
---- trunk.orig/ioncore/conf-bindings.h
-+++ trunk/ioncore/conf-bindings.h
-@@ -19,6 +19,6 @@
- extern bool ioncore_parse_keybut(const char *str, 
-                                  uint *mod_ret, uint *ksb_ret,
--                                 bool button, bool init_any);
-+                                 bool button, bool init_any, bool quiet_absent);
- #endif /* ION_IONCORE_CONF_BINDINGS_H */
---- trunk.orig/etc/cfg_ioncore.lua
-+++ trunk/etc/cfg_ioncore.lua
-@@ -284,7 +284,7 @@
- defbindings("WMoveresMode", {
-     bdoc("Cancel the resize mode."),
--    kpress("AnyModifier+Escape","WMoveresMode.cancel(_)"),
-+    kpress("AnyModifier+Escape","WMoveresMode.cancel(_)", nil, true),
-     bdoc("End the resize mode."),
-     kpress("AnyModifier+Return","WMoveresMode.finish(_)"),