mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 00:53:03 +01:00
> not having green text
This commit is contained in:
parent
80c7b07f2e
commit
39fc54972a
16
src/chat.c
16
src/chat.c
@ -35,7 +35,13 @@ 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));
|
||||||
wprintw(ctx->history, "%s\n", msg);
|
|
||||||
|
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);
|
||||||
|
|
||||||
self->blink = true;
|
self->blink = true;
|
||||||
beep();
|
beep();
|
||||||
@ -219,7 +225,13 @@ 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));
|
||||||
wprintw(ctx->history, "%s\n", line);
|
|
||||||
|
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);
|
||||||
|
|
||||||
if (!statusbar->is_online
|
if (!statusbar->is_online
|
||||||
|| tox_sendmessage(m, self->num, line, strlen(line) + 1) == 0) {
|
|| tox_sendmessage(m, self->num, line, strlen(line) + 1) == 0) {
|
||||||
|
@ -112,7 +112,13 @@ 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));
|
||||||
wprintw(ctx->history, "%s\n", msg);
|
|
||||||
|
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);
|
||||||
|
|
||||||
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