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

Add tooltips to connectdlg #3252

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
44 changes: 30 additions & 14 deletions src/connectdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,37 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR

// Add help text to controls -----------------------------------------------
// directory
QString strDirectoryWT = "<b>" + tr ( "Directory" ) + ":</b> " +
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->setAccessibleName ( strDirectoryAN );
QString strDirectoryWT = "<b>" + tr ( "Directory" ) + ":</b> " + tr ( "The list of available directories." ) + "<br/>" +
tr ( "Select a directory to list the servers registered with it." ) + "<br/>" +
tr ( "You can add custom directories in Advanced Settings." );
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
QString strFilterWT = "<b>" + tr ( "Filter" ) + ":</b> " +
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 ( "<b>" + tr ( "Show All Musicians" ) + ":</b> " +
tr ( "Uncheck to collapse the server list to show just the server details. "
"Check to show everyone on the servers." ) );
QString strExpandAllWT = "<b>" + tr ( "Show All Musicians" ) + ":</b> " +
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" ) );

Expand All @@ -80,6 +86,11 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR
"<br>" + tr ( "Permanent servers (those that have been listed for longer than 48 hours) are shown in bold." ) +
"<br>" + tr ( "You can add custom directories in Advanced Settings." ) );

lvwServers->setToolTip ( "<b>" + tr ( "Server List" ) + ":</b> " +
tr ( "The list of servers registered with the selected directory. "
Copy link
Member

Choose a reason for hiding this comment

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

Maybe even shorter: Just mention the double click to join a server. The other option doesn't really need to be explained and is slower.

Copy link
Member

Choose a reason for hiding this comment

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

Server list: Double click a Server to connect.

"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" ) );

// server address
Expand All @@ -91,15 +102,20 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR
.arg ( QString ( "<tt>example.org:%1</tt>" ).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 = "<b>" + tr ( "Delete Server Address" ) + ":</b> " +
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 ( "<b>" + tr ( "Delete Server Address" ) + ":</b> " +
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();
Expand Down
2 changes: 1 addition & 1 deletion src/connectdlgbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lblList">
<widget class="QLabel" name="lblDirectory">
<property name="text">
<string>Directory</string>
</property>
Expand Down
Loading