1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-09-28 00:25:35 +02:00

a few UI changes

This commit is contained in:
Jfreegman 2014-09-25 04:31:45 -04:00
parent 3a176e1cab
commit 2e65ee3609
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
5 changed files with 16 additions and 8 deletions

View File

@ -1023,7 +1023,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
}
if (statusbar->statusmsg[0])
wprintw(statusbar->topline, "- %s ", statusbar->statusmsg);
wprintw(statusbar->topline, ": %s ", statusbar->statusmsg);
wclrtoeol(statusbar->topline);
wmove(statusbar->topline, 0, x2 - (KEY_IDENT_DIGITS * 2) - 3);

View File

@ -307,7 +307,7 @@ static void groupchat_onGroupNamelistChange(ToxWindow *self, Tox *m, int groupnu
case TOX_CHAT_CHANGE_PEER_DEL:
event = "has left the room";
line_info_add(self, timefrmt, (char *) oldpeername, NULL, CONNECTION, 0, 0, event);
line_info_add(self, timefrmt, (char *) oldpeername, NULL, CONNECTION, 0, RED, event);
if (groupchats[self->num].side_pos > 0)
--groupchats[self->num].side_pos;

View File

@ -165,12 +165,16 @@ void line_info_add(ToxWindow *self, char *timestr, char *name1, char *name2, uin
break;
case CONNECTION:
len += 3;
len += 5;
break;
case SYS_MSG:
break;
case NAME_CHANGE:
len += 4;
break;
case PROMPT:
++len;
break;
@ -395,9 +399,12 @@ void line_info_print(ToxWindow *self)
wattroff(win, COLOR_PAIR(BLUE));
wattron(win, COLOR_PAIR(line->colour));
wprintw(win, "%s ", line->colour == RED ? "<--" : "-->");
wattron(win, A_BOLD);
wprintw(win, "* %s ", line->name1);
wprintw(win, "%s ", line->name1);
wattroff(win, A_BOLD);
wprintw(win, "%s\n", line->msg);
wattroff(win, COLOR_PAIR(line->colour));
@ -409,8 +416,9 @@ void line_info_print(ToxWindow *self)
wattroff(win, COLOR_PAIR(BLUE));
wattron(win, COLOR_PAIR(MAGENTA));
wprintw(win, "-!- ");
wattron(win, A_BOLD);
wprintw(win, "* %s", line->name1);
wprintw(win, "%s", line->name1);
wattroff(win, A_BOLD);
wprintw(win, "%s", line->msg);

View File

@ -87,7 +87,7 @@ void get_time_str(char *buf, int bufsize)
return;
}
const char *t = user_settings->time == TIME_12 ? "[%-I:%M:%S] " : "[%H:%M:%S] ";
const char *t = user_settings->time == TIME_12 ? "%-I:%M:%S " : "%H:%M:%S ";
strftime(buf, bufsize, t, get_time());
}

View File

@ -272,7 +272,7 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
} else {
wprintw(statusbar->topline, " [Offline]");
wattron(statusbar->topline, A_BOLD);
wprintw(statusbar->topline, " %s ", statusbar->nick);
wprintw(statusbar->topline, " %s", statusbar->nick);
wattroff(statusbar->topline, A_BOLD);
}
@ -300,7 +300,7 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
}
if (statusbar->statusmsg[0])
wprintw(statusbar->topline, " - %s", statusbar->statusmsg);
wprintw(statusbar->topline, " : %s", statusbar->statusmsg);
mvwhline(self->window, y2 - CHATBOX_HEIGHT, 0, ACS_HLINE, x2);