added lockfile path info to the multiple-instances warning window in rs-

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4098 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2011-03-16 23:25:57 +00:00
parent 49aad683b1
commit 2dd6581f14
5 changed files with 21 additions and 13 deletions

View file

@ -166,20 +166,23 @@ int main(int argc, char *argv[])
}
// true: note auto-login is active
int retVal = RsInit::LockAndLoadCertificates(true);
std::string lockFile;
int retVal = RsInit::LockAndLoadCertificates(true, lockFile);
switch(retVal)
{
case 0: break;
case 1: QMessageBox::warning( 0,
QObject::tr("Multiple instances"),
QObject::tr("Another RetroShare using the same profile is "
"already running on your system. Please close "
"that instance first") );
"already running on your system. Please close "
"that instance first\n Lock file:\n") +
QString::fromStdString(lockFile));
return 1;
case 2: QMessageBox::critical( 0,
QObject::tr("Multiple instances"),
QObject::tr("An unexpected error occurred when Retroshare"
"tried to acquire the single instance lock") );
"tried to acquire the single instance lock\n Lock file:\n") +
QString::fromStdString(lockFile));
return 1;
case 3: QMessageBox::critical( 0,
QObject::tr("Login Failure"),