mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 19:01:13 +02:00
Merge branch 'master' into pu/fb-setmode
Origin commit data
------------------
Branch: ni/coolstream
Commit: 77f74c5966
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-03-05 (Sun, 05 Mar 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -546,6 +546,7 @@ void MI_MOVIE_INFO::clear(void)
|
|||||||
|
|
||||||
marked = false;
|
marked = false;
|
||||||
delAsk = true;
|
delAsk = true;
|
||||||
|
source = UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMovieInfo::loadFile(CFile &file, std::string &buffer)
|
bool CMovieInfo::loadFile(CFile &file, std::string &buffer)
|
||||||
|
@@ -103,7 +103,8 @@ void CMsgBox::init(const int& Height, const int& ShowButtons, const msg_result_t
|
|||||||
//set result
|
//set result
|
||||||
if (Default_result != mbrNone)
|
if (Default_result != mbrNone)
|
||||||
result = default_result = Default_result;
|
result = default_result = Default_result;
|
||||||
|
else
|
||||||
|
result = mbrNone;
|
||||||
//add and initialize footer buttons with required buttons and basic properties
|
//add and initialize footer buttons with required buttons and basic properties
|
||||||
if (ShowButtons > -1)
|
if (ShowButtons > -1)
|
||||||
mb_show_button = ShowButtons;
|
mb_show_button = ShowButtons;
|
||||||
@@ -275,53 +276,45 @@ int CMsgBox::exec()
|
|||||||
{
|
{
|
||||||
scroll_down();
|
scroll_down();
|
||||||
}
|
}
|
||||||
else if (msg){
|
//***navi buttons for button selection***
|
||||||
//***navi buttons for button selection***
|
else if(msg == CRCInput::RC_right || msg == CRCInput::RC_left)
|
||||||
if(msg==CRCInput::RC_right || msg==CRCInput::RC_left)
|
{
|
||||||
{
|
if (msg == CRCInput::RC_right)
|
||||||
if(msg==CRCInput::RC_right){
|
ccw_footer->setSelectedButton(selected+1);
|
||||||
ccw_footer->setSelectedButton(selected+1);
|
else
|
||||||
mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias();
|
ccw_footer->setSelectedButton(selected-1);
|
||||||
}
|
mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias();
|
||||||
if(msg==CRCInput::RC_left){
|
selected = ccw_footer->getSelectedButton();
|
||||||
ccw_footer->setSelectedButton(selected-1);
|
|
||||||
mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias();
|
|
||||||
}
|
|
||||||
selected = ccw_footer->getSelectedButton();
|
|
||||||
|
|
||||||
//***refresh buttons only if we have more than one button, this avoids unnecessary repaints with possible flicker effects***
|
//***refresh buttons only if we have more than one button, this avoids unnecessary repaints with possible flicker effects***
|
||||||
if (ccw_footer->getButtonChainObject()->size()>1)
|
if (ccw_footer->getButtonChainObject()->size()>1)
|
||||||
refreshFoot();
|
refreshFoot();
|
||||||
|
|
||||||
//***refresh timeout on any pressed navi key! This resets current timeout end to initial value***
|
//***refresh timeout on any pressed navi key! This resets current timeout end to initial value***
|
||||||
if (timeout > 0){
|
if (timeout > 0) {
|
||||||
timeout_pb->setValues(0, timeout);
|
timeout_pb->setValues(0, timeout);
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
|
timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
|
||||||
}
|
}
|
||||||
|
dprintf(DEBUG_INFO, "\033[32m[CMsgBox] [%s - %d] result = %d, mb_show_button = %d\033[0m\n", __func__, __LINE__, result, mb_show_button);
|
||||||
|
}
|
||||||
|
|
||||||
|
//***action buttons without preselection***
|
||||||
|
for (size_t i = 0; i< ccw_footer->getButtonChainObject()->size(); i++){
|
||||||
|
CComponentsButton* btn_action = static_cast<CComponentsButton*>(ccw_footer->getButtonChainObject()->getCCItem(i));
|
||||||
|
if (msg == btn_action->getButtonDirectKey() || msg == btn_action->getButtonDirectKeyA()){
|
||||||
|
result = (msg_result_t)btn_action->getButtonResult();
|
||||||
dprintf(DEBUG_INFO, "\033[32m[CMsgBox] [%s - %d] result = %d, mb_show_button = %d\033[0m\n", __func__, __LINE__, result, mb_show_button);
|
dprintf(DEBUG_INFO, "\033[32m[CMsgBox] [%s - %d] result = %d, mb_show_button = %d\033[0m\n", __func__, __LINE__, result, mb_show_button);
|
||||||
}
|
|
||||||
|
|
||||||
//***action buttons without preselection***
|
|
||||||
for (size_t i = 0; i< ccw_footer->getButtonChainObject()->size(); i++){
|
|
||||||
CComponentsButton* btn_action = static_cast<CComponentsButton*>(ccw_footer->getButtonChainObject()->getCCItem(i));
|
|
||||||
if (msg == btn_action->getButtonDirectKey() || msg == btn_action->getButtonDirectKeyA()){
|
|
||||||
result = (msg_result_t)btn_action->getButtonResult();
|
|
||||||
dprintf(DEBUG_INFO, "\033[32m[CMsgBox] [%s - %d] result = %d, mb_show_button = %d\033[0m\n", __func__, __LINE__, result, mb_show_button);
|
|
||||||
loop = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//***action button ok with preselected button***
|
|
||||||
if ((msg == CRCInput::RC_ok) && (ccw_footer->getSelectedButtonObject()->getButtonAlias() == mb_show_button)){
|
|
||||||
result = (msg_result_t)ccw_footer->getSelectedButtonObject()->getButtonResult();
|
|
||||||
loop = false;
|
loop = false;
|
||||||
}
|
}
|
||||||
else if (msg == NeutrinoMessages::RECORD_START || msg == NeutrinoMessages::RECORD_STOP) {
|
}
|
||||||
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
//***action button ok with preselected button***
|
||||||
}
|
if ((msg == CRCInput::RC_ok) && (ccw_footer->getSelectedButtonObject()->getButtonAlias() == mb_show_button)){
|
||||||
//***ignore***
|
result = (msg_result_t)ccw_footer->getSelectedButtonObject()->getButtonResult();
|
||||||
else if (CNeutrinoApp::getInstance()->listModeKey(msg)){
|
loop = false;
|
||||||
// do nothing //TODO: if passed rc messages are ignored rc messaages: has no effect here too!!
|
}
|
||||||
}
|
//***ignore***
|
||||||
|
else if (CNeutrinoApp::getInstance()->listModeKey(msg)){
|
||||||
|
// do nothing //TODO: if passed rc messages are ignored rc messaages: has no effect here too!!
|
||||||
}
|
}
|
||||||
else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all)
|
else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all)
|
||||||
{
|
{
|
||||||
|
@@ -70,7 +70,7 @@ std::string cYTCache::getName(MI_MOVIE_INFO *mi, std::string ext)
|
|||||||
case MI_MOVIE_INFO::NK:
|
case MI_MOVIE_INFO::NK:
|
||||||
return g_settings.downloadcache_dir + "/nk-" + mi->ytid + "." + ext;
|
return g_settings.downloadcache_dir + "/nk-" + mi->ytid + "." + ext;
|
||||||
default:
|
default:
|
||||||
return "";
|
return g_settings.downloadcache_dir + "/error-" + mi->ytid + "." + ext;;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user