Re: [lazarus] Window Icon again - Proposal

2006-02-01 Thread Mattias Gaertner
On Wed, 1 Feb 2006 10:47:39 +0200
A.J. Venter [EMAIL PROTECTED] wrote:

 Hi all,
 Here is a proposal on how to address the window icon issue in a
 cross-platform  AND delphi compatible way.
 
 1) Use ifdefs to do different implementations on plaftfroms. 
 2) Win32 use a resource same as any other app
 3) Linux/Freebsd/Apple (not the native one though) all use X11. I know GTK
 
 cannot force app-icons, 

The linux/gtk forms have icons.
What is missing, are icons showing in the file managers. This is normally
done by copying an image of the executable name to a directory like
/usr/shar/pixmaps/.


 but X11 can, and X11 is at least in c capable of 
 using bmp´s from include files to do so.
 So the implementation on all X11 based platforms should simply BYPASS the 
 widget set entirely and set the wm_hints property directly using the 
 available Xlib translations. 
 
 This way, the only odd-ones-out are carbon and w32, and it will work with
 gtk,  gtk2, qt, * on X11´s.
 
 I don´t have the windows skills to do that implementation, but if somebody
 familiar with the lazarus code-layouts are up for helping me a bit, and
 the  big-guys say the´ll go for it, I am happy to help with a patch for
 the X11  stuff, there are a bilion examples of how to do it on the net,
 just need to  translate one to OP. 
 The trickiest bit is likely to be reading an X11 Pixmap variable out of a 
 TPixmap.

See thread 
Application Icon under Win32 (modified patchs)
from 9 Feb 2005


Mattias

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Window Icon again - Proposal

2006-02-01 Thread A.J. Venter


 The linux/gtk forms have icons.
 What is missing, are icons showing in the file managers. This is normally
 done by copying an image of the executable name to a directory like
 /usr/shar/pixmaps/.
Aye which will usually set the window icon anyway so normally it doesn't 
bother people - except my program is meant to run uninstalled from a DVD so 
that doesn't entirely work anymore.
But then... if the linux forms have icons... where/how do you set them ? Or is 
the ONLY way currently to install an icon to $ICONDIR. I can't find any place 
to do so under project options (latest lazarus from svn).


  The trickiest bit is likely to be reading an X11 Pixmap variable out of a
  TPixmap.

 See thread
 Application Icon under Win32 (modified patchs)
 from 9 Feb 2005
Thanks for that.
A.J.

-- 
A.J. Venter
Chief Software Architext
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Window Icon again - Proposal

2006-02-01 Thread A.J. Venter
On Wednesday 01 February 2006 19:28, A.J. Venter wrote:
  The linux/gtk forms have icons.
  What is missing, are icons showing in the file managers. This is normally
  done by copying an image of the executable name to a directory like
  /usr/shar/pixmaps/.

 Aye which will usually set the window icon anyway so normally it doesn't
 bother people - except my program is meant to run uninstalled from a DVD so
 that doesn't entirely work anymore.
 But then... if the linux forms have icons... where/how do you set them ? Or
 is the ONLY way currently to install an icon to $ICONDIR. I can't find any
 place to do so under project options (latest lazarus from svn).

Scratch that, found it in the form properties, been using lazarus too long, 
I'm too used to what isn't there...

A.J.
-- 
A.J. Venter
Chief Software Architext
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives