mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-15 17:33:43 +02:00
Merge branch 'master' into multituner
This commit is contained in:
@@ -330,6 +330,8 @@ int CPersonalizeGui::ShowPersonalizationMenu()
|
|||||||
delete pinChangeWidget;
|
delete pinChangeWidget;
|
||||||
delete fkeyMenu;
|
delete fkeyMenu;
|
||||||
delete plMenu;
|
delete plMenu;
|
||||||
|
for(vector<CUserMenuSetup*>::iterator it = v_userMenuSetup.begin(); it != v_userMenuSetup.end(); ++it)
|
||||||
|
delete *it;
|
||||||
v_userMenuSetup.clear();
|
v_userMenuSetup.clear();
|
||||||
delete user_menu_notifier;
|
delete user_menu_notifier;
|
||||||
delete pin_setup_notifier;
|
delete pin_setup_notifier;
|
||||||
@@ -374,7 +376,7 @@ void CPersonalizeGui::ShowPreverredKeySetup(CMenuWidget* p_widget)
|
|||||||
|
|
||||||
|
|
||||||
//init usermenu items
|
//init usermenu items
|
||||||
void CPersonalizeGui::ShowUserMenu(CMenuWidget* p_widget, vector<CUserMenuSetup*> v_umenu)
|
void CPersonalizeGui::ShowUserMenu(CMenuWidget* p_widget, vector<CUserMenuSetup*> &v_umenu)
|
||||||
{
|
{
|
||||||
p_widget->addIntroItems(LOCALE_USERMENU_HEAD);
|
p_widget->addIntroItems(LOCALE_USERMENU_HEAD);
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ class CPersonalizeGui : public CMenuTarget, public CChangeObserver, public CPINP
|
|||||||
void ShowMenuOptions(const int& menu);
|
void ShowMenuOptions(const int& menu);
|
||||||
void ShowHelpPersonalize();
|
void ShowHelpPersonalize();
|
||||||
void ShowPinSetup(CMenuWidget* p_widget, CPINChangeWidget *pin_widget);
|
void ShowPinSetup(CMenuWidget* p_widget, CPINChangeWidget *pin_widget);
|
||||||
void ShowUserMenu(CMenuWidget* p_widget, std::vector<CUserMenuSetup*> v_umenu);
|
void ShowUserMenu(CMenuWidget* p_widget, std::vector<CUserMenuSetup*> &v_umenu);
|
||||||
void ShowPluginMenu(CMenuWidget* p_widget);
|
void ShowPluginMenu(CMenuWidget* p_widget);
|
||||||
void ShowPreverredKeySetup(CMenuWidget* p_widget);
|
void ShowPreverredKeySetup(CMenuWidget* p_widget);
|
||||||
void SaveAndExit();
|
void SaveAndExit();
|
||||||
|
@@ -57,17 +57,13 @@ CUserMenuSetup::CUserMenuSetup(neutrino_locale_t menue_title, int menue_button)
|
|||||||
width = w_max (40, 10);
|
width = w_max (40, 10);
|
||||||
pref_name = g_settings.usermenu_text[button]; //set current button name as prefered name
|
pref_name = g_settings.usermenu_text[button]; //set current button name as prefered name
|
||||||
ums = NULL;
|
ums = NULL;
|
||||||
mf = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CUserMenuSetup::~CUserMenuSetup()
|
CUserMenuSetup::~CUserMenuSetup()
|
||||||
{
|
{
|
||||||
delete ums;
|
delete ums;
|
||||||
if (mf != NULL)
|
|
||||||
delete mf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define USERMENU_ITEM_OPTION_COUNT SNeutrinoSettings::ITEM_MAX
|
#define USERMENU_ITEM_OPTION_COUNT SNeutrinoSettings::ITEM_MAX
|
||||||
const CMenuOptionChooser::keyval USERMENU_ITEM_OPTIONS[USERMENU_ITEM_OPTION_COUNT] =
|
const CMenuOptionChooser::keyval USERMENU_ITEM_OPTIONS[USERMENU_ITEM_OPTION_COUNT] =
|
||||||
{
|
{
|
||||||
@@ -114,15 +110,14 @@ int CUserMenuSetup::showSetup()
|
|||||||
}else{
|
}else{
|
||||||
//if widget not clean, ensure that we have an empty widget without any item and set the last selected item
|
//if widget not clean, ensure that we have an empty widget without any item and set the last selected item
|
||||||
int sel = ums->getSelected();
|
int sel = ums->getSelected();
|
||||||
ums->resetWidget();
|
ums->resetWidget(true);
|
||||||
ums->setSelected(sel);
|
ums->setSelected(sel);
|
||||||
}
|
}
|
||||||
|
|
||||||
//CUserMenuNotifier *notify = new CUserMenuNotifier();
|
//CUserMenuNotifier *notify = new CUserMenuNotifier();
|
||||||
CStringInputSMS name(LOCALE_USERMENU_NAME, &g_settings.usermenu_text[button], 11, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzäöüß/- "/*, notify*/);
|
CStringInputSMS name(LOCALE_USERMENU_NAME, &g_settings.usermenu_text[button], 11, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzäöüß/- "/*, notify*/);
|
||||||
|
|
||||||
if (mf == NULL)
|
CMenuForwarder * mf = new CMenuForwarder(LOCALE_USERMENU_NAME, true, g_settings.usermenu_text[button],&name);
|
||||||
mf = new CMenuForwarder(LOCALE_USERMENU_NAME, true, g_settings.usermenu_text[button],&name);
|
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
ums->addIntroItems();
|
ums->addIntroItems();
|
||||||
|
@@ -72,7 +72,6 @@ const struct usermenu_props_t usermenu[USERMENU_ITEMS_COUNT] =
|
|||||||
void checkButtonName();
|
void checkButtonName();
|
||||||
|
|
||||||
CMenuWidget * ums;
|
CMenuWidget * ums;
|
||||||
CMenuForwarder *mf;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CUserMenuSetup(neutrino_locale_t menue_title, int menue_button);
|
CUserMenuSetup(neutrino_locale_t menue_title, int menue_button);
|
||||||
|
@@ -380,6 +380,7 @@ void CMenuWidget::move(int xoff, int yoff)
|
|||||||
|
|
||||||
CMenuWidget::~CMenuWidget()
|
CMenuWidget::~CMenuWidget()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
for(unsigned int count=0;count<items.size();count++) {
|
for(unsigned int count=0;count<items.size();count++) {
|
||||||
CMenuItem * item = items[count];
|
CMenuItem * item = items[count];
|
||||||
if ((item != GenericMenuSeparator) &&
|
if ((item != GenericMenuSeparator) &&
|
||||||
@@ -392,6 +393,8 @@ CMenuWidget::~CMenuWidget()
|
|||||||
|
|
||||||
items.clear();
|
items.clear();
|
||||||
page_start.clear();
|
page_start.clear();
|
||||||
|
#endif
|
||||||
|
resetWidget(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenuWidget::addItem(CMenuItem* menuItem, const bool defaultselected)
|
void CMenuWidget::addItem(CMenuItem* menuItem, const bool defaultselected)
|
||||||
@@ -411,7 +414,7 @@ void CMenuWidget::addItem(CMenuItem* menuItem, const bool defaultselected)
|
|||||||
items.push_back(menuItem);
|
items.push_back(menuItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenuWidget::resetWidget()
|
void CMenuWidget::resetWidget(bool delete_items)
|
||||||
{
|
{
|
||||||
for(unsigned int count=0;count<items.size();count++) {
|
for(unsigned int count=0;count<items.size();count++) {
|
||||||
CMenuItem * item = items[count];
|
CMenuItem * item = items[count];
|
||||||
@@ -419,7 +422,8 @@ void CMenuWidget::resetWidget()
|
|||||||
(item != GenericMenuSeparatorLine) &&
|
(item != GenericMenuSeparatorLine) &&
|
||||||
(item != GenericMenuBack) &&
|
(item != GenericMenuBack) &&
|
||||||
(item != GenericMenuCancel)){
|
(item != GenericMenuCancel)){
|
||||||
//delete item;//FIXME: possible crash here
|
if(delete_items)
|
||||||
|
delete item;
|
||||||
item = NULL;
|
item = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -446,7 +446,7 @@ class CMenuWidget : public CMenuTarget
|
|||||||
};
|
};
|
||||||
virtual void addIntroItems(neutrino_locale_t subhead_text = NONEXISTANT_LOCALE, neutrino_locale_t section_text = NONEXISTANT_LOCALE, int buttontype = BTN_TYPE_BACK );
|
virtual void addIntroItems(neutrino_locale_t subhead_text = NONEXISTANT_LOCALE, neutrino_locale_t section_text = NONEXISTANT_LOCALE, int buttontype = BTN_TYPE_BACK );
|
||||||
bool hasItem();
|
bool hasItem();
|
||||||
void resetWidget();
|
void resetWidget(bool delete_items = false);
|
||||||
void insertItem(const uint& item_id, CMenuItem* menuItem);
|
void insertItem(const uint& item_id, CMenuItem* menuItem);
|
||||||
void removeItem(const uint& item_id);
|
void removeItem(const uint& item_id);
|
||||||
int getItemId(CMenuItem* menuItem);
|
int getItemId(CMenuItem* menuItem);
|
||||||
|
@@ -79,6 +79,7 @@ class CZapit : public OpenThreads::Thread
|
|||||||
|
|
||||||
CZapitChannel * current_channel;
|
CZapitChannel * current_channel;
|
||||||
t_channel_id live_channel_id;
|
t_channel_id live_channel_id;
|
||||||
|
TP_params TP;
|
||||||
|
|
||||||
CFrontend * live_fe;
|
CFrontend * live_fe;
|
||||||
|
|
||||||
@@ -143,6 +144,7 @@ class CZapit : public OpenThreads::Thread
|
|||||||
|
|
||||||
bool PrepareChannels();
|
bool PrepareChannels();
|
||||||
bool StartScan(int scan_mode);
|
bool StartScan(int scan_mode);
|
||||||
|
bool StartScanTP(TP_params * TPparams);
|
||||||
bool StartFastScan(int scan_mode, int opid);
|
bool StartFastScan(int scan_mode, int opid);
|
||||||
|
|
||||||
void addChannelToBouquet(const unsigned int bouquet, const t_channel_id channel_id);
|
void addChannelToBouquet(const unsigned int bouquet, const t_channel_id channel_id);
|
||||||
|
@@ -97,7 +97,7 @@ transponder_list_t transponders;
|
|||||||
CZapitClient::bouquetMode bouquetMode = CZapitClient::BM_UPDATEBOUQUETS;
|
CZapitClient::bouquetMode bouquetMode = CZapitClient::BM_UPDATEBOUQUETS;
|
||||||
CZapitClient::scanType scanType = CZapitClient::ST_TVRADIO;
|
CZapitClient::scanType scanType = CZapitClient::ST_TVRADIO;
|
||||||
|
|
||||||
static TP_params TP;
|
//static TP_params TP;
|
||||||
|
|
||||||
static bool update_pmt = true;
|
static bool update_pmt = true;
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
@@ -717,6 +717,14 @@ bool CZapit::StartScan(int scan_mode)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CZapit::StartScanTP(TP_params * TPparams)
|
||||||
|
{
|
||||||
|
PrepareScan();
|
||||||
|
|
||||||
|
CServiceScan::getInstance()->Start(CServiceScan::SCAN_TRANSPONDER, (void *) TPparams);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool CZapit::StartFastScan(int scan_mode, int opid)
|
bool CZapit::StartFastScan(int scan_mode, int opid)
|
||||||
{
|
{
|
||||||
fast_scan_type_t scant;
|
fast_scan_type_t scant;
|
||||||
@@ -1071,8 +1079,11 @@ printf("[zapit] TP_id %d freq %d rate %d fec %d pol %d\n", TP.TP_id, TP.feparams
|
|||||||
CServiceManager::getInstance()->GetSatelliteName(current_channel->getSatellitePosition());
|
CServiceManager::getInstance()->GetSatelliteName(current_channel->getSatellitePosition());
|
||||||
current_channel = 0;
|
current_channel = 0;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
PrepareScan();
|
PrepareScan();
|
||||||
CServiceScan::getInstance()->Start(CServiceScan::SCAN_TRANSPONDER, (void *) &TP);
|
CServiceScan::getInstance()->Start(CServiceScan::SCAN_TRANSPONDER, (void *) &TP);
|
||||||
|
#endif
|
||||||
|
StartScanTP(&TP);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user