From 9c6f07ad229eb135b6efff8fef2d6703215b8766 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 15 Feb 2012 18:21:47 +0000 Subject: [PATCH] neutrino rec: define stop key as prefered key if user wants stop recording It should be easier, to use one button for one and the same purpose. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2103 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a70b0e7aa30bbf645f526395cdfdafe8b91706fa Author: Thilo Graf Date: 2012-02-15 (Wed, 15 Feb 2012) Origin message was: ------------------ *neutrino rec: define stop key as prefered key if user wants stop recording It should be easier, to use one button for one and the same purpose. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2103 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/driver/record.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 8154e01e0..269a3dbeb 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -1337,9 +1337,15 @@ bool CRecordManager::ShowMenu(void) mode_icon = NEUTRINO_ICON_AUTO_SHIFT; sprintf(cnt, "%d", i); - item = new CMenuForwarderNonLocalized(title.c_str(), true, NULL, - selector, cnt, CRCInput::convertDigitToKey((rec_count == 1) ? 0 : shortcut++), NULL, mode_icon); - item->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); + //define stop key if only one record is running, otherwise define shortcuts + neutrino_msg_t rc_key = CRCInput::convertDigitToKey(shortcut++); + std::string btn_icon = NEUTRINO_ICON_BUTTON_OKAY; + if (rec_count == 1){ + rc_key = CRCInput::RC_stop; + btn_icon = NEUTRINO_ICON_BUTTON_STOP; + } + item = new CMenuForwarderNonLocalized(title.c_str(), true, NULL, selector, cnt, rc_key, NULL, mode_icon); + item->setItemButton(btn_icon, true); //if only one recording is running, set the focus to this menu item menu.addItem(item, rec_count == 1 ? true: false); @@ -1351,8 +1357,8 @@ bool CRecordManager::ShowMenu(void) { menu.addItem(GenericMenuSeparatorLine); iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_STOP_ALL, true, NULL, - this, "StopAll", CRCInput::convertDigitToKey(0)); - iteml->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); + this, "StopAll", CRCInput::RC_stop); + iteml->setItemButton(NEUTRINO_ICON_BUTTON_STOP, true); //if more than one recording is running, set the focus to menu item 'stopp all records' menu.addItem(iteml, rec_count > 1 ? true: false);