diff --git a/src/gui/webtv_setup.cpp b/src/gui/webtv_setup.cpp index 7aae92959..a74887a6a 100644 --- a/src/gui/webtv_setup.cpp +++ b/src/gui/webtv_setup.cpp @@ -30,11 +30,12 @@ #include #include #include +#include #include "webtv_setup.h" CWebTVSetup::CWebTVSetup() { - width = w_max (40, 10); + width = w_max (55, 10); selected = -1; item_offset = 0; changed = false; @@ -91,25 +92,26 @@ int CWebTVSetup::exec(CMenuTarget* parent, const std::string & actionKey) if(parent) parent->hide(); - Show(); + res = Show(); return res; } -void CWebTVSetup::Show() +int CWebTVSetup::Show() { item_offset = 0; - m = new CMenuWidget(LOCALE_WEBTV_HEAD, NEUTRINO_ICON_MOVIEPLAYER, width); + m = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_MOVIEPLAYER, width, MN_WIDGET_ID_WEBTVSETUP); m->addKey(CRCInput::RC_red, this, "d"); m->addKey(CRCInput::RC_green, this, "a"); - m->setSelected(selected); - m->addIntroItems(LOCALE_EPGPLUS_OPTIONS, LOCALE_WEBTV_XML); + + m->addIntroItems(LOCALE_WEBTV_HEAD, LOCALE_WEBTV_XML); item_offset = m->getItemsCount(); for (std::list::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it) m->addItem(new CMenuForwarder(*it, true, NULL, this, "c")); - m->setFooter(CWebTVSetupFooterButtons, CWebTVSetupFooterButtonCount); - m->exec(NULL, ""); + m->setFooter(CWebTVSetupFooterButtons, CWebTVSetupFooterButtonCount); //Why we need here an extra buttonbar? + + int res = m->exec(NULL, ""); m->hide(); if (changed) { g_settings.webtv_xml.clear(); @@ -121,7 +123,9 @@ void CWebTVSetup::Show() g_Zapit->reinitChannels(); changed = false; } - selected = m->getSelected(); + delete m; + + return res; } // vim:ts=4 diff --git a/src/gui/webtv_setup.h b/src/gui/webtv_setup.h index 5ad1519c1..ed6d4ab96 100644 --- a/src/gui/webtv_setup.h +++ b/src/gui/webtv_setup.h @@ -38,6 +38,6 @@ class CWebTVSetup : public CMenuTarget public: CWebTVSetup(); int exec(CMenuTarget* parent, const std::string & actionKey); - void Show(); + int Show(); }; #endif diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index 275d5b6f2..e8e49fc1f 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -108,6 +108,9 @@ enum MN_WIDGET_ID //audio setup MN_WIDGET_ID_AUDIOSETUP, + + //web tv setup + MN_WIDGET_ID_WEBTVSETUP, //misc settings MN_WIDGET_ID_MISCSETUP,