2023-01-30 Fred Gleason <fredg@paravelsystems.com>

* Removed the 'single instance' requirement from all modules.
	* Removed the 'Allow Multiple Instances' dropdown from the
	'Configure RDLibrary' dialog in rdadmin(1).
	* Removed the 'Allow Multiple Instances' dropdown from the
	'Configure RDLogEdit' dialog in rdadmin(1).
	* Removed the wmctrl(1) dependency from the 'rivendell' DEB package.
	* Removed the wmctrl(1) dependency from the 'rivendell' RPM package.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2023-01-30 15:12:42 -05:00
parent 43692497cb
commit 822fb1de92
19 changed files with 25 additions and 190 deletions

View File

@@ -2,7 +2,7 @@
//
// Base GUI Application Class
//
// (C) Copyright 2021-2022 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2021-2023 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -38,56 +38,6 @@ RDApplication::~RDApplication()
}
bool RDApplication::makeSingleInstance(QString *err_msg)
{
//
// If we're already running, then just raise the window.
//
QStringList args;
args.clear();
args.push_back("-l");
QProcess *proc=new QProcess(this);
proc->start("wmctrl",args);
proc->waitForFinished();
if(proc->exitStatus()!=QProcess::NormalExit) {
*err_msg=tr("wmctrl(1) process crashed");
delete proc;
return false;
}
if(proc->exitCode()!=0) {
QString errs=QString::fromUtf8(proc->readAllStandardError());
if(errs.isEmpty()) {
*err_msg=tr("wmctrl(1) not found\n");
}
else {
*err_msg=QString::asprintf("wmctrl(1) process returned error [%s]",
errs.toUtf8().constData());
}
delete proc;
return false;
}
bool found=false;
QStringList f0=QString::fromUtf8(proc->readAllStandardOutput()).
split("\n",QString::SkipEmptyParts);
for(int i=0;i<f0.size();i++) {
QStringList f1=f0.at(i).split(" ",QString::SkipEmptyParts);
if(f1.size()>=6) {
if((f1.at(3).trimmed().toLower()==commandName())&&
(f1.at(4)==(QString("v")+VERSION))&&
(f1.at(5)=="-")) {
Raise(f1.at(0));
found=true;
}
}
}
delete proc;
if(found) {
exit(0);
}
return true;
}
RDIconEngine *RDApplication::iconEngine() const
{
return app_icon_engine;

View File

@@ -31,7 +31,6 @@ class RDApplication : public RDCoreApplication
RDApplication(const QString &module_name,const QString &cmdname,
const QString &usage,QObject *parent);
~RDApplication();
bool makeSingleInstance(QString *err_msg);
RDIconEngine *iconEngine() const;
static QString locale();