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

added status bar to prompt and fixed some bugs

This commit is contained in:
Jfreegman
2013-09-06 19:59:45 -04:00
parent 9c7cad0d55
commit 261310b091
7 changed files with 183 additions and 75 deletions

View File

@ -19,6 +19,8 @@
extern char *DATA_FILE;
extern int store_data(Tox *m, char *path);
extern ToxWindow *prompt;
typedef struct {
uint8_t name[TOX_MAX_NAME_LENGTH];
uint8_t statusmsg[TOX_MAX_STATUSMESSAGE_LENGTH];
@ -40,7 +42,7 @@ void friendlist_onMessage(ToxWindow *self, Tox *m, int num, uint8_t *str, uint16
return;
if (friends[num].chatwin == -1)
friends[num].chatwin = add_window(m, new_chat(m, friends[num].num));
friends[num].chatwin = add_window(m, new_chat(m, prompt, friends[num].num));
}
void friendlist_onConnectionChange(ToxWindow *self, Tox *m, int num, uint8_t status)
@ -167,7 +169,7 @@ static void friendlist_onKey(ToxWindow *self, Tox *m, wint_t key)
if (friends[num_selected].chatwin != -1) {
set_active_window(friends[num_selected].chatwin);
} else {
friends[num_selected].chatwin = add_window(m, new_chat(m, friends[num_selected].num));
friends[num_selected].chatwin = add_window(m, new_chat(m, prompt, friends[num_selected].num));
set_active_window(friends[num_selected].chatwin);
}
} else if (key == 0x107 || key == 0x8 || key == 0x7f)