mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
*neutrino usermenu plugin: fix plugin call
Plugin call was broken because of a merge error. add config parameter 'index' and 'key' for plugins This allows (optional) to config an user definied sort and setup rc-key for plugin via plugin.cfg. Sort by filename is still working as before in second instance. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1660 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -62,7 +62,9 @@ class CPlugins
|
||||
|
||||
struct plugin
|
||||
{
|
||||
int index;
|
||||
std::string filename;
|
||||
int key;
|
||||
std::string cfgfile;
|
||||
std::string pluginfile;
|
||||
int version;
|
||||
@@ -70,7 +72,7 @@ class CPlugins
|
||||
std::string description; // UTF-8 encoded
|
||||
std::string depend;
|
||||
CPlugins::p_type_t type;
|
||||
|
||||
|
||||
bool fb;
|
||||
bool rc;
|
||||
bool lcd;
|
||||
@@ -81,7 +83,7 @@ class CPlugins
|
||||
bool hide;
|
||||
bool operator< (const plugin& a) const
|
||||
{
|
||||
return this->filename < a.filename ;
|
||||
return this->index < a.index ;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -116,6 +118,8 @@ class CPlugins
|
||||
inline const std::string & getDescription (const int number) const { return plugin_list[number].description ; }
|
||||
inline int getType (const int number) const { return plugin_list[number].type ; }
|
||||
inline bool isHidden (const int number) const { return plugin_list[number].hide ; }
|
||||
inline int getIndex (const int number) const { return plugin_list[number].index ; }
|
||||
inline neutrino_msg_t getKey (const int number) const { return (neutrino_msg_t)plugin_list[number].key; }
|
||||
|
||||
void startPlugin(int number,int param);
|
||||
void start_plugin_by_name(const std::string & filename,int param);// start plugins by "name=" in .cfg
|
||||
|
Reference in New Issue
Block a user