Commit a98a383f authored by Jean Felder's avatar Jean Felder

tests: Fix gtk_drag_methods method for Gtk4

parent 1f8f3617
Pipeline #161410 passed with stages
in 5 minutes and 1 second
......@@ -664,19 +664,20 @@ class TestGtk(unittest.TestCase):
widget.drag_check_threshold(0, 0, 0, 0)
# drag_dest_ methods
widget.drag_dest_set(Gtk.DestDefaults.DROP, None, Gdk.DragAction.COPY)
widget.drag_dest_add_image_targets()
widget.drag_dest_add_text_targets()
widget.drag_dest_add_uri_targets()
widget.drag_dest_get_track_motion()
widget.drag_dest_set_track_motion(True)
widget.drag_dest_get_target_list()
widget.drag_dest_set_target_list(None)
# widget.drag_dest_add_image_targets()
# widget.drag_dest_add_text_targets()
# widget.drag_dest_add_uri_targets()
# widget.drag_dest_get_track_motion()
# widget.drag_dest_set_track_motion(True)
# widget.drag_dest_get_target_list()
# widget.drag_dest_set_target_list(None)
if GTK4:
widget.drag_dest_set_target_list(Gdk.ContentFormats.new([]))
drop_target = Gtk.DropTarget.new(Gdk.ContentFormats.new([]), Gdk.DragAction.COPY)
widget.add_controller(drop_target)
else:
widget.drag_dest_set(Gtk.DestDefaults.DROP, None, Gdk.DragAction.COPY)
widget.drag_dest_set_target_list(Gtk.TargetList.new([Gtk.TargetEntry.new('test', 0, 0)]))
widget.drag_dest_unset()
widget.drag_dest_unset()
widget.drag_highlight()
widget.drag_unhighlight()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment