1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-02-24 11:53:09 +01:00

Delete playlists from peers in the UI as well

This commit is contained in:
Leo Franchi 2011-07-31 19:41:06 -04:00
parent e1943e6f64
commit 432d6af37c

View File

@ -158,11 +158,19 @@ CollectionItem::playlistsAddedInternal( SourceTreeItem* parent, const QList< dyn
items << plItem;
if( p->mode() == Static ) {
connect( p.data(), SIGNAL( aboutToBeDeleted( Tomahawk::dynplaylist_ptr ) ),
SLOT( onAutoPlaylistDeleted( Tomahawk::dynplaylist_ptr ) ), Qt::QueuedConnection );
if( m_source->isLocal() )
connect( p.data(), SIGNAL( aboutToBeDeleted( Tomahawk::dynplaylist_ptr ) ),
SLOT( onAutoPlaylistDeleted( Tomahawk::dynplaylist_ptr ) ), Qt::QueuedConnection );
else
connect( p.data(), SIGNAL( deleted( Tomahawk::dynplaylist_ptr ) ),
SLOT( onAutoPlaylistDeleted( Tomahawk::dynplaylist_ptr ) ), Qt::QueuedConnection );
} else {
connect( p.data(), SIGNAL( aboutToBeDeleted( Tomahawk::dynplaylist_ptr ) ),
SLOT( onStationDeleted( Tomahawk::dynplaylist_ptr ) ), Qt::QueuedConnection );
if( m_source->isLocal() )
connect( p.data(), SIGNAL( aboutToBeDeleted( Tomahawk::dynplaylist_ptr ) ),
SLOT( onStationDeleted( Tomahawk::dynplaylist_ptr ) ), Qt::QueuedConnection );
else
connect( p.data(), SIGNAL( deleted( Tomahawk::dynplaylist_ptr ) ),
SLOT( onStationDeleted( Tomahawk::dynplaylist_ptr ) ), Qt::QueuedConnection );
}
}
parent->endRowsAdded();
@ -216,8 +224,12 @@ CollectionItem::onPlaylistsAdded( const QList< playlist_ptr >& playlists )
p->loadRevision();
items << plItem;
connect( p.data(), SIGNAL( aboutToBeDeleted( Tomahawk::playlist_ptr ) ),
SLOT( onPlaylistDeleted( Tomahawk::playlist_ptr ) ), Qt::QueuedConnection );
if( m_source->isLocal() )
connect( p.data(), SIGNAL( aboutToBeDeleted( Tomahawk::playlist_ptr ) ),
SLOT( onPlaylistDeleted( Tomahawk::playlist_ptr ) ), Qt::QueuedConnection );
else
connect( p.data(), SIGNAL( deleted( Tomahawk::playlist_ptr ) ),
SLOT( onPlaylistDeleted( Tomahawk::playlist_ptr ) ), Qt::QueuedConnection );
}
m_playlists->endRowsAdded();