Skip to content
Merged
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
70 changes: 41 additions & 29 deletions src/connectdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,51 +41,63 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR
setupUi ( this );

// Add help text to controls -----------------------------------------------
// server list
// 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 );
cbxDirectoryServer->setWhatsThis ( strDirectoryWT );
cbxDirectoryServer->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 );
edtFilter->setWhatsThis ( strFilterWT );

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

chbExpandAll->setAccessibleName ( tr ( "Show all musicians check box" ) );

// server list view
lvwServers->setWhatsThis ( "<b>" + tr ( "Server List" ) + ":</b> " +
tr ( "The Connection Setup window shows a list of available servers. "
"Server operators can optionally list their servers by music genre. "
"Use the List dropdown to select a genre, click on the server you want "
"to join and press the Connect button to connect to it. Alternatively, "
"double click on on the server name. Permanent servers (those that have "
"been listed for longer than 48 hours) are shown in bold." ) );
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." ) +
"<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->setAccessibleName ( tr ( "Server list view" ) );

// server address
QString strServAddrH = "<b>" + tr ( "Server Address" ) + ":</b> " +
tr ( "If you know the IP address or URL of a server, you can connect to it "
"using the Server name/Address field. An optional port number can be added after the IP "
"address or URL using a colon as a separator, e.g, "
"example.org:" ) +
QString().setNum ( DEFAULT_PORT_NUMBER ) +
tr ( ". The field will "
"also show a list of the most recently used server addresses." );
"address or URL using a colon as a separator, e.g, %1. "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we include something about literal IPv6 addresses here? Because it contains colons, a literal IPv6 address must be enclosed in [ ], and any optional :port added after the ].

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should also add that into the docs too. Will give that a go. As to the text, what's the %1 variable here (I'm on a Mac and the help text isn't showing...)? If it's jamulus.example.com:22124 then maybe have jamulus.example.com:22124 (Note: IPv6 addresses must be enclosed in square brackets)

Copy link
Copy Markdown
Collaborator Author

@pljones pljones Nov 15, 2021

Choose a reason for hiding this comment

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

Personally, I'd rather keep it short and simple here, with the documentation for IPv6 providing the cases where something specific must be provided. It's already a bit long...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Putting the cursor into the Server Address field and pressing Shift-F1 on my Linux build gives
image
Right-click, choose What's This? on the "Server Address" label gives the same text (of course).

Shift-F1 on my Windows box:
image

Copy link
Copy Markdown
Member

@gilgongo gilgongo Nov 16, 2021

Choose a reason for hiding this comment

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

Hm. This is why I think all this is due for a re-jig now we have the docs in any case. It should really say something like, "Enter the URL or IP address of any private server you have access to." The help popups should just disambiguate the UI element that's described in the docs (and so that we don't spend efforts keeping the two in sync). But then that would apply to all of them, so that's not part of this ticket. I'd just leave it for now and I'll put the IPv6 thing in the docs.

"The field will also show a list of the most recently used server addresses." )
.arg ( QString ( "<tt>example.org:%1</tt>" ).arg ( DEFAULT_PORT_NUMBER ) );

lblServerAddr->setWhatsThis ( strServAddrH );
cbxServerAddr->setWhatsThis ( strServAddrH );

cbxServerAddr->setAccessibleName ( tr ( "Server address edit box" ) );
cbxServerAddr->setAccessibleDescription ( tr ( "Holds the current server "
"IP address or URL. It also stores old URLs in the combo box list." ) );
cbxServerAddr->setAccessibleDescription ( tr ( "Holds the current server IP address or URL. It also stores old URLs in the combo box list." ) );

UpdateDirectoryServerComboBox();

cbxDirectoryServer->setWhatsThis ( "<b>" + tr ( "Server List Selection" ) + ":</b> " + tr ( "Selects the server list to be shown." ) );
cbxDirectoryServer->setAccessibleName ( tr ( "Server list selection combo box" ) );

// filter
edtFilter->setWhatsThis ( "<b>" + tr ( "Filter" ) + ":</b> " +
tr ( "The server "
"list is filtered by the given text. Note that the filter is case insensitive." ) );
edtFilter->setAccessibleName ( tr ( "Filter edit box" ) );

// show all mucisians
chbExpandAll->setWhatsThis ( "<b>" + tr ( "Show All Musicians" ) + ":</b> " +
tr ( "If you check this check box, the musicians of all servers are shown. If you "
"uncheck the check box, all list view items are collapsed." ) );
chbExpandAll->setAccessibleName ( tr ( "Show all musicians check box" ) );

// init server address combo box (max MAX_NUM_SERVER_ADDR_ITEMS entries)
cbxServerAddr->setMaxCount ( MAX_NUM_SERVER_ADDR_ITEMS );
cbxServerAddr->setInsertPolicy ( QComboBox::NoInsert );
Expand Down