diff options
author | Yves <yvesf-git@xapek.org> | 2010-03-16 22:58:03 +0100 |
---|---|---|
committer | Yves <yvesf-git@xapek.org> | 2010-03-16 22:58:03 +0100 |
commit | 75041878bd789d2b14d3ccebcb0eaeca2c3a6aca (patch) | |
tree | a16a349453287ad92f9b0c85d9d6775f4759b745 /gui.py | |
parent | a0297c212e5a9a4c2c478e538c23ddd0e96ac56e (diff) | |
download | magicproxy-75041878bd789d2b14d3ccebcb0eaeca2c3a6aca.tar.gz magicproxy-75041878bd789d2b14d3ccebcb0eaeca2c3a6aca.zip |
revert
Diffstat (limited to 'gui.py')
-rw-r--r-- | gui.py | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -4,6 +4,37 @@ import gtk, sys, proxy, time gtk.gdk.threads_init() +class Settings(gtk.Window): + def __init__(self): + super(Settings, self).__init__(gtk.WINDOW_TOPLEVEL) + + self.set_border_width(8) + self.set_title("Magicproxy GUI client settings") + self.set_resizable(False) + + table = gtk.Table(rows=3, columns=3, homogeneous=True); + + b_quit = gtk.Button("Quit") + b_quit.connect("clicked", self.on_quit) + label = gtk.Label("Time Slice") + self.time_slice = gtk.HScale() + self.time_slice.set_range(1,100) + self.time_slice.set_increments(1,1) + self.time_slice.set_value(proxy.TIME_SLICE) + + table.attach(label,0,1,0,1) + table.attach(self.time_slice,2,3,0,1,xoptions=gtk.FILL) + table.attach(b_quit,0,3,2,3) + + self.add(table) + self.show_all() + + def on_quit(self, widget): + print self.time_slice.get_value() + proxy.TIME_SLICE = self.time_slice.get_value() + self.destroy() + + class ProxyGUI(gtk.Window): def __init__(self): super(ProxyGUI, self).__init__(gtk.WINDOW_TOPLEVEL) |