1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-15 10:33:59 +02: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; items << plItem;
if( p->mode() == Static ) { if( p->mode() == Static ) {
connect( p.data(), SIGNAL( aboutToBeDeleted( Tomahawk::dynplaylist_ptr ) ), if( m_source->isLocal() )
SLOT( onAutoPlaylistDeleted( Tomahawk::dynplaylist_ptr ) ), Qt::QueuedConnection ); 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 { } else {
connect( p.data(), SIGNAL( aboutToBeDeleted( Tomahawk::dynplaylist_ptr ) ), if( m_source->isLocal() )
SLOT( onStationDeleted( Tomahawk::dynplaylist_ptr ) ), Qt::QueuedConnection ); 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(); parent->endRowsAdded();
@@ -216,8 +224,12 @@ CollectionItem::onPlaylistsAdded( const QList< playlist_ptr >& playlists )
p->loadRevision(); p->loadRevision();
items << plItem; items << plItem;
connect( p.data(), SIGNAL( aboutToBeDeleted( Tomahawk::playlist_ptr ) ), if( m_source->isLocal() )
SLOT( onPlaylistDeleted( Tomahawk::playlist_ptr ) ), Qt::QueuedConnection ); 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(); m_playlists->endRowsAdded();