Bug 0003063: gtk.Tooltips is deprecated -- second batch of updates
svn: r13340
This commit is contained in:
@@ -87,7 +87,6 @@ class ObjEntry(object):
|
||||
self.set_val = set_val
|
||||
self.uistate = uistate
|
||||
self.track = track
|
||||
self.tooltips = gtk.Tooltips()
|
||||
|
||||
#connect drag and drop
|
||||
self._init_dnd()
|
||||
@@ -219,25 +218,25 @@ class ObjEntry(object):
|
||||
image.set_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_BUTTON)
|
||||
image.show()
|
||||
self.share.add(image)
|
||||
self.tooltips.set_tip(self.share, self.DEL_STR)
|
||||
self.share.set_tooltip_text(self.DEL_STR)
|
||||
if self.add_edt is not None:
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_EDIT, gtk.ICON_SIZE_BUTTON)
|
||||
image.show()
|
||||
self.add_edt.add(image)
|
||||
self.tooltips.set_tip(self.add_edt, self.EDIT_STR)
|
||||
self.add_edt.set_tooltip_text(self.EDIT_STR)
|
||||
else:
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_BUTTON)
|
||||
image.show()
|
||||
self.share.add(image)
|
||||
self.tooltips.set_tip(self.share, self.SHARE_STR)
|
||||
self.share.set_tooltip_text(self.SHARE_STR)
|
||||
if self.add_edt is not None:
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_ADD, gtk.ICON_SIZE_BUTTON)
|
||||
image.show()
|
||||
self.add_edt.add(image)
|
||||
self.tooltips.set_tip(self.add_edt, self.ADD_STR)
|
||||
self.add_edt.set_tooltip_text(self.ADD_STR)
|
||||
|
||||
class PlaceEntry(ObjEntry):
|
||||
"""
|
||||
|
@@ -410,13 +410,10 @@ class EditFamily(EditPrimary):
|
||||
|
||||
def __init__(self, dbstate, uistate, track, family):
|
||||
|
||||
self.tooltips = gtk.Tooltips()
|
||||
EditPrimary.__init__(self, dbstate, uistate, track,
|
||||
family, dbstate.db.get_family_from_handle,
|
||||
dbstate.db.get_family_from_gramps_id)
|
||||
|
||||
self.track_ref_for_deletion("tooltips")
|
||||
|
||||
# look for the scenerio of a child and no parents on a new
|
||||
# family
|
||||
|
||||
@@ -591,12 +588,9 @@ class EditFamily(EditPrimary):
|
||||
self.mbutton_del = self.top.get_object('mbutton_del')
|
||||
self.mbutton_edit = self.top.get_object('mbutton_edit')
|
||||
|
||||
self.tooltips.set_tip(self.mbutton_index,
|
||||
_("Select a person as the mother"))
|
||||
self.tooltips.set_tip(self.mbutton_add,
|
||||
_("Add a new person as the mother"))
|
||||
self.tooltips.set_tip(self.mbutton_del,
|
||||
_("Remove the person as the mother"))
|
||||
mbutton_index.set_tooltip_text(_("Select a person as the mother"))
|
||||
mbutton_add.set_tooltip_text(_("Add a new person as the mother"))
|
||||
mbutton_del.set_tooltip_text(_("Remove the person as the mother"))
|
||||
|
||||
self.mbutton_edit.connect('button-press-event', self.edit_mother)
|
||||
self.mbutton_edit.connect('key-press-event', self.edit_mother)
|
||||
@@ -609,12 +603,9 @@ class EditFamily(EditPrimary):
|
||||
self.fbutton_del = self.top.get_object('fbutton_del')
|
||||
self.fbutton_edit = self.top.get_object('fbutton_edit')
|
||||
|
||||
self.tooltips.set_tip(self.fbutton_index,
|
||||
_("Select a person as the father"))
|
||||
self.tooltips.set_tip(self.fbutton_add,
|
||||
_("Add a new person as the father"))
|
||||
self.tooltips.set_tip(self.fbutton_del,
|
||||
_("Remove the person as the father"))
|
||||
self.fbutton_index.set_tooltip_text(_("Select a person as the father"))
|
||||
self.fbutton_add.set_tooltip_text(_("Add a new person as the father"))
|
||||
self.fbutton_del.set_tooltip_text(_("Remove the person as the father"))
|
||||
|
||||
self.fbutton_edit.connect('button-press-event', self.edit_father)
|
||||
self.fbutton_edit.connect('key-press-event', self.edit_father)
|
||||
@@ -935,7 +926,7 @@ class EditFamily(EditPrimary):
|
||||
if death and death.get_type() == gen.lib.EventType.BURIAL:
|
||||
death_label.set_label(_("Burial:"))
|
||||
|
||||
self.tooltips.set_tip(btn_edit, _('Edit %s') % name)
|
||||
btn_edit.set_tooltip_text(_('Edit %s') % name)
|
||||
btn_index.hide()
|
||||
btn_add.hide()
|
||||
btn_del.show()
|
||||
|
Reference in New Issue
Block a user