mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-25 06:40:58 -04:00
- added help dialog to plugins
- added svn revision number checking to plugin system. If svn revision is > 0 and matches the compiled revision number, the plugin is always accepted. - improved version number scripts to add the missing revision number as a int git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5512 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f7da165b86
commit
6782671951
9 changed files with 66 additions and 22 deletions
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "PluginsPage.h"
|
||||
#include "PluginItem.h"
|
||||
#include "rshare.h"
|
||||
|
@ -47,14 +49,15 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WFlags flags)
|
|||
|
||||
std::string file_name, file_hash, error_string ;
|
||||
uint32_t status ;
|
||||
uint32_t svn_revision ;
|
||||
|
||||
rsPlugins->getPluginStatus(i,status,file_name,file_hash,error_string) ;
|
||||
rsPlugins->getPluginStatus(i,status,file_name,file_hash,svn_revision,error_string) ;
|
||||
|
||||
QString status_string ;
|
||||
|
||||
switch(status)
|
||||
{
|
||||
case PLUGIN_STATUS_UNKNOWN_HASH: status_string = tr("Hash rejected. Add to white list.") ;
|
||||
case PLUGIN_STATUS_UNKNOWN_HASH: status_string = tr("SVN revision number ")+QString::number(svn_revision)+tr(" does not match current. Please manually enable the plugin at your own risk.") ;
|
||||
break ;
|
||||
case PLUGIN_STATUS_DLOPEN_ERROR: status_string = tr("Loading error.") ;
|
||||
break ;
|
||||
|
@ -107,6 +110,7 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WFlags flags)
|
|||
|
||||
QObject::connect(item,SIGNAL(pluginEnabled(bool,const QString&)),this,SLOT(togglePlugin(bool,const QString&))) ;
|
||||
QObject::connect(item,SIGNAL(pluginConfigure(int)),this,SLOT(configurePlugin(int))) ;
|
||||
QObject::connect(item,SIGNAL(pluginAbout(int)),this,SLOT(aboutPlugin(int))) ;
|
||||
}
|
||||
ui._pluginsLayout->update() ;
|
||||
|
||||
|
@ -129,6 +133,13 @@ void PluginsPage::toggleEnableAll(bool b)
|
|||
{
|
||||
rsPlugins->allowAllPlugins(b) ;
|
||||
}
|
||||
void PluginsPage::aboutPlugin(int i)
|
||||
{
|
||||
std::cerr << "Launching about window for plugin " << i << std::endl;
|
||||
|
||||
if(rsPlugins->plugin(i) != NULL && rsPlugins->plugin(i)->qt_about_page() != NULL)
|
||||
rsPlugins->plugin(i)->qt_about_page()->exec() ;
|
||||
}
|
||||
void PluginsPage::configurePlugin(int i)
|
||||
{
|
||||
std::cerr << "Launching configuration window for plugin " << i << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue