* src/plugins/stock_link.png: added icon for scratchpad display
	* src/DdTargets.py (all_text): new method to return all text ddtypes
	* src/TreeTips.py (__treetip_show): added support for tips to be callable
	methods so that tips can be generated on the fly.
	* src/plugins/Makefile.am: added stock_link.png icon
	* src/plugins/ScratchPad.py: almost complete rewrite to make proper use
	of gtk widgets and make more flexible for adding support for new
	dnd object types. Added link icon if the object is a link to a primary
	object.


svn: r4262
This commit is contained in:
Richard Taylor
2005-03-31 13:16:20 +00:00
parent 1d6f8fba1d
commit 306b962470
6 changed files with 548 additions and 356 deletions

View File

@ -11,6 +11,7 @@ __revision__ = "$Rev$"
#
# Support for text markup added: March 05 - rjt-gramps <at> thegrindstone.me.uk
# Support for tooltips to be functions added: March 05 - rjt-gramps <at> thegrindstone.me.uk
#
import gtk
@ -191,7 +192,15 @@ class TreeTips(gtk.Widget):
elif self.path != pathReturn[0]:
self.path = pathReturn[0]
rowIter = model.get_iter(self.path)
text = model.get_value(rowIter, self.column)
tip = model.get_value(rowIter, self.column)
# The tip can be either a string or
# a function that returns a string.
if type(tip) == str:
text = tip
elif callable(tip):
text = tip()
else:
text = ""
self.active_tips_data = text
if not text:
if self.markup_enabled: