Summary: | Radio Streams drag-and-drop severely broken | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Tristan Miller <psychonaut> |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Tristan Miller
2007-06-30 23:14:29 UTC
Amarok version? 1.4.5 Some comments: 1) I agree, it should be a copy 2) Actually, it is a copy but the GUI just lies. 3) Confirmed 4) Most of this point is moot as from my response to 2). But otherwise, there won't be an undo functionality implemented. Confirming only for number 2 & 3. SVN commit 681998 by seb: Accept playlistbrowser drops on items, and assign the new item to the category of the item dropped on. BUG: 147404 M +9 -5 playlistbrowser.cpp --- branches/stable/extragear/multimedia/amarok/src/playlistbrowser.cpp #681997:681998 @@ -2782,10 +2782,17 @@ void PlaylistBrowserView::moveSelectedItems( QListViewItem *newParent ) { - if( !newParent || isDynamic( newParent ) || isPodcastChannel( newParent ) || - isSmartPlaylist( newParent ) || isPodcastEpisode( newParent ) ) + if( !newParent ) return; + QListViewItem *after=0; + if( isDynamic( newParent ) || isPodcastChannel( newParent ) || + isSmartPlaylist( newParent ) || isPodcastEpisode( newParent ) || isStream( newParent ) ) + { + after = newParent; + newParent = newParent->parent(); + } + #define newParent static_cast<PlaylistBrowserEntry*>(newParent) if( !newParent->isKept() ) return; @@ -2801,7 +2808,6 @@ selected.append( *it ); } - QListViewItem *after=0; for( QListViewItem *item = selected.first(); item; item = selected.next() ) { QListViewItem *itemParent = item->parent(); @@ -2889,8 +2895,6 @@ void PlaylistBrowserView::startDrag() { - DEBUG_BLOCK - KURL::List urls; KURL::List itemList; // this is for CollectionDB::createDragPixmap() KURL::List podList; // used to add podcast episodes of the same channel in reverse order (usability) SVN commit 682001 by seb: Copy streams from coolstreams category CCBUG: 147404 M +12 -2 playlistbrowser.cpp --- branches/stable/extragear/multimedia/amarok/src/playlistbrowser.cpp #682000:682001 @@ -2844,8 +2844,18 @@ base == PlaylistBrowser::instance()->m_smartCategory && isSmartPlaylist( item ) || base == PlaylistBrowser::instance()->m_dynamicCategory && isDynamic( item ) ) { - itemParent->takeItem( item ); - newParent->insertItem( item ); + // if the item is from the cool streams dir, copy it. + if( item->parent() == PlaylistBrowser::instance()->m_coolStreams ) + { + #define item static_cast<StreamEntry*>(item) + StreamEntry *copiedStream = new StreamEntry( newParent, after, item->url(), item->title() ); + #undef item + } + else // otherwise, we move it + { + itemParent->takeItem( item ); + newParent->insertItem( item ); + } newParent->sortChildItems( 0, true ); } else if( base == PlaylistBrowser::instance()->m_podcastCategory && isPodcastChannel( item ) ) |