Re: [Tkinter] LONG POST ALERT: Setting application icon on Linux
Jeff Epler wrote: I have written a rather hackish extension to use NET_WM_ICON to set full-color icons in Tkinter apps. You can read about it here: http://craie.unpy.net/aether/index.cgi/software/01112237744 you'll probably need to take a look at the EWMH spec, too. If KDE supports NET_WM_ICON, this may work for you (but you'll have to convert your image manually to the format required for NET_WM_ICON) Best of luck! Unfortunately, the code is not supported. Jeff Thanks very much for the link! I'll take a look. Tim J -- Website: www DOT jarmania FULLSTOP com -- http://mail.python.org/mailman/listinfo/python-list
Re: [Tkinter] LONG POST ALERT: Setting application icon on Linux
I have written a rather hackish extension to use NET_WM_ICON to set full-color icons in Tkinter apps. You can read about it here: http://craie.unpy.net/aether/index.cgi/software/01112237744 you'll probably need to take a look at the EWMH spec, too. If KDE supports NET_WM_ICON, this may work for you (but you'll have to convert your image manually to the format required for NET_WM_ICON) Best of luck! Unfortunately, the code is not supported. Jeff pgpfvrqv1Xqtz.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list
Re: [Tkinter] LONG POST ALERT: Setting application icon on Linux
Jeff Epler wrote: Here is a short program that sets Tk's window icon on Linux. My window manager is icewm, and it uses a scaled version of the flagup image both at the upper-left corner of the window and on the task bar entry for the window. import Tkinter app = Tkinter.Tk() app.iconbitmap(@/usr/X11R6/include/X11/bitmaps/flagup) app.mainloop() As often happens, the Tkinter documentation doesn't tell the whole story---you have to dig into the Tk documentation. I started with man n wm, and read the following: If bitmap is specified, then it names a bitmap in the standard forms accepted by Tk (see the Tk_GetBitmap manual entry for details). OK, on to Tk_GetBitmap... @fileName FileName must be the name of a file containing a bitmap description in the standard X11 or X10 format. and I happened to know that some bitmaps in this format exist in the directory I mentioned above. Note that the standard X11 format is monochrome, so you will not be able to use color images with iconbitmap on Linux. Tk doesn't support _NET_WM_ICON for setting full-color icons. Jeff Thanks for this, Jeff - I'll do some digging in the Tk docs. My problem is that I'm trying to use iconwindow() to use a colour image, as opposed to iconbitmap(), although if push comes to shove I suppose I could use that. Thanks again for the quick response - on Easter weekend too! Tim J -- Website: www DOT jarmania FULLSTOP com -- http://mail.python.org/mailman/listinfo/python-list
Re: [Tkinter] LONG POST ALERT: Setting application icon on Linux
Here is a short program that sets Tk's window icon on Linux. My window manager is icewm, and it uses a scaled version of the flagup image both at the upper-left corner of the window and on the task bar entry for the window. import Tkinter app = Tkinter.Tk() app.iconbitmap(@/usr/X11R6/include/X11/bitmaps/flagup) app.mainloop() As often happens, the Tkinter documentation doesn't tell the whole story---you have to dig into the Tk documentation. I started with man n wm, and read the following: If bitmap is specified, then it names a bitmap in the standard forms accepted by Tk (see the Tk_GetBitmap manual entry for details). OK, on to Tk_GetBitmap... @fileName FileName must be the name of a file containing a bitmap description in the standard X11 or X10 format. and I happened to know that some bitmaps in this format exist in the directory I mentioned above. Note that the standard X11 format is monochrome, so you will not be able to use color images with iconbitmap on Linux. Tk doesn't support _NET_WM_ICON for setting full-color icons. Jeff pgpyC2wnrfybL.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list