← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 645: Applied a patch from Oliver Ast that fixes drag & drop when used with a KDE file manager.

 

------------------------------------------------------------
revno: 645
fixes bug: https://launchpad.net/bugs/892782
committer: Andy Finch <we.rocked.in79@xxxxxxxxx>
branch nick: openshot
timestamp: Thu 2012-03-22 20:45:42 +0000
message:
  Applied a patch from Oliver Ast that fixes drag & drop when used with a KDE file manager.
modified:
  openshot/windows/MainGTK.py


--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main

Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/windows/MainGTK.py'
--- openshot/windows/MainGTK.py	2012-02-02 20:14:23 +0000
+++ openshot/windows/MainGTK.py	2012-03-22 20:45:42 +0000
@@ -269,20 +269,24 @@
 		self.tree_drag_time = None
 		self.myTree.drag_dest_set( gtk.DEST_DEFAULT_MOTION |
 										 gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP,
-								   dnd_list, gtk.gdk.ACTION_COPY)
+										 dnd_list, gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)
+		self.myTree.connect('drag_motion', self.motion_tree)
 
 		self.icvFileIcons.connect('drag_data_received', self.on_drag_data_received)
 		self.icvFileIcons.drag_dest_set( gtk.DEST_DEFAULT_MOTION |
 										 gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP,
-										 dnd_list, gtk.gdk.ACTION_COPY)
+										 dnd_list, gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)
+		self.icvFileIcons.connect('drag_motion', self.motion_tree)
 
 		self.icvTransitions.drag_dest_set( gtk.DEST_DEFAULT_MOTION |
 										 gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP,
-										 dnd_list, gtk.gdk.ACTION_COPY)
+										 dnd_list, gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)
+		self.icvTransitions.connect('drag_motion', self.motion_tree)
 		
 		self.icvEffects.drag_dest_set( gtk.DEST_DEFAULT_MOTION |
 										 gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP,
-										 dnd_list, gtk.gdk.ACTION_COPY)
+										 dnd_list, gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)
+		self.icvEffects.connect('drag_motion', self.motion_tree)
 		
 		self.icvFileIcons.connect_after('drag_begin', self.on_treeFiles_drag_begin)
 		
@@ -1165,6 +1169,12 @@
 		
 		return True
 
+	def motion_tree(self, wid, context, x, y, time):
+		
+		# set the drag status to copy
+		context.drag_status(gtk.gdk.ACTION_COPY, time)
+		
+		return True
 
 	def motion_file_drag(self, wid, context, x, y, time):