ocarina/ocarina/settings/experimental.py
Bryan Schumaker d9f89e0ecd ocarina: Add experimental settings page
Right now it just contains a checkbox for running the server.  It should
probably contain some kind of warning text, and eventually other
settings.
2011-06-18 14:10:05 -04:00

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()