From 84bd88ea92aa93d509de5784e82b3b6752979d94 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 16 Aug 2012 01:39:19 +0100 Subject: [PATCH] Show basic help on startup --- src/command.c | 2 +- src/windows.c | 36 +++++++++++++++++------------------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/command.c b/src/command.c index 3334548b..66c00805 100644 --- a/src/command.c +++ b/src/command.c @@ -82,7 +82,7 @@ static struct cmd_t main_commands[] = { { "/help", _cmd_help, - { "/help [command]", "This help, or help on a specific command", + { "/help [command]", "Show help summary, or help on a specific command", { "/help [command]", "---------------", "List all commands with short help on what they do.", diff --git a/src/windows.c b/src/windows.c index 90f97e73..29665838 100644 --- a/src/windows.c +++ b/src/windows.c @@ -58,6 +58,7 @@ static int max_cols = 0; static void _create_windows(void); static void _print_splash_logo(WINDOW *win); +static void _cons_show_basic_help(void); static int _find_prof_win_index(const char * const contact); static int _new_prof_win(const char * const contact); static void _current_window_refresh(void); @@ -450,8 +451,8 @@ cons_prefs(void) dirty = TRUE; } -void -cons_help(void) +static void +_cons_show_basic_help(void) { cons_show(""); cons_show("Basic Commands:"); @@ -467,6 +468,13 @@ cons_help(void) } cons_show(""); +} + +void +cons_help(void) +{ + _cons_show_basic_help(); + cons_show("Settings:"); cons_show(""); @@ -479,14 +487,6 @@ cons_help(void) settings_helpers = g_slist_next(settings_helpers); } -/* - cons_show("/beep : Enable/disable sound notification"); - cons_show("/notify : Enable/disable desktop notifications"); - cons_show("/flash : Enable/disable screen flash notification"); - cons_show("/showsplash : Enable/disable splash logo on startup"); - cons_show("/chlog : Enable/disable chat logging"); -*/ - cons_show(""); cons_show("Status changes:"); cons_show(""); @@ -500,14 +500,6 @@ cons_help(void) status_helpers = g_slist_next(status_helpers); } -/* - cons_show("/away : Set status to away."); - cons_show("/online : Set status to online."); - cons_show("/dnd : Set status to dnd (do not disturb)."); - cons_show("/chat : Set status to chat (available for chat)."); - cons_show("/xa : Set status to xa (extended away)."); -*/ - cons_show(""); cons_show("Navigation:"); cons_show(""); @@ -643,7 +635,13 @@ _create_windows(void) _win_show_time(_cons_win); wprintw(_cons_win, "\n"); _win_show_time(_cons_win); - wprintw(_cons_win, "Type '/help' to get started.\n"); + wprintw(_cons_win, "Type '/help' to show all commands.\n"); + _win_show_time(_cons_win); + wprintw(_cons_win, "Use page up and down keys to view.\n"); + _win_show_time(_cons_win); + wprintw(_cons_win, "Use tab to autocomplete commands, logins, or usernames.\n"); + + _cons_show_basic_help(); } prefresh(_cons_win, 0, 0, 1, 0, rows-3, cols-1);