'Find the text, and handle highlight.'

def highlight(self, text, tag='yellow-background', case_sensitive=True):

    text = str(text)
    text = text.replace('\x00', '')
    flags = gtk.TEXT_SEARCH_VISIBLE_ONLY
    startIter = self.textbuf.get_start_iter()
    positions = []
    while True:
        result = startIter.forward_search(text, flags, None)
        if result:
            positions.append((result[0], result[1]))
            startIter = result[1]
        else:
            break
    if (not positions):
        self.search_entry.modify_base(gtk.STATE_NORMAL, self.bg_notfnd)
        self.textbuf.select_range(startIter, startIter)
        self._resultsLabel.set_text('')
        return positions
    self._resultsLabel.set_text((_('Total:    ') + str(len(positions))))
    for (iterini, iterfin) in positions:
        self.textbuf.apply_tag_by_name(tag, iterini, iterfin)
    return positions
