color icon for unix app ? 
Author Message
 color icon for unix app ?

Hi,

i want to use a color icon for a unix application (SGI IRIX 6.5, 4dwm). I
use the following code, but it does not work. What am i missing?

wish8.3
% image create photo -file icon.gif
image1
% toplevel .icon
.icon
% pack [label .icon.l -image image1]
% wm iconwindow . .icon

Regards,
 Stefan

---
stefan.seidler AT cup.uni-muenchen.de



Sat, 24 Jul 2004 04:03:15 GMT  
 color icon for unix app ?

Quote:

>i want to use a color icon for a unix application (SGI IRIX 6.5, 4dwm). I
>use the following code, but it does not work. What am i missing?

>wish8.3
>% image create photo -file icon.gif
>image1
>% toplevel .icon
>.icon
>% pack [label .icon.l -image image1]
>% wm iconwindow . .icon

You probably just need to unmap and remap the top-level window,
so the window manager will notice the changes:

% wm withdraw .
% wm state . normal

Sprinkle calls to [update] as needed in application code.

--Joe English




Sat, 24 Jul 2004 09:48:08 GMT  
 color icon for unix app ?

Quote:

> i want to use a color icon for a unix application (SGI IRIX 6.5, 4dwm). I
>use the following code, but it does not work. What am i missing?

> wish8.3
> % image create photo -file icon.gif
> image1
> % toplevel .icon
> .icon
> % pack [label .icon.l -image image1]
> % wm iconwindow . .icon

Frequently given answer: How does it not work?

First of all, I read in man wm:
"Note: not all window managers support the notion of an icon window."

Whether this holds for 4dwm, I can't tell. But seeing from your code,
the "toplevel" command should bring up the empty grey square, "pack.."
would display the image and shrink to fit.

So does "Does not work" mean: the "wm iconwindow ..." command shows no
reaction? The expected reaction (only from reading manpages) seems to be
that .icon disappears, but reappears if the toplevel . is minimized.

You might try with different window managers, they sometimes have quite
different behavior (which you maybe should not rely on, in order to
write really portable software ;-)
--
Schoene Gruesse/best regards, Richard Suchenwirth - +49-7531-86 2703
Siemens Dematic AG, PA RC D2, Buecklestr.1-5, 78467 Konstanz,Germany
Personal opinions expressed only unless explicitly stated otherwise.



Sat, 24 Jul 2004 15:03:42 GMT  
 color icon for unix app ?


Quote:
> >i want to use a color icon for a unix application (SGI IRIX 6.5, 4dwm). I
> >use the following code, but it does not work. What am i missing?

> >wish8.3
> >% image create photo -file icon.gif
> >image1
> >% toplevel .icon
> >.icon
> >% pack [label .icon.l -image image1]
> >% wm iconwindow . .icon

> You probably just need to unmap and remap the top-level window,
> so the window manager will notice the changes:

> % wm withdraw .
> % wm state . normal

That's it.
Thanks.

Regards,
 Stefan

("Does not work", means: the picture of the icon is unchanged ...)

---
stefan.seidler AT cup.uni-muenchen.de



Sat, 24 Jul 2004 18:12:42 GMT  
 color icon for unix app ?


:% image create photo -file icon.gif
:image1
:% toplevel .icon
:.icon
:% pack [label .icon.l -image image1]

I tried this under CDE on my SPARC Solaris 8 system.  Up to this point,
I had the default toplevel and a second toplevel with my gif image.

but when I do this command, the second toplevel disappears and the icon
of . doesn't change.

:% wm iconwindow . .icon

Anyone able to get this specific sequence of commands to work anywhere?
--
"I know of vanishingly few people ... who choose to use ksh." "I'm a minority!"

Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.



Tue, 27 Jul 2004 00:10:51 GMT  
 color icon for unix app ?


:Anyone able to get this specific sequence of commands to work anywhere?

Thanks to the <URL: http://purl.org/tcl/wiki/> chat gang, I got this
series of Tk commands to change the icon under CDE.  

$ cat /tmp/icon
image create photo -file [set tk_library]/images/logo64.gif
toplevel .icon
pack [label .icon.l -image image1]
wm iconwindow . .icon
wm withdraw .
wm state . iconic

--
"I know of vanishingly few people ... who choose to use ksh." "I'm a minority!"

Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.



Tue, 27 Jul 2004 03:20:26 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Colored application icon on unix

2. NEW: Color icons in tk_messageBox under Unix.

3. Icons - true color or 256 color

4. ICONS, ICONS, ICONS....

5. ICONS, ICONS, ICONS

6. Icons Icons Icons

7. Color Icons for VW ApplicationModel

8. Colored icons with VisualWrks 2.5

9. Color images for window icons

10. colored icons in CDE

11. Color icon in Tk?

12. HELP - Ho do I create color icons?

 

 
Powered by phpBB® Forum Software