#! /usr/bin/env python
# tovidgui

"""A wxPython frontend for the tovid suite.
"""

# tovid GUI
# ===============
# A wxPython frontend for the tovid suite
#
# Project homepage: http://tovid.org/
#
# This software is licensed under the GNU General Public License
# For the full text of the GNU GPL, see:
#
#   http://www.gnu.org/copyleft/gpl.html
#
# No guarantees of any kind are associated with use of this software.


import sys
import traceback

try:
    import wxversion
except ImportError:
    traceback.print_exc()
    print "There was an error importing the 'wx' libraries. The above"
    print "output should help you find what went wrong. Re-installing"
    print "wxPython may"
    print "help. Consult the tovid homepage (tovid.org) for further"
    print "assistance."
    print "Sorry, 'tovidgui' will not work."
    sys.exit()

# Use wx version 2.6 or 2.8
_allowed_versions = [
    '2.6-unicode',
    '2.8-unicode',
    '2.6-gtk-unicode',
    '2.8-gtk-unicode']
try:
    wxversion.select(_allowed_versions)
except wxversion.VersionError:
    print "tovidgui requires wxPython 2.6 or 2.8."
    print "Please install or upgrade wxPython."
    sys.exit()

import wx
from libtovid.gui.frames import TovidFrame

TovidGUI = wx.PySimpleApp()
#frame = MiniEditorFrame(None, wx.ID_ANY, "tovid GUI")
frame = TovidFrame(None, wx.ID_ANY, "tovid GUI")
frame.Show(True)
TovidGUI.MainLoop()
