1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

mucwin_role_list_error takes ProfMucWin

This commit is contained in:
James Booth 2015-11-02 00:44:33 +00:00
parent 2792c59031
commit 1aa3c0ea4f
4 changed files with 11 additions and 8 deletions

View File

@ -620,12 +620,12 @@ mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation)
} }
void void
mucwin_role_list_error(const char *const roomjid, const char *const role, const char *const error) mucwin_role_list_error(ProfMucWin *mucwin, const char *const role, const char *const error)
{ {
ProfWin *window = (ProfWin*)wins_get_muc(roomjid); assert(mucwin != NULL);
if (window) {
ProfWin *window = (ProfWin*)mucwin;
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", role, error); win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", role, error);
}
} }
void void

View File

@ -203,7 +203,7 @@ void mucwin_affiliation_set_error(const char *const roomjid, const char *const j
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,
const char *const error); const char *const error);
void mucwin_role_list_error(const char *const roomjid, const char *const role, const char *const error); void mucwin_role_list_error(ProfMucWin *mucwin, const char *const role, const char *const error);
void mucwin_handle_role_list(const char *const roomjid, const char *const role, GSList *nicks); void mucwin_handle_role_list(const char *const roomjid, const char *const role, GSList *nicks);
void mucwin_kick_error(ProfMucWin *mucwin, const char *const nick, const char *const error); void mucwin_kick_error(ProfMucWin *mucwin, const char *const nick, const char *const error);

View File

@ -1397,7 +1397,10 @@ _room_role_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const sta
if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) {
char *error_message = stanza_get_error_message(stanza); char *error_message = stanza_get_error_message(stanza);
log_debug("Error retrieving %s list for room %s: %s", role, from, error_message); log_debug("Error retrieving %s list for room %s: %s", role, from, error_message);
mucwin_role_list_error(from, role, error_message); ProfMucWin *mucwin = wins_get_muc(from);
if (mucwin) {
mucwin_role_list_error(mucwin, role, error_message);
}
free(error_message); free(error_message);
free(role); free(role);
return 0; return 0;

View File

@ -277,7 +277,7 @@ void mucwin_affiliation_set_error(const char * const roomjid, const char * const
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,
const char * const error) {} const char * const error) {}
void mucwin_role_list_error(const char * const roomjid, const char * const role, const char * const error) {} void mucwin_role_list_error(ProfMucWin *mucwin, const char * const role, const char * const error) {}
void mucwin_handle_role_list(const char * const roomjid, const char * const role, GSList *nicks) {} void mucwin_handle_role_list(const char * const roomjid, const char * const role, GSList *nicks) {}
void mucwin_kick_error(ProfMucWin *mucwin, const char * const nick, const char * const error) {} void mucwin_kick_error(ProfMucWin *mucwin, const char * const nick, const char * const error) {}
void ui_show_form(ProfMucConfWin *confwin) {} void ui_show_form(ProfMucConfWin *confwin) {}