From e70f3351287d442547eba868b69e9329a75e3da8 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 29 Jul 2018 01:11:33 +0200 Subject: [PATCH] record-menu: allow to exit with RC_stop, when no records available This allows to call and exit this menu without to move the finger on the remotecontrol Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b2649b0c4d7277abfd36d1040c315d13d2a15e6b Author: vanhofen Date: 2018-07-29 (Sun, 29 Jul 2018) Origin message was: ------------------ - record-menu: allow to exit with RC_stop, when no records available This allows to call and exit this menu without to move the finger on the remotecontrol --- src/driver/record.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 9ce775065..8c64eeb8a 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -1523,6 +1523,9 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey ) ShowHint(LOCALE_MAINMENU_RECORDING_STOP, LOCALE_RECORDINGMENU_RECORD_IS_NOT_RUNNING, 450, 2); //return menu_return::RETURN_EXIT_ALL; } + } else if (actionKey == "Exit") + { + return menu_return::RETURN_EXIT_ALL; } ShowMenu(); @@ -1542,6 +1545,8 @@ bool CRecordManager::ShowMenu(void) CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select); CMenuWidget menu(LOCALE_MAINMENU_RECORDING, NEUTRINO_ICON_RECORDING /*, width*/); + if (rec_count == 0) + menu.addKey(CRCInput::RC_stop, this, "Exit"); menu.addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); // Record / Timeshift