diff options
author | Arjan Molenaar <gaphor@gmail.com> | 2021-05-19 15:36:42 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2022-03-27 15:35:23 +0200 |
commit | 8ea38cd186f5e33d8e328a8b66180f7ca83abedc (patch) | |
tree | c2c963cda8edc5670947ee9c869e2f793dee5dd4 /gi/overrides | |
parent | 22c7b28d4395dbf7da9b9ff9a1ef6725c4d52399 (diff) | |
download | pygobject-8ea38cd186f5e33d8e328a8b66180f7ca83abedc.tar.gz |
Do not override Treeview.enable_model_drag_xx for GTK4
Those methods require a Gdk.ContentFormats object.
Diffstat (limited to 'gi/overrides')
-rw-r--r-- | gi/overrides/Gtk.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py index f53ec6bd..d9ec6fbe 100644 --- a/gi/overrides/Gtk.py +++ b/gi/overrides/Gtk.py @@ -1359,16 +1359,18 @@ class TreeView(Gtk.TreeView, Container): get_visible_range = strip_boolean_result(Gtk.TreeView.get_visible_range) get_dest_row_at_pos = strip_boolean_result(Gtk.TreeView.get_dest_row_at_pos) - def enable_model_drag_source(self, start_button_mask, targets, actions): - target_entries = _construct_target_list(targets) - super(TreeView, self).enable_model_drag_source(start_button_mask, - target_entries, - actions) - - def enable_model_drag_dest(self, targets, actions): - target_entries = _construct_target_list(targets) - super(TreeView, self).enable_model_drag_dest(target_entries, - actions) + if GTK2 or GTK3: + def enable_model_drag_source(self, start_button_mask, targets, actions): + target_entries = _construct_target_list(targets) + super(TreeView, self).enable_model_drag_source(start_button_mask, + target_entries, + actions) + + if GTK2 or GTK3: + def enable_model_drag_dest(self, targets, actions): + target_entries = _construct_target_list(targets) + super(TreeView, self).enable_model_drag_dest(target_entries, + actions) def scroll_to_cell(self, path, column=None, use_align=False, row_align=0.0, col_align=0.0): if not isinstance(path, Gtk.TreePath): |