additional refinements
svn: r10154
This commit is contained in:
parent
e96b543384
commit
6b8d041c94
@ -597,18 +597,19 @@ class GuiGramplet:
|
|||||||
retval += text[i]
|
retval += text[i]
|
||||||
r += 1
|
r += 1
|
||||||
i += 1
|
i += 1
|
||||||
self.set_text(retval)
|
offset = len(self.get_text())
|
||||||
|
self.append_text(retval)
|
||||||
for (a,b) in markup_pos["B"]:
|
for (a,b) in markup_pos["B"]:
|
||||||
start = self.buffer.get_iter_at_offset(a)
|
start = self.buffer.get_iter_at_offset(a + offset)
|
||||||
stop = self.buffer.get_iter_at_offset(b)
|
stop = self.buffer.get_iter_at_offset(b + offset)
|
||||||
self.buffer.apply_tag_by_name("bold", start, stop)
|
self.buffer.apply_tag_by_name("bold", start, stop)
|
||||||
for (a,b) in markup_pos["I"]:
|
for (a,b) in markup_pos["I"]:
|
||||||
start = self.buffer.get_iter_at_offset(a)
|
start = self.buffer.get_iter_at_offset(a + offset)
|
||||||
stop = self.buffer.get_iter_at_offset(b)
|
stop = self.buffer.get_iter_at_offset(b + offset)
|
||||||
self.buffer.apply_tag_by_name("italic", start, stop)
|
self.buffer.apply_tag_by_name("italic", start, stop)
|
||||||
for (a,b) in markup_pos["U"]:
|
for (a,b) in markup_pos["U"]:
|
||||||
start = self.buffer.get_iter_at_offset(a)
|
start = self.buffer.get_iter_at_offset(a + offset)
|
||||||
stop = self.buffer.get_iter_at_offset(b)
|
stop = self.buffer.get_iter_at_offset(b + offset)
|
||||||
self.buffer.apply_tag_by_name("underline", start, stop)
|
self.buffer.apply_tag_by_name("underline", start, stop)
|
||||||
|
|
||||||
def set_use_markup(self, value):
|
def set_use_markup(self, value):
|
||||||
|
@ -448,6 +448,7 @@ class PedigreeGramplet(Gramplet):
|
|||||||
self.tooltip = _("Click name to make person active\n") + \
|
self.tooltip = _("Click name to make person active\n") + \
|
||||||
_("Right-click name to edit person")
|
_("Right-click name to edit person")
|
||||||
self.max_generations = 100
|
self.max_generations = 100
|
||||||
|
self.set_use_markup(True)
|
||||||
|
|
||||||
def db_changed(self):
|
def db_changed(self):
|
||||||
"""
|
"""
|
||||||
@ -507,8 +508,7 @@ class PedigreeGramplet(Gramplet):
|
|||||||
self.append_text("\n")
|
self.append_text("\n")
|
||||||
elif what == "a":
|
elif what == "a":
|
||||||
self.append_text("o------")
|
self.append_text("o------")
|
||||||
self.link(name_displayer.display_name(person.get_primary_name()),
|
self.render_text("<b>%s</b>" % name_displayer.display_name(person.get_primary_name()))
|
||||||
'Person', person.handle)
|
|
||||||
self.append_text("\n")
|
self.append_text("\n")
|
||||||
elif what == "m":
|
elif what == "m":
|
||||||
if len(family_list) > 0:
|
if len(family_list) > 0:
|
||||||
@ -811,6 +811,7 @@ class NewsGramplet(Gramplet):
|
|||||||
for match in matches:
|
for match in matches:
|
||||||
text = text.replace("'''%s'''" % match, "<B>%s</B>" % match)
|
text = text.replace("'''%s'''" % match, "<B>%s</B>" % match)
|
||||||
text = "News from <I>www.gramps-project.org</I>:\n\n" + text
|
text = "News from <I>www.gramps-project.org</I>:\n\n" + text
|
||||||
|
self.clear_text()
|
||||||
self.set_use_markup(True)
|
self.set_use_markup(True)
|
||||||
self.render_text(text)
|
self.render_text(text)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user