From 9800a46adb3b6c622d242ce8fc5904030cf3c111 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 28 Jan 2015 00:04:37 +0000 Subject: [PATCH 1/5] Fixed compile error when no OTR support --- src/ui/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/core.c b/src/ui/core.c index 14ea2c17..85d5748a 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1418,8 +1418,8 @@ ui_outgoing_chat_msg(const char * const from, const char * const barejid, // create new window if (window == NULL) { window = wins_new_chat(barejid); - ProfChatWin *chatwin = (ProfChatWin*)window; #ifdef HAVE_LIBOTR + ProfChatWin *chatwin = (ProfChatWin*)window; if (otr_is_secure(barejid)) { chatwin->is_otr = TRUE; } From 6529220351dd9b11c610df1c3372dd138d2af2b4 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 28 Jan 2015 00:52:10 +0000 Subject: [PATCH 2/5] Strip leading/trailing whitespace from result of eval_password fixes #495 --- src/command/commands.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/command/commands.c b/src/command/commands.c index 75a4f6cf..60ef3780 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -154,6 +154,7 @@ cmd_connect(gchar **args, struct cmd_help_t help) cons_show("Error evaluating password, see logs for details."); return TRUE; } + g_strstrip(account->password); } else { log_error("popen failed when running eval_password."); cons_show("Error evaluating password, see logs for details."); From ec28888915132f03a4ecad45987a0b94c17f2e01 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 28 Jan 2015 19:50:16 +0000 Subject: [PATCH 3/5] Strip only trailing newline from eval_password --- src/command/commands.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/command/commands.c b/src/command/commands.c index 60ef3780..25314c2e 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -154,7 +154,10 @@ cmd_connect(gchar **args, struct cmd_help_t help) cons_show("Error evaluating password, see logs for details."); return TRUE; } - g_strstrip(account->password); + // strip trailing newline + if (g_str_has_suffix(account->password, "\n")) { + account->password[strlen(account->password)-1] = '\0'; + } } else { log_error("popen failed when running eval_password."); cons_show("Error evaluating password, see logs for details."); From 351ff752a7b11408e62f00cb8b5778a58e8fdda7 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 28 Jan 2015 20:35:00 +0000 Subject: [PATCH 4/5] Renamed command group presence->presences to avoid clash --- src/command/command.c | 2 +- src/command/commands.c | 2 +- src/config/theme.c | 2 +- src/ui/console.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/command/command.c b/src/command/command.c index 8e16276b..f1926dbb 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1141,7 +1141,7 @@ cmd_init(void) autocomplete_add(help_ac, "basic"); autocomplete_add(help_ac, "chatting"); autocomplete_add(help_ac, "groupchat"); - autocomplete_add(help_ac, "presence"); + autocomplete_add(help_ac, "presences"); autocomplete_add(help_ac, "contacts"); autocomplete_add(help_ac, "service"); autocomplete_add(help_ac, "settings"); diff --git a/src/command/commands.c b/src/command/commands.c index 25314c2e..2059c982 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -714,7 +714,7 @@ cmd_help(gchar **args, struct cmd_help_t help) "/rooms", "/tiny", "/who", "/nick", "/privileges", "/info", "/occupants" }; _cmd_show_filtered_help("Groupchat commands", filter, ARRAY_SIZE(filter)); - } else if (strcmp(args[0], "presence") == 0) { + } else if (strcmp(args[0], "presences") == 0) { gchar *filter[] = { "/autoaway", "/away", "/chat", "/dnd", "/online", "/priority", "/account", "/status", "/statuses", "/who", "/xa" }; diff --git a/src/config/theme.c b/src/config/theme.c index 6d3c5938..a5dbd0dd 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -592,7 +592,7 @@ theme_attrs(theme_item_t attrs) case THEME_BLACK_BOLD: result = COLOR_PAIR(52); break; case THEME_MAGENTA: result = COLOR_PAIR(53); break; case THEME_MAGENTA_BOLD: result = COLOR_PAIR(53); break; - default: break; + default: break; } if (g_hash_table_lookup(bold_items, GINT_TO_POINTER(attrs))) { diff --git a/src/ui/console.c b/src/ui/console.c index dd50d6d3..cdf5d1b8 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1402,7 +1402,7 @@ cons_help(void) cons_show("/help basic - List basic commands for getting started."); cons_show("/help chatting - List chat commands."); cons_show("/help groupchat - List groupchat commands."); - cons_show("/help presence - List commands to change presence."); + cons_show("/help presences - List commands to change presence."); cons_show("/help contacts - List commands for manipulating your roster."); cons_show("/help service - List service discovery commands."); cons_show("/help settings - List commands for changing settings."); From 5b26879e3137c833baf393878d955420360b8edb Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 28 Jan 2015 20:59:25 +0000 Subject: [PATCH 5/5] Updated /wrap help --- src/command/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/command.c b/src/command/command.c index f1926dbb..7be6603d 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -615,7 +615,7 @@ static struct cmd_t command_defs[] = { "/wrap on|off", "Word wrapping.", { "/wrap on|off", "------------", - "Enable or disable word wrapping.", + "Enable or disable word wrapping in the main window.", NULL } } }, { "/time",