finch/libgnt/pygnt/file.py

Tue, 17 Jul 2007 11:09:03 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Tue, 17 Jul 2007 11:09:03 +0000
changeset 18826
a276583c694c
permissions
-rwxr-xr-x

Do some work to make pygnt more useful. The dbus-gnt script works fairly
well now.

18826
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
1 #!/usr/bin/env python
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
2
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
3 import gnt, sys
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
4
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
5 def file_selected(widget, path, file, null):
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
6 sys.stderr.write(path + " " + file)
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
7 list = widget.get_selected_multi_files()
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
8 for i in list:
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
9 sys.stderr.write(i)
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
10
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
11 gnt.gnt_init()
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
12
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
13 win = gnt.Window()
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
14
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
15 files = gnt.FileSel()
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
16 files.set_multi_select(True)
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
17 files.set_title("Files")
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
18 files.connect("file_selected", file_selected, None)
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
19
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
20 files.show()
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
21
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
22 gnt.gnt_main()
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
23
a276583c694c Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
24 gnt.gnt_quit()

mercurial