1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-22 13:43:11 +02:00

fix some UI glitches with spotify playlist list

This commit is contained in:
Leo Franchi
2012-04-14 23:49:35 -04:00
parent 255cef8092
commit 64ba0b5d7c
3 changed files with 6 additions and 15 deletions

View File

@@ -374,6 +374,7 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
setCredentials( creds ); setCredentials( creds );
sync(); sync();
configurationWidget(); // ensure it's created so we can set the login button
if ( m_configWidget.data() ) if ( m_configWidget.data() )
{ {
const bool success = msg.value( "success" ).toBool(); const bool success = msg.value( "success" ).toBool();

View File

@@ -134,27 +134,12 @@ SpotifyAccountConfig::doLogin()
m_playlistsLoading->fadeIn(); m_playlistsLoading->fadeIn();
emit login( username(), password() ); emit login( username(), password() );
/*
QVariantMap msg;
msg[ "_msgtype" ] = "checkLogin";
msg[ "username" ] = username();
msg[ "password" ] = password();
m_account->sendMessage( msg, this, "verifyResult" );
m_ui->verifyCreds->setText( tr( "Verifying..." ) );
m_ui->verifyCreds->setEnabled( false );
m_resetTimer.start();*/
} }
void void
SpotifyAccountConfig::loginResponse( bool success, const QString& msg ) SpotifyAccountConfig::loginResponse( bool success, const QString& msg )
{ {
m_playlistsLoading->fadeOut();
if ( success ) if ( success )
{ {
m_ui->loginButton->setText( tr( "Logged in!" ) ); m_ui->loginButton->setText( tr( "Logged in!" ) );
@@ -162,6 +147,8 @@ SpotifyAccountConfig::loginResponse( bool success, const QString& msg )
} }
else else
{ {
setPlaylists( QList< SpotifyPlaylistInfo* >() );
m_playlistsLoading->fadeOut();
m_ui->loginButton->setText( tr( "Failed: %1" ).arg( msg ) ); m_ui->loginButton->setText( tr( "Failed: %1" ).arg( msg ) );
m_ui->loginButton->setEnabled( true ); m_ui->loginButton->setEnabled( true );
} }

View File

@@ -20,6 +20,9 @@
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>4</number>
</property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>