2006-06-30 Don Allingham <don@gramps-project.org>

* src/GrampsWidgets.py: Add GenderWidget to try to isolate windows 
	font problems



svn: r6973
This commit is contained in:
Don Allingham 2006-06-30 13:58:19 +00:00
parent fb8d1bc994
commit 9c2a24083b
2 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,7 @@
2006-06-30 Don Allingham <don@gramps-project.org>
* src/GrampsWidgets.py: Add GenderWidget to try to isolate windows
font problems
2006-06-28 Don Allingham <don@gramps-project.org>
* src/DataViews/_PedigreeView.py (PedigreeView.rebuild): use gtk.Arrow
instead of unicode characters

View File

@ -31,6 +31,7 @@ from gettext import gettext as _
#-------------------------------------------------------------------------
import gobject
import gtk
import pango
import AutoComp
import DateHandler
@ -52,14 +53,16 @@ class LinkLabel(gtk.EventBox):
self.orig_text = cgi.escape(label[0])
self.gender = label[1]
text = '<span underline="single">%s</span>' % self.orig_text
if label[1]:
text += u' %s' % label[1]
self.label = gtk.Label(text)
self.label.set_use_markup(True)
self.label.set_alignment(0, 0.5)
self.add(self.label)
hbox = gtk.HBox()
hbox.add(self.label)
if label[1]:
hbox.add(GenderLabel(label[1]))
self.add(hbox)
self.connect('button-press-event', func, handle)
self.connect('enter-notify-event', self.enter_text, handle)
@ -150,9 +153,6 @@ class EditLabel(gtk.HBox):
self.pack_start(gtk.image_new_from_stock(gtk.STOCK_EDIT,
gtk.ICON_SIZE_MENU), False)
self.set_spacing(4)
# self.tooltip = gtk.Tooltips()
# self.tooltip.set_tip(label, _('Click in the cell to change the value'))
# self.tooltip.enable()
self.show_all()
class BasicLabel(gtk.Label):
@ -162,6 +162,16 @@ class BasicLabel(gtk.Label):
self.set_alignment(0, 0.5)
self.show()
class GenderLabel(gtk.Label):
def __init__(self, text):
gtk.Label.__init__(self, text)
self.set_alignment(0, 0.5)
if os.sys.platform == "win32":
pangoFont = pango.FontDescription('Arial')
self.modify_font(pangoFont)
self.show()
class MarkupLabel(gtk.Label):
def __init__(self, text):