mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-16 04:13:02 +01:00
> not having green text
This commit is contained in:
parent
80c7b07f2e
commit
39fc54972a
12
src/chat.c
12
src/chat.c
@ -35,6 +35,12 @@ static void chat_onMessage(ToxWindow *self, Tox *m, int num, uint8_t *msg, uint1
|
|||||||
wattron(ctx->history, COLOR_PAIR(4));
|
wattron(ctx->history, COLOR_PAIR(4));
|
||||||
wprintw(ctx->history, "%s: ", nick);
|
wprintw(ctx->history, "%s: ", nick);
|
||||||
wattroff(ctx->history, COLOR_PAIR(4));
|
wattroff(ctx->history, COLOR_PAIR(4));
|
||||||
|
|
||||||
|
if (msg[0] == '>') {
|
||||||
|
wattron(ctx->history, COLOR_PAIR(GREEN));
|
||||||
|
wprintw(ctx->history, "%s\n", msg);
|
||||||
|
wattroff(ctx->history, COLOR_PAIR(GREEN));
|
||||||
|
} else
|
||||||
wprintw(ctx->history, "%s\n", msg);
|
wprintw(ctx->history, "%s\n", msg);
|
||||||
|
|
||||||
self->blink = true;
|
self->blink = true;
|
||||||
@ -219,6 +225,12 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
|||||||
wattron(ctx->history, COLOR_PAIR(GREEN));
|
wattron(ctx->history, COLOR_PAIR(GREEN));
|
||||||
wprintw(ctx->history, "%s: ", selfname);
|
wprintw(ctx->history, "%s: ", selfname);
|
||||||
wattroff(ctx->history, COLOR_PAIR(GREEN));
|
wattroff(ctx->history, COLOR_PAIR(GREEN));
|
||||||
|
|
||||||
|
if (line[0] == '>') {
|
||||||
|
wattron(ctx->history, COLOR_PAIR(GREEN));
|
||||||
|
wprintw(ctx->history, "%s\n", line);
|
||||||
|
wattroff(ctx->history, COLOR_PAIR(GREEN));
|
||||||
|
} else
|
||||||
wprintw(ctx->history, "%s\n", line);
|
wprintw(ctx->history, "%s\n", line);
|
||||||
|
|
||||||
if (!statusbar->is_online
|
if (!statusbar->is_online
|
||||||
|
@ -112,6 +112,12 @@ static void groupchat_onGroupMessage(ToxWindow *self, Tox *m, int groupnum, int
|
|||||||
wattron(ctx->history, COLOR_PAIR(4));
|
wattron(ctx->history, COLOR_PAIR(4));
|
||||||
wprintw(ctx->history, "%s: ", nick);
|
wprintw(ctx->history, "%s: ", nick);
|
||||||
wattroff(ctx->history, COLOR_PAIR(4));
|
wattroff(ctx->history, COLOR_PAIR(4));
|
||||||
|
|
||||||
|
if (msg[0] == '>') {
|
||||||
|
wattron(ctx->history, COLOR_PAIR(GREEN));
|
||||||
|
wprintw(ctx->history, "%s\n", msg);
|
||||||
|
wattroff(ctx->history, COLOR_PAIR(GREEN));
|
||||||
|
} else
|
||||||
wprintw(ctx->history, "%s\n", msg);
|
wprintw(ctx->history, "%s\n", msg);
|
||||||
|
|
||||||
self->blink = true;
|
self->blink = true;
|
||||||
|
@ -19,7 +19,7 @@ uint8_t num_frnd_requests = 0;
|
|||||||
|
|
||||||
/* One group chat request slot for each friend; slot is
|
/* One group chat request slot for each friend; slot is
|
||||||
overwritten on subsequent requests by the same friend. */
|
overwritten on subsequent requests by the same friend. */
|
||||||
uint8_t pending_grp_requests[MAX_FRIENDS_NUM][TOX_CLIENT_ID_SIZE] = {'\0'};
|
uint8_t pending_grp_requests[MAX_FRIENDS_NUM][TOX_CLIENT_ID_SIZE] = {'a'};
|
||||||
|
|
||||||
static char prompt_buf[MAX_STR_SIZE] = {'\0'};
|
static char prompt_buf[MAX_STR_SIZE] = {'\0'};
|
||||||
static int prompt_buf_pos = 0;
|
static int prompt_buf_pos = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user