Add drag Icon to drags from DisplayTabs Gramplet lists (#694)

Fixes #10859
This commit is contained in:
Paul Culley 2018-11-27 18:08:30 -06:00 committed by Sam Manzi
parent 4c7b24ba30
commit 817f4b7205

View File

@ -211,6 +211,7 @@ class EmbeddedList(ButtonTab):
self.tree.drag_source_set_target_list(tglist)
self.tree.connect('drag_data_get', self.drag_data_get)
self.tree.connect_after('drag-begin', self.after_drag_begin)
if not self.dbstate.db.readonly:
self.tree.connect('drag_data_received', self.drag_data_received)
self.tree.connect('drag_motion', self.tree_drag_motion)
@ -282,6 +283,12 @@ class EmbeddedList(ButtonTab):
"""
pass
def after_drag_begin(self, widget, drag_context):
"""
We want to show the icon during drag instead of the long row entry
"""
Gtk.drag_set_icon_name(drag_context, self.get_icon_name(), 0, 0)
def handle_extra_type(self, objtype, obj):
pass