mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
lfranchis suggestions
This commit is contained in:
@@ -308,7 +308,7 @@ Result::sourceIcon() const
|
||||
QPixmap avatar = collection()->source()->avatar( Source::FancyStyle );
|
||||
if ( !avatar )
|
||||
{
|
||||
avatar = TomahawkUtils::createAvatarFrame( QPixmap( RESPATH "images/user-avatar.png" ) );
|
||||
avatar = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultSourceAvatar, TomahawkUtils::AvatarInFrame );
|
||||
}
|
||||
return avatar;
|
||||
}
|
||||
|
@@ -327,17 +327,14 @@ QtScriptResolver::init()
|
||||
m_weight = m.value( "weight", 0 ).toUInt();
|
||||
m_timeout = m.value( "timeout", 25 ).toUInt() * 1000;
|
||||
QString iconPath = QFileInfo( filePath() ).path() + "/" + m.value( "icon" ).toString();
|
||||
if ( !m_icon.load( iconPath ) )
|
||||
{
|
||||
iconPath = "none";
|
||||
}
|
||||
int success = m_icon.load( iconPath );
|
||||
|
||||
// load config widget and apply settings
|
||||
loadUi();
|
||||
QVariantMap config = resolverUserConfig();
|
||||
fillDataInWidgets( config );
|
||||
|
||||
qDebug() << "JS" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon" << iconPath;
|
||||
qDebug() << "JS" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon" << iconPath << "icon found" << success;
|
||||
|
||||
m_ready = true;
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@
|
||||
#include <shlwapi.h>
|
||||
#endif
|
||||
|
||||
ScriptResolver::ScriptResolver(const QString& exe)
|
||||
ScriptResolver::ScriptResolver( const QString& exe )
|
||||
: Tomahawk::ExternalResolverGui( exe )
|
||||
, m_num_restarts( 0 )
|
||||
, m_msgsize( 0 )
|
||||
@@ -376,12 +376,9 @@ ScriptResolver::doSetup( const QVariantMap& m )
|
||||
m_weight = m.value( "weight", 0 ).toUInt();
|
||||
m_timeout = m.value( "timeout", 5 ).toUInt() * 1000;
|
||||
QString iconPath = QFileInfo( filePath() ).path() + "/" + m.value( "icon" ).toString();
|
||||
if ( !m_icon.load( iconPath ) )
|
||||
{
|
||||
iconPath = "none";
|
||||
}
|
||||
int success = m_icon.load( iconPath );
|
||||
|
||||
qDebug() << "SCRIPT" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon" << iconPath;
|
||||
qDebug() << "SCRIPT" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon" << iconPath << "icon found" << success;
|
||||
|
||||
m_ready = true;
|
||||
m_configSent = false;
|
||||
|
Reference in New Issue
Block a user