neutrino.cpp: add numericZap function

This commit is contained in:
[CST] Focus
2012-03-16 17:15:50 +04:00
parent a0fff2b417
commit 34e0455631
2 changed files with 14 additions and 14 deletions

View File

@@ -1974,6 +1974,13 @@ void CNeutrinoApp::quickZap(int msg)
channelList->quickZap(msg); channelList->quickZap(msg);
} }
void CNeutrinoApp::numericZap(int msg)
{
StopSubtitles();
int res = channelList->numericZap( msg );
StartSubtitles(res < 0);
}
void CNeutrinoApp::showInfo() void CNeutrinoApp::showInfo()
{ {
StopSubtitles(); StopSubtitles();
@@ -2103,9 +2110,7 @@ INFO("cCA::GetInstance()->Ready\n");
InfoClock->StopClock(); InfoClock->StopClock();
g_settings.mode_clock=false; g_settings.mode_clock=false;
} else { } else {
StopSubtitles(); numericZap( msg );
int res = channelList->numericZap( msg );
StartSubtitles(res < 0);
} }
} }
else if (msg == (neutrino_msg_t) g_settings.key_screenshot) { else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
@@ -2117,9 +2122,7 @@ INFO("cCA::GetInstance()->Ready\n");
} }
else if( msg == (neutrino_msg_t) g_settings.key_lastchannel ) { else if( msg == (neutrino_msg_t) g_settings.key_lastchannel ) {
// Quick Zap // Quick Zap
StopSubtitles(); numericZap( msg );
int res = channelList->numericZap( msg );
StartSubtitles(res < 0);
} }
else if( msg == (neutrino_msg_t) g_settings.key_plugin ) { else if( msg == (neutrino_msg_t) g_settings.key_plugin ) {
g_PluginList->start_plugin_by_name(g_settings.onekey_plugin.c_str(), 0); g_PluginList->start_plugin_by_name(g_settings.onekey_plugin.c_str(), 0);
@@ -2128,9 +2131,10 @@ INFO("cCA::GetInstance()->Ready\n");
CRecordManager::getInstance()->StartTimeshift(); CRecordManager::getInstance()->StartTimeshift();
} }
else if (msg == (neutrino_msg_t) g_settings.key_current_transponder){ else if (msg == (neutrino_msg_t) g_settings.key_current_transponder){
StopSubtitles(); numericZap( msg );
int res = channelList->numericZap( msg ); }
StartSubtitles(res < 0); else if (CRCInput::isNumeric(msg)) {
numericZap( msg );
} }
else if(msg == CRCInput::RC_rewind) { else if(msg == CRCInput::RC_rewind) {
if(g_RemoteControl->is_video_started) { if(g_RemoteControl->is_video_started) {
@@ -2192,11 +2196,6 @@ INFO("cCA::GetInstance()->Ready\n");
g_RemoteControl->setSubChannel(CRCInput::getNumericValue(msg)); g_RemoteControl->setSubChannel(CRCInput::getNumericValue(msg));
g_InfoViewer->showSubchan(); g_InfoViewer->showSubchan();
} }
else if (CRCInput::isNumeric(msg)) {
StopSubtitles();
int res = channelList->numericZap( msg );
StartSubtitles(res < 0);
}
else if( ( msg == CRCInput::RC_help ) || ( msg == CRCInput::RC_info) || else if( ( msg == CRCInput::RC_help ) || ( msg == CRCInput::RC_info) ||
( msg == NeutrinoMessages::SHOW_INFOBAR ) ) ( msg == NeutrinoMessages::SHOW_INFOBAR ) )
{ {

View File

@@ -227,6 +227,7 @@ public:
}; };
void SetChannelMode(int mode); void SetChannelMode(int mode);
void quickZap(int msg); void quickZap(int msg);
void numericZap(int msg);
void StopSubtitles(); void StopSubtitles();
void StartSubtitles(bool show = true); void StartSubtitles(bool show = true);
void SelectSubtitles(); void SelectSubtitles();