How to handle drag-and-drop to the desktop in Plasma 5?

Weng Xuetian wengxt at gmail.com
Thu Dec 3 11:04:04 UTC 2015


Just tried to debug it a little bit, looks like FolderModel::drop is
not called at all.

>From the observed visual behavior, plasmashell seems to takes the drop
as a new plasmoid request so FolderModel doesn't get the drop event.

Probably it is blocked by following code in desktop containment.
if (isFolder && event.mimeData.hasUrls)

On Tue, Dec 1, 2015 at 5:46 AM, Elvis Angelaccio
<elvis.angelaccio at kdemail.net> wrote:
>
>
> 2015-12-01 14:13 GMT+01:00 Bhushan Shah <bhush94 at gmail.com>:
>>
>> Hello,
>>
>> On Tue, Dec 1, 2015 at 6:39 PM, Marco Martin <notmart at gmail.com> wrote:
>> >>
>> >> In Plasma 5 this does not work anymore, as kde-base repo has not been
>> >> ported. But I see that drag-and-dropping files from Dolphin to the
>> >> desktop
>> >> works, so: where is Ark supposed to "register" this dbus method, in
>> >> Plasma
>> >> 5?
>> >
>> > Hi,
>> > folderview is now in the plasma-desktop repository, in
>> > plasma-desktop/applets/folder
>> > It has been completely rewritten so something may have been lost in
>> > translation.
>> > What was it doing exactly? was it folderview invoking a dbus method
>> > explicitly on Ark?
>
>
> Yes, it was invoking the method extractSelectedFilesTo of dbus interface
> org.kde.ark.DndExtract, from line 2362 of
> kde-base/plasma/applets/folderview/iconview.cpp
>
>
>>
>>
>> plasma-desktop still have code specific to ark
>>
>> plasma-desktop/containments/desktop/plugins/folder/foldermodel.cpp
>> L744 and ahead..
>>
>
> I see. Then I wonder what might be going wrong. From my limited dbus
> knowledge I cannot tell whether it's Ark's or Plasma's fault.
> Any help on this would be very appreciated, as dragging from Ark to the
> desktop can be considered a major feature, currently broken.
>
> Just a recap on the situation:
> - Ark defines this dbus method in: ark/part/dnddbusinterface.xml
> - Drag-and-dropping from Ark to Dolphin works
> - Drag-and-dropping from Ark to Desktop or Folder View plasmoid does not
> work - the dbus method seems to not be called at all
>
>
>
>> Also if I remember correctly, this used to work in initial plasma
>> release..
>>
>> --
>> Bhushan Shah
>>
>> http://bhush9.github.io
>> IRC Nick : bshah on Freenode
>
>
> Cheers,
> Elvis
>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>


More information about the Plasma-devel mailing list