OK, here's the code I'm trying to run:
PHP Code:
#!/usr/bin/python
from gi.repository import Gtk
class UI():
def __init__(self):
w = Gtk.Window()
w.set_default_size(600, 400)
lab = Gtk.Label("drop here!")
lab.connect("drag-data-received", self.on_drag_data_received)
w.add(lab)
w.connect("destroy", Gtk.main_quit)
w.show_all()
Gtk.main()
def on_drag_data_received(widget, drag_context, x, y, data, info, time):
print("Hello World!")
test = UI()
However, the window produced is not sensitive to dnd, nor does it print anything if I drop anything on it. What am I doing wrong?
Bookmarks