X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=debian%2Fpatches%2F101_ignore-mising-keys.diff;h=3f59ea564c6373b47499a576c8f80975eb5c40fc;hp=9e37c8d3328c486ac1753305301995205bac623a;hb=2948134dc6273f6d3ea089c4cc273b69e2f8d51e;hpb=44681b6bd22a913716a6b014558206064e90a59f diff --git a/debian/patches/101_ignore-mising-keys.diff b/debian/patches/101_ignore-mising-keys.diff index 9e37c8d..3f59ea5 100644 --- a/debian/patches/101_ignore-mising-keys.diff +++ b/debian/patches/101_ignore-mising-keys.diff @@ -1,148 +1,67 @@ ---- trunk.orig/etc/cfg_menu.lua -+++ trunk/etc/cfg_menu.lua -@@ -9,14 +9,14 @@ +Wed Jul 23 18:30:48 BST 2008 Tuomo Valkonen + * Do not log complaints about keysym to keycode conversion failure. +diff -rN -u old-ion-3plus/ioncore/conf-bindings.c new-ion-3plus/ioncore/conf-bindings.c +--- old-ion-3plus/ioncore/conf-bindings.c 2008-07-24 21:29:07.000000000 +0100 ++++ new-ion-3plus/ioncore/conf-bindings.c 2008-07-24 21:29:07.000000000 +0100 +@@ -20,6 +20,7 @@ + #include + #include "conf-bindings.h" + #include "bindmaps.h" ++#include "ioncore.h" - 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 @@ + /*{{{ parse_keybut */ +@@ -94,7 +95,8 @@ 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.")); ++ ioncore_warn_nolog("%s: %s", str, ++ TR("Could not convert keysym to keycode.")); 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; +diff -rN -u old-ion-3plus/ioncore/ioncore.c new-ion-3plus/ioncore/ioncore.c +--- old-ion-3plus/ioncore/ioncore.c 2008-07-24 21:29:07.000000000 +0100 ++++ new-ion-3plus/ioncore/ioncore.c 2008-07-24 21:29:07.000000000 +0100 +@@ -22,6 +22,7 @@ + #ifndef CF_NO_GETTEXT + #include + #endif ++#include + + #include + #include +@@ -99,12 +100,17 @@ + /*{{{ warn_nolog */ -+ 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 @@ +-void ioncore_warn_nolog(const char *str) ++void ioncore_warn_nolog(const char *str, ...) + { +- fprintf(stderr, "%s: %s\n", libtu_progname(), str); ++ va_list args; ++ ++ va_start(args, str); ++ fprintf(stderr, "%s: ", libtu_progname()); ++ vfprintf(stderr, str, args); ++ fprintf(stderr, "\n"); ++ va_end(args); + } + +- + /*}}}*/ - 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 @@ +diff -rN -u old-ion-3plus/ioncore/ioncore.h new-ion-3plus/ioncore/ioncore.h +--- old-ion-3plus/ioncore/ioncore.h 2008-07-24 21:29:07.000000000 +0100 ++++ new-ion-3plus/ioncore/ioncore.h 2008-07-24 21:29:07.000000000 +0100 +@@ -28,6 +28,6 @@ + extern WHook *ioncore_snapshot_hook; + extern WHook *ioncore_deinit_hook; - defbindings("WMoveresMode", { - bdoc("Cancel the resize mode."), -- kpress("AnyModifier+Escape","WMoveresMode.cancel(_)"), -+ kpress("AnyModifier+Escape","WMoveresMode.cancel(_)", nil, true), +-extern void ioncore_warn_nolog(const char *str); ++extern void ioncore_warn_nolog(const char *str, ...); - bdoc("End the resize mode."), - kpress("AnyModifier+Return","WMoveresMode.finish(_)"), + #endif /* ION_IONCORE_IONCORE_H */ +