mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
menu: add condition to enable/disable items in record mode
Origin commit data
------------------
Branch: ni/coolstream
Commit: 5bc33322c8
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-08-02 (Thu, 02 Aug 2018)
Origin message was:
------------------
- menu: add condition to enable/disable items in record mode
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#include <driver/fade.h>
|
#include <driver/fade.h>
|
||||||
#include <driver/display.h>
|
#include <driver/display.h>
|
||||||
|
#include <driver/record.h>
|
||||||
#include <system/helpers.h>
|
#include <system/helpers.h>
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
@@ -133,6 +134,7 @@ bool CMenuItem::initModeCondition(const int& stb_mode)
|
|||||||
void CMenuItem::disableByCondition(const menu_item_disable_cond_t& condition)
|
void CMenuItem::disableByCondition(const menu_item_disable_cond_t& condition)
|
||||||
{
|
{
|
||||||
int stb_mode = CNeutrinoApp::getInstance()->getMode();
|
int stb_mode = CNeutrinoApp::getInstance()->getMode();
|
||||||
|
int rec_mode = CRecordManager::getInstance()->GetRecordMode();
|
||||||
|
|
||||||
if (condition & DCOND_MODE_TS){
|
if (condition & DCOND_MODE_TS){
|
||||||
if (stb_mode == NeutrinoModes::mode_ts)
|
if (stb_mode == NeutrinoModes::mode_ts)
|
||||||
@@ -149,6 +151,11 @@ void CMenuItem::disableByCondition(const menu_item_disable_cond_t& condition)
|
|||||||
if (initModeCondition(stb_mode))
|
if (initModeCondition(stb_mode))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (condition & DCOND_MODE_REC){
|
||||||
|
if (rec_mode & CRecordManager::RECMODE_REC)
|
||||||
|
if (initModeCondition(rec_mode))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
active = current_active;
|
active = current_active;
|
||||||
|
|
||||||
|
@@ -78,7 +78,8 @@ enum
|
|||||||
|
|
||||||
DCOND_MODE_TV = 2,
|
DCOND_MODE_TV = 2,
|
||||||
DCOND_MODE_RADIO = 4,
|
DCOND_MODE_RADIO = 4,
|
||||||
DCOND_MODE_TS = 8
|
DCOND_MODE_TS = 8,
|
||||||
|
DCOND_MODE_REC = 16
|
||||||
}/*menu_item_disable_cond_t*/;
|
}/*menu_item_disable_cond_t*/;
|
||||||
|
|
||||||
class CChangeObserver
|
class CChangeObserver
|
||||||
|
Reference in New Issue
Block a user