mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-30 08:26:45 +02:00
improve window alert functionality
This commit is contained in:
@ -107,11 +107,16 @@ bool timed_out(uint64_t timestamp, uint64_t curtime, uint64_t timeout)
|
||||
return timestamp + timeout <= curtime;
|
||||
}
|
||||
|
||||
/* Beeps and makes window tab blink */
|
||||
void alert_window(ToxWindow *self)
|
||||
/* Colours the window tab according to type. Beeps if is_beep is true */
|
||||
void alert_window(ToxWindow *self, int type, bool is_beep)
|
||||
{
|
||||
self->blink = true;
|
||||
beep();
|
||||
if (type == WINDOW_ALERT_1)
|
||||
self->alert1 = true;
|
||||
else if(type == WINDOW_ALERT_2)
|
||||
self->alert2 = true;
|
||||
|
||||
if (is_beep)
|
||||
beep();
|
||||
}
|
||||
|
||||
/* case-insensitive string compare function for use with qsort - same return logic as strcmp */
|
||||
|
Reference in New Issue
Block a user