Use get_data on SelectionData to retrieve raw data
In Gtk 3.0 there is no more data property. Closes #11514
This commit is contained in:
@@ -84,7 +84,7 @@ class Image(BinaryMixin, Widget):
|
||||
self.field.set_client(self.record, url_open(uri).read())
|
||||
self.update_img()
|
||||
elif info == 1:
|
||||
uri = selection.data.split('\r\n')[0]
|
||||
uri = selection.get_data().split('\r\n')[0]
|
||||
if uri:
|
||||
self.field.set_client(self.record, url_open(uri).read())
|
||||
self.update_img()
|
||||
|
||||
@@ -278,10 +278,7 @@ class WinCSV(NoModal):
|
||||
def drag_data_received(self, treeview, context, x, y, selection,
|
||||
info, etime):
|
||||
treeview.stop_emission_by_name('drag-data-received')
|
||||
try:
|
||||
selection_data = selection.data
|
||||
except AttributeError:
|
||||
selection_data = selection.get_data()
|
||||
selection_data = selection.get_data()
|
||||
if not selection_data:
|
||||
return
|
||||
selection_data = selection_data.decode('utf-8')
|
||||
|
||||
Reference in New Issue
Block a user