# HG changeset patch # User Malte Bayer # Date 1322854896 -3600 # Node ID 6edcf4666e3b6ffa0ff2b17e1e58b02cb71be2e9 # Parent 9af54a45ae4226156aad43b04a34393fb0b810ae added slotUI path diff -r 9af54a45ae42 -r 6edcf4666e3b slotUI/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slotUI/README Fri Dec 02 20:41:36 2011 +0100 @@ -0,0 +1,3 @@ +At the moment just for testing stuff & rudimentary protocol definition + ++ GTK GUI testing \ No newline at end of file diff -r 9af54a45ae42 -r 6edcf4666e3b slotUI/SlotUi.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slotUI/SlotUi.py Fri Dec 02 20:41:36 2011 +0100 @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +import pygtk +pygtk.require('2.0') +import gtk + +class SlotUi: + """ + Graphical User Interface + using GTK + """ + def delete_event(self, widget, event, data=None): + if widget == self.window: + self.destroy(widget, data) + #return true to stop window destruction + return False + + def destroy(self, widget, data=None): + gtk.main_quit() + + def __init__(self): + # create main window + self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) + self.window.connect("delete_event", self.delete_event) + self.button = gtk.Button("Hello World") + self.button.connect("clicked", self.hello, None) + + self.window.add(self.button) + self.button.show() + self.window.show() + + def hello(self, widget, param1): + print widget + print "hello" + + def main(self): + gtk.main() + +if __name__ == "__main__": + app = SlotUi() + app.main() \ No newline at end of file diff -r 9af54a45ae42 -r 6edcf4666e3b slotUI/freeslot.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slotUI/freeslot.py Fri Dec 02 20:41:36 2011 +0100 @@ -0,0 +1,5 @@ +""" +FreeSlot project +Blackbox communication library +""" +