mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-15 00:28:58 -05:00
fixed plugin loading
This commit is contained in:
parent
3baf444452
commit
943e597291
1 changed files with 7 additions and 1 deletions
|
|
@ -108,7 +108,10 @@ RsGUIEventManager::RsGUIEventManager() : cDialog(NULL)
|
||||||
mEventHandlerId = 0;
|
mEventHandlerId = 0;
|
||||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
||||||
{
|
{
|
||||||
if(event->mType == RsEventType::SYSTEM && dynamic_cast<const RsSystemEvent*>(event.get())->mEventCode == RsSystemEventCode::PASSWORD_REQUESTED)
|
if(event->mType == RsEventType::SYSTEM
|
||||||
|
&& (dynamic_cast<const RsSystemEvent*>(event.get())->mEventCode == RsSystemEventCode::PASSWORD_REQUESTED
|
||||||
|
||dynamic_cast<const RsSystemEvent*>(event.get())->mEventCode == RsSystemEventCode::NEW_PLUGIN_FOUND))
|
||||||
|
|
||||||
sync_handleIncomingEvent(event);
|
sync_handleIncomingEvent(event);
|
||||||
else
|
else
|
||||||
RsQThreadUtils::postToObject([=](){ async_handleIncomingEvent(event); }, this );
|
RsQThreadUtils::postToObject([=](){ async_handleIncomingEvent(event); }, this );
|
||||||
|
|
@ -196,7 +199,10 @@ bool RsGUIEventManager::GUI_askForPluginConfirmation(const std::string& plugin_f
|
||||||
RsAutoUpdatePage::unlockAllEvents() ;
|
RsAutoUpdatePage::unlockAllEvents() ;
|
||||||
|
|
||||||
if (ret == QMessageBox::Yes)
|
if (ret == QMessageBox::Yes)
|
||||||
|
{
|
||||||
|
rsPlugins->enablePlugin(plugin_file_hash);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rsPlugins->disablePlugin(plugin_file_hash);
|
rsPlugins->disablePlugin(plugin_file_hash);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue