From 6861b2969c5cf16ccbb2b0cfed7fc4bb685e5e7d Mon Sep 17 00:00:00 2001 From: seife Date: Sun, 22 Aug 2010 17:25:56 +0000 Subject: [PATCH] neutrino: port "show infobar on EPG change" from tuxbox Maybe this should be configurable besides the config file, then another Menu item is needed... git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@736 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/daemonc/remotecontrol.cpp | 4 ++-- src/gui/infoviewer.cpp | 21 +++++++++++++++++++++ src/gui/infoviewer.h | 4 +++- src/neutrino.cpp | 2 ++ src/system/settings.h | 1 + 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp index a5860b6e9..7b6ba997e 100644 --- a/src/daemonc/remotecontrol.cpp +++ b/src/daemonc/remotecontrol.cpp @@ -199,12 +199,12 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data if ( current_EPGid != 0 ) { // ist nur ein neues Programm, kein neuer Kanal - // PIDs neu holen g_Zapit->getPIDS( current_PIDs ); - // APID Bearbeitung neu anstossen has_unresolved_ctags = true; + // infobar indicate on epg change + g_InfoViewer->showEpgInfo(); } current_EPGid= info_CN->current_uniqueKey; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index c7e7731ac..716c7d706 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1875,6 +1875,27 @@ void CInfoViewer::showLcdPercentOver () } } +void CInfoViewer::showEpgInfo() //message on event change +{ + int mode = CNeutrinoApp::getInstance()->getMode(); + /* show epg info only if we in TV- or Radio mode and current event is not the same like before */ + if ((eventname != info_CurrentNext.current_name) && (mode == 2 /*mode_radio*/ || mode == 1 /*mode_tv*/)) + { + eventname = info_CurrentNext.current_name; + if (g_settings.infobar_show) + g_RCInput->postMsg(NeutrinoMessages::SHOW_INFOBAR , 0); +#if 0 +/* let's check if this is still needed */ + else + /* don't show anything, but update the LCD + TODO: we should not have to update the LCD from the _infoviewer_. + they have nothing to do with each other */ + showLcdPercentOver(); +#endif + } +} + + int CInfoViewerHandler::exec (CMenuTarget * parent, const std::string & /*actionkey*/) { int res = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index aaf6590f9..cdbf000d1 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -129,6 +129,8 @@ class CInfoViewer void showSNR(); void showInfoFile(); + std::string eventname; + public: bool chanready; bool is_visible; @@ -137,7 +139,7 @@ class CInfoViewer CInfoViewer(); void start(); - + void showEpgInfo(); void showTitle(const int ChanNum, const std::string & Channel, const t_satellite_position satellitePosition, const t_channel_id new_channel_id = 0, const bool calledFromNumZap = false, int epgpos = 0); // Channel must be UTF-8 encoded void lookAheadEPG(const int ChanNum, const std::string & Channel, const t_channel_id new_channel_id = 0, const bool calledFromNumZap = false); //alpha: fix for nvod subchannel update void killTitle(); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index accae3879..dcdd119fd 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -822,6 +822,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true ); g_settings.infobar_subchan_disp_pos = configfile.getInt32("infobar_subchan_disp_pos" , 0 ); g_settings.progressbar_color = configfile.getBool("progressbar_color", true ); + g_settings.infobar_show = configfile.getInt32("infobar_show", 1); g_settings.infobar_show_channellogo = configfile.getInt32("infobar_show_channellogo" , 3 ); g_settings.casystem_display = configfile.getInt32("casystem_display", 0 ); g_settings.scrambled_message = configfile.getBool("scrambled_message", true ); @@ -1361,6 +1362,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display ); configfile.setInt32("infobar_subchan_disp_pos" , g_settings.infobar_subchan_disp_pos ); configfile.setBool("progressbar_color" , g_settings.progressbar_color ); + configfile.setInt32("infobar_show", g_settings.infobar_show); configfile.setInt32("infobar_show_channellogo" , g_settings.infobar_show_channellogo ); configfile.setInt32("casystem_display" , g_settings.casystem_display ); configfile.setBool("scrambled_message" , g_settings.scrambled_message ); diff --git a/src/system/settings.h b/src/system/settings.h index 9a1e35889..09a0b040d 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -63,6 +63,7 @@ struct SNeutrinoSettings int infobar_subchan_disp_pos; int misc_spts; int fan_speed; + int infobar_show; int infobar_show_channellogo; int progressbar_color; int casystem_display;