//=========================================================
//  MusE
//  Linux Music Editor
//  $Id: help.cpp,v 1.1.1.1 2003/10/29 10:05:18 wschweer Exp $
//
//  (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
//=========================================================

#include "app.h"
#include "globals.h"
#include "icons.h"
#include <qmessagebox.h>

#include <unistd.h>

//---------------------------------------------------------
//   startHelpBrowser
//---------------------------------------------------------

void MusE::startHelpBrowser()
      {
      QString lang(getenv("LANG"));
      QString museHelp = museGlobalShare + QString("/html/index_") + lang + QString(".html");
      if (access(museHelp.latin1(), R_OK) != 0) {
	      museHelp = museGlobalShare + QString("/html/index.html");
            if (access(museHelp.latin1(), R_OK) != 0) {
                  QString info(tr("no help found at: "));
                  info += museHelp;
                  QMessageBox::critical(this, tr("MusE: Open Help"), info);
                  return;
                  }
            }
      if (fork() == 0) {
            execlp(helpBrowser.latin1(), helpBrowser.latin1(), museHelp.latin1(), 0);
            }
      }

