mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
- channelist: keep channellist in users display/desc mode until exit
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -137,6 +137,9 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl
|
|||||||
channelsChanged = false;
|
channelsChanged = false;
|
||||||
liveBouquet = false;
|
liveBouquet = false;
|
||||||
|
|
||||||
|
displayMode = DISPLAY_MODE_NOW; // always start with current events
|
||||||
|
descMode = false; // always start with event list
|
||||||
|
|
||||||
paint_events_index = -2;
|
paint_events_index = -2;
|
||||||
CFrameBuffer::getInstance()->OnAfterSetPallette.connect(sigc::mem_fun(this, &CChannelList::ResetModules));
|
CFrameBuffer::getInstance()->OnAfterSetPallette.connect(sigc::mem_fun(this, &CChannelList::ResetModules));
|
||||||
CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CChannelList::ResetModules));
|
CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CChannelList::ResetModules));
|
||||||
@@ -480,8 +483,9 @@ int CChannelList::doChannelMenu(void)
|
|||||||
|
|
||||||
int CChannelList::exec()
|
int CChannelList::exec()
|
||||||
{
|
{
|
||||||
displayMode = DISPLAY_MODE_NOW; // always start with current events
|
displayMode = g_settings.channellist_displaymode;
|
||||||
descMode = false; // always start with event list
|
descMode = g_settings.channellist_descmode;
|
||||||
|
|
||||||
int nNewChannel = show();
|
int nNewChannel = show();
|
||||||
if ( nNewChannel > -1 && nNewChannel < (int) (*chanlist).size()) {
|
if ( nNewChannel > -1 && nNewChannel < (int) (*chanlist).size()) {
|
||||||
if(this->historyMode && (*chanlist)[nNewChannel]) {
|
if(this->historyMode && (*chanlist)[nNewChannel]) {
|
||||||
@@ -621,7 +625,9 @@ int CChannelList::show()
|
|||||||
new_zap_mode = g_settings.channellist_new_zap_mode;
|
new_zap_mode = g_settings.channellist_new_zap_mode;
|
||||||
|
|
||||||
calcSize();
|
calcSize();
|
||||||
displayMode = DISPLAY_MODE_NOW;
|
|
||||||
|
displayMode = g_settings.channellist_displaymode;
|
||||||
|
descMode = g_settings.channellist_descmode;
|
||||||
|
|
||||||
COSDFader fader(g_settings.theme.menu_Content_alpha);
|
COSDFader fader(g_settings.theme.menu_Content_alpha);
|
||||||
fader.StartFadeIn();
|
fader.StartFadeIn();
|
||||||
@@ -871,10 +877,13 @@ int CChannelList::show()
|
|||||||
if (displayMode == DISPLAY_MODE_MAX)
|
if (displayMode == DISPLAY_MODE_MAX)
|
||||||
displayMode = DISPLAY_MODE_NOW;
|
displayMode = DISPLAY_MODE_NOW;
|
||||||
|
|
||||||
|
g_settings.channellist_displaymode = displayMode;
|
||||||
|
|
||||||
if (g_settings.channellist_additional)
|
if (g_settings.channellist_additional)
|
||||||
{
|
{
|
||||||
// show event description per default in primetime mode only
|
// show event description per default in primetime mode only
|
||||||
descMode = (displayMode == DISPLAY_MODE_PRIME) ? true : false;
|
descMode = (displayMode == DISPLAY_MODE_PRIME) ? true : false;
|
||||||
|
g_settings.channellist_descmode = descMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
paint();
|
paint();
|
||||||
@@ -898,6 +907,7 @@ int CChannelList::show()
|
|||||||
if (g_settings.channellist_additional)
|
if (g_settings.channellist_additional)
|
||||||
{
|
{
|
||||||
descMode = !descMode;
|
descMode = !descMode;
|
||||||
|
g_settings.channellist_descmode = descMode;
|
||||||
paint();
|
paint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2731,7 +2741,13 @@ void CChannelList::editMode(bool enable)
|
|||||||
if (!bouquet || !bouquet->zapitBouquet)
|
if (!bouquet || !bouquet->zapitBouquet)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// reset displaymode
|
||||||
|
g_settings.channellist_displaymode = DISPLAY_MODE_NOW;
|
||||||
displayMode = DISPLAY_MODE_NOW;
|
displayMode = DISPLAY_MODE_NOW;
|
||||||
|
// reset descmode
|
||||||
|
g_settings.channellist_descmode = false;
|
||||||
|
descMode = false;
|
||||||
|
|
||||||
edit_state = enable;
|
edit_state = enable;
|
||||||
printf("STATE: %s\n", edit_state ? "EDIT" : "SHOW");
|
printf("STATE: %s\n", edit_state ? "EDIT" : "SHOW");
|
||||||
bool tvmode = CZapit::getInstance()->getMode() & CZapitClient::MODE_TV;
|
bool tvmode = CZapit::getInstance()->getMode() & CZapitClient::MODE_TV;
|
||||||
|
@@ -823,6 +823,8 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
g_settings.channellist_additional = configfile.getInt32("channellist_additional", 1); //default no minitv
|
g_settings.channellist_additional = configfile.getInt32("channellist_additional", 1); //default no minitv
|
||||||
g_settings.eventlist_additional = configfile.getInt32("eventlist_additional", 0);
|
g_settings.eventlist_additional = configfile.getInt32("eventlist_additional", 0);
|
||||||
g_settings.eventlist_epgplus = configfile.getInt32("eventlist_epgplus", 1);
|
g_settings.eventlist_epgplus = configfile.getInt32("eventlist_epgplus", 1);
|
||||||
|
g_settings.channellist_displaymode = DISPLAY_MODE_NOW;
|
||||||
|
g_settings.channellist_descmode = false;
|
||||||
g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false);
|
g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false);
|
||||||
g_settings.channellist_foot = configfile.getInt32("channellist_foot", 1); //default next Event
|
g_settings.channellist_foot = configfile.getInt32("channellist_foot", 1); //default next Event
|
||||||
g_settings.channellist_new_zap_mode = configfile.getInt32("channellist_new_zap_mode", 0);
|
g_settings.channellist_new_zap_mode = configfile.getInt32("channellist_new_zap_mode", 0);
|
||||||
@@ -3189,7 +3191,6 @@ int CNeutrinoApp::showChannelList(const neutrino_msg_t _msg, bool from_menu)
|
|||||||
InfoClock->enableInfoClock(false);//TODO: use callback in channel list class
|
InfoClock->enableInfoClock(false);//TODO: use callback in channel list class
|
||||||
StopSubtitles();
|
StopSubtitles();
|
||||||
|
|
||||||
//_show:
|
|
||||||
int nNewChannel = -1;
|
int nNewChannel = -1;
|
||||||
int old_b = bouquetList->getActiveBouquetNumber();
|
int old_b = bouquetList->getActiveBouquetNumber();
|
||||||
t_channel_id old_id = 0;
|
t_channel_id old_id = 0;
|
||||||
@@ -3199,7 +3200,10 @@ int CNeutrinoApp::showChannelList(const neutrino_msg_t _msg, bool from_menu)
|
|||||||
int old_mode = GetChannelMode();
|
int old_mode = GetChannelMode();
|
||||||
printf("CNeutrinoApp::showChannelList: bouquetList %p size %d old_b %d\n", bouquetList, (int)bouquetList->Bouquets.size(), old_b);fflush(stdout);
|
printf("CNeutrinoApp::showChannelList: bouquetList %p size %d old_b %d\n", bouquetList, (int)bouquetList->Bouquets.size(), old_b);fflush(stdout);
|
||||||
|
|
||||||
//_show:
|
// reset display mode and description mode of channellist
|
||||||
|
g_settings.channellist_displaymode = DISPLAY_MODE_NOW;
|
||||||
|
g_settings.channellist_descmode = false;
|
||||||
|
|
||||||
if(msg == CRCInput::RC_ok)
|
if(msg == CRCInput::RC_ok)
|
||||||
{
|
{
|
||||||
if( !bouquetList->Bouquets.empty() && bouquetList->Bouquets[old_b]->channelList->getSize() > 0)
|
if( !bouquetList->Bouquets.empty() && bouquetList->Bouquets[old_b]->channelList->getSize() > 0)
|
||||||
@@ -3476,6 +3480,10 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
|||||||
if( msg == CRCInput::RC_ok || msg == (neutrino_msg_t) g_settings.key_zaphistory || msg == (neutrino_msg_t) g_settings.key_current_transponder
|
if( msg == CRCInput::RC_ok || msg == (neutrino_msg_t) g_settings.key_zaphistory || msg == (neutrino_msg_t) g_settings.key_current_transponder
|
||||||
|| (!g_InfoViewer->getSwitchMode() && CNeutrinoApp::getInstance()->listModeKey(msg))) {
|
|| (!g_InfoViewer->getSwitchMode() && CNeutrinoApp::getInstance()->listModeKey(msg))) {
|
||||||
if( (mode == NeutrinoModes::mode_tv) || (mode == NeutrinoModes::mode_radio) || (mode == NeutrinoModes::mode_ts) || (mode == NeutrinoModes::mode_webtv) || (mode == NeutrinoModes::mode_webradio)) {
|
if( (mode == NeutrinoModes::mode_tv) || (mode == NeutrinoModes::mode_radio) || (mode == NeutrinoModes::mode_ts) || (mode == NeutrinoModes::mode_webtv) || (mode == NeutrinoModes::mode_webradio)) {
|
||||||
|
// reset displaymode and descmode of channellist
|
||||||
|
g_settings.channellist_displaymode = DISPLAY_MODE_NOW;
|
||||||
|
g_settings.channellist_descmode = false;
|
||||||
|
|
||||||
showChannelList(msg);
|
showChannelList(msg);
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
}
|
}
|
||||||
|
@@ -654,6 +654,8 @@ struct SNeutrinoSettings
|
|||||||
CHANNELLIST_ADDITIONAL_MODE_MINITV = 2
|
CHANNELLIST_ADDITIONAL_MODE_MINITV = 2
|
||||||
};
|
};
|
||||||
int channellist_additional;
|
int channellist_additional;
|
||||||
|
int channellist_displaymode;
|
||||||
|
bool channellist_descmode;
|
||||||
int channellist_epgtext_align_right;
|
int channellist_epgtext_align_right;
|
||||||
int channellist_foot;
|
int channellist_foot;
|
||||||
int channellist_new_zap_mode;
|
int channellist_new_zap_mode;
|
||||||
|
Reference in New Issue
Block a user