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:
parent
a9919c995a
commit
97c11250d4
@ -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>
|
2006-06-28 Don Allingham <don@gramps-project.org>
|
||||||
* src/DataViews/_PedigreeView.py (PedigreeView.rebuild): use gtk.Arrow
|
* src/DataViews/_PedigreeView.py (PedigreeView.rebuild): use gtk.Arrow
|
||||||
instead of unicode characters
|
instead of unicode characters
|
||||||
|
@ -31,6 +31,7 @@ from gettext import gettext as _
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import gobject
|
import gobject
|
||||||
import gtk
|
import gtk
|
||||||
|
import pango
|
||||||
|
|
||||||
import AutoComp
|
import AutoComp
|
||||||
import DateHandler
|
import DateHandler
|
||||||
@ -52,15 +53,17 @@ class LinkLabel(gtk.EventBox):
|
|||||||
self.orig_text = cgi.escape(label[0])
|
self.orig_text = cgi.escape(label[0])
|
||||||
self.gender = label[1]
|
self.gender = label[1]
|
||||||
text = '<span underline="single">%s</span>' % self.orig_text
|
text = '<span underline="single">%s</span>' % self.orig_text
|
||||||
if label[1]:
|
|
||||||
text += u' %s' % label[1]
|
|
||||||
|
|
||||||
self.label = gtk.Label(text)
|
self.label = gtk.Label(text)
|
||||||
self.label.set_use_markup(True)
|
self.label.set_use_markup(True)
|
||||||
self.label.set_alignment(0, 0.5)
|
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('button-press-event', func, handle)
|
||||||
self.connect('enter-notify-event', self.enter_text, handle)
|
self.connect('enter-notify-event', self.enter_text, handle)
|
||||||
self.connect('leave-notify-event', self.leave_text, handle)
|
self.connect('leave-notify-event', self.leave_text, handle)
|
||||||
@ -150,9 +153,6 @@ class EditLabel(gtk.HBox):
|
|||||||
self.pack_start(gtk.image_new_from_stock(gtk.STOCK_EDIT,
|
self.pack_start(gtk.image_new_from_stock(gtk.STOCK_EDIT,
|
||||||
gtk.ICON_SIZE_MENU), False)
|
gtk.ICON_SIZE_MENU), False)
|
||||||
self.set_spacing(4)
|
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()
|
self.show_all()
|
||||||
|
|
||||||
class BasicLabel(gtk.Label):
|
class BasicLabel(gtk.Label):
|
||||||
@ -162,6 +162,16 @@ class BasicLabel(gtk.Label):
|
|||||||
self.set_alignment(0, 0.5)
|
self.set_alignment(0, 0.5)
|
||||||
self.show()
|
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):
|
class MarkupLabel(gtk.Label):
|
||||||
|
|
||||||
def __init__(self, text):
|
def __init__(self, text):
|
||||||
|
Loading…
Reference in New Issue
Block a user