ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/xdefaults.C
(Generate patch)

Comparing rxvt-unicode/src/xdefaults.C (file contents):
Revision 1.110 by root, Wed Aug 1 17:54:03 2007 UTC vs.
Revision 1.113 by ayin, Sat Sep 8 20:54:51 2007 UTC

110 BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), 110 BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"),
111 BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), 111 BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"),
112#if ENABLE_TRANSPARENCY 112#if ENABLE_TRANSPARENCY
113 BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), 113 BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"),
114 SWCH ("tr", Opt_transparent, 0, NULL), 114 SWCH ("tr", Opt_transparent, 0, NULL),
115# if TINTING
116 STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), 115 STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"),
117# endif 116 STRG (Rs_shade, "shading", "sh", "%", "shade background by x %."),
118#endif 117#endif
119#if OFF_FOCUS_FADING 118#if OFF_FOCUS_FADING
120 STRG (Rs_fade, "fading", "fade", "%", "fade colors x% percent when rxvt-unicode is losing focus"), 119 STRG (Rs_fade, "fading", "fade", "%", "fade colors x% percent when rxvt-unicode is losing focus"),
121 STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"), 120 STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"),
122#endif
123#if TINTING
124 STRG (Rs_shade, "shading", "sh", "%", "shade background by x % when tinting."),
125#endif 121#endif
126 BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), 122 BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"),
127#ifndef NO_BELL 123#ifndef NO_BELL
128# if ENABLE_FRILLS 124# if ENABLE_FRILLS
129 BOOL (Rs_urgentOnBell, "urgentOnBell", NULL, Opt_urgentOnBell, 0, NULL), 125 BOOL (Rs_urgentOnBell, "urgentOnBell", NULL, Opt_urgentOnBell, 0, NULL),
327#if defined(XPM_BACKGROUND) 323#if defined(XPM_BACKGROUND)
328 "XPM," 324 "XPM,"
329#endif 325#endif
330#if defined(ENABLE_TRANSPARENCY) 326#if defined(ENABLE_TRANSPARENCY)
331 "transparent," 327 "transparent,"
328 "tint,"
332#endif 329#endif
333#if HAVE_AFTERIMAGE 330#if HAVE_AFTERIMAGE
334 "afterimage," 331 "afterimage,"
335#endif
336#if TINTING
337 "tint,"
338#endif 332#endif
339#if defined(USE_XIM) 333#if defined(USE_XIM)
340 "XIM," 334 "XIM,"
341#endif 335#endif
342#if defined(NO_BACKSPACE_KEY) 336#if defined(NO_BACKSPACE_KEY)
572 rs[optList[entry].doff] = flag; 566 rs[optList[entry].doff] = flag;
573 } 567 }
574 } 568 }
575 else 569 else
576#ifdef KEYSYM_RESOURCE 570#ifdef KEYSYM_RESOURCE
577 /* if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) */ 571 if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1))
578 if (rxvt_Str_match (opt, "keysym."))
579 { 572 {
580 const char *str = argv[++i]; 573 const char *str = argv[++i];
581 574
582 if (str != NULL) 575 if (str != NULL)
583 parse_keysym (opt + sizeof ("keysym.") - 1, str); 576 parse_keysym (opt + sizeof ("keysym.") - 1, str);
679 char *newarg = NULL; 672 char *newarg = NULL;
680 char newargstr[NEWARGLIM]; 673 char newargstr[NEWARGLIM];
681 674
682 if (arg == NULL) 675 if (arg == NULL)
683 { 676 {
684 if ((n = rxvt_Str_match (str, "keysym.")) == 0) 677 n = sizeof ("keysym.") - 1;
678 if (strncmp (str, "keysym.", n))
685 return 0; 679 return 0;
686 680
687 str += n; /* skip `keysym.' */ 681 str += n; /* skip `keysym.' */
688 if (!(pmodend = strchr (str, ':'))) 682 if (!(pmodend = strchr (str, ':')))
689 return -1; 683 return -1;
762 strncpy (newargstr, arg, NEWARGLIM - 1); 756 strncpy (newargstr, arg, NEWARGLIM - 1);
763 newargstr[NEWARGLIM - 1] = '\0'; 757 newargstr[NEWARGLIM - 1] = '\0';
764 newarg = newargstr; 758 newarg = newargstr;
765 } 759 }
766 760
767 rxvt_Str_trim (newarg); 761 if (*newarg == '\0')
768 if (*newarg == '\0' || (n = rxvt_Str_escaped (newarg)) == 0)
769 return -1; 762 return -1;
770 763
771 keyboard->register_user_translation (sym, state, newarg); 764 keyboard->register_user_translation (sym, state, newarg);
772 return 1; 765 return 1;
773} 766}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines