Importing files via Drag&Drop from KDE file manager not possible

Bug #892782 reported by Oliver Ast
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenShot Video Editor
Fix Released
High
Unassigned

Bug Description

1) Kubuntu 11.10, KDE 4.7.2, Kernel 3.0.0-12-generic, Dolphin 1.7
2) OpenShot installed via PPA
2) OpenShot version 1.4.0

Drag&Drop of files to the "Projects Files" from a KDE file manager like Dolphin or Konqueror does not work. In this situation the cursor icon already indicates that this is not possible (forbidden sign).

Additional information: When I try to drag a file from the file manager to the timeline area than the cursor icon does not say "forbidden" but it does not work as well (is of course anyway not intended).

Another interesting point is than when the last action was to drag a transition to the timeline area than the attempt of dragging a file from an external file manager to the timeline area results in another adding of the previous transition (btw: this does not happen if last drag&drop action was an effect or file from the project files area.).

Tags: import

Related branches

Oliver Ast (ema9o)
summary: - Importing files via Drag&Drop from KDE filemanger not possible
+ Importing files via Drag&Drop from KDE file manager not possible
tags: added: import
Revision history for this message
Andy Finch (fincha) wrote :

Openshot is designed for the GTK desktop, so it is not surprising it doesn't work very well under KDE. As far as I know, no one on the development team even uses KDE, so unless someone contributes a patch I'm not sure how likely this is to be fixed (or if it's possible to fix it).

Revision history for this message
Oliver Ast (ema9o) wrote :

Thanks for the feedback Andy.
At least I know the limitations now. Let's see if there will be a chance for improvment. At least with other GTK programs (e.g. GIMP) Drag&Drop works pretty well also on KDE.

Revision history for this message
Oliver Ast (ema9o) wrote :

Hi all,

in the meanwhile I took a closer look to my DnD problem and it turned out that it is caused by the effect that Dolphin as well as Konqueror are initiating DnD sessions by default with action type "ACTION_MOVE" whereas other source apps like e.g. Gwenview start with "ACTION_COPY".

As in Openshot (module MainGTK.py) the allowed DnD actions for the TreeView (myTree and icvFileIcons widgets) are set to "ACTION_COPY" only, the DnD attempt from the KDE file managers will be rejected (cursor icon = "forbidden").

There is an user workaround (1. but not preferred) and an easy programm solution (2. just a small code change) for it:
 1. The user always starts DnD actions with having the <Ctrl> key being pressed (as this would switch to the copy mode)
 2. Allow also "ACTION_MOVE" as initial DnD action event inside OpenShot.

To be consistent the changes have to be applied to the "myTree" and "icvFileIcons" widgets as well as to "icvTransitions" and "icvEffects".

Please find attached an according patch file for this ("mychanges1.patch").

As a further optimisation (regarding user perception) one could think about harmonising also the cursor icons always to the copy style (with the plus sign). At the moment it differs depending on the DnD action mode initiated by the source app. This can be done by setting the drag status during the motion event to "ACTION_COPY" (what explicitely would change the cursor style). This function and the according connection of the widget signals can be found in the attached "mypatches2.patch" file (that includes also the basic fix as described before).

Cheers

   Oliver

Revision history for this message
Andy Finch (fincha) wrote :

Thanks for the patch, we'll take a look at it as soon as we can.

Andy Finch (fincha)
Changed in openshot:
milestone: none → 1.4.3
Andy Finch (fincha)
Changed in openshot:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Andy Finch (fincha) wrote :

This has been committed to the trunk. Everything still works in a Gnome environment, perhaps someone can test in KDE?

Changed in openshot:
status: Confirmed → Fix Committed
Revision history for this message
Oliver Ast (ema9o) wrote :

Hi Andy. I can confirm, that it works now as expected in version 1.4.3-alpha1. Thanks.

Changed in openshot:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.