#Boa:App:BoaApp
#TunaPie (c)2005-2008 James Stone. Released under the GNU GPL.
#
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
#Written using Boa-Constructor.
#http://boa-constructor.sourceforge.net/
#
#Version 2.1 04/09/07

import wxversion
wxversion.ensureMinimal("2.6")
import wx
import tunapie2_main
import os
import sys

modules ={u'tunapie2_main': [1, 'Main frame of Application', u'tunapie2_main.py']}

class BoaApp(wx.App):
    def OnInit(self):
        path=sys.argv[0][:sys.argv[0].find('Tunapie.py')]
        try: os.chdir(path)
        except OSError: pass
        wx.InitAllImageHandlers()
        self.main = tunapie2_main.create(None)
        self.main.Show()
        self.SetTopWindow(self.main)
        return True

def main():
    application = BoaApp(0)
    application.MainLoop()

if __name__ == '__main__':
    main()
