some central server address clean up

This commit is contained in:
Volker Fischer 2020-05-16 11:24:50 +02:00
parent be9f396b0d
commit 6977a17156
13 changed files with 192 additions and 114 deletions

View file

@ -1,7 +1,12 @@
3.5.4git
TODO server list split on query
TODO Your Mix at Server (Ticket #187)
TODO Move Central Server Address Dropdown to Connection Setup (#157)
TODO Keep lrelease? Does it work as expected?

View file

@ -700,7 +700,7 @@ void CClientDlg::OnConnectDlgAccepted()
if ( strSelectedAddress.isEmpty() )
{
strSelectedAddress = DEFAULT_SERVER_ADDRESS;
strMixerBoardLabel = DEFAULT_SERVER_NAME;
strMixerBoardLabel = tr ( "Central Server" );
}
}

View file

@ -346,9 +346,9 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
// central server address type combo box
cbxCentServAddrType->clear();
cbxCentServAddrType->addItem ( tr ( "Manual" ) ); // AT_MANUAL
cbxCentServAddrType->addItem ( tr ( "Default" ) ); // AT_DEFAULT
cbxCentServAddrType->addItem ( tr ( "Default (North America)" ) ); // AT_NORTH_AMERICA
cbxCentServAddrType->addItem ( csAddTypeToString ( AT_MANUAL ) );
cbxCentServAddrType->addItem ( csAddTypeToString ( AT_DEFAULT ) );
cbxCentServAddrType->addItem ( csAddTypeToString ( AT_GENERAL_NORTHAMERICA ) );
cbxCentServAddrType->setCurrentIndex ( static_cast<int> ( pClient->GetCentralServerAddressType() ) );
UpdateCentralServerDependency();
@ -590,7 +590,7 @@ void CClientSettingsDlg::UpdateCentralServerDependency()
{
// if the default central server is used, just show a text of the
// server name
edtCentralServerAddress->setText ( DEFAULT_SERVER_NAME );
edtCentralServerAddress->setText ( tr ( "Predefined Address" ) );
}
else
{

View file

@ -101,9 +101,10 @@ LED bar: lbr
#define SYSTEM_FRAME_SIZE_SAMPLES 64
#define DOUBLE_SYSTEM_FRAME_SIZE_SAMPLES ( 2 * SYSTEM_FRAME_SIZE_SAMPLES )
// default server address
// default server address and port numbers
#define DEFAULT_SERVER_ADDRESS "jamulus.fischvolk.de"
#define DEFAULT_SERVER_NAME "Central Server"
#define DEFAULT_PORT_NUMBER 22124
#define CENTSERV_GENERAL_NORTHAMERICA "jamulus.fischvolk.de:22224"
// getting started and software manual URL
#define CLIENT_GETTING_STARTED_URL "https://github.com/corrados/jamulus/wiki/Software-Manual"
@ -116,10 +117,6 @@ LED bar: lbr
#define WELL_KNOWN_PORT 53 // DNS
#define IP_LOOKUP_TIMEOUT 500 // ms
// defined port numbers for client and server
#define DEFAULT_PORT_NUMBER 22124
#define DEFAULT_PORT_NUMBER_NORTHAMERICA 22224
// system sample rate (the sound card and audio coder works on this sample rate)
#define SYSTEM_SAMPLE_RATE_HZ 48000 // Hz

View file

@ -633,6 +633,11 @@
<source>The CPU of the client or server is at 100%.</source>
<translation>Die CPU des Computers ist voll ausgelastet.</translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="703"/>
<source>Central Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="809"/>
<source>user</source>
@ -1135,17 +1140,17 @@
<translation>Hoch</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="349"/>
<location filename="../../util.h" line="579"/>
<source>Manual</source>
<translation>Manuell</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="350"/>
<location filename="../../util.h" line="585"/>
<source>Default</source>
<translation>Standard</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="351"/>
<location filename="../../util.h" line="582"/>
<source>Default (North America)</source>
<translation>Standard (Nordamerika)</translation>
</message>
@ -1170,6 +1175,11 @@
<source>Buffer Delay: </source>
<translation>Puffergröße: </translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="593"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="633"/>
<source>The selected audio device could not be used because of the following error: </source>
@ -2044,19 +2054,21 @@
<translation> Server </translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="191"/>
<location filename="../../serverdlg.cpp" line="525"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Manual</source>
<translation>Manuell</translation>
<translation type="vanished">Manuell</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="192"/>
<source>Default</source>
<translation>Standard</translation>
<translation type="vanished">Standard</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="193"/>
<source>Default (North America)</source>
<translation>Standard (Nordamerika)</translation>
<translation type="vanished">Standard (Nordamerika)</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="271"/>
@ -2069,42 +2081,42 @@
<translation>&amp;Fenster</translation>
</message>
<message>
<location filename="../../util.h" line="591"/>
<location filename="../../util.h" line="607"/>
<source>Unregistered</source>
<translation>Nicht registriert</translation>
</message>
<message>
<location filename="../../util.h" line="594"/>
<location filename="../../util.h" line="610"/>
<source>Bad address</source>
<translation>Ungültige Adresse</translation>
</message>
<message>
<location filename="../../util.h" line="597"/>
<location filename="../../util.h" line="613"/>
<source>Registration requested</source>
<translation>Registrierung angefordert</translation>
</message>
<message>
<location filename="../../util.h" line="600"/>
<location filename="../../util.h" line="616"/>
<source>Registration failed</source>
<translation>Registrierung fehlgeschlagen</translation>
</message>
<message>
<location filename="../../util.h" line="603"/>
<location filename="../../util.h" line="619"/>
<source>Check server version</source>
<translation>Überprüfe Version des Servers</translation>
</message>
<message>
<location filename="../../util.h" line="606"/>
<location filename="../../util.h" line="622"/>
<source>Registered</source>
<translation>Registriert</translation>
</message>
<message>
<location filename="../../util.h" line="609"/>
<location filename="../../util.h" line="625"/>
<source>Central Server full</source>
<translation>Zentralserver voll</translation>
</message>
<message>
<location filename="../../util.h" line="612"/>
<location filename="../../util.h" line="628"/>
<source>Unknown value </source>
<translation>Unbekannter Wert </translation>
</message>
@ -2359,7 +2371,7 @@
<context>
<name>global</name>
<message>
<location filename="../../global.h" line="237"/>
<location filename="../../global.h" line="234"/>
<source>For more information use the What&apos;s This help (help menu, right mouse button or Shift+F1)</source>
<translation>Für weitere Informationen verwende die Kontexthilfe (Hilfe-Menü, rechte Maustaste oder Tastenkombination Shift+F1)</translation>
</message>

View file

@ -637,6 +637,11 @@
<source>The CPU of the client or server is at 100%.</source>
<translation>El procesador del cliente o del servidor está al 100%.</translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="703"/>
<source>Central Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="809"/>
<source>user</source>
@ -1139,17 +1144,17 @@
<translation>Alta</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="349"/>
<location filename="../../util.h" line="579"/>
<source>Manual</source>
<translation>Manual</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="350"/>
<location filename="../../util.h" line="585"/>
<source>Default</source>
<translation>Por defecto</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="351"/>
<location filename="../../util.h" line="582"/>
<source>Default (North America)</source>
<translation>Por defecto (Norteamérica)</translation>
</message>
@ -1174,6 +1179,11 @@
<source>Buffer Delay: </source>
<translation>Retardo Buffer: </translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="593"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="633"/>
<source>The selected audio device could not be used because of the following error: </source>
@ -2052,19 +2062,21 @@
<translation> </translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="191"/>
<location filename="../../serverdlg.cpp" line="525"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Manual</source>
<translation>Manual</translation>
<translation type="vanished">Manual</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="192"/>
<source>Default</source>
<translation>Por defecto</translation>
<translation type="vanished">Por defecto</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="193"/>
<source>Default (North America)</source>
<translation>Por defecto (Norteamérica)</translation>
<translation type="vanished">Por defecto (Norteamérica)</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="271"/>
@ -2077,42 +2089,42 @@
<translation>&amp;Ventana</translation>
</message>
<message>
<location filename="../../util.h" line="591"/>
<location filename="../../util.h" line="607"/>
<source>Unregistered</source>
<translation>Sin registrar</translation>
</message>
<message>
<location filename="../../util.h" line="594"/>
<location filename="../../util.h" line="610"/>
<source>Bad address</source>
<translation>Dirección no válida</translation>
</message>
<message>
<location filename="../../util.h" line="597"/>
<location filename="../../util.h" line="613"/>
<source>Registration requested</source>
<translation>Registro solicitado</translation>
</message>
<message>
<location filename="../../util.h" line="600"/>
<location filename="../../util.h" line="616"/>
<source>Registration failed</source>
<translation>Error de registro</translation>
</message>
<message>
<location filename="../../util.h" line="603"/>
<location filename="../../util.h" line="619"/>
<source>Check server version</source>
<translation>Comprueba la versión del servidor</translation>
</message>
<message>
<location filename="../../util.h" line="606"/>
<location filename="../../util.h" line="622"/>
<source>Registered</source>
<translation>Registrado</translation>
</message>
<message>
<location filename="../../util.h" line="609"/>
<location filename="../../util.h" line="625"/>
<source>Central Server full</source>
<translation>Servidor Central lleno</translation>
</message>
<message>
<location filename="../../util.h" line="612"/>
<location filename="../../util.h" line="628"/>
<source>Unknown value </source>
<translation>Valor desconocido </translation>
</message>
@ -2367,7 +2379,7 @@
<context>
<name>global</name>
<message>
<location filename="../../global.h" line="237"/>
<location filename="../../global.h" line="234"/>
<source>For more information use the What&apos;s This help (help menu, right mouse button or Shift+F1)</source>
<translation>Para más información utiliza ¿Qué es Esto? (menú de ayuda, botón derecho del ratón o Shift+F1)</translation>
</message>

View file

@ -645,6 +645,11 @@
<source>The CPU of the client or server is at 100%.</source>
<translation>Le processeur du client ou du serveur est à 100%.</translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="703"/>
<source>Central Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="809"/>
<source>user</source>
@ -1147,17 +1152,17 @@
<translation>Haute</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="349"/>
<location filename="../../util.h" line="579"/>
<source>Manual</source>
<translation>Manuel</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="350"/>
<location filename="../../util.h" line="585"/>
<source>Default</source>
<translation>Défaut</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="351"/>
<location filename="../../util.h" line="582"/>
<source>Default (North America)</source>
<translation>Défault (Amérique du Nord)</translation>
</message>
@ -1182,6 +1187,11 @@
<source>Buffer Delay: </source>
<translation>Délai de temporisation : </translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="593"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="633"/>
<source>The selected audio device could not be used because of the following error: </source>
@ -2056,19 +2066,21 @@
<translation> serveur </translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="191"/>
<location filename="../../serverdlg.cpp" line="525"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Manual</source>
<translation>Manuel</translation>
<translation type="vanished">Manuel</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="192"/>
<source>Default</source>
<translation>Défaut</translation>
<translation type="vanished">Défaut</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="193"/>
<source>Default (North America)</source>
<translation>Défaut (Amérique du nord)</translation>
<translation type="vanished">Défaut (Amérique du nord)</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="271"/>
@ -2081,42 +2093,42 @@
<translation>&amp;Fenêtre</translation>
</message>
<message>
<location filename="../../util.h" line="591"/>
<location filename="../../util.h" line="607"/>
<source>Unregistered</source>
<translation>Non inscrit</translation>
</message>
<message>
<location filename="../../util.h" line="594"/>
<location filename="../../util.h" line="610"/>
<source>Bad address</source>
<translation>Mauvaise adresse</translation>
</message>
<message>
<location filename="../../util.h" line="597"/>
<location filename="../../util.h" line="613"/>
<source>Registration requested</source>
<translation>Inscription demandée</translation>
</message>
<message>
<location filename="../../util.h" line="600"/>
<location filename="../../util.h" line="616"/>
<source>Registration failed</source>
<translation>Échec de l&apos;inscription</translation>
</message>
<message>
<location filename="../../util.h" line="603"/>
<location filename="../../util.h" line="619"/>
<source>Check server version</source>
<translation>Vérifier la version du serveur</translation>
</message>
<message>
<location filename="../../util.h" line="606"/>
<location filename="../../util.h" line="622"/>
<source>Registered</source>
<translation>Inscrit</translation>
</message>
<message>
<location filename="../../util.h" line="609"/>
<location filename="../../util.h" line="625"/>
<source>Central Server full</source>
<translation>Serveur central rempli</translation>
</message>
<message>
<location filename="../../util.h" line="612"/>
<location filename="../../util.h" line="628"/>
<source>Unknown value </source>
<translation>Valeur inconnue</translation>
</message>
@ -2371,7 +2383,7 @@
<context>
<name>global</name>
<message>
<location filename="../../global.h" line="237"/>
<location filename="../../global.h" line="234"/>
<source>For more information use the What&apos;s This help (help menu, right mouse button or Shift+F1)</source>
<translation type="unfinished"></translation>
</message>

View file

@ -633,6 +633,11 @@
<source>R</source>
<translation>R</translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="703"/>
<source>Central Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="809"/>
<source>user</source>
@ -1135,17 +1140,17 @@
<translation>Hoog</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="349"/>
<location filename="../../util.h" line="579"/>
<source>Manual</source>
<translation>Handmatig</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="350"/>
<location filename="../../util.h" line="585"/>
<source>Default</source>
<translation>Standaard</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="351"/>
<location filename="../../util.h" line="582"/>
<source>Default (North America)</source>
<translation>Standaard (Noord-Amerika)</translation>
</message>
@ -1170,6 +1175,11 @@
<source>Buffer Delay: </source>
<translation>Buffervertraging: </translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="593"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="633"/>
<source>The selected audio device could not be used because of the following error: </source>
@ -2044,19 +2054,21 @@
<translation> server</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="191"/>
<location filename="../../serverdlg.cpp" line="525"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Manual</source>
<translation>Handmatig</translation>
<translation type="vanished">Handmatig</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="192"/>
<source>Default</source>
<translation>Standaard</translation>
<translation type="vanished">Standaard</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="193"/>
<source>Default (North America)</source>
<translation>Standaard (Noord-Amerika)</translation>
<translation type="vanished">Standaard (Noord-Amerika)</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="271"/>
@ -2069,42 +2081,42 @@
<translation>&amp;Window</translation>
</message>
<message>
<location filename="../../util.h" line="591"/>
<location filename="../../util.h" line="607"/>
<source>Unregistered</source>
<translation>Niet geregistreerd</translation>
</message>
<message>
<location filename="../../util.h" line="594"/>
<location filename="../../util.h" line="610"/>
<source>Bad address</source>
<translation>Slecht adres</translation>
</message>
<message>
<location filename="../../util.h" line="597"/>
<location filename="../../util.h" line="613"/>
<source>Registration requested</source>
<translation>Aanmelding gevraagd</translation>
</message>
<message>
<location filename="../../util.h" line="600"/>
<location filename="../../util.h" line="616"/>
<source>Registration failed</source>
<translation>Registratie is mislukt</translation>
</message>
<message>
<location filename="../../util.h" line="603"/>
<location filename="../../util.h" line="619"/>
<source>Check server version</source>
<translation>Controleer de versie van de server</translation>
</message>
<message>
<location filename="../../util.h" line="606"/>
<location filename="../../util.h" line="622"/>
<source>Registered</source>
<translation>Geregistreerd</translation>
</message>
<message>
<location filename="../../util.h" line="609"/>
<location filename="../../util.h" line="625"/>
<source>Central Server full</source>
<translation>Centrale server vol</translation>
</message>
<message>
<location filename="../../util.h" line="612"/>
<location filename="../../util.h" line="628"/>
<source>Unknown value </source>
<translation>Onbekende waarde </translation>
</message>
@ -2359,7 +2371,7 @@
<context>
<name>global</name>
<message>
<location filename="../../global.h" line="237"/>
<location filename="../../global.h" line="234"/>
<source>For more information use the What&apos;s This help (help menu, right mouse button or Shift+F1)</source>
<translation>Voor meer informatie gebruik de Wat Is Dit hulp (helpmenu, rechtermuisklik of Shift+F1)</translation>
</message>

View file

@ -645,6 +645,11 @@
<source>The CPU of the client or server is at 100%.</source>
<translation>O CPU do cliente ou servidor está a 100%.</translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="703"/>
<source>Central Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientdlg.cpp" line="809"/>
<source>user</source>
@ -1147,17 +1152,17 @@
<translation>Alta</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="349"/>
<location filename="../../util.h" line="579"/>
<source>Manual</source>
<translation>Manual</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="350"/>
<location filename="../../util.h" line="585"/>
<source>Default</source>
<translation>Servidor Padrão</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="351"/>
<location filename="../../util.h" line="582"/>
<source>Default (North America)</source>
<translation>Servidor Padrão (America do Norte)</translation>
</message>
@ -1182,6 +1187,11 @@
<source>Buffer Delay: </source>
<translation>Atraso do buffer:</translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="593"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../clientsettingsdlg.cpp" line="633"/>
<source>The selected audio device could not be used because of the following error: </source>
@ -2056,19 +2066,21 @@
<translation> </translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="191"/>
<location filename="../../serverdlg.cpp" line="525"/>
<source>Predefined Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Manual</source>
<translation>Manual</translation>
<translation type="vanished">Manual</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="192"/>
<source>Default</source>
<translation>Servidor Padrão</translation>
<translation type="vanished">Servidor Padrão</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="193"/>
<source>Default (North America)</source>
<translation>Servidor Padrão (America do Norte)</translation>
<translation type="vanished">Servidor Padrão (America do Norte)</translation>
</message>
<message>
<location filename="../../serverdlg.cpp" line="271"/>
@ -2081,42 +2093,42 @@
<translation>&amp;Janela</translation>
</message>
<message>
<location filename="../../util.h" line="591"/>
<location filename="../../util.h" line="607"/>
<source>Unregistered</source>
<translation>Não Registado</translation>
</message>
<message>
<location filename="../../util.h" line="594"/>
<location filename="../../util.h" line="610"/>
<source>Bad address</source>
<translation>Endereço incorrecto</translation>
</message>
<message>
<location filename="../../util.h" line="597"/>
<location filename="../../util.h" line="613"/>
<source>Registration requested</source>
<translation>Registo solicitado</translation>
</message>
<message>
<location filename="../../util.h" line="600"/>
<location filename="../../util.h" line="616"/>
<source>Registration failed</source>
<translation>Falha no registo</translation>
</message>
<message>
<location filename="../../util.h" line="603"/>
<location filename="../../util.h" line="619"/>
<source>Check server version</source>
<translation>Verifique versão do servidor</translation>
</message>
<message>
<location filename="../../util.h" line="606"/>
<location filename="../../util.h" line="622"/>
<source>Registered</source>
<translation>Registado</translation>
</message>
<message>
<location filename="../../util.h" line="609"/>
<location filename="../../util.h" line="625"/>
<source>Central Server full</source>
<translation>Servidor Central Cheio</translation>
</message>
<message>
<location filename="../../util.h" line="612"/>
<location filename="../../util.h" line="628"/>
<source>Unknown value </source>
<translation>Valor desconhecido </translation>
</message>
@ -2371,7 +2383,7 @@
<context>
<name>global</name>
<message>
<location filename="../../global.h" line="237"/>
<location filename="../../global.h" line="234"/>
<source>For more information use the What&apos;s This help (help menu, right mouse button or Shift+F1)</source>
<translation>Para mais informações, use O que é isto (menu Ajuda, botão direito do rato ou Shift + F1)</translation>
</message>

View file

@ -188,9 +188,9 @@ lvwClients->setMinimumHeight ( 140 );
// central server address type combo box
cbxCentServAddrType->clear();
cbxCentServAddrType->addItem ( tr ( "Manual" ) ); // AT_MANUAL
cbxCentServAddrType->addItem ( tr ( "Default" ) ); // AT_DEFAULT
cbxCentServAddrType->addItem ( tr ( "Default (North America)" ) ); // AT_NORTH_AMERICA
cbxCentServAddrType->addItem ( csAddTypeToString ( AT_MANUAL ) );
cbxCentServAddrType->addItem ( csAddTypeToString ( AT_DEFAULT ) );
cbxCentServAddrType->addItem ( csAddTypeToString ( AT_GENERAL_NORTHAMERICA ) );
cbxCentServAddrType->setCurrentIndex ( static_cast<int> ( pServer->GetCentralServerAddressType() ) );
// update server name line edit
@ -522,7 +522,7 @@ void CServerDlg::UpdateGUIDependencies()
{
// if the default central server is used, just show a text of the
// server name
edtCentralServerAddress->setText ( DEFAULT_SERVER_NAME );
edtCentralServerAddress->setText ( tr ( "Predefined Address" ) );
}
else
{

View file

@ -288,7 +288,7 @@ void CSettings::Load()
// central server address type
if ( GetNumericIniSet ( IniXMLDocument, "client", "centservaddrtype",
0, 2 /* AT_NORTH_AMERICA */, iValue ) )
0, 2 /* AT_GENERAL_NORTHAMERICA */, iValue ) )
{
pClient->SetCentralServerAddressType ( static_cast<ECSAddType> ( iValue ) );
}
@ -359,7 +359,7 @@ if ( GetFlagIniSet ( IniXMLDocument, "client", "defcentservaddr", bValue ) )
// central server address type (note that it is important
// to set this setting prior to the "central server address")
if ( GetNumericIniSet ( IniXMLDocument, "server", "centservaddrtype",
0, 2 /* AT_NORTH_AMERICA */, iValue ) )
0, 2 /* AT_GENERAL_NORTHAMERICA */, iValue ) )
{
pServer->SetCentralServerAddressType ( static_cast<ECSAddType> ( iValue ) );
}

