Ticket #3488: pippy.patch

File pippy.patch, 1.0 kB (added by jani, 7 years ago)
  • Pippy.activity/activity.py

    diff -Nur sugar-pippy-activity-8/Pippy.activity/activity.py sugar-pippy-activity-8.new/Pippy.activity/activity.py
    old new  
    9696        # Source buffer 
    9797        self.text_buffer = gtksourceview2.Buffer() 
    9898        lang_manager = gtksourceview2.language_manager_get_default() 
    99         langs = lang_manager.list_languages() 
    100         for lang in langs: 
     99        ids = lang_manager.get_language_ids() 
     100        for id in ids: 
     101            lang = lang_manager.get_language(id) 
    101102            for m in lang.get_mime_types(): 
    102103                if m == "text/x-python": 
    103104                    self.text_buffer.set_language(lang) 
    104105 
    105         self.text_buffer.set_highlight(True) 
     106        self.text_buffer.set_highlight_syntax(True) 
    106107 
    107108        # The GTK source view window 
    108109        self.text_view = gtksourceview2.View(self.text_buffer)