ocarina: General settings page
The settings will be shown in a notebook, with a tabbed interface. This patch adds a "general" page for basic settings.
This commit is contained in:
parent
471db697e9
commit
847b51908a
|
@ -1,13 +1,26 @@
|
|||
# Bryan Schumaker (1 / 22 / 2010)
|
||||
# Bryan Schumaker (1 / 22 / 2011)
|
||||
|
||||
import ocarina
|
||||
gtk = ocarina.gtk
|
||||
|
||||
window = None
|
||||
pages = None
|
||||
|
||||
def create_window():
|
||||
global window
|
||||
global pages
|
||||
import general
|
||||
|
||||
window = gtk.Window()
|
||||
pages = gtk.Notebook()
|
||||
window.set_title("Settings")
|
||||
window.add(pages)
|
||||
window.resize(400, 300)
|
||||
pages.show()
|
||||
|
||||
pages.append_page(general.get_page(), gtk.Label("General"))
|
||||
|
||||
def configure():
|
||||
global window
|
||||
if window == None:
|
||||
window = gtk.Window()
|
||||
window.set_title("Settings")
|
||||
create_window()
|
||||
window.show()
|
||||
|
|
9
ocarina/settings/general.py
Normal file
9
ocarina/settings/general.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Bryan Schumaker (1 / 22 / 2011)
|
||||
|
||||
import ocarina
|
||||
gtk = ocarina.gtk
|
||||
|
||||
def get_page():
|
||||
page = gtk.Label("General settings")
|
||||
page.show()
|
||||
return page
|
Loading…
Reference in New Issue
Block a user