Archive

Posts Tagged ‘gtk’

up-to-date sample code for gtksourceview2 (from the svn)

8 October 2008 Leave a comment
#CREDITS
#http://www.progbox.co.uk/wordpress/?p=300
#DEPENDS: gtksourceview2 and libxml2
import gtk
import gtksourceview2
win = gtk.Window()
bufferS = gtksourceview2.Buffer()
manager = gtksourceview2.LanguageManager()
language = manager.get_language("xml")
#langS.set_mime_types(["text/x-python"])
bufferS.set_language(language)
bufferS.set_highlight_syntax(True)
view = gtksourceview2.View(bufferS)
view.set_show_line_numbers(True)
win.resize(400,400)
win.add(view)
win.show_all()
gtk.main()
Advertisements
Categories: Uncategorized Tags: , , ,

developing with Glade

15 July 2008 Leave a comment

wow. wonderful.

these are the first thoughts after the implementation of a couple of widgets, on a simple and sample Gtk.Window.

First of all, Glade allows the separation of interface and code.

Glade enables you the design of a GUI. Eclipse, or your favourite Python IDE, eanbles you the implementation of the methods connected to the widgets’ signals.

For the first time, I feel able to develop rapidly and efficiently using free (as in free speech) tools.

won-der-ful.

Categories: Uncategorized Tags: , , , ,