Menu

#43 need two times of double click to switch channel

open
nobody
None
5
2008-08-14
2008-08-14
Anonymous
No

the version 0.6.1 needs two times of double-click to switch the channel. This bug is still in the svn repositories, rev 113. This is due to a modified sequence of function calls within the CKlearControllerMain.Cpp file: In the function "Tune channel" the "StoreServiceId call was after the "SetChannel" call. Therefore the modification of the Service id was after the re-setting of the tuner itself. As a result the first double-click on the new channel does nothing on the tuner but sets the new channel name and the Service id after(!) the new setting of the tuner. The second double-cklick takes the Service-ID of the first double-click and tunes to the new channel. if the second channel selection is different to the one of the first double-click, it needs a third double-cklick for proper tuning.
With this behaviour the timed recording doesn't work properly.

By rearranging the procedure calls within the function "TuneChannel" to the Pre-0.6 versions the program runs properly. The modified code is:

void CKlearControllerMain::TuneChannel(const QString& ChannelName)
{

kdDebug() << "Tuning in: " << ChannelName << "\n";

if( KlearTuner->running() ){
// KlearTuner->terminate();
KlearTuner->isFinished = true; // finish thread regularly
KlearTuner->wait(); // wait for thread to return
kdDebug() << "Tuner stopped....\n";
}
KlearConfig->setCurrentChannel( ChannelName ); // set current channel in config-class
KlearConfig->WriteConfig();

KlearConfig->StoreServiceID( ChannelName ); // set current channel in config-class

KlearTuner->setChannel(ChannelName);

KlearTuner->start(); // start threaded Tuner
while( KlearTuner->isReady == false) // wait here while Tuner isn't established correctly
{
usleep(10000); // wait another 1000s for the tuner
}

kdDebug() << "Tuner started....\n";

}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB