mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
Prompt when installing a resolver from file.
This commit is contained in:
parent
da8acbb39a
commit
0bcec49b82
@ -57,6 +57,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <echonest/Playlist.h>
|
||||
|
||||
@ -190,6 +191,22 @@ GlobalActionManager::installResolverFromFile( const QString& resolverPath )
|
||||
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 );
|
||||
TomahawkSettings::instance()->addAccount( acct->accountId() );
|
||||
Accounts::AccountManager::instance()->enableAccount( acct );
|
||||
|
Loading…
x
Reference in New Issue
Block a user