#!/usr/local/bin/python2.7
#
#
# Copyright (C) Bellegarde Cedric 2008 <gnumdk@gmail.com>
# 
# main.py 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 3 of the License, or
# (at your option) any later version.
# 
# main.py 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, see <http://www.gnu.org/licenses/>.

################################################################################

from mpdBrowser import mpdBrowserBase
from mpdBrowser import mpdBrowserIPC
import sys
import gobject

if __name__ == "__main__":
 
    try:
        mpdBrowserIPC.mpdBrowserIPC_C("start")
        print "mpdBrowser already started, raise it..."
    except:
        gobject.threads_init ()
        app = mpdBrowserBase.mpdBrowserBase()
        try:
            app.main ()
        except:
            print sys.exc_info()
            app.stopThreads()
