mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 17:33:27 +01:00
tweaks and fixes
This commit is contained in:
parent
fde8059a4c
commit
1b5bcb4ffa
@ -98,7 +98,7 @@ static void chat_onAction(ToxWindow *self, Tox *m, int num, uint8_t *action, uin
|
|||||||
beep();
|
beep();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void chat_onNickChange(ToxWindow *self, Tox *m, int num, uint8_t *nick, uint16_t len)
|
static void chat_onNickChange(ToxWindow *self, int num, uint8_t *nick, uint16_t len)
|
||||||
{
|
{
|
||||||
if (self->friendnum != num)
|
if (self->friendnum != num)
|
||||||
return;
|
return;
|
||||||
|
@ -56,7 +56,7 @@ void friendlist_onConnectionChange(ToxWindow *self, Tox *m, int num, uint8_t sta
|
|||||||
friends[num].online = false;
|
friends[num].online = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void friendlist_onNickChange(ToxWindow *self, Tox *m, int num, uint8_t *str, uint16_t len)
|
void friendlist_onNickChange(ToxWindow *self, int num, uint8_t *str, uint16_t len)
|
||||||
{
|
{
|
||||||
if (len >= TOX_MAX_NAME_LENGTH || num < 0 || num >= num_friends)
|
if (len >= TOX_MAX_NAME_LENGTH || num < 0 || num >= num_friends)
|
||||||
return;
|
return;
|
||||||
@ -218,7 +218,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
|
|||||||
wattroff(self->window, COLOR_PAIR(colour) | A_BOLD);
|
wattroff(self->window, COLOR_PAIR(colour) | A_BOLD);
|
||||||
wprintw(self->window, "]%s (%s)\n", friends[i].name, friends[i].statusmsg);
|
wprintw(self->window, "]%s (%s)\n", friends[i].name, friends[i].statusmsg);
|
||||||
} else {
|
} else {
|
||||||
wprintw(self->window, "[O]%s\n", friends[i].name, friends[i].statusmsg);
|
wprintw(self->window, "[O]%s\n", friends[i].name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ struct ToxWindow_ {
|
|||||||
void(*onFriendRequest)(ToxWindow *, uint8_t *, uint8_t *, uint16_t);
|
void(*onFriendRequest)(ToxWindow *, uint8_t *, uint8_t *, uint16_t);
|
||||||
void(*onConnectionChange)(ToxWindow *, Tox *, int, uint8_t);
|
void(*onConnectionChange)(ToxWindow *, Tox *, int, uint8_t);
|
||||||
void(*onMessage)(ToxWindow *, Tox *, int, uint8_t *, uint16_t);
|
void(*onMessage)(ToxWindow *, Tox *, int, uint8_t *, uint16_t);
|
||||||
void(*onNickChange)(ToxWindow *, Tox *, int, uint8_t *, uint16_t);
|
void(*onNickChange)(ToxWindow *, int, uint8_t *, uint16_t);
|
||||||
void(*onStatusChange)(ToxWindow *, Tox *, int, TOX_USERSTATUS);
|
void(*onStatusChange)(ToxWindow *, Tox *, int, TOX_USERSTATUS);
|
||||||
void(*onStatusMessageChange)(ToxWindow *, int, uint8_t *, uint16_t);
|
void(*onStatusMessageChange)(ToxWindow *, int, uint8_t *, uint16_t);
|
||||||
void(*onAction)(ToxWindow *, Tox *, int, uint8_t *, uint16_t);
|
void(*onAction)(ToxWindow *, Tox *, int, uint8_t *, uint16_t);
|
||||||
|
@ -88,7 +88,7 @@ void on_nickchange(Tox *m, int friendnumber, uint8_t *string, uint16_t length, v
|
|||||||
|
|
||||||
for (i = 0; i < MAX_WINDOWS_NUM; ++i) {
|
for (i = 0; i < MAX_WINDOWS_NUM; ++i) {
|
||||||
if (windows[i].onNickChange != NULL)
|
if (windows[i].onNickChange != NULL)
|
||||||
windows[i].onNickChange(&windows[i], m, friendnumber, string, length);
|
windows[i].onNickChange(&windows[i], friendnumber, string, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (store_data(m, DATA_FILE))
|
if (store_data(m, DATA_FILE))
|
||||||
|
Loading…
Reference in New Issue
Block a user