1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

mucwin_handle_affiliation_list takes ProfMucWin

This commit is contained in:
James Booth 2015-11-02 00:40:23 +00:00
parent d81dbdb233
commit 3341e8c202
4 changed files with 21 additions and 18 deletions

View File

@ -537,10 +537,11 @@ mucwin_affiliation_list_error(ProfMucWin *mucwin, const char *const affiliation,
} }
void void
mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids) mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char *const affiliation, GSList *jids)
{ {
ProfWin *window = (ProfWin*)wins_get_muc(roomjid); assert(mucwin != NULL);
if (window) {
ProfWin *window = (ProfWin*)mucwin;
if (jids) { if (jids) {
win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation); win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation);
GSList *curr_jid = jids; GSList *curr_jid = jids;
@ -555,7 +556,6 @@ mucwin_handle_affiliation_list(const char *const roomjid, const char *const affi
win_print(window, '!', 0, NULL, 0, 0, "", ""); win_print(window, '!', 0, NULL, 0, 0, "", "");
} }
} }
}
void void
mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation)

View File

@ -198,7 +198,7 @@ void mucwin_update_occupants(const char *const roomjid);
void mucwin_show_occupants(const char *const roomjid); void mucwin_show_occupants(const char *const roomjid);
void mucwin_hide_occupants(const char *const roomjid); void mucwin_hide_occupants(const char *const roomjid);
void mucwin_affiliation_list_error(ProfMucWin *mucwin, const char *const affiliation, const char *const error); void mucwin_affiliation_list_error(ProfMucWin *mucwin, const char *const affiliation, const char *const error);
void mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids); void mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char *const affiliation, GSList *jids);
void mucwin_affiliation_set_error(const char *const roomjid, const char *const jid, void mucwin_affiliation_set_error(const char *const roomjid, const char *const jid,
const char *const affiliation, const char *const error); const char *const affiliation, const char *const error);
void mucwin_role_set_error(const char *const roomjid, const char *const nick, const char *const role, void mucwin_role_set_error(const char *const roomjid, const char *const nick, const char *const role,

View File

@ -1369,7 +1369,10 @@ _room_affiliation_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *co
} }
muc_jid_autocomplete_add_all(from, jids); muc_jid_autocomplete_add_all(from, jids);
mucwin_handle_affiliation_list(from, affiliation, jids); ProfMucWin *mucwin = wins_get_muc(from);
if (mucwin) {
mucwin_handle_affiliation_list(mucwin, affiliation, jids);
}
free(affiliation); free(affiliation);
g_slist_free(jids); g_slist_free(jids);

View File

@ -272,7 +272,7 @@ void ui_handle_room_configuration_form_error(const char * const roomjid, const c
void ui_handle_room_config_submit_result(const char * const roomjid) {} void ui_handle_room_config_submit_result(const char * const roomjid) {}
void ui_handle_room_config_submit_result_error(const char * const roomjid, const char * const message) {} void ui_handle_room_config_submit_result_error(const char * const roomjid, const char * const message) {}
void mucwin_affiliation_list_error(ProfMucWin *mucwin, const char * const affiliation, const char * const error) {} void mucwin_affiliation_list_error(ProfMucWin *mucwin, const char * const affiliation, const char * const error) {}
void mucwin_handle_affiliation_list(const char * const roomjid, const char * const affiliation, GSList *jids) {} void mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char * const affiliation, GSList *jids) {}
void mucwin_affiliation_set_error(const char * const roomjid, const char * const jid, void mucwin_affiliation_set_error(const char * const roomjid, const char * const jid,
const char * const affiliation, const char * const error) {} const char * const affiliation, const char * const error) {}
void mucwin_role_set_error(const char * const roomjid, const char * const nick, const char * const role, void mucwin_role_set_error(const char * const roomjid, const char * const nick, const char * const role,