Use icon names for drag source
This commit is contained in:
parent
f2f78ef2f4
commit
ae1af073a7
@ -113,7 +113,7 @@ class EditChildRef(EditSecondary):
|
||||
DdTargets.PERSON_LINK.target_flags,
|
||||
DdTargets.PERSON_LINK.app_id)
|
||||
self.label_event_box.drag_source_set_target_list(tglist)
|
||||
self.label_event_box.drag_source_set_icon_stock('gramps-person')
|
||||
self.label_event_box.drag_source_set_icon_name('gramps-person')
|
||||
self.label_event_box.connect('drag_data_get', self.drag_data_get)
|
||||
|
||||
def _setup_fields(self):
|
||||
|
@ -561,7 +561,7 @@ class EditFamily(EditPrimary):
|
||||
DdTargets.FAMILY_LINK.target_flags,
|
||||
DdTargets.FAMILY_LINK.app_id)
|
||||
self.contexteventbox.drag_source_set_target_list(tglist)
|
||||
self.contexteventbox.drag_source_set_icon_stock('gramps-family')
|
||||
self.contexteventbox.drag_source_set_icon_name('gramps-family')
|
||||
self.contexteventbox.connect('drag_data_get', self.on_drag_data_get_family)
|
||||
|
||||
def on_drag_data_get_family(self,widget, context, sel_data, info, time):
|
||||
@ -584,7 +584,7 @@ class EditFamily(EditPrimary):
|
||||
DdTargets.PERSON_LINK.target_flags,
|
||||
DdTargets.PERSON_LINK.app_id)
|
||||
event_box.drag_source_set_target_list(tglist)
|
||||
event_box.drag_source_set_icon_stock('gramps-person')
|
||||
event_box.drag_source_set_icon_name('gramps-person')
|
||||
event_box.connect('drag_data_get', on_drag_data_get)
|
||||
#Disallow drop:
|
||||
if event_box.drag_dest_get_target_list():
|
||||
|
@ -263,7 +263,7 @@ class EditPerson(EditPrimary):
|
||||
[],
|
||||
Gdk.DragAction.COPY)
|
||||
self.contexteventbox.drag_source_set_target_list(tglist)
|
||||
self.contexteventbox.drag_source_set_icon_stock('gramps-person')
|
||||
self.contexteventbox.drag_source_set_icon_name('gramps-person')
|
||||
self.contexteventbox.connect('drag_data_get', self._top_drag_data_get)
|
||||
|
||||
def _connect_db_signals(self):
|
||||
|
@ -111,7 +111,7 @@ class EditPersonRef(EditSecondary):
|
||||
DdTargets.PERSON_LINK.target_flags,
|
||||
DdTargets.PERSON_LINK.app_id)
|
||||
self.label_event_box.drag_source_set_target_list(tglist)
|
||||
self.label_event_box.drag_source_set_icon_stock('gramps-person')
|
||||
self.label_event_box.drag_source_set_icon_name('gramps-person')
|
||||
self.label_event_box.connect('drag_data_get', self.drag_data_get)
|
||||
else:
|
||||
self.label_event_box.drag_source_unset()
|
||||
|
@ -167,7 +167,7 @@ class ObjEntry(object):
|
||||
self._DND_TYPE.app_id)
|
||||
self.label_event_box.drag_source_set_target_list(tglist)
|
||||
if self._DND_ICON:
|
||||
self.label_event_box.drag_source_set_icon_stock(self._DND_ICON)
|
||||
self.label_event_box.drag_source_set_icon_name(self._DND_ICON)
|
||||
self.label_event_box.connect('drag_data_get', self.drag_data_get)
|
||||
else:
|
||||
if self.label.drag_source_get_target_list():
|
||||
|
@ -964,7 +964,7 @@ class FanChartBaseWidget(Gtk.DrawingArea):
|
||||
def on_drag_begin(self, widget, data):
|
||||
"""Set up some inital conditions for drag. Set up icon."""
|
||||
self.in_drag = True
|
||||
self.drag_source_set_icon_stock('gramps-person')
|
||||
self.drag_source_set_icon_name('gramps-person')
|
||||
|
||||
def on_drag_end(self, widget, data):
|
||||
"""Set up some inital conditions for drag. Set up icon."""
|
||||
|
@ -120,7 +120,7 @@ class _PersonWidgetBase(Gtk.DrawingArea):
|
||||
def cb_drag_begin(self, widget, data):
|
||||
"""Set up some inital conditions for drag. Set up icon."""
|
||||
self.in_drag = True
|
||||
self.drag_source_set_icon_stock('gramps-person')
|
||||
self.drag_source_set_icon_name('gramps-person')
|
||||
|
||||
def cb_drag_end(self, widget, data):
|
||||
"""Set up some inital conditions for drag. Set up icon."""
|
||||
|
@ -1091,7 +1091,7 @@ class RelationshipView(NavigationView):
|
||||
dnd_type.target_flags,
|
||||
dnd_type.app_id)
|
||||
eventbox.drag_source_set_target_list(tglist)
|
||||
eventbox.drag_source_set_icon_stock(stock_icon)
|
||||
eventbox.drag_source_set_icon_name(stock_icon)
|
||||
eventbox.connect('drag_data_get',
|
||||
self._make_drag_data_get_func(object_h, dnd_type))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user