logo       

Re: Re: [Gaim-commits] CVS: gaim/src gtkconv.c,1.504,1.505: msg#00158

gnome.gaim.devel

Subject: Re: Re: [Gaim-commits] CVS: gaim/src gtkconv.c,1.504,1.505

Felipe Contreras wrote:

Indeed, I would like something like that.

Maybe inside .gaim/icons we can have a folder for each one of the
protocols, and then inside that, each file named as it's hash.

I'd rather keep all the files in the same directory. Name them all after their hash,
have an index file which lists all the files and several hashes for each of them for the
protocols different hashing. On Gaim it's probably going to be common to have
a buddy on several protocols, who's likely to set them all to the same icon.

I don't know how does each prpl does buddy icons, but I think each one
of them uses some kind of hash, at least if it does some kind of
caching.

Yahoo uses some kind of 32bit number. We never did figure out how they generated it, we generate it ourselves using g_string_hash, so our value for a given icon doesn't match yahoo's, but in practice that doesn't matter, since it's usually only used to see if the new icon is different from the old one.

People in charge of other protocols feel free to describe what their protocol uses.

Also considering the custom smileys maybe the folder can be named as
.gaim/cache and there the prpl can store whatever files it caches.
Maybe each prpl can have a different directory structure inside its
cache dir or something.

I'd just assume keep the old folder name and keep them both together, unless there's some advantage to keeping them seperate.
I figure the files can be named after their md5 hash or something, and an index file stores other hashes for them, perhaps in a protocol specific way. And it stores other metadata like last accessed from gaim.

The tricky part is how protocols hold references on them (if at all), how you avoid stale references from leaving files around forever, and when you delete them. I'm thinking the simplest way is just "hasn't been used in x days". But perhaps metabytes and number of files should play a role. I don't really know, i've never coded something like this, someone who's worked on e.g. mozilla might know better.

--Tim



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise