diff --git a/ChangeLog b/ChangeLog index 88179664..6254d292 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,10 @@ 3.3.10 +- changed the default central server URL + - added support for server disconnection - - 3.3.9 - another improvement of auto jitter buffer detection in very bad diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 985130db..11593034 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -629,7 +629,7 @@ void CClientDlg::OnAudioPanValueChanged ( int value ) void CClientDlg::OnConnectDlgAccepted() { // get the address from the connect dialog - const QString strSelectedAddress = ConnectDlg.GetSelectedAddress(); + QString strSelectedAddress = ConnectDlg.GetSelectedAddress(); // only store new host address in our data base if the address is // not empty and it was not a server list item (only the addresses @@ -657,6 +657,16 @@ void CClientDlg::OnConnectDlgAccepted() // just show the address string as it was entered by the // user strMixerBoardLabel = strSelectedAddress; + + // special case: if the address is empty, we substitude the default + // central server address so that a user which just pressed the connect + // button without selecting an item in the table or manually entered an + // address gets a successful connection + if ( strSelectedAddress.isEmpty() ) + { + strSelectedAddress = DEFAULT_SERVER_ADDRESS; + strMixerBoardLabel = DEFAULT_SERVER_NAME; + } } // first check if we are already connected, if this is the case we have to diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index 2ff5fbe7..4a340f3e 100755 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -548,14 +548,21 @@ void CClientSettingsDlg::UpdateCentralServerDependency() const bool bCurUseDefCentServAddr = pClient->GetUseDefaultCentralServerAddress(); - // If the default central server address is enabled, the line edit shows - // the default server and is not editable. Make sure the line edit does not - // fire signals when we update the text. + // make sure the line edit does not fire signals when we update the text edtCentralServerAddress->blockSignals ( true ); { - edtCentralServerAddress->setText ( - SELECT_SERVER_ADDRESS ( bCurUseDefCentServAddr, - pClient->GetServerListCentralServerAddress() ) ); + if ( bCurUseDefCentServAddr ) + { + // if the default central server is used, just show a text of the + // server name + edtCentralServerAddress->setText ( DEFAULT_SERVER_NAME ); + } + else + { + // show the current user defined server address + edtCentralServerAddress->setText ( + pClient->GetServerListCentralServerAddress() ); + } } edtCentralServerAddress->blockSignals ( false ); diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 658602e6..726d5095 100755 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -57,8 +57,8 @@ CConnectDlg::CConnectDlg ( const bool bNewShowCompleteRegList, QString strServAddrH = tr ( "Server Address: The IP address or URL " "of the server running the " ) + APP_NAME + tr ( " server software " "must be set here. An optional port number can be added after the IP " - "address or URL using a comma as a separator, e.g, " ) + - DEFAULT_SERVER_ADDRESS + ":" + + "address or URL using a comma as a separator, e.g, " + "example.org:" ) + QString().setNum ( LLCON_DEFAULT_PORT_NUMBER ) + tr ( ". A list of " "the most recent used server IP addresses or URLs is available for " "selection." ); @@ -143,6 +143,7 @@ void CConnectDlg::Init ( const QString strNewCentralServerAddr, // load stored IP addresses in combo box cbxServerAddr->clear(); + cbxServerAddr->clearEditText(); for ( int iLEIdx = 0; iLEIdx < MAX_NUM_SERVER_ADDR_ITEMS; iLEIdx++ ) { diff --git a/src/global.h b/src/global.h index b2785c77..e66b0cdf 100755 --- a/src/global.h +++ b/src/global.h @@ -90,7 +90,8 @@ LED bar: lbr #define DEFAULT_LOG_FILE_NAME "Jamulussrvlog.txt" // default server address -#define DEFAULT_SERVER_ADDRESS "jamulus.dyndns.org" +#define DEFAULT_SERVER_ADDRESS "jamulus.fischvolk.de" +#define DEFAULT_SERVER_NAME "Central Server" #define SELECT_SERVER_ADDRESS(a, b) ((a) ? (DEFAULT_SERVER_ADDRESS) : (b)) // download URL diff --git a/src/serverdlg.cpp b/src/serverdlg.cpp index 001be8e4..0246d44f 100755 --- a/src/serverdlg.cpp +++ b/src/serverdlg.cpp @@ -493,14 +493,21 @@ void CServerDlg::UpdateGUIDependencies() chbDefaultCentralServer->setEnabled ( bCurSerListEnabled ); grbServerInfo->setEnabled ( bCurSerListEnabled ); - // If the default central server address is enabled, the line edit shows - // the default server and is not editable. Make sure the line edit does not - // fire signals when we update the text. + // make sure the line edit does not fire signals when we update the text edtCentralServerAddress->blockSignals ( true ); { - edtCentralServerAddress->setText ( - SELECT_SERVER_ADDRESS ( bCurUseDefCentServAddr, - pServer->GetServerListCentralServerAddress() ) ); + if ( bCurUseDefCentServAddr ) + { + // if the default central server is used, just show a text of the + // server name + edtCentralServerAddress->setText ( DEFAULT_SERVER_NAME ); + } + else + { + // show the current user defined server address + edtCentralServerAddress->setText ( + pServer->GetServerListCentralServerAddress() ); + } } edtCentralServerAddress->blockSignals ( false ); diff --git a/src/settings.cpp b/src/settings.cpp index 14214916..3d6dcc30 100755 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -53,17 +53,9 @@ void CSettings::Load() // IP addresses for ( iIdx = 0; iIdx < MAX_NUM_SERVER_ADDR_ITEMS; iIdx++ ) { - QString sDefaultIP = ""; - - // use default only for first entry - if ( iIdx == 0 ) - { - sDefaultIP = DEFAULT_SERVER_ADDRESS; - } - pClient->vstrIPAddress[iIdx] = GetIniSetting ( IniXMLDocument, "client", - QString ( "ipaddress%1" ).arg ( iIdx ), sDefaultIP ); + QString ( "ipaddress%1" ).arg ( iIdx ), "" ); } // stored fader tags