Changes

Jump to navigation Jump to search
Line 99: Line 99:  
view.modify_font(pango.FontDescription("Monospace " +
 
view.modify_font(pango.FontDescription("Monospace " +
 
                 str(style.FONT_SIZE)))
 
                 str(style.FONT_SIZE)))
 +
...
 +
 
</pre>
 
</pre>
   Line 109: Line 111:  
text = buffer.get_text(buffer.get_start_iter(), buffer.get_end_iter())
 
text = buffer.get_text(buffer.get_start_iter(), buffer.get_end_iter())
 
</pre>
 
</pre>
 +
 +
You will probably want to put the view in a gtk.ScrolledWindow
 +
<pre>
 +
sw = gtk.ScrolledWindow()
 +
sw.add(view)
 +
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
 +
</pre>
 +
and add the sw object instead of the view.
 +
    
You can find more in the Pippy source and in jarabe.view.sourceview.
 
You can find more in the Pippy source and in jarabe.view.sourceview.
158

edits

Navigation menu