#!/usr/bin/python2
# Bryan Schumaker (8/13/2010)

import ocarina
import libsaria
from ocarina import window
from ocarina import body
from ocarina import library
from ocarina import playlist
from ocarina import queue
from ocarina import menu

width  = libsaria.init_pref("ocarina.window.width", 800)
height = libsaria.init_pref("ocarina.window.height", 600)

window.init(width, height)
body.init(window)
window.set_title("%s" % ocarina.__vers__)
window.set_icon("images/ocarina.png")
window.add(body.body)

text = "Pause after current song"
menu.add_common_menu_item(text, libsaria.controls.do_pause_after)

playlist.init()
queue.init()
library.init()

print "Startup took:", ocarina.now() - ocarina.__start__

ocarina.startup()
body.init_page("Library")
ocarina.main()
