diff --git a/ChangeLog b/ChangeLog index 18138cbf..6d31f332 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,10 @@ 3.5.4git -TODO Move Central Server Address Dropdown to Connection Setup (#157) +- support intermediate Reaper RPP file while recording, coded by pljones (Ticket #170) + +- duplicate Central Server type dropdown to Connection Setup (#157) + TODO Keep lrelease? Does it work as expected? diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 0f7b229b..25fef754 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -39,7 +39,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP, bConnectDlgWasShown ( false ), ClientSettingsDlg ( pNCliP, parent, Qt::Window ), ChatDlg ( parent, Qt::Window ), - ConnectDlg ( bNewShowComplRegConnList, parent, Qt::Dialog ), + ConnectDlg ( pNCliP, bNewShowComplRegConnList, parent, Qt::Dialog ), AnalyzerConsole ( pNCliP, parent, Qt::Window ), MusicianProfileDlg ( pNCliP, parent ) { diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index 47b02780..e59cb3a7 100755 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -443,6 +443,10 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, SIGNAL ( buttonClicked ( QAbstractButton* ) ), this, SLOT ( OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* ) ) ); + QObject::connect ( pClient, + SIGNAL ( CentralServerAddressTypeChanged() ), + this, SLOT ( OnCentralServerAddressTypeChanged() ) ); + // Timers ------------------------------------------------------------------ // start timer for status bar @@ -583,6 +587,13 @@ void CClientSettingsDlg::UpdateCentralServerDependency() { const bool bCurUseDefCentServAddr = ( pClient->GetCentralServerAddressType() != AT_MANUAL ); + // update server type combo box (because the value may have ben changed + // by a control in another dialog, e.g., the connect dialog), + // since it is just an update, do not fire signals for the update + cbxCentServAddrType->blockSignals ( true ); + cbxCentServAddrType->setCurrentIndex ( static_cast ( pClient->GetCentralServerAddressType() ) ); + cbxCentServAddrType->blockSignals ( false ); + // make sure the line edit does not fire signals when we update the text edtCentralServerAddress->blockSignals ( true ); { diff --git a/src/clientsettingsdlg.h b/src/clientsettingsdlg.h index 330c44b3..5d199a7e 100755 --- a/src/clientsettingsdlg.h +++ b/src/clientsettingsdlg.h @@ -102,6 +102,7 @@ protected: void OnAudioChannelsActivated ( int iChanIdx ); void OnAudioQualityActivated ( int iQualityIdx ); void OnCentServAddrTypeActivated ( int iTypeIdx ); + void OnCentralServerAddressTypeChanged() { UpdateCentralServerDependency(); } void OnDriverSetupClicked(); signals: diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 4d96aee5..06fc74e2 100755 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -26,10 +26,12 @@ /* Implementation *************************************************************/ -CConnectDlg::CConnectDlg ( const bool bNewShowCompleteRegList, - QWidget* parent, +CConnectDlg::CConnectDlg ( CClient* pNCliP, + const bool bNewShowCompleteRegList, + QWidget* parent, Qt::WindowFlags f ) : QDialog ( parent, f ), + pClient ( pNCliP ), strCentralServerAddress ( "" ), strSelectedAddress ( "" ), strSelectedServerName ( "" ), @@ -74,6 +76,12 @@ CConnectDlg::CConnectDlg ( const bool bNewShowCompleteRegList, cbxServerAddr->setAccessibleDescription ( tr ( "Holds the current server " "IP address or URL. It also stores old URLs in the combo box list." ) ); + // central server address type combo box + cbxCentServAddrType->clear(); + cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_MANUAL ) ); + cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_DEFAULT ) ); + cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENERAL_NORTHAMERICA ) ); + // filter edtFilter->setWhatsThis ( "" + tr ( "Filter" ) + ": " + tr ( "The server " "list is filtered by the given text. Note that the filter is case insensitive." ) ); @@ -162,6 +170,9 @@ CConnectDlg::CConnectDlg ( const bool bNewShowCompleteRegList, QObject::connect ( cbxServerAddr, SIGNAL ( editTextChanged ( const QString& ) ), this, SLOT ( OnServerAddrEditTextChanged ( const QString& ) ) ); + QObject::connect ( cbxCentServAddrType, SIGNAL ( activated ( int ) ), + this, SLOT ( OnCentServAddrTypeChanged ( int ) ) ); + // check boxes QObject::connect ( chbExpandAll, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnExpandAllStateChanged ( int ) ) ); @@ -220,6 +231,11 @@ void CConnectDlg::RequestServerList() // clear filter edit box edtFilter->setText ( "" ); + // update list combo box (disable events to avoid a signal) + cbxCentServAddrType->blockSignals ( true ); + cbxCentServAddrType->setCurrentIndex ( static_cast ( pClient->GetCentralServerAddressType() ) ); + cbxCentServAddrType->blockSignals ( false ); + // get the IP address of the central server (using the ParseNetworAddress // function) when the connect dialog is opened, this seems to be the correct // time to do it diff --git a/src/connectdlg.h b/src/connectdlg.h index 14aef15f..ae6442c8 100755 --- a/src/connectdlg.h +++ b/src/connectdlg.h @@ -47,8 +47,9 @@ class CConnectDlg : public QDialog, private Ui_CConnectDlgBase Q_OBJECT public: - CConnectDlg ( const bool bNewShowCompleteRegList, - QWidget* parent = nullptr, + CConnectDlg ( CClient* pNCliP, + const bool bNewShowCompleteRegList, + QWidget* parent = nullptr, Qt::WindowFlags f = nullptr ); void Init ( const CVector& vstrIPAddresses ); @@ -88,6 +89,8 @@ protected: void UpdateListFilter(); void ShowAllMusicians ( const bool bState ); + CClient* pClient; + QTimer TimerPing; QTimer TimerReRequestServList; QString strCentralServerAddress; @@ -104,6 +107,7 @@ public slots: void OnServerListItemSelectionChanged(); void OnServerListItemDoubleClicked ( QTreeWidgetItem* Item, int ); void OnServerAddrEditTextChanged ( const QString& ); + void OnCentServAddrTypeChanged ( int iTypeIdx ) { pClient->SetCentralServerAddressType ( static_cast ( iTypeIdx ) ); } void OnFilterTextEdited ( const QString& ) { UpdateListFilter(); } void OnExpandAllStateChanged ( int value ) { ShowAllMusicians ( value == Qt::Checked ); } void OnConnectClicked(); diff --git a/src/connectdlgbase.ui b/src/connectdlgbase.ui index 7eaf1112..5f0a820a 100755 --- a/src/connectdlgbase.ui +++ b/src/connectdlgbase.ui @@ -29,6 +29,16 @@ 0 + + + + List + + + + + +