Option to allow multiple instances of WSJT-X to run simultaneously.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3206 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-04-24 15:00:30 +00:00
parent 4ba1f7d932
commit dab1519ad8
3 changed files with 31 additions and 2 deletions

View File

@ -180,6 +180,7 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
m_repeatMsg=0;
m_bRigOpen=false;
m_secBandChanged=0;
m_bMultipleOK=false;
decodeBusy(false);
ui->xThermo->setFillBrush(Qt::green);
@ -187,12 +188,14 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
ui->labDist->setStyleSheet("border: 0px;");
#ifdef WIN32
if(!m_bMultipleOK) {
while(true) {
int iret=killbyname("jt9.exe");
if(iret == 603) break;
if(iret != 0) msgBox("KillByName return code: " +
QString::number(iret));
}
}
#endif
mem_jt9 = shdmem;
@ -395,6 +398,7 @@ void MainWindow::writeSettings()
settings.setValue("73TxDisable",m_73TxDisable);
settings.setValue("Runaway",m_runaway);
settings.setValue("Tx2QSO",m_tx2QSO);
settings.setValue("MultipleOK",m_bMultipleOK);
settings.endGroup();
}
@ -505,6 +509,8 @@ void MainWindow::readSettings()
ui->actionRunaway_Tx_watchdog->setChecked(m_runaway);
m_tx2QSO=settings.value("Tx2QSO",false).toBool();
ui->actionTx2QSO->setChecked(m_tx2QSO);
m_bMultipleOK=settings.value("MultipleOK",false).toBool();
ui->actionAllow_multiple_instances->setChecked(m_bMultipleOK);
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
!ui->actionAFMHot->isChecked() && !ui->actionBlue->isChecked()) {
@ -2614,3 +2620,8 @@ void MainWindow::rigOpen()
delete rig;
}
}
void MainWindow::on_actionAllow_multiple_instances_triggered(bool checked)
{
m_bMultipleOK=checked;
}

View File

@ -153,6 +153,8 @@ private slots:
void killFile();
void on_tuneButton_clicked();
void on_actionAllow_multiple_instances_triggered(bool checked);
private:
Ui::MainWindow *ui;
@ -248,7 +250,7 @@ private:
bool m_tx2QSO;
bool m_tune;
bool m_bRigOpen;
bool m_bMultipleOK;
char m_decoded[80];
float m_pctZap;

View File

@ -2058,6 +2058,12 @@ p, li { white-space: pre-wrap; }
<property name="title">
<string>Setup</string>
</property>
<widget class="QMenu" name="menuAdvanced">
<property name="title">
<string>Advanced</string>
</property>
<addaction name="actionAllow_multiple_instances"/>
</widget>
<addaction name="actionDeviceSetup"/>
<addaction name="separator"/>
<addaction name="actionMonitor_OFF_at_startup"/>
@ -2074,6 +2080,8 @@ p, li { white-space: pre-wrap; }
<addaction name="action_73TxDisable"/>
<addaction name="actionRunaway_Tx_watchdog"/>
<addaction name="actionTx2QSO"/>
<addaction name="separator"/>
<addaction name="menuAdvanced"/>
</widget>
<widget class="QMenu" name="menuView">
<property name="title">
@ -2631,6 +2639,14 @@ p, li { white-space: pre-wrap; }
<string>Tx messages echoed to QSO window</string>
</property>
</action>
<action name="actionAllow_multiple_instances">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Allow multiple instances</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>