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