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

Merge pull request #213 from plutooo/master

Added chat windows, and some clean up.
This commit is contained in:
irungentoo
2013-07-31 10:31:21 -07:00
6 changed files with 222 additions and 18 deletions

View File

@ -221,7 +221,7 @@ static void execute(ToxWindow* self, char* cmd) {
msg[0] = 0;
msg++;
if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) != 1) {
if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) < 0) {
wprintw(self->window, "Error occurred while sending message.\n");
}
else {
@ -312,6 +312,8 @@ static void prompt_onInit(ToxWindow* self) {
ToxWindow new_prompt() {
ToxWindow ret;
memset(&ret, 0, sizeof(ret));
ret.onKey = &prompt_onKey;
ret.onDraw = &prompt_onDraw;
ret.onInit = &prompt_onInit;