update_menu: disable software update while recording

Origin commit data
------------------
Branch: ni/coolstream
Commit: e424c6369b
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-06-20 (Thu, 20 Jun 2019)

Origin message was:
------------------
- update_menu: disable software update while recording

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2019-06-20 23:18:06 +02:00
parent 78d101e731
commit 47b1e2cc49

View File

@@ -44,6 +44,7 @@
#include "gui/opkg_manager.h"
#include <gui/widget/icons.h>
#include <driver/screen_max.h>
#include <driver/record.h>
#include <system/debug.h>
#include <system/flashtool.h>
#include <system/helpers.h>
@@ -88,17 +89,19 @@ int CSoftwareUpdate::showSoftwareUpdate()
inetkey = CRCInput::convertDigitToKey(1);
}
bool allow_update = !CRecordManager::getInstance()->RecordingStatus() || CRecordManager::getInstance()->TimeshiftOnly();
CFlashUpdate flash;
flash.enableNotify(false);
//online update
if (file_exists(g_settings.softupdate_url_file.c_str())) {
update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, true, NULL, &flash, "inet", inetkey);
update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, allow_update, NULL, &flash, "inet", inetkey);
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK);
softUpdate.addItem(update_item);
}
//local update
update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_LOCAL, true, NULL, &flash, "local", CRCInput::RC_green);
update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_LOCAL, allow_update, NULL, &flash, "local", CRCInput::RC_green);
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK_LOCAL);
softUpdate.addItem(update_item);