1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-30 08:26:45 +02:00

alert user when name is mentioned in groupchat

This commit is contained in:
Jfreegman
2013-12-06 19:41:53 -05:00
parent ce45580c83
commit f942982f4e
5 changed files with 45 additions and 13 deletions

View File

@ -111,10 +111,17 @@ bool timed_out(uint64_t timestamp, uint64_t curtime, uint64_t timeout)
/* Colours the window tab according to type. Beeps if is_beep is true */
void alert_window(ToxWindow *self, int type, bool is_beep)
{
if (type == WINDOW_ALERT_1)
switch (type) {
case WINDOW_ALERT_0:
self->alert0 = true;
break;
case WINDOW_ALERT_1:
self->alert1 = true;
else if(type == WINDOW_ALERT_2)
break;
case WINDOW_ALERT_2:
self->alert2 = true;
break;
}
if (is_beep)
beep();