Logo Search packages:      
Sourcecode: webboard version File versions  Download package

def webboardlib::webboard::WebBoard::on_combobox_syntax_changed (   self,
  combobox 
)
Set the selected syntax highlightenging for
the source view

Definition at line 170 of file webboard.py.

                                                  :
        """
        Set the selected syntax highlightenging for
        the source view
        """
        lang_store = combobox.get_model()
        iter = combobox.get_active_iter()
        mime = lang_store.get_value(iter, 2)
        self.language = lang_store.get_value(iter, 0)
        buffer = self.textview.get_buffer()
        if mime == "None":
            buffer.set_highlight(False)
        else:
            try:
                language = self.lm.get_language_from_mime_type(mime)
                buffer.set_language(language)
                buffer.set_highlight(True)
            except:
                buffer.set_highlight(False)


Generated by  Doxygen 1.6.0   Back to index