CI menu: add support to change CI clock

Origin commit data
------------------
Branch: ni/coolstream
Commit: 546952f3a1
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-01-13 (Fri, 13 Jan 2012)


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

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-01-13 14:38:04 +04:00
parent 6d287822aa
commit 6775dc8a6a
2 changed files with 29 additions and 24 deletions

View File

@@ -1,23 +1,13 @@
/* /*
Neutrino-GUI - DBoxII-Project Neutrino-GUI - DBoxII-Project
Copyright (C) 2001 Steffen Hehn 'McClean' Copyright (C) 2011 CoolStream International Ltd
Homepage: http://dbox.cyberphoria.org/
Kommentar: License: GPLv2
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
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation;
(at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -110,15 +100,20 @@ int CCAMMenuHandler::doMainMenu()
char name1[255]={0}; char name1[255]={0};
char str1[255]={0}; char str1[255]={0};
CMenuWidget* cammenu = new CMenuWidget(LOCALE_CI_SETTINGS, NEUTRINO_ICON_SETTINGS); int CiSlots = ca->GetNumberCISlots();
cammenu->addItem( GenericMenuBack );
cammenu->addItem( GenericMenuSeparatorLine );
cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_RESET_STANDBY, &g_settings.ci_standby_reset, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); CMenuWidget* cammenu = new CMenuWidget(LOCALE_CI_SETTINGS, NEUTRINO_ICON_SETTINGS);
cammenu->addItem( GenericMenuSeparatorLine ); //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; CMenuWidget * tempMenu;
int CiSlots = ca->GetNumberCISlots();
int i = 0; int i = 0;
cnt = 0; cnt = 0;
@@ -494,3 +489,13 @@ int CCAMMenuHandler::doMenu(int slot, CA_SLOT_TYPE slotType)
printf("CCAMMenuHandler::doMenu: return\n"); printf("CCAMMenuHandler::doMenu: return\n");
return res; 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;
}

View File

@@ -1,13 +1,12 @@
/* /*
Neutrino-GUI - DBoxII-Project Neutrino-GUI - DBoxII-Project
Copyright (C) 2011 CoolStream International Ltd
License: GPL License: GPLv2
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation;
(at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -32,7 +31,7 @@
using namespace std; using namespace std;
class CCAMMenuHandler : public CMenuTarget class CCAMMenuHandler : public CMenuTarget, public CChangeObserver
{ {
private: private:
CHintBox * hintBox; CHintBox * hintBox;
@@ -48,6 +47,7 @@ class CCAMMenuHandler : public CMenuTarget
void init(void); void init(void);
int exec(CMenuTarget* parent, const std::string &actionkey); int exec(CMenuTarget* parent, const std::string &actionkey);
int handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data); int handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data);
bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/);
}; };
#endif #endif