예제 #1
0
파일: conversation.go 프로젝트: 0x27/coyim
// Expects to be called from the GUI thread.
// Expects to be called when conv is already locked
func insertWithTag(buff *gtk.TextBuffer, tagName, text string) {
	charCount := buff.GetCharCount()
	insertAtEnd(buff, text)
	oldEnd := buff.GetIterAtOffset(charCount)
	newEnd := buff.GetEndIter()
	buff.ApplyTagByName(tagName, oldEnd, newEnd)
}
예제 #2
0
파일: conversation.go 프로젝트: 0x27/coyim
// Expects to be called from the GUI thread.
// Expects to be called when conv is already locked
func insertAtEnd(buff *gtk.TextBuffer, text string) {
	buff.Insert(buff.GetEndIter(), text)
}