1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-03 12:16:44 +02:00

Refactor and clean up file transfers

(No longer rely on undefined core filenumber property for indexing)
This commit is contained in:
Jfreegman
2015-03-29 18:33:51 -04:00
parent bf09b3b6c4
commit 522aabd4e4
12 changed files with 322 additions and 266 deletions

View File

@ -155,11 +155,13 @@ void line_info_add(ToxWindow *self, const char *timestr, const char *name1, cons
/* for type-specific formatting in print function */
switch (type) {
case IN_ACTION:
/* fallthrough */
case OUT_ACTION:
len += strlen(user_settings->line_normal) + 2;
break;
case IN_MSG:
/* fallthrough */
case OUT_MSG:
len += strlen(user_settings->line_normal) + 3;
break;
@ -299,7 +301,9 @@ void line_info_print(ToxWindow *self)
switch (type) {
case OUT_MSG:
/* fallthrough */
case OUT_MSG_READ:
/* fallthrough */
case IN_MSG:
wattron(win, COLOR_PAIR(BLUE));
wprintw(win, "%s ", line->timestr);
@ -339,7 +343,9 @@ void line_info_print(ToxWindow *self)
break;
case OUT_ACTION_READ:
/* fallthrough */
case OUT_ACTION:
/* fallthrough */
case IN_ACTION:
wattron(win, COLOR_PAIR(BLUE));
wprintw(win, "%s ", line->timestr);