1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-26 17:13:27 +01:00

small fixes

This commit is contained in:
Jfreegman 2013-08-28 05:53:47 -04:00
parent f24eebaeed
commit c08639b8e1

View File

@ -73,7 +73,7 @@ int friendlist_onFriendAdded(Tox *m, int num)
friends[i].chatwin = -1; friends[i].chatwin = -1;
tox_getname(m, num, friends[i].name); tox_getname(m, num, friends[i].name);
strcpy((char *) friends[i].name, "unknown"); strcpy((char *) friends[i].name, "unknown");
strcpy((char *) friends[i].status, "unknown"); strcpy((char *) friends[i].status, "Offline");
if (i == num_friends) if (i == num_friends)
++num_friends; ++num_friends;
@ -121,7 +121,7 @@ static void delete_friend(Tox *m, ToxWindow *self, int f_num, wint_t key)
int i; int i;
for (i = num_friends; i != 0; --i) { for (i = num_friends; i != 0; --i) {
if (friends[i-1].active == true) if (friends[i-1].active)
break; break;
} }
@ -166,11 +166,11 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
int i; int i;
for (i = 0; i < num_friends; ++i) { for (i = 0; i < num_friends; ++i) {
if (friends[i].active == true) { if (friends[i].active) {
if (i == num_selected) if (i == num_selected)
wattron(self->window, COLOR_PAIR(3)); wattron(self->window, COLOR_PAIR(3));
wprintw(self->window, " > ", friends[i].num); wprintw(self->window, " > ");
if (i == num_selected) if (i == num_selected)
wattroff(self->window, COLOR_PAIR(3)); wattroff(self->window, COLOR_PAIR(3));