GTK3: placeview drag drop, avoid crash on drag of a place leave from treeview
svn: r20105
This commit is contained in:
parent
a3c7409bcd
commit
f21dd31e91
@ -463,6 +463,10 @@ class ListView(NavigationView):
|
|||||||
for handle in selected_ids],
|
for handle in selected_ids],
|
||||||
0)
|
0)
|
||||||
sel_data.set(self.drag_list_info().atom_drag_type, 8, pickle.dumps(data))
|
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):
|
def set_column_order(self):
|
||||||
"""
|
"""
|
||||||
|
@ -213,8 +213,14 @@ class PlaceBaseView(ListView):
|
|||||||
widget.set_stock_id(Gtk.STOCK_JUMP_TO)
|
widget.set_stock_id(Gtk.STOCK_JUMP_TO)
|
||||||
if self.drag_info():
|
if self.drag_info():
|
||||||
self.list.enable_model_drag_source(Gdk.ModifierType.BUTTON1_MASK,
|
self.list.enable_model_drag_source(Gdk.ModifierType.BUTTON1_MASK,
|
||||||
[('text/plain', 0, 0), self.drag_info().target_data()],
|
[],
|
||||||
Gdk.DragAction.COPY)
|
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):
|
def __create_maps_menu_actions(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user