Patchwork [bitbake-devel] hob: disable layer drag and drop outside the containing widget

login
register
mail settings
Submitter Cristiana Voicu
Date Nov. 29, 2013, 2:10 p.m.
Message ID <1385734239-4633-1-git-send-email-cristiana.voicu@intel.com>
Download mbox | patch
Permalink /patch/62615/
State New
Headers show

Comments

Cristiana Voicu - Nov. 29, 2013, 2:10 p.m.
[YOCTO #5577]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 .../lib/bb/ui/crumbs/hig/layerselectiondialog.py   |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/hig/layerselectiondialog.py b/bitbake/lib/bb/ui/crumbs/hig/layerselectiondialog.py
index 1d100c5..52d57b6 100644
--- a/bitbake/lib/bb/ui/crumbs/hig/layerselectiondialog.py
+++ b/bitbake/lib/bb/ui/crumbs/hig/layerselectiondialog.py
@@ -133,12 +133,13 @@  class LayerSelectionDialog (CrumbsDialog):
         tree_selection.set_mode(gtk.SELECTION_SINGLE)
 
         # Allow enable drag and drop of rows including row move
+        dnd_internal_target = ''
+        dnd_targets = [(dnd_internal_target, gtk.TARGET_SAME_WIDGET, 0)]
         layer_tv.enable_model_drag_source( gtk.gdk.BUTTON1_MASK,
-            self.TARGETS,
-            gtk.gdk.ACTION_DEFAULT|
+            dnd_targets,
+            gtk.gdk.ACTION_MOVE)
+        layer_tv.enable_model_drag_dest(dnd_targets,
             gtk.gdk.ACTION_MOVE)
-        layer_tv.enable_model_drag_dest(self.TARGETS,
-            gtk.gdk.ACTION_DEFAULT)
         layer_tv.connect("drag_data_get", self.drag_data_get_cb)
         layer_tv.connect("drag_data_received", self.drag_data_received_cb)