[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src
From: Mark Kretschmann <markey () web ! de>
Date: 2006-12-01 8:36:47
Message-ID: 1164962207.874081.5027.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 609519 by markey:
Don't use item coloring when restoring playlist on startup; neither use it for \
Undo/Redo.
M +4 -4 playlist.cpp
M +1 -1 playlist.h
M +1 -4 playlistitem.cpp
M +1 -1 playlistitem.h
M +3 -1 playlistloader.cpp
M +2 -1 playlistloader.h
--- trunk/extragear/multimedia/amarok/src/playlist.cpp #609518:609519
@@ -553,7 +553,7 @@
}
void
-Playlist::insertMediaInternal( const KURL::List &list, PlaylistItem *after, bool \
directPlay ) +Playlist::insertMediaInternal( const KURL::List &list, PlaylistItem \
*after, bool directPlay, bool coloring ) {
if ( !list.isEmpty() ) {
setSorting( NO_SORT );
@@ -563,7 +563,7 @@
while( after && after->url().isEmpty() )
after = static_cast<PlaylistItem*>( after->itemAbove() );
- ThreadWeaver::instance()->queueJob( new UrlLoader( list, after, directPlay ) \
); + ThreadWeaver::instance()->queueJob( new UrlLoader( list, after, \
directPlay, coloring ) ); }
}
@@ -721,7 +721,7 @@
// first ever-run
if( QFile::exists( url.path() ) )
{
- ThreadWeaver::instance()->queueJob( new UrlLoader( url, 0 ) );
+ ThreadWeaver::instance()->queueJob( new UrlLoader( url, 0, false, /*item \
coloring*/ false ) ); }
}
@@ -4465,7 +4465,7 @@
m_total = 0;
m_albums.clear();
- insertMediaInternal( url, 0 ); //because the listview is empty, undoState won't \
be forced + insertMediaInternal( url, 0, false, /*item coloring*/ false ); \
//because the listview is empty, undoState won't be forced
m_undoButton->setEnabled( !m_undoList.isEmpty() );
m_redoButton->setEnabled( !m_redoList.isEmpty() );
--- trunk/extragear/multimedia/amarok/src/playlist.h #609518:609519
@@ -295,7 +295,7 @@
PlaylistItem *currentTrack() const { return m_currentTrack; }
PlaylistItem *restoreCurrentTrack();
- void insertMediaInternal( const KURL::List&, PlaylistItem*, bool directPlay \
= false ); + void insertMediaInternal( const KURL::List&, PlaylistItem*, bool \
directPlay = false, bool coloring = false ); bool isAdvancedQuery( const QString \
&query ); void refreshNextTracks( int = -1 );
void removeItem( PlaylistItem*, bool = false );
--- trunk/extragear/multimedia/amarok/src/playlistitem.cpp #609518:609519
@@ -726,10 +726,7 @@
+ painter->fontMetrics().minRightBearing();
}
p.setFont( font );
- if( m_isNew )
- p.setPen( Qt::blue );
- else
- p.setPen( textc );
+ p.setPen( m_isNew ? Qt::blue : textc ); // FIXME Don't hardcode the blue \
color?
const int _width = width - leftMargin - margin + minbearing - 1; // -1 \
seems to be necessary
const QString _text = KStringHandler::rPixelSqueeze( colText, \
painter->fontMetrics(), _width );
--- trunk/extragear/multimedia/amarok/src/playlistitem.h #609518:609519
@@ -163,7 +163,7 @@
bool m_filestatusEnabled;
bool m_deleteAfterEdit;
bool m_isBeingRenamed;
- bool m_isNew;
+ bool m_isNew; //New items will be assigned a different color
static bool s_pixmapChanged;
static const QString &editingText();
--- trunk/extragear/multimedia/amarok/src/playlistloader.cpp #609518:609519
@@ -73,10 +73,11 @@
};
-UrlLoader::UrlLoader( const KURL::List &urls, QListViewItem *after, bool \
playFirstUrl ) +UrlLoader::UrlLoader( const KURL::List &urls, QListViewItem *after, \
bool playFirstUrl, bool coloring ) : ThreadWeaver::DependentJob( \
Playlist::instance(), "UrlLoader" )
, m_markerListViewItem( new PlaylistItem( Playlist::instance(), after ) )
, m_playFirstUrl( playFirstUrl )
+ , m_coloring( coloring )
, m_block( "UrlLoader" )
, m_oldQueue( Playlist::instance()->m_nextTracks )
, m_xmlSource( 0 )
@@ -252,6 +253,7 @@
continue;
PlaylistItem* const item = new PlaylistItem( (*it).bundle, \
m_markerListViewItem ); + item->setIsNew( m_coloring );
//TODO scrollbar position
//TODO previous tracks queue
--- trunk/extragear/multimedia/amarok/src/playlistloader.h #609518:609519
@@ -105,7 +105,7 @@
Q_OBJECT
public:
- UrlLoader( const KURL::List&, QListViewItem*, bool playFirstUrl = false );
+ UrlLoader( const KURL::List&, QListViewItem*, bool playFirstUrl = false, bool \
coloring = true ); ~UrlLoader();
static const uint OPTIMUM_BUNDLE_COUNT = 50;
@@ -133,6 +133,7 @@
KURL::List m_URLs;
PlaylistItem *m_markerListViewItem;
bool m_playFirstUrl;
+ bool m_coloring;
Debug::Block m_block;
QPtrList<PlaylistItem> m_oldQueue;
QXmlInputSource *m_xmlSource;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic