aMSN Forums
May 25, 2013, 03:51:08 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Implementing .XPM Icon  (Read 5248 times)
GuS-Arg
Super Power User
**
Offline Offline

Posts: 450



View Profile WWW
« on: June 30, 2006, 12:27:36 am »

Hi team!

This is was i meant in the another post (http://amsn.sourceforge.net/forums/viewtopic.php?t=1157) by using this kind of image for the top bar icon (amsn.xbm), here an example in XChat:


That one is this file: http://lnxteam.com.ar/downloads/pub/pics/amsn/xchat_mini.xpm

See? is possible... Smiley

I've replaced the xbm for xpm but with no luck, maybe needs a modification inside gui.tcl?
I saw there:
Quote

catch {wm iconbitmap . @[::skin::GetSkinFile pixmaps amsn.xbm]}
      catch {wm iconmask . @[::skin::GetSkinFile pixmaps amsnmask.xbm]}


Cheers.
Logged

billiob
Administrator
Super Power User
*****
Offline Offline

Posts: 1352


View Profile
« Reply #1 on: June 30, 2006, 09:50:36 pm »

Look at this, if you can understand it : http://www.tcl.tk/man/tcl8.4/TkCmd/wm.htm#M18 (i really don't understand those bitmaps).
Logged
GuS-Arg
Super Power User
**
Offline Offline

Posts: 450



View Profile WWW
« Reply #2 on: July 01, 2006, 12:36:35 am »

Quote from: "billiob"
Look at this, if you can understand it : http://www.tcl.tk/man/tcl8.4/TkCmd/wm.htm#M18 (i really don't understand those bitmaps).


Yeah, but it don't really say about X window Icons allowed to use... Just how use the window icon under tcl/tk.
Anyone who know something? any thought? idea?
I will continue investigating about this....

Thanks.

Cheers.
Logged

GuS-Arg
Super Power User
**
Offline Offline

Posts: 450



View Profile WWW
« Reply #3 on: July 01, 2006, 02:16:35 pm »

... And is possible to use XPM window icons? (maybe PNG too?) i Think yes, easy example in kde:

http://wiki.tcl.tk/9795

So this will not depend of amsn code, even more easy to set the Icon for the app. In this case, aMSN.
Indeed if i comment the lines inside gui.tcl and chatwindow.tcl:

Quote

#catch {wm iconbitmap . @[::skin::GetSkinFile pixmaps amsn.xbm]}
#catch {wm iconmask . @[::skin::GetSkinFile pixmaps amsnmask.xbm]}


KDE uses the icon defined in the system for aMSN. I am using NuoveXT icon set, so uses the amsn.png icon. Smiley
This sould work for Gnome too, i don't know for other desktops.
Logged

kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #4 on: July 04, 2006, 06:08:55 pm »

hi gus,
still no idea on how it works.. could you try to find a generic way of doing it ? I'm really poor at this kind of stuff..
Also, why don't you create the image you want and then export it as xbm with gimp?
from what I can see a xbm is an image defined in C structure where each BIT (not byte) represents a pixel, if the bit is 1, then the pixel is black, if the bit is 0, then the pixel is white.. the icon mask is the same thing, but, all it does is a binary AND between the iconbitmap and iconmask.
the file must be :
Quote
@fileName
FileName must be the name of a file containing a bitmap description in the standard X11 or X10 format.

so you need to find those specifications and see what can be done with them!
Logged

KaKaRoTo
GuS-Arg
Super Power User
**
Offline Offline

Posts: 450



View Profile WWW
« Reply #5 on: July 05, 2006, 04:05:28 am »

Quote from: "kakaroto"
hi gus,
still no idea on how it works.. could you try to find a generic way of doing it ? I'm really poor at this kind of stuff..
Also, why don't you create the image you want and then export it as xbm with gimp?
from what I can see a xbm is an image defined in C structure where each BIT (not byte) represents a pixel, if the bit is 1, then the pixel is black, if the bit is 0, then the pixel is white.. the icon mask is the same thing, but, all it does is a binary AND between the iconbitmap and iconmask.
the file must be :
Quote
@fileName
FileName must be the name of a file containing a bitmap description in the standard X11 or X10 format.

so you need to find those specifications and see what can be done with them!


Yes i know! but still (i think) xbm is uggly... so why i insist on this? Because if that icon depends of the X we could use XPM, or better, if KDE and Gnome support PNG for the X ( i know we must handle other wm). So i am continue reading this to search for a general solution as you suggest

I've found some info:

http://wiki.tcl.tk/4197

Indeed is possible to use XPM (but i think that info is about using XPM inside TK), look at the list:

http://wiki.tcl.tk/1404

If we could test with XPM, will be a general solution for all wm. Remember that XPM is a Pixmap, not a Bitmap as XBM. But XPM is in relation with XBM, just that handles colors and transparency.

XPM: http://koala.ilog.fr/lehors/xpm-README.html
Logged

kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #6 on: July 05, 2006, 03:18:03 pm »

ok... it seems to not be supported by default.. did you try putting a xpm inside the .xbm file and see what happens ?
Logged

KaKaRoTo
GuS-Arg
Super Power User
**
Offline Offline

Posts: 450



View Profile WWW
« Reply #7 on: July 07, 2006, 12:38:36 pm »

Quote from: "kakaroto"
ok... it seems to not be supported by default.. did you try putting a xpm inside the .xbm file and see what happens ?


Yes seems not. I will try that later about putting the xpm inside xbm Smiley
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!