GNOME Bugzilla – Bug 680640
Inconsistent drag and drop API Treeview versus Widget
Last modified: 2013-02-19 11:09:37 UTC
For widgets, one must pass TargetEntry for drag and drop, while for TreeView, there is an override, so one needs to pass lists of tuple (string, flag, info). This is inconsistent. See http://git.gnome.org/browse/pygobject/tree/gi/overrides/Gtk.py where TreeView has: def enable_model_drag_source(self, start_button_mask, targets, actions): target_entries = self._construct_target_list(targets) requiring here that targets are lists of tuples. Suggestion: allow in _construct_target_list that TargetEntry's are passed, only convert is list for backward compat.
Created attachment 236569 [details] [review] overrides: Fix inconsistencies with drag and drop target list API Add support to Gtk.Widget.drag_dest_set_target_list and Gtk.Widget.drag_source_set_target_list to accept iterables containing mixed TargetEntry or a tuple of (target, flags, info). Add support to Gtk.TreeView.enable_model_drag_source and Gtk.TreeView.enable_model_drag_dest to accept a list of Gtk.TargetEntry items.
Comment on attachment 236569 [details] [review] overrides: Fix inconsistencies with drag and drop target list API Looks good, please push.
Attachment 236569 [details] pushed as 840c871 - overrides: Fix inconsistencies with drag and drop target list API