[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-1/amarok/src
From: Mark Kretschmann <markey () web ! de>
Date: 2005-02-05 18:34:24
Message-ID: 20050205183424.C01A61D225 () office ! kde ! org
[Download RAW message or body]
CVS commit by markey:
Patch from Gregory Isabelli <g_isabelli@yahoo.fr>:
I add a new little thing: it's sometimes difficult to
read the album name on covers, then it's difficult to
choose which is the one you search. I add a label in
the cover search dialog to show this album name.
M +19 -6 coverfetcher.cpp 1.74
M +2 -0 coverfetcher.h 1.34
--- kdeextragear-1/amarok/src/coverfetcher.cpp #1.73:1.74
@@ -101,4 +101,5 @@ CoverFetcher::startFetch()
// reset all values
m_coverUrls.clear();
+ m_coverNames.clear();
m_xml = QString::null;
m_size = 2;
@@ -147,4 +148,7 @@ CoverFetcher::attemptAnotherFetch()
m_coverUrls.pop_front();
+
+ m_currentCoverName = m_coverNames.front();
+ m_coverNames.pop_front();
}
@@ -216,11 +220,16 @@ CoverFetcher::finishedXmlFetch( KIO::Job
m_coverUrls.clear();
+ m_coverNames.clear();
for( QDomNode node = details; !node.isNull(); node = \
node.nextSibling() ) {
QString url = node.namedItem( size \
).firstChild().toText().nodeValue(); + QString name = \
node.namedItem( "ProductName" ).firstChild().toText().nodeValue();
- debug() << url << endl;
+ debug() << "name:" << name << " url:" << url << endl;
if( !url.isEmpty() )
+ {
m_coverUrls += url;
+ m_coverNames += name;
+ }
}
@@ -342,10 +351,11 @@ CoverFetcher::showCover()
{
public:
- CoverFoundDialog( QWidget *parent, const QString &caption, const \
QImage &cover ) + CoverFoundDialog( QWidget *parent, const QString \
&caption, const QImage &cover, const QString &productname ) : KDialog( \
parent ) {
(new QVBoxLayout( this ))->setAutoAdd( true );
- QLabel *label = new QLabel( this );
+ QLabel *labelPix = new QLabel( this );
+ QLabel *labelName = new QLabel( this );
QHBox *buttons = new QHBox( this );
KPushButton *save = new KPushButton( KStdGuiItem::save(), \
buttons ); @@ -354,6 +364,9 @@ CoverFetcher::showCover()
KPushButton *cancel = new KPushButton( \
KStdGuiItem::cancel(), buttons );
- label->setAlignment( Qt::AlignHCenter );
- label->setPixmap( cover );
+ labelPix ->setAlignment( Qt::AlignHCenter );
+ labelName->setAlignment( Qt::AlignHCenter );
+ labelPix ->setPixmap( cover );
+ labelName->setText( productname );
+
save->setDefault( true );
this->setFixedSize( sizeHint() );
@@ -377,5 +390,5 @@ CoverFetcher::showCover()
};
- CoverFoundDialog dialog( (QWidget*)parent(), m_album, m_image );
+ CoverFoundDialog dialog( (QWidget*)parent(), m_album, m_image, \
m_currentCoverName );
switch( dialog.exec() )
--- kdeextragear-1/amarok/src/coverfetcher.h #1.33:1.34
@@ -62,4 +62,6 @@ private:
QStringList m_queries;
QStringList m_coverUrls;
+ QStringList m_coverNames;
+ QString m_currentCoverName;
QStringList m_errors;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic