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