/* 
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Peter Hofer <ph@desktopbsd.net>
 *         (C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#include <err.h>

#include <kaboutdata.h>
#include <qtimer.h>
#include <kcmdlineargs.h>
#include <kuniqueapplication.h>

#include <nettray.h>
#include <translation.h>
#include <dbsdglobal.h>
#include <dbsdkiconloader.h>


int  main(int argc, char *argv[]) {
   KAboutData  about("dbsd-nettray", "Network Control", "", NULL, KAboutData::License_BSD);
   KCmdLineArgs::init(argc, argv, &about);
   KUniqueApplication::addCmdLineOptions();
   if(!KUniqueApplication::start())
   	errx(0, "already running.");

	DBSDKIconLoader  iconLoader;
	DBSDGlobal::setIconLoader(&iconLoader);

	KUniqueApplication  a;

	Translation::installTranslator();

	NetworkTray  tray;
	a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));

	tray.show();
	return  a.exec();
}
