[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeextragear-1/amarok/src
From:       Christian Muehlhaeuser <chris () chris ! de>
Date:       2004-10-28 1:16:13
Message-ID: 20041028011613.6212616C0B () office ! kde ! org
[Download RAW message or body]

CVS commit by muesli: 

* Made code a little nicer.


  M +3 -8      osd.cpp   1.54
  M +1 -4      tracktooltip.cpp   1.17


--- kdeextragear-1/amarok/src/osd.cpp  #1.53:1.54
@@ -547,10 +547,5 @@ amaroK::OSD::showTrack( const MetaBundle
     
     // Lets get the location of the cover image
-    CollectionDB db;
-    QString image = db.albumImage( bundle.artist(), bundle.album() );
-    if ( !image )
-        image = db.getImageForPath( bundle.url().directory() );
-    
-      
+    QString image = CollectionDB().albumImage( bundle.artist(), bundle.album() );
         
     // If we end up replacing many lines with QString::null, we could get blank \
lines.  lets remove them.

--- kdeextragear-1/amarok/src/tracktooltip.cpp  #1.16:1.17
@@ -21,12 +21,9 @@
 void TrackToolTip::add( QWidget * widget, const MetaBundle & tags )
 {
-    CollectionDB db;
     QString tipBuf;
     QStringList left, right;
     const QString tableRow = "<tr><td width=70 align=right>%1:</td><td \
align=left>%2</td></tr>";  
-    QString image = db.albumImage( tags.artist(), tags.album() );
-    if ( !image )
-        image = db.getImageForPath( tags.url().directory() );
+    QString image = CollectionDB().albumImage( tags.artist(), tags.album() );
 
     left  << i18n( "Title" ) << i18n( "Artist" ) << i18n( "Album" ) << i18n( \
"Length" ) << i18n( "Bitrate" ) << i18n( "Samplerate" );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic