Version: amarok-2.3.0.90-1mdv2010.1 (using KDE 4.4.2) Compiler: gcc-c++-4.4.3-2mnb2 OS: Linux Installed from: Mandriva RPMs When I drag and drop a file from Konqueror to the Amarok playlist (on Mandriva Cooker - tested on both x86-32 and x86-64 using amarok-2.3.0.90-1mdv2010.1 ), then the first file is dropped correctly, but the second one is causing problems and pops a copy of the existing file. I've tried with .mp3-s , .flv-s and .ogg-s - all yield the same problem. It's very annoying and prevents me from properly using Amarok.
Drag and drop works fine for me with Dolphin. So maybe this is a configuration problem of some problem with Konqueror. Does it work from other apps than Konqueror for you?
(In reply to comment #1) > Drag and drop works fine for me with Dolphin. So maybe this is a configuration > problem of some problem with Konqueror. > > Does it work from other apps than Konqueror for you? I tried dragging and dropping (at least while a file in Amarok is playing) from all of these: 1. Dolphin. 2. Konqueror. 3. Nautilus. In all cases, it popped up the pop up and did not drop the file. Dragging and dropping a file to Kaffeine works fine from all apps, so it's a problem with Amarok. I should note that I: 1. Drop a single file. 2. Start playing it. 3. Try to drop other files into Kaffeine (from any of the file managers.) Furthermore, dropping a file from the Amarok file browser to the playlist works fine, but I don't have a tree view or tabs there, which is why I prefer Konqueror or something similar.
OK, now I tried it with the git master version of Amarok started with: $ KDEDIRS=/home/shlomi/apps/multimedia/amarok-svn/ \ /home/shlomi/apps/multimedia/amarok-svn/bin/amarok And the bug is still exhibited there - I get a pop-up for every dragged file and it does not get dragged there. I noticed that after a few drags and drops the problem disappears. I should note that I'm still using the underlying patched Mandriva KDE and Qt libraries, so it might be a problem there.
I should note that the version of Amarok before the Mandriva upgrade to 2.3.0.90 worked fine in this respect (the stable version - 2.3.x or 2.2.x).
I believe that I can now consistently reproduce the strange image popup of the file due to the droppping to the playlist by first deleting an item from the playlist in Amarok. Here is some --debug information from that Amarok snapshot of a while ago after the .mp3 file was dropped and I was given a popup error: {{{{ shlomi:~$ amarok: BEGIN: virtual void Playlist::PrettyListView::startDrag(Qt::DropActions) amarok: BEGIN: PopupDropper* PopupDropperFactory::createPopupDropper(QWidget*) link XMLID_9_ hasn't been detected! link XMLID_9_ hasn't been detected! link XMLID_9_ hasn't been detected! link XMLID_9_ hasn't been detected! Could not resolve property : linearGradient5167 Could not resolve property : linearGradient3563 Could not resolve property : linearGradient3563-3 Could not resolve property : linearGradient3563-3 amarok: END__: PopupDropper* PopupDropperFactory::createPopupDropper(QWidget*) - Took 0.17s svgHandler SVG renderer is KSvgRenderer(0x9618e28) m_pd SVG renderer is KSvgRenderer(0x9618e28) does play exist in renderer? true amarok: BEGIN: void MainWindow::saveLayout() amarok: END__: void MainWindow::saveLayout() - Took 0.024s amarok: BEGIN: virtual void Playlist::PrettyListView::dropEvent(QDropEvent*) amarok: BEGIN: int Playlist::Controller::moveRows(QList<int>&, int) amarok: BEGIN: void Playlist::Controller::moveRows(QList<int>&, QList<int>&) amarok: [Playlist::Controller] moving rows: 19 18 amarok: [Playlist::Controller] moving rows: 20 19 amarok: [Playlist::Controller] moving rows: 21 20 amarok: [Playlist::Controller] moving rows: 22 21 amarok: [Playlist::Controller] moving rows: 18 22 amarok: BEGIN: virtual void Playlist::MoveTracksCmd::redo() amarok: BEGIN: void Playlist::Model::moveTracksCommand(const Playlist::MoveCmdList&, bool) amarok: [Playlist::Model] moveTracksCommand: 5 false amarok: BEGIN: void StatusBar::updateTotalPlaylistLength() amarok: END__: void StatusBar::updateTotalPlaylistLength() - Took 0.00073s amarok: END__: void Playlist::Model::moveTracksCommand(const Playlist::MoveCmdList&, bool) - Took 0.0018s amarok: END__: virtual void Playlist::MoveTracksCmd::redo() - Took 0.0022s amarok: END__: void Playlist::Controller::moveRows(QList<int>&, QList<int>&) - Took 0.0035s amarok: END__: int Playlist::Controller::moveRows(QList<int>&, int) - Took 0.0038s amarok: END__: virtual void Playlist::PrettyListView::dropEvent(QDropEvent*) - Took 0.056s amarok: [Playlist::PrettyListView] After the drag! amarok: [Playlist::PrettyListView] clearing PUD amarok: END__: virtual void Playlist::PrettyListView::startDrag(Qt::DropActions) - DELAY Took (quite long) 5.3s }}}}
commit f4fde86a49186b6402b1d45787f8449abda13b92 Author: Rick W. Chen <stuffcorpse@archlinux.us> Date: Wed Jun 9 04:54:24 2010 +1200 Implement custom dragEnterEvent in the playlist BUG: 235722 diff --git a/ChangeLog b/ChangeLog index ac023b5..76ebc2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,6 +28,7 @@ VERSION 2.3.2-Beta 1 Patch by Richard Longland <rlongland@hotmail.com>. BUGFIXES: + * Fixed dropping files to playlist from Konqueror. (BR 235722) * Fixed keyboard shortcuts of actions from scripts lost after restart. Thanks to Martin Blumenstingl <darklight.xdarklight@googlemail.com>. (BR 223165) diff --git a/src/playlist/view/listview/PrettyListView.cpp b/src/playlist/view/listview/PrettyListView.cpp index 0e26c5f..25a897c 100644 --- a/src/playlist/view/listview/PrettyListView.cpp +++ b/src/playlist/view/listview/PrettyListView.cpp @@ -26,6 +26,7 @@ #include "PrettyListView.h" #include "amarokconfig.h" +#include "AmarokMimeData.h" #include "context/ContextView.h" #include "context/popupdropper/libpud/PopupDropperItem.h" #include "context/popupdropper/libpud/PopupDropper.h" @@ -417,6 +418,20 @@ Playlist::PrettyListView::findInSource() } void +Playlist::PrettyListView::dragEnterEvent( QDragEnterEvent *event ) +{ + const QMimeData *mime = event->mimeData(); + if( mime->hasUrls() || + mime->hasFormat( AmarokMimeData::TRACK_MIME ) || + mime->hasFormat( AmarokMimeData::PLAYLIST_MIME ) || + mime->hasFormat( AmarokMimeData::PODCASTEPISODE_MIME ) || + mime->hasFormat( AmarokMimeData::PODCASTCHANNEL_MIME ) ) + { + event->acceptProposedAction(); + } +} + +void Playlist::PrettyListView::dragMoveEvent( QDragMoveEvent* event ) { QModelIndex index = indexAt( event->pos() ); diff --git a/src/playlist/view/listview/PrettyListView.h b/src/playlist/view/listview/PrettyListView.h index a4cb57e..e4893e3 100644 --- a/src/playlist/view/listview/PrettyListView.h +++ b/src/playlist/view/listview/PrettyListView.h @@ -89,6 +89,7 @@ public slots: protected: void showEvent( QShowEvent* ); void contextMenuEvent( QContextMenuEvent* ); + void dragEnterEvent( QDragEnterEvent *event ); void dragLeaveEvent( QDragLeaveEvent* ); void dragMoveEvent( QDragMoveEvent* ); void dropEvent( QDropEvent* );