Commit 4f9dc316 authored by Scott Wheeler's avatar Scott Wheeler

A couple of fix-lets:

* removed a useless (and incorrect) debugging statement
* don't prompt the user for where they want to put items that are found with
  KDirWatcher
* make refresh just refresh the selected items, if any
: ----------------------------------------------------------------------

svn path=/trunk/kdemultimedia/juk/; revision=218027
parent 30e31ecb
......@@ -235,11 +235,8 @@ void CollectionListItem::addChildItem(PlaylistItem *child)
void CollectionListItem::checkCurrent()
{
if(!data()->exists() || !data()->isFile()) {
kdDebug() << "So, this exists -- " << m_path << endl;
if(!data()->exists() || !data()->isFile())
CollectionList::instance()->clearItem(this);
return;
}
else if(!data()->tag()->current()) {
data()->refresh();
slotRefresh();
......
......@@ -279,11 +279,13 @@ void Playlist::saveAs()
void Playlist::refresh()
{
PlaylistItemList list;
PlaylistItemList l = selectedItems();
if(l.isEmpty())
l = items();
KApplication::setOverrideCursor(Qt::waitCursor);
int j = 0;
for(PlaylistItem *i = static_cast<PlaylistItem *>(firstChild()); i; i = static_cast<PlaylistItem *>(i->itemBelow())) {
for(PlaylistItem *i = l.first(); i; i = l.next()) {
i->slotRefreshFromDisk();
if(j % 5 == 0)
kapp->processEvents();
......
......@@ -284,7 +284,7 @@ private slots:
void slotScanDirectories() { open(m_directoryList); }
void slotSetNextItem(PlaylistItem *item = 0) { m_nextPlaylistItem = item; }
void slotDirChanged(const QString &dir) { open(dir); }
void slotDirChanged(const QString &dir) { slotAddToPlaylist(dir, m_collection); }
private:
PlaylistItem *m_playingItem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment