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

remove group self-timeout callback

This commit is contained in:
Jfreegman 2015-04-12 21:56:42 -04:00
parent b66a1f6ba1
commit a360afe08a
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
5 changed files with 0 additions and 34 deletions

View File

@ -533,26 +533,6 @@ static void groupchat_onGroupSelfJoin(ToxWindow *self, Tox *m, int groupnum)
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 1, MAGENTA, "-!- Topic set to: %s", topic);
}
static void groupchat_onGroupSelfTimeout(ToxWindow *self, Tox *m, int groupnum)
{
if (groupnum != self->num)
return;
int i;
for (i = 0; i < max_groupchat_index; ++i) {
if (groupchats[i].active && groupchats[i].groupnumber == groupnum) {
groupchats[i].is_connected = false;
break;
}
}
char timefrmt[TIME_STR_SIZE];
get_time_str(timefrmt, sizeof(timefrmt));
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 0, RED, "-!- Disconnected from group");
}
static void groupchat_onGroupRejected(ToxWindow *self, Tox *m, int groupnum, uint8_t type)
{
if (groupnum != self->num)
@ -967,7 +947,6 @@ ToxWindow new_group_chat(Tox *m, int groupnum, const char *groupname, int length
ret.onGroupOpCertificate = &groupchat_onGroupOpCertificate;
ret.onGroupNickChange = &groupchat_onGroupNickChange;
ret.onGroupSelfJoin = &groupchat_onGroupSelfJoin;
ret.onGroupSelfTimeout = &groupchat_onGroupSelfTimeout;
ret.onGroupRejected = &groupchat_onGroupRejected;
ChatContext *chatwin = calloc(1, sizeof(ChatContext));

View File

@ -556,7 +556,6 @@ static void init_tox_callbacks(Tox *m)
tox_callback_group_nick_change(m, on_group_nick_change, NULL);
tox_callback_group_topic_change(m, on_group_topic_change, NULL);
tox_callback_group_self_join(m, on_group_self_join, NULL);
tox_callback_group_self_timeout(m, on_group_self_timeout, NULL);
tox_callback_group_rejected(m, on_group_rejected, NULL);
}

View File

@ -127,6 +127,5 @@ void on_group_topic_change(Tox *m, int groupnumber, uint32_t peernumber, const u
void on_group_nick_change(Tox *m, int groupnumber, uint32_t peernumber, const uint8_t *newname, uint16_t length, void *userdata);
void on_group_op_certificate(Tox *m, int groupnumber, uint32_t src_peernum, uint32_t tgt_peernum, uint8_t cert_type, void *userdata);
void on_group_self_join(Tox *m, int groupnumber, void *userdata);
void on_group_self_timeout(Tox *m, int groupnumber, void *userdata);
void on_group_rejected(Tox *m, int groupnumber, uint8_t type, void *userdata);
#endif /* #define TOXIC_H */

View File

@ -293,16 +293,6 @@ void on_group_self_join(Tox *m, int groupnumber, void *userdata)
}
}
void on_group_self_timeout(Tox *m, int groupnumber, void *userdata)
{
size_t i;
for (i = 0; i < MAX_WINDOWS_NUM; ++i) {
if (windows[i].onGroupSelfTimeout != NULL)
windows[i].onGroupSelfTimeout(&windows[i], m, groupnumber);
}
}
void on_group_rejected(Tox *m, int groupnumber, uint8_t type, void *userdata)
{
size_t i;

View File

@ -137,7 +137,6 @@ struct ToxWindow {
void(*onGroupNickChange)(ToxWindow *, Tox *, int, uint32_t, const char *, uint16_t);
void(*onGroupTopicChange)(ToxWindow *, Tox *, int, uint32_t, const char *, uint16_t);
void(*onGroupSelfJoin)(ToxWindow *, Tox *, int);
void(*onGroupSelfTimeout)(ToxWindow *, Tox *, int);
void(*onGroupRejected)(ToxWindow *, Tox *, int, uint8_t);
#ifdef AUDIO