22 lines
481 B
Python
22 lines
481 B
Python
|
# Bryan Schumaker (6 / 18 / 2011)
|
||
|
|
||
|
import gtk
|
||
|
import libsaria
|
||
|
|
||
|
page = gtk.VBox()
|
||
|
text = "Experimental"
|
||
|
|
||
|
def toggled(button, func):
|
||
|
func(button.get_active())
|
||
|
|
||
|
def make_check_button(text, func, active):
|
||
|
button = gtk.CheckButton(text)
|
||
|
button.set_active(active)
|
||
|
button.connect("toggled", toggled, func)
|
||
|
return button
|
||
|
|
||
|
SERVER = make_check_button("Enable web server", libsaria.server.toggle_state, libsaria.server.get_state())
|
||
|
|
||
|
page.pack_start(SERVER, False, False)
|
||
|
page.show_all()
|