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.120 by ayin, Thu Nov 15 11:36:15 2007 UTC vs.
Revision 1.123 by ayin, Fri Nov 23 11:17:37 2007 UTC

263#endif 263#endif
264#ifdef HAVE_AFTERIMAGE 264#ifdef HAVE_AFTERIMAGE
265 STRG (Rs_blendtype, "blendType", "blt", "string", "background image blending type - alpha, tint, etc..."), 265 STRG (Rs_blendtype, "blendType", "blt", "string", "background image blending type - alpha, tint, etc..."),
266 STRG (Rs_blurradius, "blurRadius", "blr", "HxV", "Gaussian Blur radii to apply to the root background"), 266 STRG (Rs_blurradius, "blurRadius", "blr", "HxV", "Gaussian Blur radii to apply to the root background"),
267#endif 267#endif
268#ifndef NO_RESOURCES
269 INFO ("xrm", "string", "X resource"),
270#endif
271 INFO ("e", "command arg ...", "command to execute") 268 INFO ("e", "command arg ...", "command to execute")
272 }; 269 };
273 270
274#undef INFO 271#undef INFO
275#undef STRG 272#undef STRG
561 558
562 if (optList[entry].doff != -1) 559 if (optList[entry].doff != -1)
563 rs[optList[entry].doff] = flag; 560 rs[optList[entry].doff] = flag;
564 } 561 }
565 } 562 }
563#ifndef NO_RESOURCES
564 else if (!strcmp (opt, "xrm"))
565 {
566 if (i+1 < argc)
567 XrmPutLineResource (&option_db, argv[++i]);
568 }
569#endif
570#ifdef KEYSYM_RESOURCE
571 else if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1))
572 {
573 if (i+1 < argc)
574 {
575 char *res = (char *)malloc (strlen (opt) + strlen (argv[++i]) + 6);
576 sprintf (res, "*.%s: %s\n", opt, argv[i]);
577 XrmPutLineResource (&option_db, res);
578 free (res);
579 }
580 }
581#endif
566 else 582 else
567#ifdef KEYSYM_RESOURCE
568 if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1))
569 { 583 {
570 if (i+1 < argc)
571 parse_keysym (opt + sizeof ("keysym.") - 1, argv[++i]);
572 }
573 else
574#endif
575 {
576 bad_option = 1; 584 bad_option = 1;
577 rxvt_warn ("\"%s\": unknown or malformed option.\n", opt); 585 rxvt_warn ("\"%s\": unknown or malformed option.\n", opt);
578 } 586 }
579 } 587 }
580 588
581 if (bad_option) 589 if (bad_option)
582 rxvt_usage (0); 590 rxvt_usage (0);
583} 591}
801 809
802void 810void
803rxvt_term::extract_resources () 811rxvt_term::extract_resources ()
804{ 812{
805#ifndef NO_RESOURCES 813#ifndef NO_RESOURCES
814 XrmDatabase database = XrmGetDatabase (dpy);
815 XrmMergeDatabases (option_db, &database);
816 option_db = NULL;
806 /* 817 /*
807 * Query resources for options that affect us 818 * Query resources for options that affect us
808 */ 819 */
809 for (int entry = 0; entry < optList_size; entry++) 820 for (int entry = 0; entry < optList_size; entry++)
810 { 821 {
839 850
840 /* 851 /*
841 * [R5 or later]: enumerate the resource database 852 * [R5 or later]: enumerate the resource database
842 */ 853 */
843# ifdef KEYSYM_RESOURCE 854# ifdef KEYSYM_RESOURCE
844 XrmDatabase database = XrmGetDatabase (dpy);
845 XrmName name_prefix[3]; 855 XrmName name_prefix[3];
846 XrmClass class_prefix[3]; 856 XrmClass class_prefix[3];
847 857
848 name_prefix[0] = XrmStringToName (rs[Rs_name]); 858 name_prefix[0] = XrmStringToName (rs[Rs_name]);
849 name_prefix[1] = XrmStringToName ("keysym"); 859 name_prefix[1] = XrmStringToName ("keysym");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines