From bd20513493c9cdddeebe619ffdfbd7f8ed70498b Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Tue, 19 Aug 2014 23:40:49 -0400 Subject: [PATCH] a few fixes --- src/friendlist.c | 2 +- src/global_commands.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/friendlist.c b/src/friendlist.c index a000025..2ef628b 100644 --- a/src/friendlist.c +++ b/src/friendlist.c @@ -975,7 +975,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m) wmove(self->window, y2 - 1, 1); wattron(self->window, A_BOLD); - wprintw(self->window, "ID: "); + wprintw(self->window, "Key: "); wattroff(self->window, A_BOLD); int i; diff --git a/src/global_commands.c b/src/global_commands.c index ebcf688..0823407 100644 --- a/src/global_commands.c +++ b/src/global_commands.c @@ -372,7 +372,7 @@ void cmd_requests(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv return; } - int i; + int i, j; int count = 0; for (i = 0; i < FriendRequests.max_idx; ++i) { @@ -380,7 +380,6 @@ void cmd_requests(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv continue; char id[TOX_CLIENT_ID_SIZE * 2 + 1] = {0}; - size_t j; for (j = 0; j < TOX_CLIENT_ID_SIZE; ++j) { char d[3]; @@ -388,12 +387,11 @@ void cmd_requests(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv strcat(id, d); } - line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "id: %d, Key: %s", i, id); - line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Message: %s", FriendRequests.request[i].msg); + line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "%d : %s", i, id); + line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "%s", FriendRequests.request[i].msg); if (++count < FriendRequests.num_requests) line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, ""); - } }