Re: Media Preview Panel

Adit Panchal <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <[email protected]>
On Apr 4, 2005, at 16:37, Adit Panchal wrote:

> I almost have this working except I have one question regarding the 
> storage of the ringer information in pubsub. I noticed that the 
> ringers that have not been uploaded to the phone are marked with a 
> 'u'. For example:  {'name': u'LeChuck.mid'}, and they do not contain 
> origin data. In my code, to determine whether a ringer is builtin or 
> not, I just check the origin. For these tuples without an origin, can 
> I just look for the 'u' with a startswith string test? Where does this 
> 'u' come from? Is it appended by pubsub itself, or by ringer.py?

Never mind, unless there is a better way to do it, I got it to work by 
this way:

             if (not self._rtindex[k].has_key('origin')) or 
(self._rtindex[k]['origin'] == 'ringers'):

So I am detecting it by checking whether the ringtone has a ringers 
origin or does not have an origin at all.

Regardless, I am still curious where the 'u' comes from.

Adit



-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.