[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kopete-devel
Subject:    Re: [kopete-devel] saving photo to disk on each message
From:       Jason Keirstead <jason () keirstead ! org>
Date:       2005-02-17 18:17:22
Message-ID: 200502171417.22263.jason () keirstead ! org
[Download RAW message or body]

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.

> 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.

> 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. And even then, the MSN one 
would be wrong with Adium. 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.

The only proper way to do it is to store the message-specific MC's photo. 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.


-- 
If you wait by the river long enough, eventually
you will see the bodies of all your enemies float by.
    - Sun Tzu
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic