1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

lfranchis suggestions

This commit is contained in:
Kilian Lackhove
2012-09-12 18:35:27 +02:00
parent bdbfa5bf63
commit 5990efaa32
3 changed files with 6 additions and 12 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;