Path: utzoo!utgpu!water!watmath!clyde!bellcore!dana From: dana@dino.bellcore.com (Dana A. Chee) Newsgroups: comp.windows.x Subject: Re: resources in toolkit Message-ID: Date: 23 May 88 11:56:43 GMT Sender: news@bellcore.bellcore.com Organization: Bellcore, Morristown, NJ USA Lines: 74 In-reply-to: jkh@ardent.UUCP.UUCP's message of 12 May 88 21:59:48 GMT In article <8805122159.AA07168@BigMoma.ardent.com> jkh@ardent.UUCP.UUCP writes: Ever since I installed Jef Poskanser's patches for a string->pixmap converter, I've been trying to figure out how to get icon pixmaps to be displayed properly. An entry of the form: xterm*iconPixmap: /foo/bar/somepixmapfile works fine. However, this sets it for *all* xterms, not just the ones with an application name of "xterm". I was under the impression that you could specify an alternate application name with -n (and an alternate window manager name with -T). Shouldn't it be possible to say something like: (~/.Xdefaults) xterm*iconPixmap: /stuff/generic-xterm-icon goofy*iconPixmap: /stuff/goofy-machine-icon (shell) % xterm -g 80x24+0+0 % xterm -n goofy -e rlogin goofy And have two different pixmaps displayed? It would be all well and fine if the toolkit (or xterm at least) supported a -iconPixmap flag so you could specify something in the absense of a resource, but that's not the case. I notice that -n in xterm is also looked for as the resource "iconName"... Is that right? I suppose if -T sets the application name, fine, but.... How *does* one select a potentially different icon pixmap for each invocation of xterm? What you need is '-name goofy' on the command line. This sets the application's actual name. Also, am I completely confused about the resource manager or shouldn't it be possible to say: Xterm*iconPixmap: ... It doesn't work for me.. Perhaps I just don't understand the name/class concept well enough. q? Its XTerm instead of Xterm (don't ask me why, that's just the way the code is written). And while we're on this subject, I guess I'll ask how exactly does the toolkit handle command line options? I notice that XtInititialize() is interested in argc, argv and a list of client-specific options which it seems to kindly parse and initialize for you, but wouldn't it be logical for the toolkit to have its own set of "standard" arguments that would be used to init the top level widget? I notice quite a few things that are searched for in the resource database, but there doesn't see to be any way of specifying them on the command line. Que Pasa? Yes, there are a set of standard command line arguments that Xt recognizes. They are listed on page 22 (Section 4.3) of the X Toolkit Intrinsics manual. When XtInitialize is called, it merges the client specific arguments with the standard aguments, and searches argv for all of them. Jordan Hubbard jkh@violet.berkeley.edu Hope this helps. -- Dana Chee Bellcore MRE 2Q-250 (201) 829-4488 dana@bellcore.com