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.
This commit is contained in:
Bryan Schumaker 2011-06-18 14:10:05 -04:00
parent f87f5f25cf
commit d9f89e0ecd
2 changed files with 24 additions and 0 deletions

View File

@ -39,3 +39,6 @@ def add_category(module):
import library
add_category(library)
import experimental
add_category(experimental)

View File

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