* src/Utils.py (bold_label, unbold label): Add functions.
* src/EditPerson.py (bold_label, unbold label): Remove functions; Call them from Utils in every instance. * src/ImageSelect.py (Gallery.load_images): Change label upon load. * src/Sources.py (SourceTab.redraw): Change label upon redraw. * src/AddrEdit.py (__init__): Find sources label from XML; (on_switch_page): Add function. * src/AttrEdit.py (__init__): Find sources label from XML; (on_switch_page): Add function. * src/dialog.glade: Set meaningful label ids, remove bold markup. * src/EditPlace.py (__init__): Find soucre label from XML. * src/places.glade: Set meaningful label ids, remove bold markup. * src/Marriage.py (__init__): Find soucre label from XML; (on_switch_page): Add function. * src/marriage.glade: Set meaningful label ids, remove bold markup. * src/EditSource.py (__init__): Find soucre label from XML. * src/gramps.glade: Set meaningful label ids, remove bold markup. * src/EventEdit.py: (__init__): Find soucre label from XML; (on_switch_page): Add function. * src/Witness.py (WitnessTab.redraw): Change label upon redraw. * src/NameEdit.py: (__init__): Find soucre label from XML; (on_switch_page): Add function. svn: r2327
This commit is contained in:
17
src/Utils.py
17
src/Utils.py
@ -611,3 +611,20 @@ def roman(num):
|
||||
return rnum
|
||||
else:
|
||||
return
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Change label apperance
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def bold_label(label):
|
||||
text = label.get_text()
|
||||
label.set_text("<b>%s</b>" % text )
|
||||
label.set_use_markup(1)
|
||||
|
||||
def unbold_label(label):
|
||||
text = label.get_text()
|
||||
text = string.replace(text,'<b>','')
|
||||
text = string.replace(text,'</b>','')
|
||||
label.set_text(text)
|
||||
label.set_use_markup(0)
|
||||
|
Reference in New Issue
Block a user