]> git.decadent.org.uk Git - ion3.git/blob - debian/patches/101_ignore-mising-keys.diff
Merge commit '20081002' into HEAD
[ion3.git] / debian / patches / 101_ignore-mising-keys.diff
1 Wed Jul 23 18:30:48 BST 2008  Tuomo Valkonen <tuomov@iki.fi>
2   * Do not log complaints about keysym to keycode conversion failure.
3 diff -rN -u old-ion-3plus/ioncore/conf-bindings.c new-ion-3plus/ioncore/conf-bindings.c
4 --- old-ion-3plus/ioncore/conf-bindings.c       2008-07-24 21:29:07.000000000 +0100
5 +++ new-ion-3plus/ioncore/conf-bindings.c       2008-07-24 21:29:07.000000000 +0100
6 @@ -20,6 +20,7 @@
7  #include <libextl/extl.h>
8  #include "conf-bindings.h"
9  #include "bindmaps.h"
10 +#include "ioncore.h"
11  
12  
13  /*{{{ parse_keybut */
14 @@ -94,7 +95,8 @@
15                  break;
16              }
17              if(XKeysymToKeycode(ioncore_g.dpy, keysym)==0){
18 -                warn_obj(str, TR("Could not convert keysym to keycode."));
19 +                ioncore_warn_nolog("%s: %s", str, 
20 +                                   TR("Could not convert keysym to keycode."));
21                  break;
22              }
23              *ksb_ret=keysym;
24 diff -rN -u old-ion-3plus/ioncore/ioncore.c new-ion-3plus/ioncore/ioncore.c
25 --- old-ion-3plus/ioncore/ioncore.c     2008-07-24 21:29:07.000000000 +0100
26 +++ new-ion-3plus/ioncore/ioncore.c     2008-07-24 21:29:07.000000000 +0100
27 @@ -22,6 +22,7 @@
28  #ifndef CF_NO_GETTEXT
29  #include <libintl.h>
30  #endif
31 +#include <stdarg.h>
32  
33  #include <libtu/util.h>
34  #include <libtu/optparser.h>
35 @@ -99,12 +100,17 @@
36  /*{{{ warn_nolog */
37  
38  
39 -void ioncore_warn_nolog(const char *str)
40 +void ioncore_warn_nolog(const char *str, ...)
41  {
42 -    fprintf(stderr, "%s: %s\n", libtu_progname(), str);
43 +    va_list args;
44 +    
45 +    va_start(args, str);
46 +    fprintf(stderr, "%s: ", libtu_progname());
47 +    vfprintf(stderr, str, args);
48 +    fprintf(stderr, "\n");
49 +    va_end(args);
50  }
51  
52 -
53  /*}}}*/
54  
55  
56 diff -rN -u old-ion-3plus/ioncore/ioncore.h new-ion-3plus/ioncore/ioncore.h
57 --- old-ion-3plus/ioncore/ioncore.h     2008-07-24 21:29:07.000000000 +0100
58 +++ new-ion-3plus/ioncore/ioncore.h     2008-07-24 21:29:07.000000000 +0100
59 @@ -28,6 +28,6 @@
60  extern WHook *ioncore_snapshot_hook;
61  extern WHook *ioncore_deinit_hook;
62  
63 -extern void ioncore_warn_nolog(const char *str);
64 +extern void ioncore_warn_nolog(const char *str, ...);
65  
66  #endif /* ION_IONCORE_IONCORE_H */
67