1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-27 00:03:26 +01:00

prompt tab alealert when friend comes online

This commit is contained in:
Jfreegman 2014-02-13 06:24:58 -05:00
parent c3d2ff6bfb
commit 07089271cc
3 changed files with 5 additions and 3 deletions

View File

@ -200,7 +200,7 @@ int init_connection_helper(Tox *m, int linenumber)
* 4: failed to resolve name to IP
* 5: serverlist file contains no acceptable line
*/
static uint8_t init_connection_serverlist_loaded = 0;
static int init_connection_serverlist_loaded = 0;
int init_connection(Tox *m)
{
if (linecnt > 0) /* already loaded serverlist */

View File

@ -49,4 +49,4 @@ bool valid_nick(uint8_t *nick);
void mv_curs_end(WINDOW *w, size_t len, int max_y, int max_x);
/* gets base file name from path or original file name if no path is supplied */
void get_file_name(uint8_t *pathname, uint8_t *buf);
void get_file_name(uint8_t *pathname, uint8_t *namebuf);

View File

@ -370,6 +370,8 @@ static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int friendnum , u
wattroff(self->window, A_BOLD);
wprintw(self->window, "has come online\n");
wattroff(self->window, COLOR_PAIR(GREEN));
alert_window(self, WINDOW_ALERT_2, false);
} else {
wattron(self->window, COLOR_PAIR(RED));
wattron(self->window, A_BOLD);
@ -398,7 +400,7 @@ static void prompt_onFriendRequest(ToxWindow *self, uint8_t *key, uint8_t *data,
}
wprintw(self->window, "Type \"/accept %d\" to accept it.\n", n);
alert_window(self, WINDOW_ALERT_2, true);
alert_window(self, WINDOW_ALERT_1, true);
}
void prompt_init_statusbar(ToxWindow *self, Tox *m)