'Applies a different filter to the textview.
:param filtinfo: the new filter'

def filter(self, filtinfo):

    self.active_filter = filtinfo
    textbuff = self.textbuffer
    textbuff.set_text('')
    for (mtype, text) in self.all_messages:
        if (mtype in filtinfo):
            colortag = self.bg_colors[mtype]
            iterl = textbuff.get_end_iter()
            textbuff.insert_with_tags_by_name(iterl, text, colortag)
    self.scroll_to_end()
