1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 07:07:05 +02:00

Don't show spotify config widget unless we have a resolver

This commit is contained in:
Leo Franchi
2012-05-17 18:09:16 -04:00
parent 34656e6395
commit e8247421ab
6 changed files with 13 additions and 4 deletions

View File

@@ -206,7 +206,7 @@ TOMAHAWK_PLUGINS = [
] ]
QT_PLUGINS_SEARCH_PATH=[ QT_PLUGINS_SEARCH_PATH=[
'/usr/local/Cellar/qt/4.7.4/plugins', '/usr/local/Cellar/qt/4.8.0/plugins',
] ]

View File

@@ -585,6 +585,9 @@ SpotifyAccount::icon() const
QWidget* QWidget*
SpotifyAccount::configurationWidget() SpotifyAccount::configurationWidget()
{ {
if ( m_spotifyResolver.isNull() )
return 0;
if ( m_configWidget.isNull() ) if ( m_configWidget.isNull() )
{ {
m_configWidget = QWeakPointer< SpotifyAccountConfig >( new SpotifyAccountConfig( this ) ); m_configWidget = QWeakPointer< SpotifyAccountConfig >( new SpotifyAccountConfig( this ) );

View File

@@ -200,12 +200,14 @@ AtticaManager::resolvers() const
Content Content
AtticaManager::resolverForId( const QString& id ) const AtticaManager::resolverForId( const QString& id ) const
{ {
qDebug() << "Asked for resolver for id:" << id;
foreach ( const Attica::Content& c, m_resolvers ) foreach ( const Attica::Content& c, m_resolvers )
{ {
if ( c.id() == id ) if ( c.id() == id )
return c; return c;
} }
qDebug() << "Not found!";
return Content(); return Content();
} }
@@ -214,6 +216,10 @@ AtticaManager::resolverForId( const QString& id ) const
AtticaManager::ResolverState AtticaManager::ResolverState
AtticaManager::resolverState ( const Content& resolver ) const AtticaManager::resolverState ( const Content& resolver ) const
{ {
qDebug() << Q_FUNC_INFO << "Returning resolver state for resolver:" << resolver .id() << "known?" << m_resolverStates.contains( resolver.id() );
if ( m_resolverStates.contains( resolver.id() ) )
qDebug() << "KNOWN and stateL" << m_resolverStates[ resolver.id() ].state;
if ( !m_resolverStates.contains( resolver.id() ) ) if ( !m_resolverStates.contains( resolver.id() ) )
{ {
return AtticaManager::Uninstalled; return AtticaManager::Uninstalled;

View File

@@ -76,8 +76,6 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
+ (void) moveFile:(NSString *)source to:(NSString*)dest withDelegate:delegate + (void) moveFile:(NSString *)source to:(NSString*)dest withDelegate:delegate
{ {
NSLog(@"FileHelpers moving file from %@ to %@", source, dest);
NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:source, TKCopySourceKey, dest, TKCopyDestinationKey, delegate, TKInstallerDelegateKey, nil]; NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:source, TKCopySourceKey, dest, TKCopyDestinationKey, delegate, TKInstallerDelegateKey, nil];
[NSThread detachNewThreadSelector:@selector(performMoveWithInfo:) toTarget:self withObject:info]; [NSThread detachNewThreadSelector:@selector(performMoveWithInfo:) toTarget:self withObject:info];
} }

View File

@@ -58,6 +58,8 @@
NSLog( @"Failed to do chmod +x of moved resolver! %@", [[error userInfo] objectForKey: NSLocalizedDescriptionKey] ); NSLog( @"Failed to do chmod +x of moved resolver! %@", [[error userInfo] objectForKey: NSLocalizedDescriptionKey] );
} }
qDebug() << "Successfully install tomahawk resolver with path:" << path;
if ( receiver ) if ( receiver )
QMetaObject::invokeMethod(receiver, "installSucceeded", Qt::DirectConnection, Q_ARG(QString, path)); QMetaObject::invokeMethod(receiver, "installSucceeded", Qt::DirectConnection, Q_ARG(QString, path));

View File

@@ -147,7 +147,7 @@ main( int argc, char *argv[] )
#ifndef ENABLE_HEADLESSs #ifndef ENABLE_HEADLESSs
#ifdef WITH_BREAKPAD #ifdef WITH_BREAKPAD
new BreakPad( QDir::tempPath(), TomahawkSettings::instance()->crashReporterEnabled() ); //new BreakPad( QDir::tempPath(), TomahawkSettings::instance()->crashReporterEnabled() );
#endif #endif
#endif #endif