2017-12-20 Fred Gleason <fredg@paravelsystems.com>

* Cleaned up 'log in use" messages in rdlogedit(1) and
	rdclilogedit(1).
This commit is contained in:
Fred Gleason 2017-12-20 18:31:16 -05:00
parent aec8bba723
commit 0224380581
3 changed files with 14 additions and 9 deletions

View File

@ -16530,3 +16530,6 @@
* Added a 'LOGS.LOCK_GUID' field to the database.
* Incremented the database version to 274.
* Added a 'LockLog' call to the Web API.
2017-12-20 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up 'log in use" messages in rdlogedit(1) and
rdclilogedit(1).

View File

@ -649,10 +649,12 @@ int EditLog::exec()
QHostAddress addr;
if(!edit_log_lock->tryLock(&username,&stationname,&addr)) {
QMessageBox::warning(this,"RDLogEdit - "+tr("Log Locked"),
tr("Log already being edited by")+" "+
username+"@"+stationname+" ["+
addr.toString()+"].");
QString msg=tr("Log already being edited by")+" "+username+"@"+stationname;
if(stationname!=addr.toString()) {
msg+=" ["+addr.toString()+"]";
}
msg+=".";
QMessageBox::warning(this,"RDLogEdit - "+tr("Log Locked"),msg);
return false;
}

View File

@ -153,11 +153,11 @@ bool MainObject::TryLock(RDLogLock *lock,const QString &logname)
ret=lock->tryLock(&username,&stationname,&addr);
if(!ret) {
fprintf(stderr,"log \"%s\" in use by %s@%s [%s]\n",
(const char *)logname,
(const char *)username,
(const char *)stationname,
(const char *)addr.toString());
QString msg="log \""+logname+"\" in use by "+username+"@"+stationname;
if(stationname!=addr.toString()) {
msg+=" ["+addr.toString()+"]";
}
fprintf(stderr,"%s\n",(const char *)msg);
}
return ret;
}