2007-05-07 Don Allingham <don@gramps-project.org>

* src/ReportBase/_SimpleDoc.py: add support for tabs
	* src/BaseDoc.py: add support for tabs	
	* src/docgen/TextBufDoc.py: add support for tabs



svn: r8443
This commit is contained in:
Don Allingham
2007-05-08 02:56:33 +00:00
parent c5916814e8
commit 87764d64c0
4 changed files with 29 additions and 1 deletions

View File

@@ -128,6 +128,15 @@ class TextBufDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc):
tag.set_property("pixels-below-lines", pixels(style.get_bottom_margin()))
tag.set_property("wrap-mode", gtk.WRAP_WORD)
new_tabs = style.get_tabs()
tab_array = pango.TabArray(len(new_tabs)+1,True)
index = 0
for tab in [ pixels(x) for x in new_tabs ]:
tab_array.set_tab(index, pango.TAB_LEFT, tab)
index += 1
tag.set_property("tabs", tab_array)
self.tag_table.add(tag)
self.buffer = gtk.TextBuffer(self.tag_table)
return