view finch/libgnt/pygnt/file.py @ 18679:6b16fca71f8b

Add some more functions for GntTree. One point to note is that the key for each row in a tree needs to be a GObject, which, really is quite simple to do in python (examples coming up shortly). There is a wrapper for gpointer, which I am going to remove shortly. I also need to fix the install location. The way to go, I think, is to change the configure script in libgnt/configure.ac. This involves checking for python and doing things of that sort.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 28 Jul 2007 11:16:05 +0000
parents 5e1412f4e67a
children
line wrap: on
line source

#!/usr/bin/env python

import gnt, sys

def file_selected(widget, path, file, null):
	sys.stderr.write(path + " " + file)
	list = widget.get_selected_multi_files()
	for i in list:
		sys.stderr.write(i)

gnt.gnt_init()

win = gnt.Window()

files = gnt.FileSel()
files.set_multi_select(True)
files.set_title("Files")
files.connect("file_selected", file_selected, None)

files.show()

gnt.gnt_main()

gnt.gnt_quit()