Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduced new server lists: Any Genre 2, Choral/Barbershop (#875) #885

Merged
merged 1 commit into from
Jan 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@



### 3.6.2git <- NOTE: the release version number will be 3.6.3 ###
### 3.6.2git <- NOTE: the release version number will be 3.7.0 ###

- introduced new server lists: Any Genre 2, Choral/Barbershop (#875)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is wrong, by the way. What the change does is https://github.com/jamulussoftware/jamulus/pull/885/files#diff-40ab92941994ec9418dbb76ae46d5aef0e4cb8b034f2be2b31562bb9aca8070f

  • rename "Default" to "Any Genre 1"; rename "All Genres" to "Any Genre 2"; rename "Genre Classical/Folk/Choral" to "Genre Classical/Folk"
  • add "Any Genre 3" and "Genre Choral/Barbershop"


- show --clientname as first word in title to avoid clipping in Windows task bar (#789)

Expand Down
4 changes: 3 additions & 1 deletion src/connectdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP,
// central server address type combo box
cbxCentServAddrType->clear();
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_DEFAULT ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could loop through an array containing the lists starting from here.

Could this be done with a compiler macro or something like this: https://stackoverflow.com/questions/24392000/define-a-for-loop-macro-in-c#24392091

cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_ALL_GENRES ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_ANY_GENRE2 ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_ANY_GENRE3 ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_ROCK ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_JAZZ ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_CLASSICAL_FOLK ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_CHORAL ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_CUSTOM ) );

cbxCentServAddrType->setWhatsThis ( "<b>" + tr ( "Server List Selection" ) + ":</b> " + tr (
Expand Down
4 changes: 3 additions & 1 deletion src/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ LED bar: lbr
// default server address and port numbers
#define DEFAULT_SERVER_ADDRESS "jamulus.fischvolk.de"
#define DEFAULT_PORT_NUMBER 22124
#define CENTSERV_ALL_GENRES "jamulusallgenres.fischvolk.de:22224"
#define CENTSERV_ANY_GENRE2 "jamulusanygenre2.fischvolk.de:22224"
#define CENTSERV_ANY_GENRE3 "jamulusanygenre3.fischvolk.de:22624"
#define CENTSERV_GENRE_ROCK "jamulusrock.fischvolk.de:22424"
#define CENTSERV_GENRE_JAZZ "jamulusjazz.fischvolk.de:22324"
#define CENTSERV_GENRE_CLASSICAL_FOLK "jamulusclassical.fischvolk.de:22524"
#define CENTSERV_GENRE_CHORAL "jamuluschoral.fischvolk.de:22724"

// getting started and software manual URL
#define CLIENT_GETTING_STARTED_URL "https://jamulus.io/wiki/Getting-Started"
Expand Down
451 changes: 239 additions & 212 deletions src/res/translation/translation_de_DE.ts

Large diffs are not rendered by default.

451 changes: 239 additions & 212 deletions src/res/translation/translation_es_ES.ts

Large diffs are not rendered by default.

451 changes: 239 additions & 212 deletions src/res/translation/translation_fr_FR.ts

Large diffs are not rendered by default.

451 changes: 239 additions & 212 deletions src/res/translation/translation_it_IT.ts

Large diffs are not rendered by default.

451 changes: 239 additions & 212 deletions src/res/translation/translation_nl_NL.ts

Large diffs are not rendered by default.

451 changes: 239 additions & 212 deletions src/res/translation/translation_pl_PL.ts

Large diffs are not rendered by default.

451 changes: 239 additions & 212 deletions src/res/translation/translation_pt_BR.ts

Large diffs are not rendered by default.

451 changes: 239 additions & 212 deletions src/res/translation/translation_pt_PT.ts

Large diffs are not rendered by default.

451 changes: 239 additions & 212 deletions src/res/translation/translation_sk_SK.ts

Large diffs are not rendered by default.

451 changes: 239 additions & 212 deletions src/res/translation/translation_sv_SE.ts

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/serverdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,12 @@ lvwClients->setMinimumHeight ( 140 );
// central server address type combo box
cbxCentServAddrType->clear();
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_DEFAULT ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_ALL_GENRES ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_ANY_GENRE2 ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_ANY_GENRE3 ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_ROCK ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_JAZZ ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_CLASSICAL_FOLK ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_GENRE_CHORAL ) );
cbxCentServAddrType->addItem ( csCentServAddrTypeToString ( AT_CUSTOM ) );
cbxCentServAddrType->setCurrentIndex ( static_cast<int> ( pServer->GetCentralServerAddressType() ) );

Expand Down
4 changes: 3 additions & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,10 +1040,12 @@ QString NetworkUtil::GetCentralServerAddress ( const ECSAddType eCentralServerAd
switch ( eCentralServerAddressType )
{
case AT_CUSTOM: return strCentralServerAddress;
case AT_ALL_GENRES: return CENTSERV_ALL_GENRES;
case AT_ANY_GENRE2: return CENTSERV_ANY_GENRE2;
case AT_ANY_GENRE3: return CENTSERV_ANY_GENRE3;
case AT_GENRE_ROCK: return CENTSERV_GENRE_ROCK;
case AT_GENRE_JAZZ: return CENTSERV_GENRE_JAZZ;
case AT_GENRE_CLASSICAL_FOLK: return CENTSERV_GENRE_CLASSICAL_FOLK;
case AT_GENRE_CHORAL: return CENTSERV_GENRE_CHORAL;
default: return DEFAULT_SERVER_ADDRESS; // AT_DEFAULT
}
}
Expand Down
26 changes: 17 additions & 9 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,11 +607,13 @@ enum ECSAddType
{
// used for settings -> enum values should be fixed
AT_DEFAULT = 0,
AT_ALL_GENRES = 1,
AT_GENRE_ROCK = 2,
AT_GENRE_JAZZ = 3,
AT_GENRE_CLASSICAL_FOLK = 4,
AT_CUSTOM = 5 // Must be the last entry!
AT_ANY_GENRE2 = 1,
AT_ANY_GENRE3 = 2,
AT_GENRE_ROCK = 3,
AT_GENRE_JAZZ = 4,
AT_GENRE_CLASSICAL_FOLK = 5,
AT_GENRE_CHORAL = 6,
AT_CUSTOM = 7 // Must be the last entry!
};

inline QString csCentServAddrTypeToString ( ECSAddType eAddrType )
Expand All @@ -621,8 +623,11 @@ inline QString csCentServAddrTypeToString ( ECSAddType eAddrType )
case AT_CUSTOM:
return QCoreApplication::translate ( "CClientSettingsDlg", "Custom" );

case AT_ALL_GENRES:
return QCoreApplication::translate ( "CClientSettingsDlg", "All Genres" );
case AT_ANY_GENRE2:
return QCoreApplication::translate ( "CClientSettingsDlg", "Any Genre 2" );

case AT_ANY_GENRE3:
return QCoreApplication::translate ( "CClientSettingsDlg", "Any Genre 3" );

case AT_GENRE_ROCK:
return QCoreApplication::translate ( "CClientSettingsDlg", "Genre Rock" );
Expand All @@ -631,10 +636,13 @@ inline QString csCentServAddrTypeToString ( ECSAddType eAddrType )
return QCoreApplication::translate ( "CClientSettingsDlg", "Genre Jazz" );

case AT_GENRE_CLASSICAL_FOLK:
return QCoreApplication::translate ( "CClientSettingsDlg", "Genre Classical/Folk/Choral" );
return QCoreApplication::translate ( "CClientSettingsDlg", "Genre Classical/Folk" );

case AT_GENRE_CHORAL:
return QCoreApplication::translate ( "CClientSettingsDlg", "Genre Choral/Barbershop" );

default: // AT_DEFAULT
return QCoreApplication::translate ( "CClientSettingsDlg", "Default" );
return QCoreApplication::translate ( "CClientSettingsDlg", "Any Genre 1" );
}
}

Expand Down