Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!mips!smsc.sony.com!dce From: dce@smsc.sony.com (David Elliott) Newsgroups: comp.windows.x Subject: Re: Application resource file etiquette Message-ID: <1990Oct5.155651.7094@smsc.sony.com> Date: 5 Oct 90 15:56:51 GMT References: <69294@lll-winken.LLNL.GOV> Sender: dce@smsc.sony.com (David Elliott) Reply-To: dce@smsc.sony.com (David Elliott) Organization: Army Recrucification Center Lines: 41 In article <69294@lll-winken.LLNL.GOV>, casey@gauss.llnl.gov (Casey Leedom) writes: |> In the same vein, I keep on running into application resource files |> which spend a lot of time defining which colors to use in which buttons, |> etc. which almost invariably don't work right on monochrome displays. |> Since a majority of our workstations are monochrome I spend a lot of time |> commenting out all those carefully wrought color setups. I did run into |> one application that put ``#ifdef COLOR ... #endif'' around those |> definitions, but of course that was useless since application resource |> files aren't passed through cpp. I had a discussion about this recently, and the result was two ideas: 1. Add simple preprocessing to the X resource manager. Allow only a simple subset of the xrdb variables, the #ifdef, #else, #endif, and #define operations, and a subset of #if (maybe only string equality and inequality, and simple number comparisons like <, =, and >). 2. Modify the color namespace to handle "fallback" colors, which would allow the user to specify the desired color and the color to use if that can't be handled. The example that prompted this was a set of users that had their xterms set up to be black with green characters. When they used a black and white screen, the result was black with black characters. A fallback scheme would allow the user to say XTerm*background: black XTerm*foreground: green(white) So that instead of the foreground going back to the default (black) if green can't be handled, white is used. The second idea here is OK (please allow me at least some vanity ;-), but could be too confusing. -- ...David Elliott ...dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce ...(408)944-4073 ..."He'll become the Sun. We must have one you know" "Oh"