ocarina: Show and hide settings page
I don't have any settings here yet, but it's coming. For now, it's good enough to be able to open and close a tab.
This commit is contained in:
parent
a8aef66696
commit
381b72aea4
|
@ -1,5 +1,26 @@
|
||||||
# Bryan Schumaker (6 / 18 / 2011)
|
# Bryan Schumaker (6 / 18 / 2011)
|
||||||
|
|
||||||
|
import gtk
|
||||||
|
|
||||||
|
from ocarina import sources
|
||||||
|
from ocarina import body
|
||||||
|
|
||||||
|
settings_page = gtk.VBox()
|
||||||
|
settings_page.show()
|
||||||
|
SETTINGS_PAGE = body.add_page(settings_page, "Settings")
|
||||||
|
|
||||||
|
close_button = gtk.Button("Close", gtk.STOCK_CLOSE)
|
||||||
|
settings_page.pack_start(close_button, False, False)
|
||||||
|
settings_page.show_all()
|
||||||
|
|
||||||
|
def hide_settings(*args):
|
||||||
|
body.hide_page(SETTINGS_PAGE)
|
||||||
|
body.switch_to_page_n(0)
|
||||||
|
close_button.connect("clicked", hide_settings)
|
||||||
|
|
||||||
|
def show_settings():
|
||||||
|
body.show_page(SETTINGS_PAGE)
|
||||||
|
|
||||||
def show_page():
|
def show_page():
|
||||||
print "Showing settings page!"
|
show_settings()
|
||||||
|
body.switch_to_page(SETTINGS_PAGE)
|
||||||
|
|
Loading…
Reference in New Issue