#!/usr/bin/env python
# Copyright (C) 2009 Roberto Majadas, Cesar Garcia, Luis de Bethencourt
# <openshine.com>
#
# 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, 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 Street, Fifth Floor, Boston, MA  02110-1301
# USA

import os
import sys
import gtk
import gettext
import __builtin__

if os.name == "nt" :
    if not hasattr(sys, "frozen") :
        root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
        nanny_lib_path = os.path.join(root_path, "lib", "python2.6", "site-packages")
        sys.path.append(nanny_lib_path)
    else:
        sys.stdout = open(os.devnull, 'w')
        sys.stderr = open(os.devnull, 'w')

import nanny.client.gnome.systray

#parser = OptionParser()
#parser.add_option("-p", "--pid-file", dest="pid_file", help="pid File", metavar="PID_FILE")
#parser.add_option("--no-daemon",action="store_false", dest="daemon", default=True, help="Don't create daemon")
#(options, args) = parser.parse_args()

__builtin__._ = gettext.gettext

nanny_systray = nanny.client.gnome.systray.SystrayNanny()
gtk.main()
