1
0
Fork 0

- Gnuviech Admin Tool GNOME Frontend

git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@157 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
Jan Dittberner 2006-02-20 21:27:30 +00:00
parent 59f034704a
commit a26a15f3c1
3 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,63 @@
#!/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()

View file

@ -0,0 +1,4 @@
#!/usr/bin/python
"""
This package contains the SOAP client for the gnuviech admin tool
"""

View file

@ -0,0 +1,9 @@
#!/usr/bin/python
from SOAPpy import SOAPProxy
class SOAPClient:
def __init__(self):
self.server = SOAPProxy("http://localhost:8080/")
def echo(self, value):
return self.server.echo(value);