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

improve window alert functionality

This commit is contained in:
Jfreegman
2013-11-28 19:45:28 -05:00
parent 2057e7bc4f
commit a98ec22fd6
8 changed files with 50 additions and 31 deletions

View File

@ -41,7 +41,7 @@ static void chat_onMessage(ToxWindow *self, Tox *m, int num, uint8_t *msg, uint1
} else
wprintw(ctx->history, "%s\n", msg);
alert_window(self);
alert_window(self, WINDOW_ALERT_1, true);
}
static void chat_onConnectionChange(ToxWindow *self, Tox *m, int num, uint8_t status)
@ -69,7 +69,7 @@ static void chat_onAction(ToxWindow *self, Tox *m, int num, uint8_t *action, uin
wprintw(ctx->history, "* %s %s\n", nick, action);
wattroff(ctx->history, COLOR_PAIR(YELLOW));
alert_window(self);
alert_window(self, WINDOW_ALERT_1, true);
}
static void chat_onNickChange(ToxWindow *self, int num, uint8_t *nick, uint16_t len)
@ -158,7 +158,7 @@ static void chat_onFileSendRequest(ToxWindow *self, Tox *m, int num, uint8_t fil
friends[num].file_receiver.pending[filenum] = true;
strcpy(friends[num].file_receiver.filenames[filenum], filename);
alert_window(self);
alert_window(self, WINDOW_ALERT_2, true);
}
static void chat_onFileControl(ToxWindow *self, Tox *m, int num, uint8_t receive_send,
@ -191,7 +191,7 @@ static void chat_onFileControl(ToxWindow *self, Tox *m, int num, uint8_t receive
break;
}
alert_window(self);
alert_window(self, WINDOW_ALERT_2, true);
}
static void chat_onFileData(ToxWindow *self, Tox *m, int num, uint8_t filenum, uint8_t *data,
@ -242,7 +242,7 @@ static void chat_onGroupInvite(ToxWindow *self, Tox *m, int friendnumber, uint8_
memcpy(friends[friendnumber].pending_groupchat, group_pub_key, TOX_CLIENT_ID_SIZE);
wprintw(ctx->history, "Type \"/join\" to join the chat.\n");
alert_window(self);
alert_window(self, WINDOW_ALERT_2, true);
}
static void send_action(ToxWindow *self, ChatContext *ctx, Tox *m, uint8_t *action) {