miscsettings_menu: allow to reset movieplayer plugin

Origin commit data
------------------
Commit: a4bd8cc5a8
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-02-22 (Mon, 22 Feb 2016)

Origin message was:
------------------
- miscsettings_menu: allow to reset movieplayer plugin
This commit is contained in:
vanhofen
2016-02-22 21:06:46 +01:00
parent 0c73944b02
commit e11a006f04
7 changed files with 25 additions and 14 deletions

View File

@@ -100,11 +100,11 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
}
else if(actionKey == "movieplayer_plugin")
{
CMenuWidget MoviePluginSelector(LOCALE_MOVIEPLAYER_DEFPLUGIN, NEUTRINO_ICON_FEATURES);
CMenuWidget MoviePluginSelector(LOCALE_MOVIEPLAYER_PLUGIN, NEUTRINO_ICON_FEATURES);
MoviePluginSelector.addItem(GenericMenuSeparator);
MoviePluginSelector.addItem(new CMenuForwarder(LOCALE_PLUGINS_NO_PLUGIN, true, NULL, new CMoviePluginChangeExec(), "---", CRCInput::RC_red));
MoviePluginSelector.addItem(GenericMenuSeparatorLine);
char id[5];
int cnt = 0;
int enabled_count = 0;
for(unsigned int count=0;count < (unsigned int) g_PluginList->getNumberOfPlugins();count++)
{
@@ -112,8 +112,7 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
{
sprintf(id, "%d", count);
enabled_count++;
MoviePluginSelector.addItem(new CMenuForwarder(g_PluginList->getName(count), true, NULL, new CMoviePluginChangeExec(), id, CRCInput::convertDigitToKey(count)), (cnt == 0));
cnt++;
MoviePluginSelector.addItem(new CMenuForwarder(g_PluginList->getName(count), true, NULL, new CMoviePluginChangeExec(), id, CRCInput::convertDigitToKey(count)));
}
}

View File

@@ -638,7 +638,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.recording_startstop_msg = configfile.getBool("recording_startstop_msg" , true);
// default plugin for movieplayer
g_settings.movieplayer_plugin = configfile.getString( "movieplayer_plugin", "noplugin" );
g_settings.movieplayer_plugin = configfile.getString( "movieplayer_plugin", "---" );
g_settings.plugin_hdd_dir = configfile.getString( "plugin_hdd_dir", "/media/sda1/plugins" );
g_settings.plugins_disabled = configfile.getString( "plugins_disabled", "" );

View File

@@ -1799,7 +1799,7 @@ typedef enum
LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT1,
LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT2,
LOCALE_MOVIEPLAYER_CHAPTERS,
LOCALE_MOVIEPLAYER_DEFPLUGIN,
LOCALE_MOVIEPLAYER_PLUGIN,
LOCALE_MOVIEPLAYER_FILEPLAYBACK,
LOCALE_MOVIEPLAYER_HEAD,
LOCALE_MOVIEPLAYER_STARTING,
@@ -2023,6 +2023,7 @@ typedef enum
LOCALE_PINPROTECTION_HEAD,
LOCALE_PINPROTECTION_WRONGCODE,
LOCALE_PLUGINS_HDD_DIR,
LOCALE_PLUGINS_NO_PLUGIN,
LOCALE_PLUGINS_RESULT,
LOCALE_PLUGINTYPE_DISABLED,
LOCALE_PLUGINTYPE_GAME,

View File

@@ -1799,7 +1799,7 @@ const char * locale_real_names[] =
"movieplayer.bookmarkname_hint1",
"movieplayer.bookmarkname_hint2",
"movieplayer.chapters",
"movieplayer.defplugin",
"movieplayer.plugin",
"movieplayer.fileplayback",
"movieplayer.head",
"movieplayer.starting",
@@ -2023,6 +2023,7 @@ const char * locale_real_names[] =
"pinprotection.head",
"pinprotection.wrongcode",
"plugins.hdd_dir",
"plugins.no_plugin",
"plugins.result",
"plugintype.disabled",
"plugintype.game",

View File

@@ -375,12 +375,20 @@ int CNVODChangeExec::exec(CMenuTarget* parent, const std::string & actionKey)
int CMoviePluginChangeExec::exec(CMenuTarget* parent, const std::string & actionKey)
{
int sel= atoi(actionKey.c_str());
parent->hide();
if (sel>=0)
if (parent)
parent->hide();
if (actionKey == "---")
{
g_settings.movieplayer_plugin=g_PluginList->getName(sel);
g_settings.movieplayer_plugin = actionKey;
}
else
{
int sel = atoi(actionKey.c_str());
if (sel >= 0)
g_settings.movieplayer_plugin = g_PluginList->getName(sel);
}
return menu_return::RETURN_EXIT;
}