changeset 69cdab505632 in tryton:5.0
details: https://hg.tryton.org/tryton?cmd=changeset;node=69cdab505632
description:
Fix drag & drop on export/import CSV
With Gtk3, selection data must be UTF-8 encoded.
set_drag_dest_row requires a GtkTreePath and no more integer.
issue8194
review277121002
(grafted from c2f0a344661c6781a98209254096b1732f75fe76)
diffstat:
tryton/gui/window/win_csv.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r d647c2550154 -r 69cdab505632 tryton/gui/window/win_csv.py
--- a/tryton/gui/window/win_csv.py Tue Apr 02 21:37:23 2019 +0200
+++ b/tryton/gui/window/win_csv.py Wed Mar 27 00:32:12 2019 +0100
@@ -262,7 +262,7 @@
if not data:
return
data = ','.join(str(x) for x in data)
- selection.set(selection.get_target(), 8, data)
+ selection.set(selection.get_target(), 8, data.encode('utf-8'))
return True
def drag_data_received(self, treeview, context, x, y, selection,
@@ -274,6 +274,7 @@
selection_data = selection.get_data()
if not selection_data:
return
+ selection_data = selection_data.decode('utf-8')
store = treeview.get_model()
data_iters = [store.get_iter((int(i),))