/*
 * 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 <terminaldisplay.h>
#include <terminalformatter.h>
#include <qcolor.h>

#include <pkgconstants.h>

#include <portsupdateformatter.h>

PortsUpdateFormatter::PortsUpdateFormatter(TerminalDisplay *d, const char *name)
	:	TerminalFormatter(d, name)
{
}

QColor PortsUpdateFormatter::format(const QString &str) {
	if(str.startsWith(" Checkout"))
		return QColor(0x4f, 0x94, 0x1e);
	else if(str.startsWith(" Delete"))
		return QColor(0xa0, 0xa0, 0xa0);
	else if(str.startsWith(" Edit") || str.startsWith(PORTS_DIRECTORY))
		return QColor(0x1a, 0x44, 0x72);

	return QColor(0, 0, 0);
}
