diff --git a/ChangeLog b/ChangeLog index 482ba822..635440b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,13 @@ + 3.4.1 + - show the number of connected clients in the MacOS task bar if more + than one client is connected -3.4.0 + +3.4.0 (2015-12-10) - show the names of the connected clients in the server list diff --git a/Jamulus.pro b/Jamulus.pro index 772a722e..a4ee161e 100755 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -47,6 +47,7 @@ win32 { winmm.lib \ ws2_32.lib } else:macx { + QT += macextras HEADERS += mac/sound.h SOURCES += mac/sound.cpp RC_FILE = mac/mainicon.icns diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 6f772579..705e13f6 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -778,6 +778,24 @@ void CClientDlg::SetMyWindowTitle ( const int iNumClients ) QString ( " (%1 users)" ).arg ( iNumClients ) ); } } + +#if defined ( __APPLE__ ) || defined ( __MACOSX ) + // for MacOS only we show the number of connected clients as a + // badge label text if more than one user is connected + // (only available in Qt5.2) +# if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) + if ( iNumClients > 1 ) + { + // show the number of connected clients + QtMac::setBadgeLabelText ( QString ( "%1" ).arg ( iNumClients ) ); + } + else + { + // clear the text (apply an empty string) + QtMac::setBadgeLabelText ( "" ); + } +# endif +#endif } void CClientDlg::ShowConnectionSetupDialog() diff --git a/src/clientdlg.h b/src/clientdlg.h index 199a03ff..dbba9fa2 100755 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -43,6 +43,11 @@ #include "connectdlg.h" #include "analyzerconsole.h" #include "ui_clientdlgbase.h" +#if defined ( __APPLE__ ) || defined ( __MACOSX ) +# if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) +# include +# endif +#endif /* Definitions ****************************************************************/