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:
parent
f87f5f25cf
commit
d9f89e0ecd
|
@ -39,3 +39,6 @@ def add_category(module):
|
||||||
|
|
||||||
import library
|
import library
|
||||||
add_category(library)
|
add_category(library)
|
||||||
|
|
||||||
|
import experimental
|
||||||
|
add_category(experimental)
|
||||||
|
|
|
@ -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()
|
Loading…
Reference in New Issue