23 #include "wadseekershow.h" 
   25 #include "configuration/doomseekerconfig.h" 
   26 #include "gui/mainwindow.h" 
   27 #include "gui/wadseekerinterface.h" 
   28 #include "serverapi/server.h" 
   29 #include "application.h" 
   33 #include <QMessageBox> 
   47 bool WadseekerShow::checkWadseekerValidity(QWidget *parent)
 
   49         if (WadseekerInterface::isInstantiated())
 
   51                 QMessageBox::warning(parent, tr(
"Wadseeker cannot be launched"),
 
   52                         tr(
"Another instance of Wadseeker is already running."), QMessageBox::Ok);
 
   56         QString targetDirPath = gConfig.wadseeker.targetDirectory;
 
   57         QDir targetDir(targetDirPath);
 
   58         QFileInfo targetDirFileInfo(targetDirPath);
 
   60         if (targetDirPath.isEmpty() || !targetDir.exists() || !targetDirFileInfo.isWritable())
 
   62                 QString error = tr(
"Wadseeker will not work correctly:\n\n" 
   63                                 "Target directory is either not set, is invalid or cannot be written to.\n\n" 
   64                                 "Please review your Configuration and/or refer to online help available from " 
   66                 QMessageBox::warning(parent, tr(
"Wadseeker cannot be launched"),
 
   67                         error, QMessageBox::Ok);
 
   76         if (staticInstance == NULL)
 
   80         return staticInstance;