From 3d189e8f605e9fecaba4dd1a24772fff3427fd53 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Fri, 27 Jul 2012 15:05:46 +0000 Subject: [PATCH] GTK3: fix drag and drop on dbman svn: r20109 --- src/gui/dbman.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/gui/dbman.py b/src/gui/dbman.py index 96dd9dd42..6eaccb844 100644 --- a/src/gui/dbman.py +++ b/src/gui/dbman.py @@ -152,9 +152,12 @@ class DbManager(CLIDbManager): """ Connects the signals to the buttons on the interface. """ - ddtargets = [ DdTargets.URI_LIST.target() ] - self.top.drag_dest_set(Gtk.DestDefaults.ALL, ddtargets, - Gdk.DragAction.COPY) + ddtarget = DdTargets.URI_LIST + self.top.drag_dest_set(Gtk.DestDefaults.ALL, [], Gdk.DragAction.COPY) + tglist = Gtk.TargetList.new([]) + tglist.add(ddtarget.atom_drag_type, ddtarget.target_flags, + ddtarget.app_id) + self.top.drag_dest_set_target_list(tglist) self.remove.connect('clicked', self.__remove_db) self.new.connect('clicked', self.__new_db) @@ -734,7 +737,7 @@ class DbManager(CLIDbManager): """ Handle the reception of drag data """ - drag_value = selection.data + drag_value = selection.get_data() fname = None type = None title = None @@ -751,14 +754,14 @@ def drag_motion(wid, context, xpos, ypos, time_stamp): """ DND callback that is called on a DND drag motion begin """ - context.drag_status(Gdk.DragAction.COPY, time_stamp) + Gdk.drag_status(context, Gdk.DragAction.COPY, time_stamp) return True def drop_cb(wid, context, xpos, ypos, time_stamp): """ DND callback that finishes the DND operation """ - context.finish(True, False, time_stamp) + Gtk.drag_finish(context, True, False, time_stamp) return True def find_revisions(name):