Use icon names for drag source

This commit is contained in:
Nick Hall 2015-05-22 23:29:23 +01:00
parent f2f78ef2f4
commit ae1af073a7
8 changed files with 9 additions and 9 deletions

View File

@ -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):

View File

@ -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():

View File

@ -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):

View File

@ -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()

View File

@ -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():

View File

@ -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."""

View File

@ -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."""

View File

@ -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))