From e85e9dbb999f1fccd2083224cc52eebe29915bfe Mon Sep 17 00:00:00 2001 From: "Coren[m]" Date: Sun, 24 Nov 2013 21:11:54 +0100 Subject: group_namelistchange(): for ui reasons, divulge the peernumber and the nature of the change (add, del, name change). tox.*, Messenger.*, group_chats.*: - expand interface of callback by peernumber/change groupchats.c: - call callback in addpeer/delpeer/setnick with peernumber and flag nTox.c: - print_groupchatpeers(): print as many names on a line as possible, not one peer per line - print_groupnamelistchange(): only print the change, if possible (i.e. "new peer", "peer's new name") - added command "/p" to print the list of peers --- toxcore/Messenger.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toxcore/Messenger.h') diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index bf8a0572..6fc23db4 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h @@ -198,7 +198,7 @@ typedef struct Messenger { void *group_invite_userdata; void (*group_message)(struct Messenger *m, int, int, uint8_t *, uint16_t, void *); void *group_message_userdata; - void (*group_namelistchange)(struct Messenger *m, int, void *); + void (*group_namelistchange)(struct Messenger *m, int, int, uint8_t, void *); void *group_namelistchange_userdata; void (*file_sendrequest)(struct Messenger *m, int, uint8_t, uint64_t, uint8_t *, uint16_t, void *); @@ -462,7 +462,7 @@ void m_callback_group_message(Messenger *m, void (*function)(Messenger *m, int, * It gets called every time the name list changes(new peer/name, deleted peer) * Function(Tox *tox, int groupnumber, void *userdata) */ -void m_callback_group_namelistchange(Messenger *m, void (*function)(Messenger *m, int, void *), void *userdata); +void m_callback_group_namelistchange(Messenger *m, void (*function)(Messenger *m, int, int, uint8_t, void *), void *userdata); /* Creates a new groupchat and puts it in the chats array. * -- cgit v1.2.3