From kde-core-devel Sun May 13 00:08:34 2001 From: Malte.Starostik () t-online ! de (Malte Starostik) Date: Sun, 13 May 2001 00:08:34 +0000 To: kde-core-devel Subject: Re: i18n of icons X-MARC-Message: https://marc.info/?l=kde-core-devel&m=98971270104157 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------Boundary-00=_A2Z85DEG4ZGPGOW56P2X" --------------Boundary-00=_A2Z85DEG4ZGPGOW56P2X Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit On Mittwoch, 9. Mai 2001 09:18, Alex Zepeda wrote: > On Tue, May 08, 2001 at 01:40:56PM -0700, Waldo Bastian wrote: > > Are shared pixmaps supported by all X servers? Doesn't someone want to > > make a central pixmap server as KDEDModule? > > Well there's always the thought of a big png image with all the icons and > a text comment describing name,x,y coordinate triplets. > > One big icon per app. This whole thing could be loaded at start time or > whenever the first icon was needed... This little script builds a .h that contains all files given on the command line as const char*s plus a size info. Such thing could be put into libkdeicons.so and kde apps link to it. Then icons could be loaded by just QByteArray data; data.setRawData(hi32_app_go, hi32_app_go_size); QPixmap icon(data); data.resetRawData(hi32_app_go, hi32_app_go_size); -Malte -- Wars don't determine who's right, only who's left. --------------Boundary-00=_A2Z85DEG4ZGPGOW56P2X Content-Type: application/x-shellscript; name="png2h.sh" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="png2h.sh" #!/bin/sh for i in $*; do name=3D`echo ${i%%.png}|sed s,-,_,g` echo "static const char *$name =3D " cat "$i" | perl -pi -e 's/(.)/"\\x".unpack("H2", $1)/ges; s/(.{1,40})= /"$1"\n/g' echo ";" echo "static int ${name}_size =3D " `ls -l "$i" | awk '{print $5}'` "= ;" done --------------Boundary-00=_A2Z85DEG4ZGPGOW56P2X--