From d4f00da713bffd59bef8d005eb00ae727175abc0 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sun, 17 Feb 2013 21:14:19 +0000 Subject: [PATCH] use APP_NAME define instead of writing llcon directly in the code --- linux/sound.cpp | 2 +- src/clientsettingsdlg.cpp | 33 ++++++++++++++++++--------------- src/connectdlg.cpp | 7 ++++--- src/llconclientdlg.cpp | 13 ++++++++----- src/util.cpp | 19 ++++++++++--------- 5 files changed, 41 insertions(+), 33 deletions(-) diff --git a/linux/sound.cpp b/linux/sound.cpp index 57ccfd3e..dfe8b694 100755 --- a/linux/sound.cpp +++ b/linux/sound.cpp @@ -31,7 +31,7 @@ void CSound::OpenJack() jack_status_t JackStatus; // try to become a client of the JACK server - pJackClient = jack_client_open ( "llcon", JackNullOption, &JackStatus ); + pJackClient = jack_client_open ( APP_NAME, JackNullOption, &JackStatus ); if ( pJackClient == NULL ) { throw CGenErr ( tr ( "Jack server not running" ) ); diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index 07c3bd64..92863696 100755 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -81,10 +81,10 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, // sound card device cbxSoundcard->setWhatsThis ( tr ( "Sound Card Device: The ASIO " - "driver (sound card) can be selected using llcon under the Windows " - "operating system. Under MacOS/Linux, no sound card selection is " - "possible. If the selected ASIO driver is not valid an error message " - "is shown and the previous valid driver is selected.
" + "driver (sound card) can be selected using " ) + APP_NAME + + tr ( " under the Windows operating system. Under MacOS/Linux, no sound " + "card selection is possible. If the selected ASIO driver is not valid " + "an error message is shown and the previous valid driver is selected.
" "If the driver is selected during an active connection, the connection " "is stopped, the driver is changed and the connection is started again " "automatically." ) ); @@ -123,8 +123,9 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, // sound card buffer delay QString strSndCrdBufDelay = tr ( "Sound Card Buffer Delay: The " - "buffer delay setting is a fundamental setting of the llcon software. " - "This setting has influence on many connection properties.
" + "buffer delay setting is a fundamental setting of the " ) + + APP_NAME + tr ( " software. This setting has influence on many " + "connection properties.
" "Three buffer sizes are supported:" "" "Some sound card driver do not allow the buffer delay to be changed " - "from within the llcon software. In this case the buffer delay setting " + "from within the " ) + APP_NAME + + tr ( " software. In this case the buffer delay setting " "is disabled. To change the actual buffer delay, this " "setting has to be changed in the sound card driver. On Windows, press " "the ASIO Setup button to open the driver settings panel. On Linux, " "use the Jack configuration tool to change the buffer size.
" "If no buffer size is selected and all settings are disabled, an " - "unsupported buffer size is used by the driver. The llcon software " - "will still work with this setting but with restricted performannce.
" + "unsupported buffer size is used by the driver. The " ) + APP_NAME + + tr ( " software will still work with this setting but with restricted " + "performannce.
" "The actual buffer delay has influence on the connection status, the " "current upload rate and the overall delay. The lower the buffer size, " "the higher the probability of red light in the status indicator (drop " @@ -153,10 +156,10 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, QString strSndCrdBufDelayTT = tr ( "If the buffer delay settings are " "disabled, it is prohibited by the audio driver to modify this " - "setting from within the llcon software. On Windows, press " - "the ASIO Setup button to open the driver settings panel. On Linux, " - "use the Jack configuration tool to change the buffer size." ) + - TOOLTIP_COM_END_TEXT; + "setting from within the " ) + APP_NAME + + tr ( " software. On Windows, press the ASIO Setup button to open the " + "driver settings panel. On Linux, use the Jack configuration tool to " + "change the buffer size." ) + TOOLTIP_COM_END_TEXT; rbtBufferDelayPreferred->setWhatsThis ( strSndCrdBufDelay ); rbtBufferDelayPreferred->setAccessibleName ( tr ( "128 samples setting radio button" ) ); @@ -251,8 +254,8 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, lblUpstreamValue->setWhatsThis ( strConnStats ); ledOverallDelay->setWhatsThis ( strConnStats ); ledOverallDelay->setToolTip ( tr ( "If this LED indicator turns red, " - "you will not have much fun using the llcon software." ) + - TOOLTIP_COM_END_TEXT ); + "you will not have much fun using the " ) + APP_NAME + + tr ( " software." ) + TOOLTIP_COM_END_TEXT ); // init driver button diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 9b4ad2ed..9695278c 100755 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -56,9 +56,10 @@ CConnectDlg::CConnectDlg ( const bool bNewShowCompleteRegList, // server address QString strServAddrH = tr ( "Server Address: The IP address or URL " - "of the server running the llcon 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 + ":" + + "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 + ":" + QString().setNum ( LLCON_DEFAULT_PORT_NUMBER ) + tr ( ". A list of " "the most recent used server IP addresses or URLs is available for " "selection." ); diff --git a/src/llconclientdlg.cpp b/src/llconclientdlg.cpp index b10cfd29..8082900e 100755 --- a/src/llconclientdlg.cpp +++ b/src/llconclientdlg.cpp @@ -52,14 +52,17 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, "Make sure not to clip the input signal to avoid distortions of the " "audio signal." ); - QString strInpLevHTT = tr ( "If the llcon software is connected and " + QString strInpLevHTT = tr ( "If the " ) + APP_NAME + + tr ( " software is connected and " "you play your instrument/sing in the microphone, the LED level " "meter should flicker. If this is not the case, you have " "probably selected the wrong input channel (e.g. line in instead " "of the microphone input) or set the input gain too low in the " - "(Windows) audio mixer.
For a proper usage of the llcon software, " + "(Windows) audio mixer.
For a proper usage of the " ) + APP_NAME + + tr ( " software, " "you should not hear your singing/instrument in the loudspeaker or " - "your headphone when the llcon software is not connected. This can " + "your headphone when the " ) + APP_NAME + + tr ( " software is not connected. This can " "be achieved by muting your input audio channel in the Playback " "mixer (not the Recording mixer!)." ) + TOOLTIP_COM_END_TEXT; @@ -186,8 +189,8 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, lblDelay->setWhatsThis ( strLEDDelay ); ledDelay->setWhatsThis ( strLEDDelay ); ledDelay->setToolTip ( tr ( "If this LED indicator turns red, " - "you will not have much fun using the llcon software." ) + - TOOLTIP_COM_END_TEXT ); + "you will not have much fun using the " ) + APP_NAME + + tr ( " software." ) + TOOLTIP_COM_END_TEXT ); ledDelay->setAccessibleName ( tr ( "Delay status LED indicator" ) ); diff --git a/src/util.cpp b/src/util.cpp index 218b4477..19e072f1 100755 --- a/src/util.cpp +++ b/src/util.cpp @@ -311,11 +311,12 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : QDialog ( parent ) txvCredits->setOpenExternalLinks ( true ); txvCredits->setText ( "

" // general description of llcon software - "llcon " + tr("The llcon software enables musicians to " - "perform real-time jam sessions over the internet. There is a llcon " - "server which collects the audio data from each llcon client, " - "mixes the audio data and sends the mix back to each client.") + - "


" + "" + tr( "The " ) + APP_NAME + + tr ( " software enables musicians to perform real-time jam sessions " + "over the internet. There is a " ) + APP_NAME + tr ( " " + "server which collects the audio data from each " ) + + APP_NAME + tr ( " client, mixes the audio data and sends the mix back " + "to each client.") + "


" "

" // GPL header text "This program is free software; you can redistribute it and/or modify " "it under the terms of the GNU General Public License as published by " @@ -329,8 +330,8 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : QDialog ( parent ) "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 " "USA" "


" - "

" + // libraries used by this compilation of llcon - tr ( "llcon uses the following libraries, resources or code snippets:" ) + + "

" + APP_NAME + // libraries used by this compilation of llcon + tr ( " uses the following libraries, resources or code snippets:" ) + "

" "
    " "
  • Qt cross-platform application framework: " @@ -364,7 +365,7 @@ QString CAboutDlg::GetVersionAndNameStr ( const bool bWithHtml ) strVersionText += " *** "; } - strVersionText += tr ( "llcon, Version " ) + VERSION; + strVersionText += APP_NAME + tr ( ", Version " ) + VERSION; if ( bWithHtml ) { @@ -375,7 +376,7 @@ QString CAboutDlg::GetVersionAndNameStr ( const bool bWithHtml ) strVersionText += "\n *** "; } - strVersionText += tr ( "llcon, Low-Latency (internet) CONnection" ); + strVersionText += APP_NAME + tr ( ", Internet Jam Session Software" ); if ( bWithHtml ) {