# 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")

categories = gtk.Notebook()
settings_page.pack_start(categories, True, True)
settings_page.show_all()

close_button = gtk.Button("Close", gtk.STOCK_CLOSE)
close_button.set_relief(gtk.RELIEF_NONE)
categories.set_action_widget(close_button, gtk.PACK_END)
close_button.show()

def hide_settings(*args):
	body.hide_page(SETTINGS_PAGE)
	body.switch_to_page_n(0)
close_button.connect("clicked", hide_settings)
hide_settings()

def show_settings():
	body.show_page(SETTINGS_PAGE)

def show_page():
	show_settings()
	body.switch_to_page(SETTINGS_PAGE)

def add_category(module):
	label = gtk.Label(module.text)
	label.show()
	categories.append_page(module.page, label)
	module.page.show()

import library
add_category(library)

import experimental
add_category(experimental)
