/* ****************************************************************************
  This file is part of KBabel

  Copyright (C) 1999-2000 by Matthias Kiefer
                            <matthias.kiefer@gmx.de>
                2001-2003 by Stanislav Visnovsky <visnovsky@kde.org>

  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 of the License, 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

**************************************************************************** */
#include "settings.h"
#include "resources.h"

#include <qstring.h>
#include <kglobal.h>
#include <kglobalsettings.h>
#include <klocale.h>
#include <kconfig.h>
#include <kstandarddirs.h>

namespace Defaults {
const bool CatalogManager::openWindow=false;
const bool CatalogManager::killCmdOnExit=true;
const bool CatalogManager::indexWords=false;

const bool CatalogManager::flagColumn=true;
const bool CatalogManager::fuzzyColumn=true;
const bool CatalogManager::untranslatedColumn=true;
const bool CatalogManager::totalColumn=true;
const bool CatalogManager::cvsColumn=true;
const bool CatalogManager::revisionColumn=true;
const bool CatalogManager::translatorColumn=true;

QString CatalogManager::poBaseDir()
{
   if(_poBaseDir.isNull())
   {
      _poBaseDir="";
   }

   return _poBaseDir;
}


QString CatalogManager::potBaseDir()
{
   if(_potBaseDir.isNull())
   {
      _potBaseDir="";
   }

   return _potBaseDir;
}


QStringList CatalogManager::dirCommands()
{
   QStringList cmds;
   cmds.append("make");
   cmds.append("make install");
   cmds.append("cvs update");

   return cmds;
}

QStringList CatalogManager::dirCommandNames()
{
   QStringList cmds;
   cmds.append(i18n("Make"));
   cmds.append(i18n("Make Install"));

   return cmds;
}

QStringList CatalogManager::fileCommands()
{
   QStringList cmds;

   cmds.append("@PACKAGE@");
   cmds.append("msgfmt -o @PACKAGE@.gmo @PACKAGE@.po");
   cmds.append("cervisia @PODIR@ --resolve @PACKAGE@.po");

   return cmds;
}

QStringList CatalogManager::fileCommandNames()
{
   QStringList cmds;

   cmds.append(i18n("Run Application"));
   cmds.append(i18n("Compile"));
   cmds.append(i18n("Resolve CVS Conflict"));

   return cmds;
}

QString CatalogManager::ignoreURL()
{
    if(_ignoreURL.isEmpty())
    {
	KStandardDirs * dirs = KGlobal::dirs();
	if(dirs)
	{
	    _ignoreURL = dirs->saveLocation("appdata");
	    if(_ignoreURL.right(1)!="/")
	        _ignoreURL+="/";
	    _ignoreURL += "validationignores";
	}
    }
    return _ignoreURL;
}
																		
QString CatalogManager::_poBaseDir=QString::null;
QString CatalogManager::_potBaseDir=QString::null;
QString CatalogManager::_ignoreURL=QString::null;

}
