Add option to suppress tooltips in trees
svn: r6111
This commit is contained in:
parent
f7c77b40b5
commit
628457e159
@ -1,3 +1,8 @@
|
||||
2006-03-09 Don Allingham <don@gramps-project.org>
|
||||
* src/const.py.in: add use_tips variable
|
||||
* src/PeopleModel.py: use_tips to control tool tips
|
||||
* src/DataModels.py: use_tips to control tool tips
|
||||
|
||||
2006-03-08 Don Allingham <don@gramps-project.org>
|
||||
* src/DataViews/_FamilyView.py: fix spacing
|
||||
* src/Editors/_EditPrimary.py: make sure object is valid before
|
||||
|
@ -50,6 +50,7 @@ import RelLib
|
||||
import Utils
|
||||
import ToolTips
|
||||
import GrampsLocale
|
||||
import const
|
||||
|
||||
_GENDER = [ _(u'female'), _(u'male'), _(u'unknown') ]
|
||||
|
||||
@ -266,11 +267,15 @@ class SourceModel(BaseModel):
|
||||
return time.localtime(data[8])
|
||||
|
||||
def column_tooltip(self,data):
|
||||
if const.use_tips:
|
||||
try:
|
||||
t = ToolTips.TipFromFunction(self.db, lambda: self.db.get_source_from_handle(data[0]))
|
||||
t = ToolTips.TipFromFunction(self.db, lambda:
|
||||
self.db.get_source_from_handle(data[0]))
|
||||
except:
|
||||
log.error("Failed to create tooltip.",exc_info=True)
|
||||
return t
|
||||
else:
|
||||
return u''
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -375,11 +380,15 @@ class PlaceModel(BaseModel):
|
||||
_codeset)
|
||||
|
||||
def column_tooltip(self,data):
|
||||
if const.use_tips:
|
||||
try:
|
||||
t = ToolTips.TipFromFunction(self.db, lambda: self.db.get_place_from_handle(data[0]))
|
||||
t = ToolTips.TipFromFunction(self.db, lambda:
|
||||
self.db.get_place_from_handle(data[0]))
|
||||
except:
|
||||
log.error("Failed to create tooltip.", exc_info=True)
|
||||
return t
|
||||
else:
|
||||
return u''
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -464,11 +473,15 @@ class FamilyModel(BaseModel):
|
||||
_codeset)
|
||||
|
||||
def column_tooltip(self,data):
|
||||
if const.use_tips:
|
||||
try:
|
||||
t = ToolTips.TipFromFunction(self.db, lambda: self.db.get_family_from_handle(data[0]))
|
||||
t = ToolTips.TipFromFunction(self.db, lambda:
|
||||
self.db.get_family_from_handle(data[0]))
|
||||
except:
|
||||
log.error("Failed to create tooltip.", exc_info=True)
|
||||
return t
|
||||
else:
|
||||
return u''
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -543,11 +556,15 @@ class MediaModel(BaseModel):
|
||||
_codeset)
|
||||
|
||||
def column_tooltip(self,data):
|
||||
if self.use_tips:
|
||||
try:
|
||||
t = ToolTips.TipFromFunction(self.db, lambda: self.db.get_object_from_handle(data[0]))
|
||||
t = ToolTips.TipFromFunction(self.db, lambda:
|
||||
self.db.get_object_from_handle(data[0]))
|
||||
except:
|
||||
log.error("Failed to create tooltip.", exc_info=True)
|
||||
return t
|
||||
else:
|
||||
return u''
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -476,7 +476,10 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
return None
|
||||
|
||||
def column_tooltip(self,data,node):
|
||||
if const.use_tips:
|
||||
return ToolTips.TipFromFunction(self.db, lambda: self.db.get_person_from_handle(data[0]))
|
||||
else:
|
||||
return u''
|
||||
|
||||
|
||||
def column_int_id(self,data,node):
|
||||
|
@ -126,6 +126,7 @@ fdl = os.path.join(data_dir,"fdl.txt")
|
||||
|
||||
startup = 1
|
||||
dnd_images = 1
|
||||
use_tips = False
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user