--- rxvt-unicode/src/xdefaults.C 2012/06/07 16:04:45 1.170 +++ rxvt-unicode/src/xdefaults.C 2012/12/29 14:23:35 1.174 @@ -113,7 +113,7 @@ BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_scrollTtyOutput, Optflag_Reverse, "scroll-on-tty-output inhibit"), BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), -#if ENABLE_TRANSPARENCY +#if BG_IMAGE_FROM_ROOT BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), BOOL (Rs_transparent, "transparent", "tr", Opt_transparent, 0, "inherit parent pixmap"), STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), @@ -197,9 +197,9 @@ #if BG_IMAGE_FROM_FILE RSTRG (Rs_path, "path", "search path"), STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), -# if ENABLE_EWMH +#endif +#if ENABLE_EWMH STRG (Rs_iconfile, "iconFile", "icon", "file", "path to application icon image"), -# endif #endif /* fonts: command-line option = resource name */ STRG (Rs_font, "font", "fn", "fontname", "normal text font"), @@ -641,15 +641,16 @@ XrmQuarkList quarks, XrmRepresentation *type ecb_unused, XrmValue *value, - XPointer closure ecb_unused) + XPointer closure) { + rxvt_term *term = (rxvt_term *)closure; int last; for (last = 0; quarks[last] != NULLQUARK; last++) /* look for last quark in list */ ; last--; - GET_R->parse_keysym (XrmQuarkToString (quarks[last]), (char *)value->addr);//D//TODO + term->parse_keysym (XrmQuarkToString (quarks[last]), (char *)value->addr); return False; } @@ -744,6 +745,7 @@ wchar_t *ws = rxvt_mbstowcs (arg); if (!HOOK_INVOKE ((this, HOOK_REGISTER_COMMAND, DT_INT, sym, DT_INT, state, DT_WCS_LEN, ws, wcslen (ws), DT_END))) keyboard->register_user_translation (sym, state, ws); + free (ws); return 1; } @@ -799,6 +801,7 @@ */ for (int entry = 0; entry < ecb_array_length (optList); entry++) { + int s; const char *kw = optList[entry].kw; if (kw == NULL || rs[optList[entry].doff] != NULL) @@ -814,7 +817,10 @@ if (optList_isBool (entry)) { - bool s = parse_bool_resource (p); + s = strcasecmp (p, "TRUE") == 0 + || strcasecmp (p, "YES") == 0 + || strcasecmp (p, "ON") == 0 + || strcasecmp (p, "1") == 0; if (optList_isReverse (entry)) s = !s; @@ -829,39 +835,33 @@ void rxvt_term::extract_keysym_resources () { -#if !defined NO_RESOURCES && defined KEYSYM_RESOURCE - find_resources ("keysym", "Keysym", XrmEnumOneLevel, rxvt_define_key); -#endif -} - -#if !defined NO_RESOURCES && defined KEYSYM_RESOURCE -void -rxvt_term::find_resources (const char *n_prefix, const char *c_prefix, int mode, - Bool (*proc)(XrmDatabase *, XrmBindingList, XrmQuarkList, XrmRepresentation *, XrmValue *, XPointer)) -{ +#ifndef NO_RESOURCES /* * [R5 or later]: enumerate the resource database */ +# ifdef KEYSYM_RESOURCE XrmDatabase database = XrmGetDatabase (dpy); XrmName name_prefix[3]; XrmClass class_prefix[3]; name_prefix[0] = XrmStringToName (rs[Rs_name]); - name_prefix[1] = XrmStringToName (n_prefix); + name_prefix[1] = XrmStringToName ("keysym"); name_prefix[2] = NULLQUARK; class_prefix[0] = XrmStringToName (RESCLASS); - class_prefix[1] = XrmStringToName (c_prefix); + class_prefix[1] = XrmStringToName ("Keysym"); class_prefix[2] = NULLQUARK; /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ XrmEnumerateDatabase (database, name_prefix, class_prefix, - mode, proc, NULL); + XrmEnumOneLevel, rxvt_define_key, (XPointer)this); # ifdef RESFALLBACK name_prefix[0] = class_prefix[0] = XrmStringToName (RESFALLBACK); /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ XrmEnumerateDatabase (database, name_prefix, class_prefix, - mode, proc, NULL); + XrmEnumOneLevel, rxvt_define_key, (XPointer)this); # endif +# endif + +#endif /* NO_RESOURCES */ } -#endif /*----------------------- end-of-file (C source) -----------------------*/