ocarina: Added library category to settings

I'll eventually use this for controlling the library.  Right now it's
just an empty page.
This commit is contained in:
Bryan Schumaker 2011-06-18 10:47:00 -04:00
parent 381b72aea4
commit f09f80cd65
2 changed files with 21 additions and 2 deletions

View File

@ -9,10 +9,14 @@ 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)
categories = gtk.Notebook()
settings_page.pack_start(categories, True, True)
settings_page.show_all()
close_button = gtk.Button("Close", gtk.STOCK_CLOSE)
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)
@ -24,3 +28,12 @@ def show_settings():
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)

View File

@ -0,0 +1,6 @@
# Bryan Schumaker (6 / 18 / 2011)
import gtk
page = gtk.VBox()
text = "Library"