Skip to content

Commit

Permalink
Modified messageboxes to use the new CMsgBoxes class
Browse files Browse the repository at this point in the history
  • Loading branch information
pgScorpio committed Mar 28, 2022
1 parent 44b1daf commit 803159e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
42 changes: 40 additions & 2 deletions src/clientdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1183,8 +1183,46 @@ void CClientDlg::OnConnect ( QString strServerName )
// audio feedback detection
if ( pSettings->bEnableFeedbackDetection )
{
TimerDetectFeedback.start ( DETECT_FEEDBACK_TIME_MS ); // single shot timer
bDetectFeedback = true;
// try to start client, if error occurred, do not go in
// running state but show error message
try
{
if ( !pClient->IsRunning() )
{
pClient->Start();
}
}

catch ( const CGenErr& generr )
{
// show error message and return the function
CMsgBoxes::ShowError ( generr.GetErrorText() );
return;
}

// hide label connect to server
lblConnectToServer->hide();
lbrInputLevelL->setEnabled ( true );
lbrInputLevelR->setEnabled ( true );

// change connect button text to "disconnect"
butConnect->setText ( tr ( "&Disconnect" ) );

// set server name in audio mixer group box title
MainMixerBoard->SetServerName ( strMixerBoardLabel );

// start timer for level meter bar and ping time measurement
TimerSigMet.start ( LEVELMETER_UPDATE_TIME_MS );
TimerBuffersLED.start ( BUFFER_LED_UPDATE_TIME_MS );
TimerPing.start ( PING_UPDATE_TIME_MS );
TimerCheckAudioDeviceOk.start ( CHECK_AUDIO_DEV_OK_TIME_MS ); // is single shot timer

// audio feedback detection
if ( pSettings->bEnableFeedbackDetection )
{
TimerDetectFeedback.start ( DETECT_FEEDBACK_TIME_MS ); // single shot timer
bDetectFeedback = true;
}
}
}

Expand Down
1 change: 0 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ char** CCommandlineOptions::appArgv = NULL;
QDialog* CMsgBoxes::pMainForm = NULL;
QString CMsgBoxes::strMainFormName = APP_NAME;


QString UsageArguments ( char** argv )
{
// clang-format off
Expand Down

0 comments on commit 803159e

Please sign in to comment.