linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #07341
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3337: The text in the /help-command now lists the description of each command.
------------------------------------------------------------
revno: 3337
committer: Fredrik Ullner <ullner@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Fri 2013-08-09 15:04:30 +0200
message:
The text in the /help-command now lists the description of each command.
modified:
changelog.txt
help/chat_commands.html
win32/HubFrame.cpp
win32/PrivateFrame.cpp
win32/WinUtil.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2013-08-08 21:26:09 +0000
+++ changelog.txt 2013-08-09 13:04:30 +0000
@@ -4,6 +4,7 @@
* Optimize searches with multiple extensions (emtee, poy)
* [L#1032153] Added CDATA parsing to XML parser (crise)
* [L#233798] Added option to set automatic search interval (ullner)
+* [L#1033249] The text in the /help-command now lists the description of each command. (ullner)
-- 0.828 2013-07-23 --
* Translation fixes
=== modified file 'help/chat_commands.html'
--- help/chat_commands.html 2012-09-09 14:05:30 +0000
+++ help/chat_commands.html 2013-08-09 13:04:30 +0000
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
@@ -115,7 +115,7 @@
parameters is specified it opens that log file. The status log is
available only in the hub frame.</dd>
<dt><untranslated>/help</untranslated></dt>
- <dd>Displays available commands. (The ones listed on this page.)</dd>
+ <dd>Displays available commands. (The ones listed on this page.) Optionally, you can specify "brief" to have a brief listing.</dd>
<dt><untranslated>/u <url></untranslated></dt>
<dd>Launches your default web browser with the given URL.</dd>
<dt><untranslated>/f <search string></untranslated></dt>
=== modified file 'win32/HubFrame.cpp'
--- win32/HubFrame.cpp 2013-03-31 16:34:44 +0000
+++ win32/HubFrame.cpp 2013-08-09 13:04:30 +0000
@@ -512,11 +512,53 @@
} else if(Util::stricmp(cmd.c_str(), _T("topic")) == 0) {
addChat(str(TF_("Current hub topic: %1%") % Text::toT(client->getHubDescription())));
} else if(Util::stricmp(cmd.c_str(), _T("help")) == 0) {
- addChat(_T("*** ") + WinUtil::commands +
- _T(", /join <hub-ip>, /showjoins, /favshowjoins, /close, /userlist, ")
- _T("/conn[ection], /fav[orite], /removefav[orite], /info, ")
- _T("/pm <user> [message], /getlist <user>, /ignore <user>, /unignore <user>, ")
- _T("/log <status, system, downloads, uploads>, /topic"));
+ bool bShowBriefCommands = !param.empty() && (Util::stricmp(param.c_str(), _T("brief")) == 0);
+
+ if(bShowBriefCommands)
+ {
+ addChat(T_("*** Keyboard commands:") + _T("\r\n") +
+ WinUtil::commands +
+ _T(", /join <hub-ip>, /showjoins, /favshowjoins, /close, /userlist, ")
+ _T("/conn[ection], /fav[orite], /removefav[orite], /info, ")
+ _T("/pm <user> [message], /getlist <user>, /ignore <user>, /unignore <user>, ")
+ _T("/log <status, system, downloads, uploads>, /topic")
+ );
+ }
+ else
+ {
+ addChat(T_("*** Keyboard commands:") + _T("\r\n") +
+ WinUtil::descriptive_commands
+ + _T("\r\n") _T("/join <hub-ip>")
+ + _T("\r\n\t") + T_("Joins <hub-ip>. See also Open new window when using /join.")
+ + _T("\r\n") _T("/showjoins")
+ + _T("\r\n\t") + T_("Toggles the displaying of users joining the hub. This only takes effect for freshly-arriving users.")
+ + _T("\r\n") _T("/favshowjoins")
+ + _T("\r\n\t") + T_("Toggles the displaying of favorite users joining the hub. Does not require /showjoins to be enabled.")
+ + _T("\r\n") _T("/userlist")
+ + _T("\r\n\t") + T_("Toggles visibility of the list of users for the current hub.")
+ + _T("\r\n") _T("/connection")
+ + _T("\r\n") _T("/conn")
+ + _T("\r\n\t") + T_("Displays the connectivity status information, auto detected or manually chosen connection mode, IP and ports that DC++ is currently using for connections with all users.")
+ + _T("\r\n") _T("/favorite")
+ + _T("\r\n") _T("/fav")
+ + _T("\r\n\t") + T_("Adds the current hub (along with your nickname and password, if used) to the list of Favorite Hubs.")
+ + _T("\r\n") _T("/removefavorite")
+ + _T("\r\n") _T("/removefav")
+ + _T("\r\n\t") + T_("Removes the current hub from the list of Favorite Hubs.")
+ + _T("\r\n") _T("/pm <user> [message]")
+ + _T("\r\n\t") + T_("Opens a private message window to the user, and optionally sends the message, if one was specified.")
+ + _T("\r\n") _T("/getlist <user>")
+ + _T("\r\n\t") + T_("Adds the user's list to the Download Queue.")
+ + _T("\r\n") _T("/ignore <user>")
+ + _T("\r\n\t") + T_("Adds a user matching definition (or modifies an existing one, if possible) to ignore chat messages from the specified user.")
+ + _T("\r\n") _T("/unignore <user>")
+ + _T("\r\n\t") + T_("Adds a user matching definition (or modifies an existing one, if possible) to stop ignoring chat messages from the specified user.")
+ + _T("\r\n") _T("/topic")
+ + _T("\r\n\t") + T_("Prints the current hub's topic. Useful if you want to copy the topic or it contains a link you'd like to easily open.")
+
+ );
+ }
+
} else if(Util::stricmp(cmd.c_str(), _T("pm")) == 0) {
string::size_type j = param.find(_T(' '));
if(j != string::npos) {
=== modified file 'win32/PrivateFrame.cpp'
--- win32/PrivateFrame.cpp 2013-08-03 17:28:21 +0000
+++ win32/PrivateFrame.cpp 2013-08-09 13:04:30 +0000
@@ -354,7 +354,32 @@
} else if(Util::stricmp(cmd.c_str(), _T("log")) == 0) {
openLog();
} else if(Util::stricmp(cmd.c_str(), _T("help")) == 0) {
- addChat(_T("*** ") + WinUtil::commands + _T(", /getlist, /grant, /close, /favorite, /ignore, /unignore, /log <system, downloads, uploads>"));
+ bool bShowBriefCommands = !param.empty() && (Util::stricmp(param.c_str(), _T("brief")) == 0);
+
+ if(bShowBriefCommands)
+ {
+ addChat(T_("*** Keyboard commands:") + _T("\r\n") +
+ WinUtil::commands +
+ _T(", /getlist, /grant, /close, /favorite, /ignore, /unignore, /log <system, downloads, uploads>")
+ );
+ }
+ else
+ {
+ addChat(T_("*** Keyboard commands:") + _T("\r\n") +
+ WinUtil::descriptive_commands +
+ + _T("\r\n") _T("/getlist")
+ + _T("\r\n\t") + T_("Adds the current user's list to the Download Queue.")
+ + _T("\r\n") _T("/grant")
+ + _T("\r\n\t") + T_("Grants the remote user a slot. Once they connect, or if they don't connect in 10 minutes, the granted slot is removed.")
+ + _T("\r\n") _T("/favorite")
+ + _T("\r\n") _T("/fav")
+ + _T("\r\n\t") + T_("Adds the current user to the list of Favorite Users.")
+ + _T("\r\n") _T("/ignore")
+ + _T("\r\n\t") + T_("Adds a user matching definition (or modifies an existing one, if possible) to ignore chat messages from the current user.")
+ + _T("\r\n") _T("/unignore")
+ + _T("\r\n\t") + T_("Adds a user matching definition (or modifies an existing one, if possible) to stop ignoring chat messages from the current user.")
+ );
+ }
} else if(SETTING(SEND_UNKNOWN_COMMANDS)) {
send = true;
=== modified file 'win32/WinUtil.cpp'
--- win32/WinUtil.cpp 2013-06-01 13:48:06 +0000
+++ win32/WinUtil.cpp 2013-08-09 13:04:30 +0000
@@ -137,6 +137,7 @@
const RichTextBox::Seed WinUtil::Seeds::Dialog::richTextBox;
const Table::Seed WinUtil::Seeds::Dialog::table;
const Table::Seed WinUtil::Seeds::Dialog::optionsTable;
+const CheckBox::Seed WinUtil::Seeds::Dialog::checkBox;
void WinUtil::init() {
@@ -548,6 +549,42 @@
#define MSGS 19
+tstring
+ WinUtil::descriptive_commands =
+ _T("\r\n") _T("/refresh")
+ _T("\r\n\t") + T_("Manually refreshes DC++'s share list by going through the shared directories and adding new folders and files. DC++ automatically refreshes once an hour by default, and also refreshes after the list of shared directories is changed.")
+ + _T("\r\n") _T("/slots <number>")
+ + _T("\r\n\t") + T_("Sets the current number of upload slots to the number you specify. If this is less than the current number of slots, no uploads are cancelled.")
+ + _T("\r\n") _T("/dslots <number>")
+ + _T("\r\n\t") + T_("Sets the current number of download slots to the number you specify. If this is less than the current number of slots, no downloads are cancelled.")
+ + _T("\r\n") _T("/search <string>")
+ + _T("\r\n\t") + T_("Opens a new search window with the specified search string. It does not automatically send the search.")
+ + _T("\r\n") _T("/close")
+ + _T("\r\n\t") + T_("Closes the current window.")
+ + _T("\r\n") _T("/clear [lines to keep]")
+ + _T("\r\n\t") + T_("Clears the current window of all text. Optionally, you can specify how many of the latest (most recent) lines should be kept.")
+ + _T("\r\n") _T("/dc++")
+ + _T("\r\n\t") + T_("Sends a random DC++ advertising message to the chat, including a link to the DC++ homepage and the version number.")
+ + _T("\r\n") _T("/away [message]")
+ + _T("\r\n\t") + T_("Sets Away status. New private message windows will be responded to, once, with the message you specified, or the default away message configured in the Personal information settings page.")
+ + _T("\r\n") _T("/back")
+ + _T("\r\n\t") + T_("Un-sets Away status.")
+ + _T("\r\n") _T("/g <search string>")
+ + _T("\r\n\t") + T_("Launches your default web browser to the Google search engine with the specified search.")
+ + _T("\r\n") _T("/imdb <imdb query>")
+ + _T("\r\n\t") + T_("Launches your default web browser to the Internet Movie Database (imdb) with the specified query.")
+ + _T("\r\n") _T("/rebuild")
+ + _T("\r\n\t") + T_("Rebuilds the HashIndex.xml and HashData.dat files, removing entries to files that are no longer shared, or old hashes for files that have since changed. This runs in the main DC++ thread, so the interface will freeze until the rebuild is finished.")
+ + _T("\r\n") _T("/log <status, system, downloads, uploads>")
+ + _T("\r\n\t") + T_("If no parameter is specified, it launches the log for the hub or private chat with the associated application in Windows. If one of the parameters is specified it opens that log file. The status log is available only in the hub frame.")
+ + _T("\r\n") _T("/help")
+ + _T("\r\n\t") + T_("Displays available commands. (The ones listed on this page.) Optionally, you can specify "brief" to have a brief listing.")
+ + _T("\r\n") _T("/u <url>")
+ + _T("\r\n\t") + T_("Launches your default web browser with the given URL.")
+ + _T("\r\n") _T("/f <search string>")
+ + _T("\r\n\t") + T_("Highlights the last occourrence of the specified search string in the chat window.")
+ ;
+
tstring
WinUtil::commands =
_T("/refresh, /me <msg>, /clear [lines to keep], /slots #, /dslots #, /search <string>, /f <string>, /dc++, /away <msg>, /back, /g <searchstring>, /imdb <imdbquery>, /u <url>, /rebuild, /download, /upload");