Mercurial > pidgin.yaz
changeset 9247:933c7418fd03
[gaim-migrate @ 10046]
I went and made up a format for the help strings for commands.
I'm not married to this format if someone has a better suggestion.
I'll add help strings for IRC's commands (and give rid of its current
irc specific /help command, since there's no need for that anymore)
after someone suggets a better format, or no one complains about this one.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Wed, 09 Jun 2004 06:09:08 +0000 |
parents | e20af87d8721 |
children | 6430b09ccc71 |
files | src/cmds.h src/gtkconv.c src/protocols/jabber/jabber.c |
diffstat | 3 files changed, 22 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cmds.h Wed Jun 09 05:32:17 2004 +0000 +++ b/src/cmds.h Wed Jun 09 06:09:08 2004 +0000 @@ -111,7 +111,11 @@ * be called. * @param prpl_id This is the prpl's id string. This is only meaningful is the proper flag is set. * @param func This is the function to call when someone enters this command. - * @param helpstr This is a string describing how to use the command. + * @param helpstr This is a whitespace sensitive, UTF-8, HTML string describing how to use the command. + * The prefered format of this string shall be the commands name, followed by a space + * and any arguments it accpets (if it takes any arguments, otherwise no space), follow + * by a colon, two spaces, and a description of the command in sentense form. No slash + * before the command name. * @return A pointer to a GaimCmdId. This is only used for calling gaim_cmd_unregister, which frees it. * Returns @c NULL on failure. */
--- a/src/gtkconv.c Wed Jun 09 05:32:17 2004 +0000 +++ b/src/gtkconv.c Wed Jun 09 06:09:08 2004 +0000 @@ -419,9 +419,9 @@ if (help) { for (l = help; l; l = l->next) if (l->next) - g_string_append_printf(s, "%s\n", (char *)l->data); + g_string_append_printf(s, "/%s\n", (char *)l->data); else - g_string_append_printf(s, "%s", (char *)l->data); + g_string_append_printf(s, "/%s", (char *)l->data); } else { g_string_append(s, _("No such command (in this context).")); } @@ -6075,18 +6075,18 @@ **********************************************************************/ gaim_cmd_register("me", "S", GAIM_CMD_P_DEFAULT, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL, - me_command_cb, _("Send an IRC style action to a buddy or chat.")); + me_command_cb, _("me <action>: Send an IRC style action to a buddy or chat.")); gaim_cmd_register("debug", "w", GAIM_CMD_P_DEFAULT, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL, - debug_command_cb, _("Send various debug information to the current conversation.")); + debug_command_cb, _("debug <option>: Send various debug information to the current conversation.")); gaim_cmd_register("help", "", GAIM_CMD_P_DEFAULT, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL, - help_command_cb, _("/help: List available commands.")); + help_command_cb, _("help: List available commands.")); gaim_cmd_register("help", "w", GAIM_CMD_P_DEFAULT, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL, - help_arg_command_cb, _("/help <command>: Help on a specific command.")); + help_arg_command_cb, _("help <command>: Help on a specific command.")); } void
--- a/src/protocols/jabber/jabber.c Wed Jun 09 05:32:17 2004 +0000 +++ b/src/protocols/jabber/jabber.c Wed Jun 09 06:09:08 2004 +0000 @@ -1397,45 +1397,45 @@ { gaim_cmd_register("config", "", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY, "prpl-jabber", - jabber_cmd_chat_config, _("Configure a chat room")); + jabber_cmd_chat_config, _("config: Configure a chat room.")); gaim_cmd_register("configure", "", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY, "prpl-jabber", - jabber_cmd_chat_config, _("Configure a chat room")); + jabber_cmd_chat_config, _("configure: Configure a chat room.")); gaim_cmd_register("nick", "s", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY, "prpl-jabber", - jabber_cmd_chat_nick, _("Change your nickname")); + jabber_cmd_chat_nick, _("nick <new nickname>: Change your nickname.")); gaim_cmd_register("part", "s", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY | GAIM_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber", - jabber_cmd_chat_part, _("Leave the room")); + jabber_cmd_chat_part, _("part [room]: Leave the room.")); gaim_cmd_register("register", "", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY, "prpl-jabber", - jabber_cmd_chat_register, _("Register with a chat room")); + jabber_cmd_chat_register, _("register: Register with a chat room.")); /* XXX: there needs to be a core /topic cmd, methinks */ gaim_cmd_register("topic", "s", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY | GAIM_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber", - jabber_cmd_chat_topic, _("View or change the topic")); + jabber_cmd_chat_topic, _("topic [new topic]: View or change the topic.")); gaim_cmd_register("ban", "ws", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY | GAIM_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber", - jabber_cmd_chat_ban, _("Ban a user from the room")); + jabber_cmd_chat_ban, _("ban <user> [room]: Ban a user from the room.")); gaim_cmd_register("invite", "ws", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY | GAIM_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber", - jabber_cmd_chat_invite, _("Invite a user to the room")); + jabber_cmd_chat_invite, _("invite <user> [room]: Invite a user to the room.")); gaim_cmd_register("join", "ws", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY | GAIM_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber", - jabber_cmd_chat_join, _("Join a chat on this server")); + jabber_cmd_chat_join, _("join: <room> [server]: Join a chat on this server.")); gaim_cmd_register("kick", "ws", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY | GAIM_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber", - jabber_cmd_chat_kick, _("Kick a user from the room")); + jabber_cmd_chat_kick, _("kick <user> [room]: Kick a user from the room.")); gaim_cmd_register("msg", "ws", GAIM_CMD_P_PRPL, GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_PRPL_ONLY, "prpl-jabber", - jabber_cmd_chat_msg, _("Send a private message to another user")); + jabber_cmd_chat_msg, _("msg <user> [room]: Send a private message to another user.")); /* XXX is this right? */ } static GaimPluginPrefFrame *