diff options
Diffstat (limited to 'testing/toxic/chat.c')
-rw-r--r-- | testing/toxic/chat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c index 846bcf21..936eb868 100644 --- a/testing/toxic/chat.c +++ b/testing/toxic/chat.c | |||
@@ -51,6 +51,7 @@ static void chat_onMessage(ToxWindow* self, int num, uint8_t* msg, uint16_t len) | |||
51 | 51 | ||
52 | wattron(ctx->history, COLOR_PAIR(2)); | 52 | wattron(ctx->history, COLOR_PAIR(2)); |
53 | wprintw(ctx->history, "%02d:%02d:%02d ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec); | 53 | wprintw(ctx->history, "%02d:%02d:%02d ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec); |
54 | wattroff(ctx->history, COLOR_PAIR(2)); | ||
54 | wattron(ctx->history, COLOR_PAIR(4)); | 55 | wattron(ctx->history, COLOR_PAIR(4)); |
55 | wprintw(ctx->history, "%s: ", nick); | 56 | wprintw(ctx->history, "%s: ", nick); |
56 | wattroff(ctx->history, COLOR_PAIR(4)); | 57 | wattroff(ctx->history, COLOR_PAIR(4)); |
@@ -116,6 +117,7 @@ static void chat_onKey(ToxWindow* self, int key) { | |||
116 | /* make sure the string has at least non-space character */ | 117 | /* make sure the string has at least non-space character */ |
117 | wattron(ctx->history, COLOR_PAIR(2)); | 118 | wattron(ctx->history, COLOR_PAIR(2)); |
118 | wprintw(ctx->history, "%02d:%02d:%02d ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec); | 119 | wprintw(ctx->history, "%02d:%02d:%02d ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec); |
120 | wattroff(ctx->history, COLOR_PAIR(2)); | ||
119 | wattron(ctx->history, COLOR_PAIR(1)); | 121 | wattron(ctx->history, COLOR_PAIR(1)); |
120 | wprintw(ctx->history, "you: ", ctx->line); | 122 | wprintw(ctx->history, "you: ", ctx->line); |
121 | wattroff(ctx->history, COLOR_PAIR(1)); | 123 | wattroff(ctx->history, COLOR_PAIR(1)); |
@@ -254,6 +256,6 @@ ToxWindow new_chat(int friendnum) { | |||
254 | x->friendnum = friendnum; | 256 | x->friendnum = friendnum; |
255 | 257 | ||
256 | ret.x = (void*) x; | 258 | ret.x = (void*) x; |
257 | 259 | free(x); | |
258 | return ret; | 260 | return ret; |
259 | } | 261 | } |