mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 10:51:12 +02:00
- pluginlist: formatting code using astyle
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
#include <zapit/client/zapittools.h>
|
#include <zapit/client/zapittools.h>
|
||||||
#include <system/helpers.h>
|
#include <system/helpers.h>
|
||||||
|
|
||||||
extern CPlugins * g_Plugins; /* neutrino.cpp */
|
extern CPlugins *g_Plugins;
|
||||||
|
|
||||||
CPluginList::CPluginList(const neutrino_locale_t Title, const uint32_t listtype)
|
CPluginList::CPluginList(const neutrino_locale_t Title, const uint32_t listtype)
|
||||||
{
|
{
|
||||||
@@ -63,21 +63,22 @@ CPluginList::CPluginList(const neutrino_locale_t Title, const uint32_t listtype)
|
|||||||
int CPluginList::run()
|
int CPluginList::run()
|
||||||
{
|
{
|
||||||
int ret = g_Plugins->startPlugin(number);
|
int ret = g_Plugins->startPlugin(number);
|
||||||
if (!g_Plugins->getScriptOutput().empty()) {
|
if (!g_Plugins->getScriptOutput().empty())
|
||||||
|
{
|
||||||
hide();
|
hide();
|
||||||
ShowMsg(LOCALE_PLUGINS_RESULT, g_Plugins->getScriptOutput(), CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_SHELL, 320, g_settings.timing[SNeutrinoSettings::TIMING_STATIC_MESSAGES]);
|
ShowMsg(LOCALE_PLUGINS_RESULT, g_Plugins->getScriptOutput(), CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_SHELL, 320, g_settings.timing[SNeutrinoSettings::TIMING_STATIC_MESSAGES]);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CPluginList::exec(CMenuTarget* parent, const std::string &actionKey)
|
int CPluginList::exec(CMenuTarget *parent, const std::string &actionKey)
|
||||||
{
|
{
|
||||||
if (parent)
|
if (parent)
|
||||||
parent->hide();
|
parent->hide();
|
||||||
|
|
||||||
CColorKeyHelper keyhelper;
|
CColorKeyHelper keyhelper;
|
||||||
neutrino_msg_t key = CRCInput::RC_nokey;
|
neutrino_msg_t key = CRCInput::RC_nokey;
|
||||||
const char * dummy = NULL;
|
const char *dummy = NULL;
|
||||||
|
|
||||||
number = -1;
|
number = -1;
|
||||||
if (!actionKey.empty())
|
if (!actionKey.empty())
|
||||||
@@ -98,8 +99,10 @@ int CPluginList::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
|
|
||||||
int nop = g_Plugins->getNumberOfPlugins();
|
int nop = g_Plugins->getNumberOfPlugins();
|
||||||
|
|
||||||
for(int count = 0; count < nop; count++) {
|
for (int count = 0; count < nop; count++)
|
||||||
if ((g_Plugins->getType(count) & pluginlisttype) && !g_Plugins->isHidden(count) && (g_Plugins->getIntegration(count) == PLUGIN_INTEGRATION_DISABLED)) {
|
{
|
||||||
|
if ((g_Plugins->getType(count) & pluginlisttype) && !g_Plugins->isHidden(count) && (g_Plugins->getIntegration(count) == PLUGIN_INTEGRATION_DISABLED))
|
||||||
|
{
|
||||||
neutrino_msg_t d_key = g_Plugins->getKey(count);
|
neutrino_msg_t d_key = g_Plugins->getKey(count);
|
||||||
keyhelper.get(&key, &dummy, d_key);
|
keyhelper.get(&key, &dummy, d_key);
|
||||||
CMenuForwarder *f = new CMenuForwarder(std::string(g_Plugins->getName(count)), true, NULL, this, to_string(count).c_str(), key);
|
CMenuForwarder *f = new CMenuForwarder(std::string(g_Plugins->getName(count)), true, NULL, this, to_string(count).c_str(), key);
|
||||||
@@ -126,9 +129,9 @@ int CPluginChooser::run()
|
|||||||
return menu_return::RETURN_EXIT;
|
return menu_return::RETURN_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPluginsExec* CPluginsExec::getInstance()
|
CPluginsExec *CPluginsExec::getInstance()
|
||||||
{
|
{
|
||||||
static CPluginsExec* pluginsExec = NULL;
|
static CPluginsExec *pluginsExec = NULL;
|
||||||
|
|
||||||
if (!pluginsExec)
|
if (!pluginsExec)
|
||||||
pluginsExec = new CPluginsExec();
|
pluginsExec = new CPluginsExec();
|
||||||
@@ -136,7 +139,7 @@ CPluginsExec* CPluginsExec::getInstance()
|
|||||||
return pluginsExec;
|
return pluginsExec;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CPluginsExec::exec(CMenuTarget* parent, const std::string & actionKey)
|
int CPluginsExec::exec(CMenuTarget *parent, const std::string &actionKey)
|
||||||
{
|
{
|
||||||
int ret = menu_return::RETURN_REPAINT;
|
int ret = menu_return::RETURN_REPAINT;
|
||||||
|
|
||||||
@@ -149,7 +152,8 @@ int CPluginsExec::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
if (parent != NULL)
|
if (parent != NULL)
|
||||||
parent->hide();
|
parent->hide();
|
||||||
|
|
||||||
if (actionKey == "teletext") {
|
if (actionKey == "teletext")
|
||||||
|
{
|
||||||
g_RCInput->postMsg(CRCInput::RC_timeout, 0);
|
g_RCInput->postMsg(CRCInput::RC_timeout, 0);
|
||||||
g_RCInput->postMsg(CRCInput::RC_text, 0);
|
g_RCInput->postMsg(CRCInput::RC_text, 0);
|
||||||
return menu_return::RETURN_EXIT;
|
return menu_return::RETURN_EXIT;
|
||||||
|
@@ -43,8 +43,8 @@ class CPluginList : public CMenuTarget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CPluginList(const neutrino_locale_t Title, const uint32_t listtype);
|
CPluginList(const neutrino_locale_t Title, const uint32_t listtype);
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget *parent, const std::string &actionKey);
|
||||||
virtual int run ();
|
virtual int run();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CPluginChooser : public CPluginList
|
class CPluginChooser : public CPluginList
|
||||||
@@ -53,14 +53,14 @@ class CPluginChooser : public CPluginList
|
|||||||
std::string *selectedFilePtr;
|
std::string *selectedFilePtr;
|
||||||
public:
|
public:
|
||||||
CPluginChooser(const neutrino_locale_t Name, const uint32_t listtype, std::string &selectedFile);
|
CPluginChooser(const neutrino_locale_t Name, const uint32_t listtype, std::string &selectedFile);
|
||||||
int run ();
|
int run();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CPluginsExec : public CMenuTarget
|
class CPluginsExec : public CMenuTarget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static CPluginsExec* getInstance();
|
static CPluginsExec *getInstance();
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget *parent, const std::string &actionKey);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user