[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

749.0. "How to set Icon name different than a Window name....." by AIAG::PARIKH (Mehul Parikh. A I Applications Group) Tue May 09 1989 14:19

 The application that I am working on has a name and other details on a
 title bar. When that window is iconized, all that information takes lot of 
 icon space. All that I want on icon is the app. name.

 How can I change the icon name to be other than the string that is on the
 title bar?

 This is the representative code...

 

T.RTitleUserPersonal
Name
DateLines
749.1Previous topic continued...AIAG::PARIKHMehul Parikh. A I Applications GroupTue May 09 1989 14:2628
 Oops..Hit the wrong button.
 Here is the code...

----------------
 toplevel = XtInitialize("FOO(Version 1.0)","Cclass",NULL,0,&argc,argv);
 main_window = DwtMainWindow(toplevel,"Testing",100,100,400,200);
 XtManageChild(main_window);

 --------------

 The icon and title bar both show "FOO(Version 1.0)". I want the icon to
 only have the name "FOO".

 I tried XSetIconName after getting the display and window, but I got the
 following run time error message:

X error event received from server: not a valid window ID
  Failed request major op code 18 X_ChangeProperty
  Failed request minor op code 0 (if applicable)
  ResourceID 0x400006 in failed request (if applicable)
  Serial number of failed request 26
  Current serial number in output stream 37
%XLIB-E-ERROREVENT, error event received from server
%TRACE-E-TRACEBACK, symbolic stack dump follows..........

Any suggestions?

749.2AITG::DERAMODaniel V. {AITG,ZFC}:: D'EramoTue May 09 1989 15:5510
     Re invalid window id error ... you probably either used the
     widget pointer instead of the window id, or you accessed the
     window id before there was a window (i.e. before realizing
     the widget).
     
     I'm sure there is a toolkit routine to set/change the icon
     name, or at least something to use XtSetValues on.
     
     Dan

749.3RAB::DESAIJatin DesaiTue May 09 1989 17:4918
Re: .0

Try 

   {
   Arg arg[4];
   int nargs;

   nargs = 0;
   XtSetArg(arg[argc], XtNtitle, "Title"); argc++;
   XtSetArg(arg[argc], XtNiconName, "Icon Name"); argc++;

   XtSetValues(toplevel, arg, argc);
   }

Jatin

749.4PSW::WINALSKIPaul S. WinalskiTue May 09 1989 21:094
That code fragment should say "int argc = 0;" instead of "int nargs;".

--PSW