[PATCH] Solution for Bug 143513 (Playlist items stay greyed out even if songs are available)

Martin Drößler mail at martindroessler.de
Sun Jun 10 20:48:14 UTC 2007


Am Sonntag, 10. Juni 2007 schrieb Jeff Mitchell:
> I didn't know this was a problem, but a better solution would be to figure
> out why they're staying grey in the first place.  

After some more investigation, I figured out, that the problem is with 
UrlLoader::customEvent( QCustomEvent *e)

On line 296 it checks: 
if( (*it).filestatusdisabled || !( (*it).bundle.exists() ) )

where filestatusdisabled is the attribute in the item-tags of current.xml

and then sets:
item->setFilestatusEnabled( false );

this method checks again if the file exists, but it sets another variable 
m_enabled.

The paint-method greyes out the entry if it does not exists _or_ its disabled 
(via m_enabled)!
So (*it).filestatusdisabled should be ignored, then amarok behaves as 
expected: when amarok is started and the files are not available (e.g. the 
partition is not mounted) then the items are greyed out. If you mount the 
partition and restart amarok, then they are black again.
Of course: with the menu-entry added with the patch in my first mail, you 
don't have to restart amarok ;-)


Regards,
MD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: playlistloader.patch
Type: text/x-diff
Size: 494 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/amarok/attachments/20070610/1fa0c4ee/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/amarok/attachments/20070610/1fa0c4ee/attachment.sig>


More information about the Amarok mailing list