//////////////////////////////////////////////////////////////
//      $Id: utils.cpp,v 1.11.10.1 2003/04/18 08:07:07 lukas Exp $
//
// Author: Toivo Pedaste
//
#include "../config.h"
#include <kpackage.h>
#include <kmessagebox.h>
#include <klocale.h>

#include "utils.h"
#include "kplview.h"

void KpMsgE( QString msg, bool stop)
{
 KpMsg( i18n("Error"), msg,  stop);
}

void KpMsg(QString lab, QString msg, bool stop)
{
  if (stop)
    KMessageBox::sorry(kpkg, msg, lab);
  else
    KMessageBox::information(kpkg, msg, lab);
}

KPLVItem *findGroup(QString name, KPLVItem *search)
{
  if(!search)
    return NULL;

  do {
    if (name == search->text(0)) {
      return search;
    }
  } while( (search=search->nextSibling()) != NULL);

  return NULL;
}



