Skip to content

Commit

Permalink
Wrap a few more message boxen with isInteractive() check
Browse files Browse the repository at this point in the history
  • Loading branch information
rocketman768 committed Apr 10, 2016
1 parent b8f4604 commit c4f28ad
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/brewtarget.cpp
Expand Up @@ -131,11 +131,13 @@ bool Brewtarget::createDir(QDir dir, QString errText)

logW(errText.arg(dir.path()));

QMessageBox::information(
0,
errTitle,
errText.arg(dir.path())
);
if (Brewtarget::isInteractive()) {
QMessageBox::information(
0,
errTitle,
errText.arg(dir.path())
);
}
return false;
}

Expand All @@ -156,11 +158,13 @@ bool Brewtarget::ensureDirectoriesExist()
QString errMsg = QString(QObject::tr("Data directory \"%1\" is missing. Some features will be unavaliable.")).arg(dataDir.path());
logE(errMsg);

QMessageBox::critical(
0,
QObject::tr("Directory Problem"),
errMsg
);
if (Brewtarget::isInteractive()) {
QMessageBox::critical(
0,
QObject::tr("Directory Problem"),
errMsg
);
}
}


Expand Down

0 comments on commit c4f28ad

Please sign in to comment.