diff --git a/src/driver/record.cpp b/src/driver/record.cpp index f0f03b7c6..436a5ccdc 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -868,6 +868,8 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons printf("%s channel_id %" PRIx64 " epg: %" PRIx64 ", apidmode 0x%X\n", __func__, eventinfo->channel_id, eventinfo->epgID, eventinfo->apids); + if (g_settings.recording_type == CNeutrinoApp::RECORDING_OFF) + return false; #if 0 if(!CheckRecording(eventinfo)) return false; @@ -1324,6 +1326,9 @@ void CRecordManager::StartTimeshift() int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey ) { + if (g_settings.recording_type == CNeutrinoApp::RECORDING_OFF) + return menu_return::RETURN_REPAINT; + if(parent) parent->hide(); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index f08c03974..488f28cf3 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -652,7 +652,7 @@ int CChannelList::show() } #endif - if(SameTP()) { + if((g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) && SameTP()) { printf("[neutrino channellist] start direct recording...\n"); hide(); if (!CRecordManager::getInstance()->Record(chanlist[selected]->channel_id)) { @@ -1776,7 +1776,9 @@ void CChannelList::paintButtonBar(bool is_current) } if (i == 4) { //manage record button - if (g_settings.recording_type != RECORDING_OFF && !displayNext){ + if (g_settings.recording_type == RECORDING_OFF) + continue; + if (!displayNext){ if (do_record){ Button[bcnt].locale = LOCALE_MAINMENU_RECORDING_STOP; Button[bcnt].button = NEUTRINO_ICON_BUTTON_STOP; diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp index 738926d1a..b7998ca51 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -166,10 +166,12 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) if (usage_mode == MODE_DEFAULT) { //movieplayer - moviePlayer = new CMenuWidget(LOCALE_MAINMENU_MOVIEPLAYER, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA_MOVIEPLAYER); - personalize->addWidget(moviePlayer); - fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, moviePlayer, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); - fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE); + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { + moviePlayer = new CMenuWidget(LOCALE_MAINMENU_MOVIEPLAYER, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA_MOVIEPLAYER); + personalize->addWidget(moviePlayer); + fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, moviePlayer, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); + fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE); + } //pictureviewer pictureviewergui = new CPictureViewerGui(); @@ -204,8 +206,10 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) personalize->addItem(media, fw_inet, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_INETPLAY]); //movieplayer - showMoviePlayer(moviePlayer, personalize); - personalize->addItem(media, fw_mp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_MPLAYER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { + showMoviePlayer(moviePlayer, personalize); + personalize->addItem(media, fw_mp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_MPLAYER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); + } //picture viewer personalize->addItem(media, fw_pviewer, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_PVIEWER]); diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 9c6e21ae7..da871d31f 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1031,15 +1031,15 @@ const CMenuOptionChooser::keyval TIMERLIST_STANDBY_OPTIONS[TIMERLIST_STANDBY_OPT #endif const CMenuOptionChooser::keyval TIMERLIST_TYPE_OPTIONS[TIMERLIST_TYPE_OPTION_COUNT] = { - { CTimerd::TIMER_SHUTDOWN, LOCALE_TIMERLIST_TYPE_SHUTDOWN }, #if 0 { CTimerd::TIMER_NEXTPROGRAM, LOCALE_TIMERLIST_TYPE_NEXTPROGRAM }, #endif + { CTimerd::TIMER_RECORD, LOCALE_TIMERLIST_TYPE_RECORD }, { CTimerd::TIMER_ZAPTO, LOCALE_TIMERLIST_TYPE_ZAPTO }, { CTimerd::TIMER_STANDBY, LOCALE_TIMERLIST_TYPE_STANDBY }, - { CTimerd::TIMER_RECORD, LOCALE_TIMERLIST_TYPE_RECORD }, { CTimerd::TIMER_SLEEPTIMER, LOCALE_TIMERLIST_TYPE_SLEEPTIMER }, { CTimerd::TIMER_REMIND, LOCALE_TIMERLIST_TYPE_REMIND }, + { CTimerd::TIMER_SHUTDOWN, LOCALE_TIMERLIST_TYPE_SHUTDOWN }, { CTimerd::TIMER_EXEC_PLUGIN, LOCALE_TIMERLIST_TYPE_EXECPLUGIN } }; @@ -1133,6 +1133,9 @@ int CTimerList::newTimer() std::vector toDelete; // Defaults timerNew.eventType = CTimerd::TIMER_RECORD ; + if (g_settings.recording_type == CNeutrinoApp::RECORDING_OFF) + timerNew.eventType = CTimerd::TIMER_ZAPTO; + timerNew.eventRepeat = CTimerd::TIMERREPEAT_ONCE ; timerNew.repeatCount = 0; timerNew.alarmTime = (time(NULL)/60)*60; @@ -1220,7 +1223,11 @@ int CTimerList::newTimer() CTimerListNewNotifier notifier2((int *)&timerNew.eventType, &timerNew.stopTime,m2,m6,m8,m9,m10,m7, timerSettings_stopTime.getValue()); - CMenuOptionChooser* m0 = new CMenuOptionChooser(LOCALE_TIMERLIST_TYPE, (int *)&timerNew.eventType, TIMERLIST_TYPE_OPTIONS, TIMERLIST_TYPE_OPTION_COUNT, true, ¬ifier2); + CMenuOptionChooser* m0; + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) + m0 = new CMenuOptionChooser(LOCALE_TIMERLIST_TYPE, (int *)&timerNew.eventType, TIMERLIST_TYPE_OPTIONS, TIMERLIST_TYPE_OPTION_COUNT, true, ¬ifier2); + else + m0 = new CMenuOptionChooser(LOCALE_TIMERLIST_TYPE, (int *)&timerNew.eventType, &TIMERLIST_TYPE_OPTIONS[1], TIMERLIST_TYPE_OPTION_COUNT-1, true, ¬ifier2); timerSettings.addItem( m0); timerSettings.addItem( m1); diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index b1991d760..5b07acb5f 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -75,7 +75,6 @@ const CMenuOptionChooser::keyval USERMENU_ITEM_OPTIONS[USERMENU_ITEM_OPTION_COUN { SNeutrinoSettings::ITEM_EPG_MISC, LOCALE_USERMENU_ITEM_EPG_MISC }, { SNeutrinoSettings::ITEM_AUDIO_SELECT, LOCALE_AUDIOSELECTMENUE_HEAD }, { SNeutrinoSettings::ITEM_SUBCHANNEL, LOCALE_INFOVIEWER_SUBSERVICE }, - { SNeutrinoSettings::ITEM_RECORD, LOCALE_TIMERLIST_TYPE_RECORD }, { SNeutrinoSettings::ITEM_MOVIEPLAYER_MB, LOCALE_MOVIEBROWSER_HEAD }, { SNeutrinoSettings::ITEM_TIMERLIST, LOCALE_TIMERLIST_NAME }, { SNeutrinoSettings::ITEM_REMOTE, LOCALE_RCLOCK_MENUEADD }, @@ -88,7 +87,8 @@ const CMenuOptionChooser::keyval USERMENU_ITEM_OPTIONS[USERMENU_ITEM_OPTION_COUN { SNeutrinoSettings::ITEM_CAM, LOCALE_CI_SETTINGS }, { SNeutrinoSettings::ITEM_CLOCK, LOCALE_CLOCK_SWITCH_ON }, { SNeutrinoSettings::ITEM_GAMES, LOCALE_MAINMENU_GAMES }, - { SNeutrinoSettings::ITEM_SCRIPTS, LOCALE_MAINMENU_SCRIPTS } + { SNeutrinoSettings::ITEM_SCRIPTS, LOCALE_MAINMENU_SCRIPTS }, + { SNeutrinoSettings::ITEM_RECORD, LOCALE_TIMERLIST_TYPE_RECORD } }; int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &) @@ -130,7 +130,8 @@ int CUserMenuSetup::showSetup() { snprintf(text,max_char,"%d.",item+1); text[max_char-1]=0;// terminate for sure - ums->addItem(new CMenuOptionChooser(text, &g_settings.usermenu[button][item], USERMENU_ITEM_OPTIONS, USERMENU_ITEM_OPTION_COUNT,true, NULL, CRCInput::RC_nokey, "", true )); + int count = (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) ? USERMENU_ITEM_OPTION_COUNT : USERMENU_ITEM_OPTION_COUNT - 1; + ums->addItem(new CMenuOptionChooser(text, &g_settings.usermenu[button][item], USERMENU_ITEM_OPTIONS, count,true, NULL, CRCInput::RC_nokey, "", true )); } int res = ums->exec(NULL, ""); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index fe72fb7bb..476e9de69 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2178,7 +2178,8 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) } } else if( msg == CRCInput::RC_record) { - CRecordManager::getInstance()->exec(NULL, "Record"); + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) + CRecordManager::getInstance()->exec(NULL, "Record"); } else if( msg == CRCInput::RC_stop ) { CRecordManager::getInstance()->exec(NULL, "Stop_record"); @@ -2251,7 +2252,8 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) } else if( msg == CRCInput::RC_video || msg == CRCInput::RC_play ) { //open moviebrowser via media player menu object - CMediaPlayerMenu::getInstance()->exec(NULL,"movieplayer"); + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) + CMediaPlayerMenu::getInstance()->exec(NULL,"movieplayer"); } else if (CRCInput::isNumeric(msg) && g_RemoteControl->director_mode ) { g_RemoteControl->setSubChannel(CRCInput::getNumericValue(msg)); @@ -2648,8 +2650,10 @@ _repeat: g_CamHandler->exec(NULL, "ca_ci_reset1"); } } - CRecordManager::getInstance()->Record((CTimerd::RecordingInfo *) data); - autoshift = CRecordManager::getInstance()->TimeshiftOnly(); + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { + CRecordManager::getInstance()->Record((CTimerd::RecordingInfo *) data); + autoshift = CRecordManager::getInstance()->TimeshiftOnly(); + } delete[] (unsigned char*) data; return messages_return::handled | messages_return::cancel_all; diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index d4f5b98ee..4c4670801 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -298,9 +298,11 @@ void CNeutrinoApp::InitMenuSettings() personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_NETWORK]); // record settings - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING, true, NULL, new CRecordSetup()); - mf->setHint(NEUTRINO_ICON_HINT_RECORDING, LOCALE_MENU_HINT_RECORDING); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_RECORDING]); + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING, true, NULL, new CRecordSetup()); + mf->setHint(NEUTRINO_ICON_HINT_RECORDING, LOCALE_MENU_HINT_RECORDING); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_RECORDING]); + } // osdlang mf = new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE, true, NULL, new COsdLangSetup()); @@ -320,9 +322,11 @@ void CNeutrinoApp::InitMenuSettings() } // drive settings - mf = new CMenuForwarder(LOCALE_HDD_SETTINGS, true, NULL, new CHDDMenuHandler()); - mf->setHint(NEUTRINO_ICON_HINT_HDD, LOCALE_MENU_HINT_HDD); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_DRIVES]); + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { + mf = new CMenuForwarder(LOCALE_HDD_SETTINGS, true, NULL, new CHDDMenuHandler()); + mf->setHint(NEUTRINO_ICON_HINT_HDD, LOCALE_MENU_HINT_HDD); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_DRIVES]); + } // cisettings mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler);