[Kwintv] Final touches

Zack Rusin zack at kde.org
Mon Jan 26 09:10:11 CET 2004


On Sunday 25 January 2004 05:13, Dirk Ziegelmeier wrote:
> I just had a look at the default channel names. Your patch will only
> work in US/CDN, most other countries have letters in the default
> name, so we should come up with a more intelligent algorithm. Looking
> at the different naming conventions, IMO it cannot be solved that
> easy... So I like the idea very much, but not the current
> implementation :-(

I need to readup about the standards oversees :) Anyway, I didn't have 
time to do it today, but what's going to happen is that to the channel 
class I'll add an enum NameType { UserSet, ProgramSet };. Setting 
channel name in the constructor is always ProgramSet. Channel::setName 
will change to Channel::setName( const QString& name, NameType = 
UserSet );. All networkid function will call setName with ProgramSet 
parameter while all other setName default to UserSet.
Now here's the fun part: we'll have to extend the dtd to include 
attribute userset in <name> which would eb #IMPLIED to be "false" by 
default. So <name>RTL</name> would equal setName( "RTL", ProgramSet );
and <name userset="true">My Channel</name> would be 
setName( "My Channel", UserSet );. This way not only we'll catch all the 
cases but also will also fix the case when a program set station name 
changes to something different (currently you'd have to rescan, now it 
will be updated automatically). So user set station names will always 
have preference over our detected names and won't be changed, while the 
names we set ourselves will also be uptodate.
I'll do it tomorrow.

Zack

-- 
Winners compare their achievments to their goals, 
losers compare theirs to that of others. 


More information about the kwintv mailing list