mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-12-01 14:20:11 +01:00
2022-12-30 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDLIBRARY.IS_SINGLETON' field to the database. * Added a 'RDLOGEDIT.IS_SINGLETON' field to the database. * Incremented the database version to 367. * Added 'RDLibraryConf::isSingleton()' and 'RDLibraryConf::setIsSingleton()' methods. * Added 'RDLogeditConf::isSingleton()' and 'RDLogeditConf::setIsSingleton()' methods. * Modified rdcartslots(1), rdcastmanager(1), rdcatch(1), rdlogmanager(1) and rdpanel(1) to allow only a single instance to run at a time. * Modified rdlibrary(1) and rdlogedit(1) to conditionally allow only a single instance to run at a time. * Added an rdsinglestart(1) utility. * Added a 'wmctrl' dependency to the 'rivendell' RPM package. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -45,8 +45,9 @@ int RunReportOperation(int argc,char *argv[],const QString &rptname,
|
||||
return 256;
|
||||
}
|
||||
|
||||
rda=static_cast<RDApplication *>(new RDCoreApplication("RDLogManager","rdlogmanager",RDLOGMANAGER_USAGE));
|
||||
if(!rda->open(&err_msg)) {
|
||||
rda=static_cast<RDApplication *>(new RDCoreApplication("RDLogManager",
|
||||
"rdlogmanager",RDLOGMANAGER_USAGE));
|
||||
if(!rda->open(&err_msg,NULL,true)) {
|
||||
fprintf(stderr,"rdlogmanager: %s\n",err_msg.toUtf8().constData());
|
||||
exit(RDApplication::ExitNoDb);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ LogObject::LogObject(const QString &svcname,int start_offset,
|
||||
// Open the Database
|
||||
//
|
||||
rda=static_cast<RDApplication *>(new RDCoreApplication("RDLogManager","rdlogmanager",""));
|
||||
if(!rda->open(&err_msg)) {
|
||||
if(!rda->open(&err_msg,NULL,false)) {
|
||||
fprintf(stderr,"rdlogmanager: %s\n",err_msg.toUtf8().constData());
|
||||
exit(RDApplication::ExitNoDb);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
// Open the Database
|
||||
//
|
||||
rda=new RDApplication("RDLogManager","rdlogmanager",RDLOGMANAGER_USAGE,this);
|
||||
if(!rda->open(&err_msg)) {
|
||||
if(!rda->open(&err_msg,NULL,true)) {
|
||||
QMessageBox::critical(this,"RDLogManager - "+tr("Error"),err_msg);
|
||||
exit(RDApplication::ExitNoDb);
|
||||
}
|
||||
@@ -61,6 +61,15 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
applicationIcon(RDIconEngine::RdLogManager,22));
|
||||
setWindowTitle(tr("RDLogManager"));
|
||||
|
||||
//
|
||||
// Ensure that we're the only instance
|
||||
//
|
||||
if(!rda->makeSingleInstance(&err_msg)) {
|
||||
QMessageBox::critical(this,"RDLogManager - "+tr("Error"),
|
||||
tr("Startup error")+": "+err_msg+".");
|
||||
exit(RDCoreApplication::ExitPriorInstance);
|
||||
}
|
||||
|
||||
//
|
||||
// CAE Connection
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user