From ebbfe9fdfb783421faf211e1f031e82d641a3146 Mon Sep 17 00:00:00 2001 From: Peter L Jones Date: Sun, 14 Jan 2024 12:47:14 +0000 Subject: [PATCH 1/3] Add tooltips to connectdlg --- src/connectdlg.cpp | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index bc5190aa81..830cf3c74f 100644 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -48,37 +48,45 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR QString strDirectoryAN = tr ( "Directory combo box" ); lblList->setWhatsThis ( strDirectoryWT ); + lblList->setToolTip ( strDirectoryWT ); lblList->setAccessibleName ( strDirectoryAN ); cbxDirectory->setWhatsThis ( strDirectoryWT ); + cbxDirectory->setToolTip ( strDirectoryWT ); cbxDirectory->setAccessibleName ( strDirectoryAN ); // filter QString strFilterWT = "" + tr ( "Filter" ) + ": " + tr ( "Filters the server list by the given text. Note that the filter is case insensitive. " "A single # character will filter for those servers with at least one person connected." ); - QString strFilterAN = tr ( "Filter edit box" ); lblFilter->setWhatsThis ( strFilterWT ); + lblFilter->setToolTip ( strFilterWT ); edtFilter->setWhatsThis ( strFilterWT ); + edtFilter->setToolTip ( strFilterWT ); + QString strFilterAN = tr ( "Filter edit box" ); lblFilter->setAccessibleName ( strFilterAN ); edtFilter->setAccessibleName ( strFilterAN ); // show all mucisians - chbExpandAll->setWhatsThis ( "" + tr ( "Show All Musicians" ) + ": " + - tr ( "Uncheck to collapse the server list to show just the server details. " - "Check to show everyone on the servers." ) ); + QString strExpandAllWT = "" + tr ( "Show All Musicians" ) + ": " + + tr ( "Uncheck to collapse the server list to show just the server details. " + "Check to show everyone on the servers." ); + chbExpandAll->setWhatsThis ( strExpandAllWT ); + chbExpandAll->setToolTip ( strExpandAllWT ); chbExpandAll->setAccessibleName ( tr ( "Show all musicians check box" ) ); // server list view - lvwServers->setWhatsThis ( "" + tr ( "Server List" ) + ": " + - tr ( "The Connection Setup window lists the available servers registered with " - "the selected directory. Use the Directory dropdown to change the directory, " - "find the server you want to join in the server list, click on it, and " - "then click the Connect button to connect. Alternatively, double click on " - "the server name to connect." ) + - "
" + tr ( "Permanent servers (those that have been listed for longer than 48 hours) are shown in bold." ) + - "
" + tr ( "You can add custom directories in Advanced Settings." ) ); + QString strServersWT = "" + tr ( "Server List" ) + ": " + + tr ( "The Connection Setup window lists the available servers registered with " + "the selected directory. Use the Directory dropdown to change the directory, " + "find the server you want to join in the server list, click on it, and " + "then click the Connect button to connect. Alternatively, double click on " + "the server name to connect." ) + + "
" + tr ( "Permanent servers (those that have been listed for longer than 48 hours) are shown in bold." ) + "
" + + tr ( "You can add custom directories in Advanced Settings." ); + lvwServers->setWhatsThis ( strServersWT ); + lvwServers->setToolTip ( strServersWT ); lvwServers->setAccessibleName ( tr ( "Server list view" ) ); @@ -91,15 +99,20 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR .arg ( QString ( "example.org:%1" ).arg ( DEFAULT_PORT_NUMBER ) ); lblServerAddr->setWhatsThis ( strServAddrH ); + lblServerAddr->setToolTip ( strServAddrH ); cbxServerAddr->setWhatsThis ( strServAddrH ); + cbxServerAddr->setToolTip ( strServAddrH ); cbxServerAddr->setAccessibleName ( tr ( "Server address edit box" ) ); cbxServerAddr->setAccessibleDescription ( tr ( "Holds the current server address. It also stores old addresses in the combo box list." ) ); + QString strDeleteServerAddrWT = "" + tr ( "Delete Server Address" ) + ": " + + tr ( "Click the button to clear the currently selected server address " + "and delete it from the list of stored servers." ); + tbtDeleteServerAddr->setWhatsThis ( strDeleteServerAddrWT ); + tbtDeleteServerAddr->setToolTip ( strDeleteServerAddrWT ); + tbtDeleteServerAddr->setAccessibleName ( tr ( "Delete server address button" ) ); - tbtDeleteServerAddr->setWhatsThis ( "" + tr ( "Delete Server Address" ) + ": " + - tr ( "Click the button to clear the currently selected server address " - "and delete it from the list of stored servers." ) ); tbtDeleteServerAddr->setText ( u8"\u232B" ); UpdateDirectoryComboBox(); From 41213a766bf9acccd31d91a305bbe887a86dcb7f Mon Sep 17 00:00:00 2001 From: Peter L Jones Date: Sun, 14 Jan 2024 12:48:52 +0000 Subject: [PATCH 2/3] Rename lblList to lblDirectory (to match cbx) --- src/connectdlg.cpp | 10 +++++----- src/connectdlgbase.ui | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 830cf3c74f..8ec68332b8 100644 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -45,13 +45,13 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR QString strDirectoryWT = "" + tr ( "Directory" ) + ": " + tr ( "Shows the servers listed by the selected directory. " "You can add custom directories in Advanced Settings." ); - QString strDirectoryAN = tr ( "Directory combo box" ); - - lblList->setWhatsThis ( strDirectoryWT ); - lblList->setToolTip ( strDirectoryWT ); - lblList->setAccessibleName ( strDirectoryAN ); + lblDirectory->setWhatsThis ( strDirectoryWT ); + lblDirectory->setToolTip ( strDirectoryWT ); cbxDirectory->setWhatsThis ( strDirectoryWT ); cbxDirectory->setToolTip ( strDirectoryWT ); + + QString strDirectoryAN = tr ( "Directory combo box" ); + lblDirectory->setAccessibleName ( strDirectoryAN ); cbxDirectory->setAccessibleName ( strDirectoryAN ); // filter diff --git a/src/connectdlgbase.ui b/src/connectdlgbase.ui index 279c76dc0b..cc4413dd16 100644 --- a/src/connectdlgbase.ui +++ b/src/connectdlgbase.ui @@ -30,7 +30,7 @@ 0 - + Directory From 1ea7d42af47a6b6dfbf349e3f011f832e762031a Mon Sep 17 00:00:00 2001 From: Peter L Jones Date: Sun, 14 Jan 2024 12:50:30 +0000 Subject: [PATCH 3/3] Reword directory combo help for clarity --- src/connectdlg.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 8ec68332b8..316e0e783a 100644 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -42,9 +42,9 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR // Add help text to controls ----------------------------------------------- // directory - QString strDirectoryWT = "" + tr ( "Directory" ) + ": " + - tr ( "Shows the servers listed by the selected directory. " - "You can add custom directories in Advanced Settings." ); + QString strDirectoryWT = "" + tr ( "Directory" ) + ": " + tr ( "The list of available directories." ) + "
" + + tr ( "Select a directory to list the servers registered with it." ) + "
" + + tr ( "You can add custom directories in Advanced Settings." ); lblDirectory->setWhatsThis ( strDirectoryWT ); lblDirectory->setToolTip ( strDirectoryWT ); cbxDirectory->setWhatsThis ( strDirectoryWT ); @@ -77,16 +77,19 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR chbExpandAll->setAccessibleName ( tr ( "Show all musicians check box" ) ); // server list view - QString strServersWT = "" + tr ( "Server List" ) + ": " + - tr ( "The Connection Setup window lists the available servers registered with " - "the selected directory. Use the Directory dropdown to change the directory, " - "find the server you want to join in the server list, click on it, and " - "then click the Connect button to connect. Alternatively, double click on " - "the server name to connect." ) + - "
" + tr ( "Permanent servers (those that have been listed for longer than 48 hours) are shown in bold." ) + "
" + - tr ( "You can add custom directories in Advanced Settings." ); - lvwServers->setWhatsThis ( strServersWT ); - lvwServers->setToolTip ( strServersWT ); + lvwServers->setWhatsThis ( "" + tr ( "Server List" ) + ": " + + tr ( "The Connection Setup window lists the available servers registered with " + "the selected directory. Use the Directory dropdown to change the directory, " + "find the server you want to join in the server list, click on it, and " + "then click the Connect button to connect. Alternatively, double click on " + "the server name to connect." ) + + "
" + tr ( "Permanent servers (those that have been listed for longer than 48 hours) are shown in bold." ) + + "
" + tr ( "You can add custom directories in Advanced Settings." ) ); + + lvwServers->setToolTip ( "" + tr ( "Server List" ) + ": " + + tr ( "The list of servers registered with the selected directory. " + "Click the server you want to join, then click the Connect button or " + "double click the server to connect." ) ); lvwServers->setAccessibleName ( tr ( "Server list view" ) );