From 11f09acd5e8ccd78feaeb7a7945d6cc10dc4cd55 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 20 May 2010 19:51:58 +0000 Subject: [PATCH] add internetradio menu , patch by bazi98. THX :) git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@598 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/8ec83692dee62f3311fed39c5fd35331474a6c87 Author: Jacek Jendrzej Date: 2010-05-20 (Thu, 20 May 2010) Origin message was: ------------------ -add internetradio menu , patch by bazi98. THX :) git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@598 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/audioplayer.cpp | 21 +++------------------ src/neutrino_menue.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 4335ac8ee..83814b163 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -185,11 +185,11 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) // we borrow this from filebrowser extern size_t CurlWriteToString(void *ptr, size_t size, size_t nmemb, void *data); -CAudioPlayerGui::CAudioPlayerGui(bool /*inetmode*/) +CAudioPlayerGui::CAudioPlayerGui(bool inetmode) { m_frameBuffer = CFrameBuffer::getInstance(); m_visible = false; - m_inetmode = false; //inetmode;//FIXME + m_inetmode = inetmode; Init(); } @@ -428,22 +428,7 @@ int CAudioPlayerGui::show() } } - if ( msg == CRCInput::RC_tv) - { - if (m_inetmode) { - m_inetmode = false; - m_radiolist = m_playlist; - m_playlist = m_filelist; - } else { - m_inetmode = true; - m_filelist = m_playlist; - m_playlist = m_radiolist; - } - Init(); - clear_before_update = true; - update = true; - } - else if (msg == CRCInput::RC_home || msg == CRCInput::RC_stop) + if (msg == CRCInput::RC_home || msg == CRCInput::RC_stop) { if (m_state != CAudioPlayerGui::STOP) stop(); diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 07ec0d95e..543d774e2 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -713,11 +713,13 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings #if 1 CMenuWidget *media = new CMenuWidget(LOCALE_MAINMENU_MEDIA); addMenueIntroItems(*media); - + audioPlayer = new CAudioPlayerGui(); media->addItem(new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, true, NULL, audioPlayer, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + audioPlayer = new CAudioPlayerGui(true); + media->addItem(new CMenuForwarder(LOCALE_INETRADIO_NAME, true, NULL, audioPlayer, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); media->addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); media->addItem(new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, new CPictureViewerGui(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); - media->addItem(new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, true, NULL, new CUpnpBrowserGui(), NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + media->addItem(new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, true, NULL, new CUpnpBrowserGui(), NULL, CRCInput::convertDigitToKey(0))); mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MEDIA, true, NULL, media, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); #else mainMenu.addItem(GenericMenuSeparatorLine);