diff --git a/src/gui/views/listview.py b/src/gui/views/listview.py index a77cc5d4b..ac90a0dd5 100644 --- a/src/gui/views/listview.py +++ b/src/gui/views/listview.py @@ -463,6 +463,10 @@ class ListView(NavigationView): for handle in selected_ids], 0) sel_data.set(self.drag_list_info().atom_drag_type, 8, pickle.dumps(data)) + else: + # pass empty + data = (self.drag_info().drag_type, id(self), [], 0) + sel_data.set(self.drag_list_info().atom_drag_type, 8, pickle.dumps(data)) def set_column_order(self): """ diff --git a/src/plugins/lib/libplaceview.py b/src/plugins/lib/libplaceview.py index ac6d4e41a..8296f361d 100644 --- a/src/plugins/lib/libplaceview.py +++ b/src/plugins/lib/libplaceview.py @@ -213,8 +213,14 @@ class PlaceBaseView(ListView): widget.set_stock_id(Gtk.STOCK_JUMP_TO) if self.drag_info(): self.list.enable_model_drag_source(Gdk.ModifierType.BUTTON1_MASK, - [('text/plain', 0, 0), self.drag_info().target_data()], + [], Gdk.DragAction.COPY) + tglist = Gtk.TargetList.new([]) + tglist.add(self.drag_info().atom_drag_type, + self.drag_info().target_flags, + self.drag_info().app_id) + tglist.add_text_targets (0L) + self.list.drag_source_set_target_list(tglist) def __create_maps_menu_actions(self): """