1
0
Fork 0
gnuviechadmin-historic/gnome-frontend/src/gnuviech-admin-gnome.py
Jan Dittberner a26a15f3c1 - Gnuviech Admin Tool GNOME Frontend
git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@157 a67ec6bc-e5d5-0310-a910-815c51eb3124
2006-02-20 21:27:30 +00:00

63 lines
No EOL
1.7 KiB
Python

#!/usr/bin/python
import pygtk
pygtk.require('2.0')
import gtk
from soapclient import soapclient
class GnuviechAdminGnome:
"""GnuviechAdmin Gnome Interface"""
def hello(self, widget, data = None):
print "Hello World"
def metoo(self, widget, data = None):
print "Me 2"
def delete_event(self, widget, event, data = None):
print "delete event occurred"
return False
def button_press(self, widget, data = None):
print "button pressed"
def change_event(self, widget, data = None):
text = widget.get_text()
print text
self.label.set_text(self.soapclient.echo(text))
def destroy_event(self, widget, data = None):
gtk.main_quit()
def __init__( self ):
self.soapclient = soapclient.SOAPClient()
self.window = gtk.Window()
self.window.connect("delete_event", self.delete_event)
self.window.connect("destroy", self.destroy_event)
button = gtk.Button("Hello world")
self.handler1 = button.connect("clicked", self.hello, None)
button.connect("clicked", self.metoo, None)
button.connect_object("clicked", gtk.Widget.destroy, self.window)
button.connect("pressed", self.button_press, None)
self.textfield = gtk.Entry()
self.textfield.connect("changed", self.change_event)
self.label = gtk.Label()
vbox = gtk.VBox()
vbox.add(button)
vbox.add(self.textfield)
vbox.add(self.label)
self.window.add(vbox)
self.window.show_all()
def main(self):
gtk.main()
if __name__ == '__main__':
g = GnuviechAdminGnome()
g.main()