Improvement to plugin system:

- made config page system more automatic, to allow addign config pages from plugins
- added (disabled) checkbox and function to allow all plugins for development
- added config page methods to RsPlugin class



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4957 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-02-18 14:55:50 +00:00
parent 13283b40ee
commit 5679a30e67
25 changed files with 220 additions and 300 deletions

View file

@ -95,6 +95,9 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WFlags flags)
if(plugin != NULL)
item->_enabled_CB->setChecked(true) ;
if(rsPlugins->getAllowAllPlugins())
item->_enabled_CB->setEnabled(false) ;
QObject::connect(item,SIGNAL(pluginEnabled(bool,const QString&)),this,SLOT(togglePlugin(bool,const QString&))) ;
QObject::connect(item,SIGNAL(pluginConfigure(int)),this,SLOT(configurePlugin(int))) ;
}
@ -109,7 +112,15 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WFlags flags)
ui._lookupDirectories_TB->setHtml(text) ;
// todo
ui.enableAll->setChecked(rsPlugins->getAllowAllPlugins());
ui.enableAll->setToolTip(tr("Check this for developing plugins. They will not\nbe checked for the hash. However, in normal\ntimes, checking the hash protects you from\nmalicious behavior of crafted plugins."));
ui.enableAll->setEnabled(false);
QObject::connect(ui.enableAll,SIGNAL(toggled(bool)),this,SLOT(toggleEnableAll(bool))) ;
}
void PluginsPage::toggleEnableAll(bool b)
{
rsPlugins->allowAllPlugins(b) ;
}
void PluginsPage::configurePlugin(int i)
{