View file

@ -950,9 +950,9 @@ QString NetworkUtil::GetCentralServerAddress ( const ECSAddType eCentralServerAd
{
switch ( eCentralServerAddressType )
{
case AT_MANUAL: return strCentralServerAddress;
case AT_NORTH_AMERICA: return QString ( "%1:%2" ).arg ( DEFAULT_SERVER_ADDRESS ).arg ( DEFAULT_PORT_NUMBER_NORTHAMERICA );
default: return DEFAULT_SERVER_ADDRESS; // AT_DEFAULT
case AT_MANUAL: return strCentralServerAddress;
case AT_GENERAL_NORTHAMERICA: return CENTSERV_GENERAL_NORTHAMERICA;
default: return DEFAULT_SERVER_ADDRESS; // AT_DEFAULT
}
}
@ -1328,7 +1328,7 @@ ECSAddType CLocale::GetCentralServerAddressType ( const QLocale::Country eCountr
case QLocale::Canada:
case QLocale::Mexico:
case QLocale::Greenland:
return AT_NORTH_AMERICA;
return AT_GENERAL_NORTHAMERICA;
default:
return AT_DEFAULT;

View file

@ -565,11 +565,27 @@ enum ELicenceType
// Central server address type -------------------------------------------------
enum ECSAddType
{
// used for settings -> enum values must be fixed!
AT_MANUAL = 0,
AT_DEFAULT = 1, // Europe and others
AT_NORTH_AMERICA = 2
AT_DEFAULT = 1,
AT_GENERAL_NORTHAMERICA = 2
};
inline QString csAddTypeToString ( ECSAddType eAddrType )
{
switch ( eAddrType )
{
case AT_MANUAL:
return QCoreApplication::translate ( "CClientSettingsDlg", "Manual" );
case AT_GENERAL_NORTHAMERICA:
return QCoreApplication::translate ( "CClientSettingsDlg", "Default (North America)" );
default: // AT_DEFAULT
return QCoreApplication::translate ( "CClientSettingsDlg", "Default" );
}
}
// Slave server registration state ---------------------------------------------
enum ESvrRegStatus