From 4708c204f37b497458f543f5b96676a6554add4a Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Fri, 22 May 2020 06:25:38 +0200 Subject: [PATCH] some cleanup for the server list selection --- ChangeLog | 2 +- src/clientsettingsdlg.cpp | 4 ++-- src/connectdlg.cpp | 4 ++-- src/global.h | 2 +- src/serverdlg.cpp | 4 ++-- src/util.cpp | 12 ++++++------ src/util.h | 18 +++++++++--------- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index da3f267e..6650dad3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,7 +18,7 @@ - save client settings on Linux cmdline termination signal, coded by pljones (#70) - +TODO fix .tar.gz Linux release 3.5.3 on Sourceforge (gives compile errors) diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index c8957138..effc87e6 100755 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -346,11 +346,11 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, // central server address type combo box cbxCentServAddrType->clear(); - cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_CUSTOM ) ); cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_DEFAULT ) ); - cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENERAL_NORTHAMERICA ) ); + cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_ALL_GENRES ) ); cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_ROCK ) ); cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_JAZZ ) ); + cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_CUSTOM ) ); cbxCentServAddrType->setCurrentIndex ( static_cast ( pClient->GetCentralServerAddressType() ) ); UpdateCentralServerDependency(); diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 6acb98b1..825fa5c4 100755 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -78,11 +78,11 @@ CConnectDlg::CConnectDlg ( CClient* pNCliP, // central server address type combo box cbxCentServAddrType->clear(); - cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_CUSTOM ) ); cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_DEFAULT ) ); - cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENERAL_NORTHAMERICA ) ); + cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_ALL_GENRES ) ); cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_ROCK ) ); cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_JAZZ ) ); + cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_CUSTOM ) ); // filter edtFilter->setWhatsThis ( "" + tr ( "Filter" ) + ": " + tr ( "The server " diff --git a/src/global.h b/src/global.h index 089bd317..3e1ac500 100755 --- a/src/global.h +++ b/src/global.h @@ -104,7 +104,7 @@ LED bar: lbr // default server address and port numbers #define DEFAULT_SERVER_ADDRESS "jamulus.fischvolk.de" #define DEFAULT_PORT_NUMBER 22124 -#define CENTSERV_GENERAL_NORTHAMERICA "jamulus.fischvolk.de:22224" +#define CENTSERV_ALL_GENRES "jamulus.fischvolk.de:22224" #define CENTSERV_GENRE_ROCK "centralrock.drealm.info:22124" #define CENTSERV_GENRE_JAZZ "centraljazz.drealm.info:22224" diff --git a/src/serverdlg.cpp b/src/serverdlg.cpp index 13c9cb47..9a369acb 100755 --- a/src/serverdlg.cpp +++ b/src/serverdlg.cpp @@ -188,11 +188,11 @@ lvwClients->setMinimumHeight ( 140 ); // central server address type combo box cbxCentServAddrType->clear(); - cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_CUSTOM ) ); cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_DEFAULT ) ); - cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENERAL_NORTHAMERICA ) ); + cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_ALL_GENRES ) ); cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_ROCK ) ); cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_JAZZ ) ); + cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_CUSTOM ) ); cbxCentServAddrType->setCurrentIndex ( static_cast ( pServer->GetCentralServerAddressType() ) ); // update server name line edit diff --git a/src/util.cpp b/src/util.cpp index d4a1f029..67c80c20 100755 --- a/src/util.cpp +++ b/src/util.cpp @@ -951,11 +951,11 @@ QString NetworkUtil::GetCentralServerAddress ( const ECSAddType eCentralServerAd { switch ( eCentralServerAddressType ) { - case AT_CUSTOM: return strCentralServerAddress; - case AT_GENERAL_NORTHAMERICA: return CENTSERV_GENERAL_NORTHAMERICA; - case AT_GENRE_ROCK: return CENTSERV_GENRE_ROCK; - case AT_GENRE_JAZZ: return CENTSERV_GENRE_JAZZ; - default: return DEFAULT_SERVER_ADDRESS; // AT_DEFAULT + case AT_CUSTOM: return strCentralServerAddress; + case AT_ALL_GENRES: return CENTSERV_ALL_GENRES; + case AT_GENRE_ROCK: return CENTSERV_GENRE_ROCK; + case AT_GENRE_JAZZ: return CENTSERV_GENRE_JAZZ; + default: return DEFAULT_SERVER_ADDRESS; // AT_DEFAULT } } @@ -1335,7 +1335,7 @@ ECSAddType CLocale::GetCentralServerAddressType ( const QLocale::Country eCountr case QLocale::Canada: case QLocale::Mexico: case QLocale::Greenland: - return AT_GENERAL_NORTHAMERICA; + return AT_ALL_GENRES; default: return AT_DEFAULT; diff --git a/src/util.h b/src/util.h index 8d5d8c6f..0c711785 100755 --- a/src/util.h +++ b/src/util.h @@ -506,7 +506,7 @@ private: // Audio channel configuration ------------------------------------------------- enum EAudChanConf { - // used for settings -> enum values must be fixed! + // used for settings -> enum values should be fixed CC_MONO = 0, CC_MONO_IN_STEREO_OUT = 1, CC_STEREO = 2 @@ -547,7 +547,7 @@ enum EGetDataStat // GUI design enum ------------------------------------------------------------- enum EGUIDesign { - // used for settings -> enum values must be fixed! + // used for settings -> enum values should be fixed GD_STANDARD = 0, GD_ORIGINAL = 1 }; @@ -565,12 +565,12 @@ enum ELicenceType // Central server address type ------------------------------------------------- enum ECSAddType { - // used for settings -> enum values must be fixed! - AT_CUSTOM = 0, - AT_DEFAULT = 1, - AT_GENERAL_NORTHAMERICA = 2, - AT_GENRE_ROCK = 3, - AT_GENRE_JAZZ = 4 + // used for settings -> enum values should be fixed + AT_DEFAULT = 0, + AT_ALL_GENRES = 1, + AT_GENRE_ROCK = 2, + AT_GENRE_JAZZ = 3, + AT_CUSTOM = 4 }; inline QString csCentServAddrTypeToString ( ECSAddType eAddrType ) @@ -580,7 +580,7 @@ inline QString csCentServAddrTypeToString ( ECSAddType eAddrType ) case AT_CUSTOM: return QCoreApplication::translate ( "CClientSettingsDlg", "Custom" ); - case AT_GENERAL_NORTHAMERICA: + case AT_ALL_GENRES: return QCoreApplication::translate ( "CClientSettingsDlg", "All Genres" ); case AT_GENRE_ROCK: