[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src/covermanager
From: Nikolaj Hald Nielsen <nhnFreespirit () gmail ! com>
Date: 2008-08-19 9:20:07
Message-ID: 1219137607.643822.27572.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 849224 by nhnielsen:
Explicitly handle when the user cancels a dialog, hopefully preventing the annoying \
repeat popup of dialogs when searching.
BUG: 167462
M +11 -0 CoverFetcher.cpp
--- trunk/extragear/multimedia/amarok/src/covermanager/CoverFetcher.cpp \
#849223:849224 @@ -357,6 +357,7 @@
void CoverFetcher::parseItemNode( const QDomNode &node )
{
+ DEBUG_BLOCK
QDomNode it = node.firstChild();
QString size;
@@ -433,6 +434,7 @@
void
CoverFetcher::finishedImageFetch( KJob *job ) //SLOT
{
+ DEBUG_BLOCK
if( job->error() )
{
debug() << "finishedImageFetch(): KIO::error(): " << job->error();
@@ -594,6 +596,7 @@
void
CoverFetcher::getUserQuery( QString explanation )
{
+ DEBUG_BLOCK
if( explanation.isEmpty() )
explanation = i18n("Ask Amazon for covers using this query:");
@@ -613,6 +616,8 @@
m_queries << m_userQuery;
startFetch( m_albumPtr );
break;
+ case QDialog::Rejected:
+ break;
default:
finishWithError( i18n( "Aborted." ) );
break;
@@ -660,6 +665,7 @@
virtual void accept()
{
+ DEBUG_BLOCK
if( qstrcmp( sender()->objectName().toAscii(), "NewSearch" ) == 0 )
done( 1000 );
else if( qstrcmp( sender()->objectName().toAscii(), "NextCover" ) == 0 )
@@ -673,6 +679,7 @@
void
CoverFetcher::showCover()
{
+ DEBUG_BLOCK
CoverFoundDialog dialog( static_cast<QWidget*>( parent() ), m_image, \
m_currentCoverName );
switch( dialog.exec() )
@@ -680,6 +687,9 @@
case KDialog::Accepted:
finish();
break;
+ case KDialog::Rejected: //make sure we dont show any more dialogs
+ debug() << "cover rejected";
+ break;
case 1000: //showQueryEditor()
getUserQuery();
m_coverAmazonUrls.clear();
@@ -700,6 +710,7 @@
void
CoverFetcher::finish()
{
+ DEBUG_BLOCK
The::statusBar()->shortMessage( i18n( "Retrieved cover successfully" ) );
m_albumPtr->setImage( image() );
m_isFetching = false;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic