mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
remotetimer: Don't repaint timerlist when no changes to remote ip
This commit is contained in:
@@ -300,6 +300,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
if ((remotebox_NetworkIP.exec(NULL,"") == true) && (!remoteip.empty())) {
|
if ((remotebox_NetworkIP.exec(NULL,"") == true) && (!remoteip.empty())) {
|
||||||
remboxmenu->addItem(new CMenuForwarder(remoteip, true, NULL, this, "cha_ip"));
|
remboxmenu->addItem(new CMenuForwarder(remoteip, true, NULL, this, "cha_ip"));
|
||||||
remotebox_NetworkIP.hide();
|
remotebox_NetworkIP.hide();
|
||||||
|
remboxmenu->enableSaveScreen(false);
|
||||||
|
remboxmenu->hide();
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
return menu_return::RETURN_REPAINT;
|
return menu_return::RETURN_REPAINT;
|
||||||
@@ -309,6 +311,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
bselected = remboxmenu->getSelected();
|
bselected = remboxmenu->getSelected();
|
||||||
if (bselected >= item_offset) {
|
if (bselected >= item_offset) {
|
||||||
remboxmenu->removeItem(bselected);
|
remboxmenu->removeItem(bselected);
|
||||||
|
remboxmenu->enableSaveScreen(false);
|
||||||
remboxmenu->hide();
|
remboxmenu->hide();
|
||||||
bselected = remboxmenu->getSelected();
|
bselected = remboxmenu->getSelected();
|
||||||
changed = true;
|
changed = true;
|
||||||
@@ -326,6 +329,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
if (remotebox_NetworkIP.exec(NULL,"") == true) {
|
if (remotebox_NetworkIP.exec(NULL,"") == true) {
|
||||||
f->setName(remoteip);
|
f->setName(remoteip);
|
||||||
remotebox_NetworkIP.hide();
|
remotebox_NetworkIP.hide();
|
||||||
|
remboxmenu->enableSaveScreen(false);
|
||||||
|
remboxmenu->hide();
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
return menu_return::RETURN_REPAINT;
|
return menu_return::RETURN_REPAINT;
|
||||||
@@ -905,8 +910,7 @@ int CTimerList::show()
|
|||||||
}
|
}
|
||||||
else if (msg==CRCInput::RC_setup)
|
else if (msg==CRCInput::RC_setup)
|
||||||
{
|
{
|
||||||
enterRemoteBox();
|
update = enterRemoteBox();
|
||||||
update=true;
|
|
||||||
}
|
}
|
||||||
else if (msg==CRCInput::RC_yellow)
|
else if (msg==CRCInput::RC_yellow)
|
||||||
{
|
{
|
||||||
@@ -969,8 +973,9 @@ void CTimerList::hide()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTimerList::enterRemoteBox()
|
bool CTimerList::enterRemoteBox()
|
||||||
{
|
{
|
||||||
|
bool ret = false;
|
||||||
remboxmenu = new CMenuWidget(LOCALE_REMOTEBOX_HEAD, NEUTRINO_ICON_TIMER);
|
remboxmenu = new CMenuWidget(LOCALE_REMOTEBOX_HEAD, NEUTRINO_ICON_TIMER);
|
||||||
remboxmenu->addKey(CRCInput::RC_red, this, "del_ip");
|
remboxmenu->addKey(CRCInput::RC_red, this, "del_ip");
|
||||||
remboxmenu->addKey(CRCInput::RC_green, this, "add_ip");
|
remboxmenu->addKey(CRCInput::RC_green, this, "add_ip");
|
||||||
@@ -984,8 +989,8 @@ void CTimerList::enterRemoteBox()
|
|||||||
|
|
||||||
remboxmenu->setFooter(RemoteBoxFooterButtons, RemoteBoxFooterButtonCount);
|
remboxmenu->setFooter(RemoteBoxFooterButtons, RemoteBoxFooterButtonCount);
|
||||||
|
|
||||||
|
remboxmenu->enableSaveScreen(true);
|
||||||
remboxmenu->exec(NULL, "");
|
remboxmenu->exec(NULL, "");
|
||||||
remboxmenu->hide();
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
g_settings.timer_remotebox_ip.clear();
|
g_settings.timer_remotebox_ip.clear();
|
||||||
for (int i = item_offset; i < remboxmenu->getItemsCount(); i++) {
|
for (int i = item_offset; i < remboxmenu->getItemsCount(); i++) {
|
||||||
@@ -994,8 +999,10 @@ void CTimerList::enterRemoteBox()
|
|||||||
g_settings.timer_remotebox_ip.push_back(f->getName());
|
g_settings.timer_remotebox_ip.push_back(f->getName());
|
||||||
}
|
}
|
||||||
changed = false;
|
changed = false;
|
||||||
|
ret = true;
|
||||||
}
|
}
|
||||||
delete remboxmenu;
|
delete remboxmenu;
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTimerList::paintItem(int pos)
|
void CTimerList::paintItem(int pos)
|
||||||
|
@@ -86,7 +86,7 @@ class CTimerList : public CMenuTarget, public CListHelpers
|
|||||||
/* todo: properly import the enum CVFD::MODES */
|
/* todo: properly import the enum CVFD::MODES */
|
||||||
int saved_dispmode;
|
int saved_dispmode;
|
||||||
void remoteTimerList(CTimerd::TimerList &timerlist);
|
void remoteTimerList(CTimerd::TimerList &timerlist);
|
||||||
void enterRemoteBox();
|
bool enterRemoteBox();
|
||||||
void select_remotebox_ip();
|
void select_remotebox_ip();
|
||||||
bool remoteChanExists(t_channel_id channel_id);
|
bool remoteChanExists(t_channel_id channel_id);
|
||||||
bool localChanExists(t_channel_id channel_id);
|
bool localChanExists(t_channel_id channel_id);
|
||||||
|
Reference in New Issue
Block a user