Development Team/Almanac: Difference between revisions

Lucian (talk | contribs)
mNo edit summary
Lucian (talk | contribs)
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.