1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

Some more fixes

This commit is contained in:
Leo Franchi
2012-07-03 09:53:49 -04:00
parent 5be032f39c
commit aa0f99bcce
2 changed files with 12 additions and 4 deletions

View File

@@ -207,6 +207,10 @@ Result::toQuery()
if ( m_query.isNull() )
{
m_query = Tomahawk::Query::get( artist()->name(), track(), album()->name() );
if ( m_query.isNull() )
return query_ptr();
m_query->setAlbumPos( albumpos() );
m_query->setDiscNumber( discnumber() );
m_query->setDuration( duration() );

View File

@@ -45,8 +45,8 @@ SpotifyAccountConfig::SpotifyAccountConfig( SpotifyAccount *account )
connect( m_ui->loginButton, SIGNAL( clicked( bool ) ), this, SLOT( doLogin() ) );
connect( m_ui->usernameEdit, SIGNAL( textChanged( QString ) ), this, SLOT( resetLoginButton() ) );
connect( m_ui->passwordEdit, SIGNAL( textChanged( QString ) ), this, SLOT( resetLoginButton() ) );
connect( m_ui->usernameEdit, SIGNAL( textEdited( QString ) ), this, SLOT( resetLoginButton() ) );
connect( m_ui->passwordEdit, SIGNAL( textEdited( QString ) ), this, SLOT( resetLoginButton() ) );
loadFromConfig();
m_playlistsLoading = new AnimatedSpinner( m_ui->playlistList );
@@ -153,6 +153,7 @@ SpotifyAccountConfig::doLogin()
m_isLoggedIn = false;
m_loggedInManually = false;
m_verifiedUsername.clear();
m_ui->playlistList->clear();
emit logout();
showLoggedOut();
}
@@ -219,7 +220,10 @@ SpotifyAccountConfig::showLoggedOut()
void
SpotifyAccountConfig::resetLoginButton()
{
m_ui->loginButton->setText( tr( "Log In" ) );
m_ui->loginButton->setEnabled( true );
if ( !m_isLoggedIn )
{
m_ui->loginButton->setText( tr( "Log In" ) );
m_ui->loginButton->setEnabled( true );
}
}