mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
Prompt when installing a resolver from file.
This commit is contained in:
@@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include <echonest/Playlist.h>
|
#include <echonest/Playlist.h>
|
||||||
|
|
||||||
@@ -190,6 +191,22 @@ GlobalActionManager::installResolverFromFile( const QString& resolverPath )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int result = QMessageBox::question( JobStatusView::instance(),
|
||||||
|
tr( "Install plug-in" ),
|
||||||
|
tr( "<b>%1</b> %2<br/>"
|
||||||
|
"by <b>%3</b><br/><br/>"
|
||||||
|
"You are attempting to install a Tomahawk "
|
||||||
|
"plug-in from an unknown source. Plug-ins from "
|
||||||
|
"untrusted sources may put your data at risk.<br/>"
|
||||||
|
"Do you want to install this plug-in?" )
|
||||||
|
.arg( acct->accountFriendlyName() )
|
||||||
|
.arg( acct->version() )
|
||||||
|
.arg( acct->author() ),
|
||||||
|
QMessageBox::Yes,
|
||||||
|
QMessageBox::No );
|
||||||
|
if ( result != QMessageBox::Yes )
|
||||||
|
return;
|
||||||
|
|
||||||
Accounts::AccountManager::instance()->addAccount( acct );
|
Accounts::AccountManager::instance()->addAccount( acct );
|
||||||
TomahawkSettings::instance()->addAccount( acct->accountId() );
|
TomahawkSettings::instance()->addAccount( acct->accountId() );
|
||||||
Accounts::AccountManager::instance()->enableAccount( acct );
|
Accounts::AccountManager::instance()->enableAccount( acct );
|
||||||
|
Reference in New Issue
Block a user