Changeset - d6cea108ec48
[Not reviewed]
default
0 1 0
Drew Perttula - 13 years ago 2012-06-15 06:10:29
drewp@bigasterisk.com
demo drag/drop receiver in curvecalc
Ignore-this: a55db5fdd8872fc73f5dc57e5f48a47b
1 file changed with 11 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/curvecalc/curveview.py
Show inline comments
 
@@ -374,6 +374,17 @@ class Curveview(object):
 
        self.widget.connect("focus-out-event", self.onFocusOut)
 
        #self.widget.connect("event", self.onAny)
 

	
 
        # this is actually for subterms or mainwin, but i test here for reloads.
 
        self.widget.drag_dest_set(flags=gtk.DEST_DEFAULT_ALL,
 
                                  targets=[('text/uri-list', 0, 0)],
 
                                  actions=gtk.gdk.ACTION_COPY)
 
        self.widget.connect("drag-data-received", self.onDataReceived)
 

	
 

	
 
    def onDataReceived(self, widget, context, x, y, selection, targetType, time):
 
        print "recv", repr(selection.data)
 
        
 

	
 
    def onAny(self, w, event):
 
        print "   %s on %s" % (event, w)
 
        
0 comments (0 inline, 0 general)