diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index 3148499fb..782f12832 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -1,23 +1,13 @@ /* Neutrino-GUI - DBoxII-Project - Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ + Copyright (C) 2011 CoolStream International Ltd - Kommentar: - - Diese GUI wurde von Grund auf neu programmiert und sollte nun vom - Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert - auf der Client-Server Idee, diese GUI ist also von der direkten DBox- - Steuerung getrennt. Diese wird dann von Daemons uebernommen. - - - License: GPL + License: GPLv2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + the Free Software Foundation; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -110,15 +100,20 @@ int CCAMMenuHandler::doMainMenu() char name1[255]={0}; char str1[255]={0}; - CMenuWidget* cammenu = new CMenuWidget(LOCALE_CI_SETTINGS, NEUTRINO_ICON_SETTINGS); - cammenu->addItem( GenericMenuBack ); - cammenu->addItem( GenericMenuSeparatorLine ); + int CiSlots = ca->GetNumberCISlots(); - cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_RESET_STANDBY, &g_settings.ci_standby_reset, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - cammenu->addItem( GenericMenuSeparatorLine ); + CMenuWidget* cammenu = new CMenuWidget(LOCALE_CI_SETTINGS, NEUTRINO_ICON_SETTINGS); + //cammenu->addItem( GenericMenuBack ); + //cammenu->addItem( GenericMenuSeparatorLine ); + cammenu->addIntroItems(); + + if(true /* CiSlots */) { + cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_RESET_STANDBY, &g_settings.ci_standby_reset, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + cammenu->addItem( new CMenuOptionNumberChooser(LOCALE_CI_CLOCK, &g_settings.ci_clock, true, 6, 12, this)); + cammenu->addItem( GenericMenuSeparatorLine ); + } CMenuWidget * tempMenu; - int CiSlots = ca->GetNumberCISlots(); int i = 0; cnt = 0; @@ -494,3 +489,13 @@ int CCAMMenuHandler::doMenu(int slot, CA_SLOT_TYPE slotType) printf("CCAMMenuHandler::doMenu: return\n"); return res; } + +bool CCAMMenuHandler::changeNotify(const neutrino_locale_t OptionName, void * /*Data*/) +{ + if (ARE_LOCALES_EQUAL(OptionName, LOCALE_CI_CLOCK)) { + printf("CCAMMenuHandler::changeNotify: ci_clock %d\n", g_settings.ci_clock); + ca->SetTSClock(g_settings.ci_clock * 1000000); + return true; + } + return false; +} diff --git a/src/gui/cam_menu.h b/src/gui/cam_menu.h index 78b8f3749..4a8c1fa43 100644 --- a/src/gui/cam_menu.h +++ b/src/gui/cam_menu.h @@ -1,13 +1,12 @@ /* Neutrino-GUI - DBoxII-Project - - License: GPL + Copyright (C) 2011 CoolStream International Ltd + License: GPLv2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + the Free Software Foundation; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -32,7 +31,7 @@ using namespace std; -class CCAMMenuHandler : public CMenuTarget +class CCAMMenuHandler : public CMenuTarget, public CChangeObserver { private: CHintBox * hintBox; @@ -48,6 +47,7 @@ class CCAMMenuHandler : public CMenuTarget void init(void); int exec(CMenuTarget* parent, const std::string &actionkey); int handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data); + bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/); }; #endif