1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-06 23:46:34 +01:00

Merge fix

This commit is contained in:
Michael Rose
2013-08-15 12:11:48 +02:00
parent 36086f16c3
commit 399dd33b97
4 changed files with 81 additions and 48 deletions

View File

@@ -16,7 +16,7 @@
uint8_t pending_requests[MAX_STR_SIZE][CLIENT_ID_SIZE]; // XXX
uint8_t num_requests=0; // XXX
static friendAddedFn *on_friendadded;
static friendAddedFn *on_friendadded_cb;
static char prompt_buf[MAX_STR_SIZE] = {0};
static int prompt_buf_pos = 0;
@@ -88,7 +88,7 @@ void cmd_accept(ToxWindow *self, Messenger *m, char **args)
wprintw(self->window, "Failed to add friend.\n");
else {
wprintw(self->window, "Friend accepted as: %d.\n", num);
on_friendadded(m, num);
on_friendadded_cb(m, num);
}
}
@@ -152,7 +152,7 @@ void cmd_add(ToxWindow *self, Messenger *m, char **args)
break;
default:
wprintw(self->window, "Friend added as %d.\n", num);
on_friendadded(m, num);
on_friendadded_cb(m, num);
break;
}
}
@@ -436,7 +436,7 @@ static void prompt_onInit(ToxWindow *self, Messenger *m)
ToxWindow new_prompt(friendAddedFn *f)
{
on_friendadded = f;
on_friendadded_cb = f;
ToxWindow ret;
memset(&ret, 0, sizeof(ret));
ret.onKey = &prompt_onKey;