From kopete-devel Thu Feb 17 18:38:59 2005 From: Olivier Goffart Date: Thu, 17 Feb 2005 18:38:59 +0000 To: kopete-devel Subject: Re: [kopete-devel] saving photo to disk on each message Message-Id: <200502171939.07392.ogoffart () tiscalinet ! be> X-MARC-Message: https://marc.info/?l=kopete-devel&m=110866552411383 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1746698156==" --===============1746698156== Content-Type: multipart/signed; boundary="nextPart10561948.y2URRkjDIL"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart10561948.y2URRkjDIL Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Le Jeudi 17 F=E9vrier 2005 19:17, Jason Keirstead a =E9crit=A0: > On Thursday 17 February 2005 1:10 pm, Olivier Goffart wrote: > > 1) You same the photo to another location while it's generally already = in > > the disk, on each message, for each contact. > > Its a KTempFile.. they will have unique names. ??!? the photo is already on the disk, but you still copy it. for each message, because KTempFile use randomly generated number. > > 2) the file seems to be removed when the message is freed. so for the > > adium style, that might fail. > > The message is not freed until after the message is rendered. It will work > with all other styles, but yes, not Adium. I've just tested the ichat style, and it doesn't work. Maybe for another reason, but i just see facts. (i don't see the image, just the "unknwon file" icon > > > the solution is to use the contact's photo property. which is not the > > KABC photo, which only works with MSN, which is a string to the > > location of the image. and which will works. > > Key here is 'only works with MSN'. No good, at all. The CPU + hard disk consumption it will take, specially on irc channel if y= ou=20 have several contact with a photo is not neglectible IMO. > And even then, the MSN one would be wrong with Adium.=20 > Because if you change your photo, the next time the chat re-draws it will > replace all the photos aside the old messages with the new one, which is > inaccurate - that was not your photo when you sent that message. Better to have it display a wrong photo in rare case than display a broken= =20 image always. And btw, the fact the image is not the good one is rally a detail that i do= n't=20 care about. > The only proper way to do it is to store the message-specific MC's photo. it's too complex, better to don't have that. > Now, ideally, what we want to do is not delete these temporary photos > fingerprinted per-message until the chat session is terminated. But, > Kopete::Message is not a QObject, so I could not figure out an easy way to > do that, without massive code changes which are not a good idea before 3.= 4. > So I think this is best for now - it will not work in Adium, but it will > work in iChat and all other styles. I would like you to use the photo property anyway. at least for kde 3.4 --nextPart10561948.y2URRkjDIL Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQBCFOTLz58lY8jWrL0RAgYUAJ9IAbydt7DsmRIlh4R1KzKq+U2ebwCffEeS i0PhWYHd0cENx7otMMYsZSA= =YGvY -----END PGP SIGNATURE----- --nextPart10561948.y2URRkjDIL-- --===============1746698156== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel --===============1746698156==--