1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 06:13:03 +01:00

change online/offline symbols

This commit is contained in:
Jfreegman 2014-07-26 19:16:07 -04:00
parent 02b192d6ee
commit 3cae1d92cd
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
5 changed files with 9 additions and 6 deletions

View File

@ -858,7 +858,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
} }
wattron(statusbar->topline, COLOR_PAIR(colour) | A_BOLD); wattron(statusbar->topline, COLOR_PAIR(colour) | A_BOLD);
wprintw(statusbar->topline, " O"); wprintw(statusbar->topline, " %s", ONLINE_CHAR);
wattroff(statusbar->topline, COLOR_PAIR(colour) | A_BOLD); wattroff(statusbar->topline, COLOR_PAIR(colour) | A_BOLD);
if (friends[self->num].is_typing) if (friends[self->num].is_typing)
@ -871,7 +871,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
if (friends[self->num].is_typing) if (friends[self->num].is_typing)
wattroff(statusbar->topline, COLOR_PAIR(YELLOW)); wattroff(statusbar->topline, COLOR_PAIR(YELLOW));
} else { } else {
wprintw(statusbar->topline, " o"); wprintw(statusbar->topline, " %s", OFFLINE_CHAR);
wattron(statusbar->topline, A_BOLD); wattron(statusbar->topline, A_BOLD);
wprintw(statusbar->topline, " %s ", statusbar->nick); wprintw(statusbar->topline, " %s ", statusbar->nick);
wattroff(statusbar->topline, A_BOLD); wattroff(statusbar->topline, A_BOLD);

View File

@ -447,7 +447,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
} }
wattron(self->window, COLOR_PAIR(colour) | A_BOLD); wattron(self->window, COLOR_PAIR(colour) | A_BOLD);
wprintw(self->window, "O "); wprintw(self->window, "%s ", ONLINE_CHAR);
wattroff(self->window, COLOR_PAIR(colour) | A_BOLD); wattroff(self->window, COLOR_PAIR(colour) | A_BOLD);
if (f_selected) if (f_selected)
@ -487,7 +487,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
wprintw(self->window, "\n"); wprintw(self->window, "\n");
} else { } else {
wprintw(self->window, "o "); wprintw(self->window, "%s ", OFFLINE_CHAR);
if (f_selected) if (f_selected)
wattron(self->window, COLOR_PAIR(BLUE)); wattron(self->window, COLOR_PAIR(BLUE));

View File

@ -302,7 +302,7 @@ static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int32_t friendnum
char timefrmt[TIME_STR_SIZE]; char timefrmt[TIME_STR_SIZE];
get_time_str(timefrmt, sizeof(timefrmt)); get_time_str(timefrmt, sizeof(timefrmt));
char *msg; const char *msg;
if (status == 1) { if (status == 1) {
msg = "has come online"; msg = "has come online";

View File

@ -64,6 +64,9 @@
#define T_KEY_C_H 0x08 /* ctrl-h */ #define T_KEY_C_H 0x08 /* ctrl-h */
#define T_KEY_C_Y 0x19 /* ctrl-y */ #define T_KEY_C_Y 0x19 /* ctrl-y */
#define ONLINE_CHAR "*"
#define OFFLINE_CHAR "*"
typedef enum _FATAL_ERRS { typedef enum _FATAL_ERRS {
FATALERR_MEMORY = -1, /* malloc() or calloc() failed */ FATALERR_MEMORY = -1, /* malloc() or calloc() failed */
FATALERR_FREAD = -2, /* fread() failed on critical read */ FATALERR_FREAD = -2, /* fread() failed on critical read */

View File

@ -111,7 +111,7 @@ int yank_buf(ChatContext *ctx)
if (!ctx->yank[0]) if (!ctx->yank[0])
return -1; return -1;
if (ctx->yank_len + ctx->len >= MAX_STR_SIZE - 1) if (ctx->yank_len + ctx->len >= MAX_STR_SIZE)
return -1; return -1;
wmemmove(&ctx->line[ctx->pos + ctx->yank_len], &ctx->line[ctx->pos], ctx->len - ctx->pos); wmemmove(&ctx->line[ctx->pos + ctx->yank_len], &ctx->line[ctx->pos], ctx->len - ctx->pos);