Disable multimedia plugins and video functions...

...(movie player & upnp browser) when movieplayer is in use
This commit is contained in:
M. Liebmann
2015-12-08 06:16:10 +01:00
parent d06594dd60
commit 189b2e0fb0
3 changed files with 8 additions and 7 deletions

View File

@@ -167,6 +167,7 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p)
fw_inet->setHint(NEUTRINO_ICON_HINT_INET_RADIO, LOCALE_MENU_HINT_INET_RADIO); fw_inet->setHint(NEUTRINO_ICON_HINT_INET_RADIO, LOCALE_MENU_HINT_INET_RADIO);
} }
bool enabled = !CMoviePlayerGui::getInstance().Playing();
if (usage_mode == MODE_DEFAULT) if (usage_mode == MODE_DEFAULT)
{ {
//movieplayer //movieplayer
@@ -174,9 +175,9 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p)
moviePlayer = new CMenuWidget(LOCALE_MAINMENU_MOVIEPLAYER, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA_MOVIEPLAYER); moviePlayer = new CMenuWidget(LOCALE_MAINMENU_MOVIEPLAYER, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA_MOVIEPLAYER);
personalize->addWidget(moviePlayer); personalize->addWidget(moviePlayer);
if (g_settings.easymenu) if (g_settings.easymenu)
fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, moviePlayer, NULL, CRCInput::RC_red); fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, enabled, NULL, moviePlayer, NULL, CRCInput::RC_red);
else else
fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, moviePlayer, NULL, CRCInput::RC_yellow); fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, enabled, NULL, moviePlayer, NULL, CRCInput::RC_yellow);
fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE); fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE);
} }
@@ -192,7 +193,7 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p)
if (!g_settings.easymenu) { if (!g_settings.easymenu) {
if (!upnpbrowsergui) if (!upnpbrowsergui)
upnpbrowsergui = new CUpnpBrowserGui(); upnpbrowsergui = new CUpnpBrowserGui();
fw_upnp = new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, true, NULL, upnpbrowsergui, NULL, CRCInput::RC_0); fw_upnp = new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, enabled, NULL, upnpbrowsergui, NULL, CRCInput::RC_0);
fw_upnp->setHint(NEUTRINO_ICON_HINT_A_PIC, LOCALE_MENU_HINT_UPNP); fw_upnp->setHint(NEUTRINO_ICON_HINT_A_PIC, LOCALE_MENU_HINT_UPNP);
} }
#endif #endif
@@ -261,7 +262,7 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p)
//add I_TYPE_MULTIMEDIA plugins //add I_TYPE_MULTIMEDIA plugins
unsigned int nextShortcut = (unsigned int)media->getNextShortcut(); unsigned int nextShortcut = (unsigned int)media->getNextShortcut();
media->integratePlugins(CPlugins::I_TYPE_MULTIMEDIA, nextShortcut); media->integratePlugins(CPlugins::I_TYPE_MULTIMEDIA, nextShortcut, enabled);
res = media->exec(NULL, ""); res = media->exec(NULL, "");
delete media; delete media;

View File

@@ -968,7 +968,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
return retval; return retval;
} }
void CMenuWidget::integratePlugins(CPlugins::i_type_t integration, const unsigned int shortcut) void CMenuWidget::integratePlugins(CPlugins::i_type_t integration, const unsigned int shortcut, bool enabled)
{ {
bool separatorline = false; bool separatorline = false;
unsigned int number_of_plugins = (unsigned int) g_PluginList->getNumberOfPlugins(); unsigned int number_of_plugins = (unsigned int) g_PluginList->getNumberOfPlugins();
@@ -984,7 +984,7 @@ void CMenuWidget::integratePlugins(CPlugins::i_type_t integration, const unsigne
} }
printf("[neutrino] integratePlugins: add %s\n", g_PluginList->getName(count)); printf("[neutrino] integratePlugins: add %s\n", g_PluginList->getName(count));
neutrino_msg_t dk = (shortcut != CRCInput::RC_nokey) ? CRCInput::convertDigitToKey(sc++) : CRCInput::RC_nokey; neutrino_msg_t dk = (shortcut != CRCInput::RC_nokey) ? CRCInput::convertDigitToKey(sc++) : CRCInput::RC_nokey;
CMenuForwarder *fw_plugin = new CMenuForwarder(g_PluginList->getName(count), true, NULL, CPluginsExec::getInstance(), to_string(count).c_str(), dk); CMenuForwarder *fw_plugin = new CMenuForwarder(g_PluginList->getName(count), enabled, NULL, CPluginsExec::getInstance(), to_string(count).c_str(), dk);
fw_plugin->setHint(g_PluginList->getHintIcon(count), g_PluginList->getDescription(count)); fw_plugin->setHint(g_PluginList->getHintIcon(count), g_PluginList->getDescription(count));
addItem(fw_plugin); addItem(fw_plugin);
} }

View File

@@ -575,7 +575,7 @@ class CMenuWidget : public CMenuTarget
virtual void hide(); virtual void hide();
virtual int exec(CMenuTarget* parent, const std::string & actionKey); virtual int exec(CMenuTarget* parent, const std::string & actionKey);
virtual const char *getName(); virtual const char *getName();
virtual void integratePlugins(CPlugins::i_type_t integration, const unsigned int shortcut=CRCInput::RC_nokey); virtual void integratePlugins(CPlugins::i_type_t integration, const unsigned int shortcut=CRCInput::RC_nokey, bool enabled=true);
void setSelected(const int &Preselected){ selected = Preselected; }; void setSelected(const int &Preselected){ selected = Preselected; };
int getSelected()const { return selected; }; int getSelected()const { return selected; };
void move(int xoff, int yoff); void move(int xoff, int yoff);