diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index d54e2470e..1bc9c6ea8 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -958,12 +958,13 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) return retval; } -void CMenuWidget::integratePlugins(void *pluginsExec, CPlugins::i_type_t integration) +void CMenuWidget::integratePlugins(void *pluginsExec, CPlugins::i_type_t integration, const unsigned int shortcut) { CPluginsExec *_pluginsExec = static_cast(pluginsExec); bool separatorline = false; char id_plugin[5]; unsigned int number_of_plugins = (unsigned int) g_PluginList->getNumberOfPlugins(); + unsigned int sc = shortcut; for (unsigned int count = 0; count < number_of_plugins; count++) { if ((g_PluginList->getIntegration(count) == integration) && !g_PluginList->isHidden(count)) @@ -975,7 +976,8 @@ void CMenuWidget::integratePlugins(void *pluginsExec, CPlugins::i_type_t integra } printf("[neutrino] integratePlugins: add %s\n", g_PluginList->getName(count)); sprintf(id_plugin, "%d", count); - CMenuForwarder *fw_plugin = new CMenuForwarder(g_PluginList->getName(count), true, NULL, _pluginsExec, id_plugin); + 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, _pluginsExec, id_plugin, dk); fw_plugin->setHint(g_PluginList->getHintIcon(count), g_PluginList->getDescription(count)); addItem(fw_plugin); } diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index a5e72940e..ced5f41c8 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -558,7 +558,7 @@ class CMenuWidget : public CMenuTarget virtual void hide(); virtual int exec(CMenuTarget* parent, const std::string & actionKey); virtual const char *getName(); - virtual void integratePlugins(void *pluginsExec, CPlugins::i_type_t integration); + virtual void integratePlugins(void *pluginsExec, CPlugins::i_type_t integration, const unsigned int shortcut=CRCInput::RC_nokey); void setSelected(const int &Preselected){ preselected = Preselected; }; int getSelected()const { return selected; }; void move(int xoff, int yoff);