diff --git a/src/serverdlg.cpp b/src/serverdlg.cpp
index b1e19dcdcb..8d5e78ed07 100644
--- a/src/serverdlg.cpp
+++ b/src/serverdlg.cpp
@@ -33,11 +33,17 @@ CServerDlg::CServerDlg ( CServer* pNServP, CServerSettings* pNSetP, const bool b
BitmapSystemTrayActive ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDGreenArrow.png" ) )
{
// check if system tray icon can be used
- bSystemTrayIconAvaialbe = SystemTrayIcon.isSystemTrayAvailable();
+ bSystemTrayIconAvailable = SystemTrayIcon.isSystemTrayAvailable();
setupUi ( this );
+ // set window title
+ setWindowTitle ( tr ( "%1 Server", "%1 is the name of the main application" ).arg ( APP_NAME ) );
+
// Add help text to controls -----------------------------------------------
+
+ // Tab: Server setup
+
// client list
lvwClients->setWhatsThis ( "" + tr ( "Client List" ) + ": " +
tr ( "The client list shows all clients which are currently connected to this "
@@ -46,16 +52,6 @@ CServerDlg::CServerDlg ( CServer* pNServP, CServerSettings* pNSetP, const bool b
lvwClients->setAccessibleName ( tr ( "Connected clients list view" ) );
- // start minimized on operating system start
- chbStartOnOSStart->setWhatsThis ( "" +
- tr ( "Start Minimized on Operating "
- "System Start" ) +
- ": " +
- tr ( "If the start minimized on operating system start "
- "check box is checked, the server will be "
- "started when the operating system starts up and is automatically "
- "minimized to a system task bar icon." ) );
-
// Make My Server Public flag
chbRegisterServer->setWhatsThis ( "" + tr ( "Make My Server Public" ) + ": " +
tr ( "If the Make My Server Public check box is checked, this server registers "
@@ -65,21 +61,12 @@ CServerDlg::CServerDlg ( CServer* pNServP, CServerSettings* pNSetP, const bool b
"to make sure that all servers in the connect dialog server list are "
"actually available." ) );
- // register server status label
+ // server registration status label
lblRegSvrStatus->setWhatsThis ( "" + tr ( "Register Server Status" ) + ": " +
- tr ( "If the Make My Server Public check box is checked, this will show "
+ tr ( "If the Register Server check box is checked, this will show "
"whether registration with the directory server is successful. If the "
"registration failed, please choose another server list." ) );
- // custom directory server address
- QString strCustomDirectoryAddress = "" + tr ( "Custom Directory Server Address" ) + ": " +
- tr ( "The custom directory server address is the IP address or URL of the directory "
- "server at which the server list of the connection dialog is managed." );
-
- lblDirectoryAddress->setWhatsThis ( strCustomDirectoryAddress );
- edtDirectoryAddress->setWhatsThis ( strCustomDirectoryAddress );
- edtDirectoryAddress->setAccessibleName ( tr ( "Directory server address line edit" ) );
-
cbxDirectoryType->setWhatsThis ( "" + tr ( "Server List Selection" ) + ": " +
tr ( "Selects the server list (i.e. directory server address) in which your server will be added." ) );
cbxDirectoryType->setAccessibleName ( tr ( "Server list selection combo box" ) );
@@ -116,25 +103,6 @@ CServerDlg::CServerDlg ( CServer* pNServP, CServerSettings* pNSetP, const bool b
cbxLocationCountry->setAccessibleName ( tr ( "Combo box for location of this server" ) );
- // recording directory
- pbtRecordingDir->setAccessibleName ( tr ( "Display dialog to select recording directory button" ) );
- pbtRecordingDir->setWhatsThis ( "" + tr ( "Main Recording Directory" ) + ": " +
- tr ( "Click the button to open the dialog that allows the main recording directory to be selected."
- "The chosen value must exist and be writeable (allow creation of sub-directories "
- "by the user Jamulus is running as). " ) );
-
- edtRecordingDir->setAccessibleName ( tr ( "Main recording directory text box (read-only)" ) );
- edtRecordingDir->setWhatsThis ( "" + tr ( "Main Recording Directory" ) + ": " +
- tr ( "The current value of the main recording directory. "
- "The chosen value must exist and be writeable (allow creation of sub-directories "
- "by the user Jamulus is running as). "
- "Click the button to open the dialog that allows the main recording directory to be selected." ) );
-
- tbtClearRecordingDir->setAccessibleName ( tr ( "Clear the recording directory button" ) );
- tbtClearRecordingDir->setWhatsThis ( "" + tr ( "Clear Recording Directory" ) + ": " +
- tr ( "Click the button to clear the currently selected recording directory. "
- "This will prevent recording until a new value is selected." ) );
-
// enable recorder
chbEnableRecorder->setAccessibleName ( tr ( "Checkbox to turn on or off server recording" ) );
chbEnableRecorder->setWhatsThis ( "" + tr ( "Enable Recorder" ) + ": " +
@@ -174,8 +142,54 @@ CServerDlg::CServerDlg ( CServer* pNServP, CServerSettings* pNSetP, const bool b
tr ( "A server welcome message text is displayed in the chat window if a "
"musician enters the server. If no message is set, the server welcome is disabled." ) );
+ // Tab: options
+
+ // Interface Language
+ QString strWTLanguage = "" + tr ( "Language" ) + ": " + tr ( "Select the language to be used for the user interface." );
+ lblLanguage->setWhatsThis ( strWTLanguage );
+ cbxLanguage->setWhatsThis ( strWTLanguage );
+
+ cbxLanguage->setAccessibleName ( tr ( "Language combo box" ) );
+
+ // recording directory
+ pbtRecordingDir->setAccessibleName ( tr ( "Display dialog to select recording directory button" ) );
+ pbtRecordingDir->setWhatsThis ( "" + tr ( "Main Recording Directory" ) + ": " +
+ tr ( "Click the button to open the dialog that allows the main recording directory to be selected. "
+ "The chosen value must exist and be writeable (allow creation of sub-directories "
+ "by the user Jamulus is running as)." ) );
+
+ edtRecordingDir->setAccessibleName ( tr ( "Main recording directory text box (read-only)" ) );
+ edtRecordingDir->setWhatsThis ( "" + tr ( "Main Recording Directory" ) + ": " +
+ tr ( "The current value of the main recording directory. "
+ "The chosen value must exist and be writeable (allow creation of sub-directories "
+ "by the user Jamulus is running as). "
+ "Click the button to open the dialog that allows the main recording directory to be selected." ) );
+
+ tbtClearRecordingDir->setAccessibleName ( tr ( "Clear the recording directory button" ) );
+ tbtClearRecordingDir->setWhatsThis ( "" + tr ( "Clear Recording Directory" ) + ": " +
+ tr ( "Click the button to clear the currently selected recording directory. "
+ "This will prevent recording until a new value is selected." ) );
+
+ // custom directory
+ QString strCustomDirectory = "" + tr ( "Custom Directory" ) + ": " +
+ tr ( "The custom directory is the IP address or URL of the directory "
+ "server at which the server list of the connection dialog is managed." );
+
+ lblCustomDirectory->setWhatsThis ( strCustomDirectory );
+ edtCustomDirectory->setWhatsThis ( strCustomDirectory );
+ edtCustomDirectory->setAccessibleName ( tr ( "Custom Directory line edit" ) );
+
+ // start minimized on operating system start
+ chbStartOnOSStart->setWhatsThis ( "" + tr ( "Start Minimized on Operating System Start" ) + ": " +
+ tr ( "If the start minimized on operating system start "
+ "check box is checked, the server will be "
+ "started when the operating system starts up and is automatically "
+ "minimized to a system task bar icon." ) );
+
+ // Application initialisation
+
// init system tray icon
- if ( bSystemTrayIconAvaialbe )
+ if ( bSystemTrayIconAvailable )
{
// prepare context menu to be added to the system tray icon
pSystemTrayIconMenu = new QMenu ( this );
@@ -200,12 +214,14 @@ CServerDlg::CServerDlg ( CServer* pNServP, CServerSettings* pNSetP, const bool b
}
// act on "start minimized" flag (note, this has to be done after setting
- // the correct value for the system tray icon availablility)
+ // and acting on the correct value for the system tray icon availablility)
if ( bStartMinimized )
{
showMinimized();
}
+ // UI initialisation
+
// set up list view for connected clients
lvwClients->setColumnWidth ( 0, 170 ); // 170 // IP:port
lvwClients->setColumnWidth ( 1, 200 ); // 200 // Name
@@ -242,7 +258,7 @@ lvwClients->setMinimumHeight ( 140 );
cbxDirectoryType->setCurrentIndex ( static_cast ( pServer->GetDirectoryType() ) );
// custom directory server address
- edtDirectoryAddress->setText ( pServer->GetDirectoryAddress() );
+ edtCustomDirectory->setText ( pServer->GetDirectoryAddress() );
// update server name line edit
edtServerName->setText ( pServer->GetServerName() );
@@ -281,6 +297,23 @@ lvwClients->setMinimumHeight ( 140 );
chbRegisterServer->setCheckState ( Qt::Unchecked );
}
+ // Recorder controls
+ chbEnableRecorder->setChecked ( pServer->GetRecordingEnabled() );
+ edtCurrentSessionDir->setText ( "" );
+ pbtNewRecording->setAutoDefault ( false );
+
+ // setup welcome message GUI control
+ tedWelcomeMessage->setPlaceholderText ( tr ( "Type a message here. If no message is set, the server welcome is disabled." ) );
+ tedWelcomeMessage->setText ( pServer->GetWelcomeMessage() );
+
+ // language combo box (corrects the setting if language not found)
+ cbxLanguage->Init ( pSettings->strLanguage );
+
+ // recorder options
+ pbtRecordingDir->setAutoDefault ( false );
+ edtRecordingDir->setText ( pServer->GetRecordingDir() );
+ tbtClearRecordingDir->setText ( u8"\u232B" );
+
// update start minimized check box (only available for Windows)
#ifndef _WIN32
chbStartOnOSStart->setVisible ( false );
@@ -311,24 +344,6 @@ lvwClients->setMinimumHeight ( 140 );
chbEnableDelayPanning->setCheckState ( Qt::Unchecked );
}
- // Recorder controls
- chbEnableRecorder->setChecked ( pServer->GetRecordingEnabled() );
- edtCurrentSessionDir->setText ( "" );
- pbtNewRecording->setAutoDefault ( false );
- pbtRecordingDir->setAutoDefault ( false );
- edtRecordingDir->setText ( pServer->GetRecordingDir() );
- tbtClearRecordingDir->setText ( u8"\u232B" );
-
- UpdateRecorderStatus ( QString::null );
-
- // language combo box (corrects the setting if language not found)
- cbxLanguage->Init ( pSettings->strLanguage );
-
- // setup welcome message GUI control
- tedWelcomeMessage->setPlaceholderText ( tr ( "Type a message here. If no message is set, the server welcome is disabled." ) );
-
- tedWelcomeMessage->setText ( pServer->GetWelcomeMessage() );
-
// prepare update check info label (invisible by default)
lblUpdateCheck->setOpenExternalLinks ( true ); // enables opening a web browser if one clicks on a html link
lblUpdateCheck->setText ( "" + APP_UPGRADE_AVAILABLE_MSG_TEXT.arg ( APP_NAME ).arg ( VERSION ) + "" );
@@ -337,8 +352,7 @@ lvwClients->setMinimumHeight ( 140 );
// update GUI dependencies
UpdateGUIDependencies();
- // set window title
- setWindowTitle ( tr ( "%1 Server", "%1 is the name of the main application" ).arg ( APP_NAME ) );
+ UpdateRecorderStatus ( QString::null );
// View menu --------------------------------------------------------------
QMenu* pViewMenu = new QMenu ( tr ( "&Window" ), this );
@@ -365,38 +379,37 @@ lvwClients->setMinimumHeight ( 140 );
// check boxes
QObject::connect ( chbRegisterServer, &QCheckBox::stateChanged, this, &CServerDlg::OnRegisterServerStateChanged );
- QObject::connect ( chbStartOnOSStart, &QCheckBox::stateChanged, this, &CServerDlg::OnStartOnOSStartStateChanged );
-
QObject::connect ( chbEnableRecorder, &QCheckBox::stateChanged, this, &CServerDlg::OnEnableRecorderStateChanged );
- // delay panning
+ QObject::connect ( chbStartOnOSStart, &QCheckBox::stateChanged, this, &CServerDlg::OnStartOnOSStartStateChanged );
+
QObject::connect ( chbEnableDelayPanning, &QCheckBox::stateChanged, this, &CServerDlg::OnEnableDelayPanningStateChanged );
// line edits
- QObject::connect ( edtDirectoryAddress, &QLineEdit::editingFinished, this, &CServerDlg::OnDirectoryAddressEditingFinished );
-
QObject::connect ( edtServerName, &QLineEdit::textChanged, this, &CServerDlg::OnServerNameTextChanged );
QObject::connect ( edtLocationCity, &QLineEdit::textChanged, this, &CServerDlg::OnLocationCityTextChanged );
+ QObject::connect ( edtCustomDirectory, &QLineEdit::editingFinished, this, &CServerDlg::OnCustomDirectoryEditingFinished );
+
// combo boxes
- QObject::connect ( cbxLocationCountry,
+ QObject::connect ( cbxDirectoryType,
static_cast ( &QComboBox::activated ),
this,
- &CServerDlg::OnLocationCountryActivated );
+ &CServerDlg::OnDirectoryTypeActivated );
- QObject::connect ( cbxDirectoryType,
+ QObject::connect ( cbxLocationCountry,
static_cast ( &QComboBox::activated ),
this,
- &CServerDlg::OnDirectoryTypeActivated );
+ &CServerDlg::OnLocationCountryActivated );
QObject::connect ( cbxLanguage, &CLanguageComboBox::LanguageChanged, this, &CServerDlg::OnLanguageChanged );
// push buttons
- QObject::connect ( pbtRecordingDir, &QPushButton::released, this, &CServerDlg::OnRecordingDirClicked );
-
QObject::connect ( pbtNewRecording, &QPushButton::released, this, &CServerDlg::OnNewRecordingClicked );
+ QObject::connect ( pbtRecordingDir, &QPushButton::released, this, &CServerDlg::OnRecordingDirClicked );
+
// tool buttons
QObject::connect ( tbtClearRecordingDir, &QToolButton::released, this, &CServerDlg::OnClearRecordingDirClicked );
@@ -481,10 +494,10 @@ void CServerDlg::OnRegisterServerStateChanged ( int value )
UpdateGUIDependencies();
}
-void CServerDlg::OnDirectoryAddressEditingFinished()
+void CServerDlg::OnCustomDirectoryEditingFinished()
{
// apply new setting to the server and update it
- pServer->SetDirectoryAddress ( edtDirectoryAddress->text() );
+ pServer->SetDirectoryAddress ( edtCustomDirectory->text() );
pServer->UpdateServerList();
}
@@ -702,7 +715,7 @@ void CServerDlg::UpdateGUIDependencies()
void CServerDlg::UpdateSystemTrayIcon ( const bool bIsActive )
{
- if ( bSystemTrayIconAvaialbe )
+ if ( bSystemTrayIconAvailable )
{
if ( bIsActive )
{
@@ -818,7 +831,7 @@ void CServerDlg::changeEvent ( QEvent* pEvent )
{
// if we have a system tray icon, we make the window invisible if it is
// minimized
- if ( bSystemTrayIconAvaialbe && ( pEvent->type() == QEvent::WindowStateChange ) )
+ if ( bSystemTrayIconAvailable && ( pEvent->type() == QEvent::WindowStateChange ) )
{
if ( isMinimized() )
{
diff --git a/src/serverdlg.h b/src/serverdlg.h
index 7594b58832..21308c40a5 100644
--- a/src/serverdlg.h
+++ b/src/serverdlg.h
@@ -87,7 +87,7 @@ class CServerDlg : public CBaseDlg, private Ui_CServerDlgBase
QMenuBar* pMenu;
- bool bSystemTrayIconAvaialbe;
+ bool bSystemTrayIconAvailable;
QSystemTrayIcon SystemTrayIcon;
QPixmap BitmapSystemTrayInactive;
QPixmap BitmapSystemTrayActive;
@@ -98,7 +98,7 @@ public slots:
void OnStartOnOSStartStateChanged ( int value );
void OnEnableRecorderStateChanged ( int value ) { pServer->SetEnableRecording ( Qt::CheckState::Checked == value ); }
- void OnDirectoryAddressEditingFinished();
+ void OnCustomDirectoryEditingFinished();
void OnServerNameTextChanged ( const QString& strNewName );
void OnLocationCityTextChanged ( const QString& strNewCity );
void OnLocationCountryActivated ( int iCntryListItem );
diff --git a/src/serverdlgbase.ui b/src/serverdlgbase.ui
index 3dcf609800..f7e76084dd 100644
--- a/src/serverdlgbase.ui
+++ b/src/serverdlgbase.ui
@@ -252,14 +252,14 @@
-
-
-
+
Custom Directory Server Address:
-
-
+
@@ -326,7 +326,7 @@
pbtRecordingDir
edtRecordingDir
tbtClearRecordingDir
- edtDirectoryAddress
+ edtCustomDirectory
chbStartOnOSStart