ppmtoxpm myapp.ppm > myapp.xpm3. Copy myapp.xpm to /usr/share/icons/mini4. Start wish with the right appname:
wish -name myapp5. Create new toplevels with the right class
% toplevel .t -class myappFor reference, I'm using KDE 3.1 on Mandrake 9.1, with a self-compiled Tcl/Tk 8.4.4 (but the default Mandrake-compiled 8.3.3 is also installed in /usr/bin).Note this has nothing to do with the wm iconbitmap or wm iconwindow commands.
And here's a small icon browser. It re-creates a toplevel window with the selected class.
proc new {} { set sel [.l curselection] if { ![llength $sel] } { return } set index [lindex $sel 0] set class [.l get $index] destroy .t toplevel .t -class $class wm title .t $class } listbox .l -exportselection 0 -yscrollcommand [list .y set] scrollbar .y -orient vertical -command [list .l yview] grid columnconfigure . 1 -weight 1 grid rowconfigure . 1 -weight 1 grid .l -column 1 -row 1 -sticky nsew grid .y -column 2 -row 1 -sticky ns set dir /usr/share/icons/mini foreach f [lsort -dictionary [glob -nocomplain -directory $dir *.png *.xpm]] { .l insert end [file root [file tail $f]] } bind .l <<ListboxSelect>> [list new]
LV In trying the above on SPARC Solaris GNOME, I notice that the directory is different and that even after fixing the directory, I still don't see an icon displayed either in the created window or in the taskbar or in the window stripe.Anyone know what needs to change above to get these things to work?