#!/usr/bin/env python
# -*- python -*-
# Copyright (C) 2010 The Fuss Project - http://www.fuss.bz.it/
#
# Authors: Christopher R. Gabriel <cgabriel@truelite.it>
#
# Xapian Indexing code by Enrico Zini <enrico@truelite.it>
#
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# This file is distributed without any warranty; without even the implied
# warranty of merchantability or fitness for a particular purpose.
# See "COPYING" in the source distribution for more information.
#

import os, os.path
import sys
import gettext
_ = gettext.gettext

if __name__ == "__main__":
    from fusslauncher import cmdline
    import fusslauncher.conf as conf

    parser = cmdline.Parser(usage="usage: %prog [options]",
                    description="Fuss application launcher applet")
    parser.add_option("-q", "--quiet", action="store_true", help="quiet mode: only output fatal errors")
    parser.add_option("-v", "--verbose", action="store_true", help="verbose mode")
    parser.add_option("-d", "--debug", action="store_true", help="debug mode")
    (opts, args) = parser.parse_args()

    gettext.bindtextdomain(conf.GETTEXT_PACKAGE)
    gettext.textdomain(conf.GETTEXT_PACKAGE)

    if opts.debug:
        import fusslauncher.engine
        fusslauncher.engine.debug = True

    from fusslauncher import ui
    ui.run_launcher(opts)
