changeset cc12a4cc909a in tryton:4.8
details: https://hg.tryton.org/tryton?cmd=changeset;node=cc12a4cc909a
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 7d3c7b34d3e7 -r cc12a4cc909a tryton/gui/window/win_csv.py
--- a/tryton/gui/window/win_csv.py Tue Apr 02 21:38:02 2019 +0200
+++ b/tryton/gui/window/win_csv.py Wed Mar 27 00:32:12 2019 +0100
@@ -264,7 +264,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,
@@ -276,6 +276,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),))