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

Renamed ui_handle_room_role_list -> mucwin_handle_role_list

This commit is contained in:
James Booth 2015-11-01 21:50:32 +00:00
parent 2cc5f17871
commit 556985ec39
4 changed files with 37 additions and 37 deletions

View File

@ -651,7 +651,7 @@ mucwin_role_list_error(const char *const roomjid, const char *const role, const
}
void
ui_handle_room_role_list(const char *const roomjid, const char *const role, GSList *nicks)
mucwin_handle_role_list(const char *const roomjid, const char *const role, GSList *nicks)
{
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
if (window) {
@ -680,39 +680,6 @@ ui_handle_room_role_list(const char *const roomjid, const char *const role, GSLi
}
}
void
ui_handle_room_affiliation_set_error(const char *const roomjid, const char *const jid, const char *const affiliation,
const char *const error)
{
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
if (window) {
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s affiliation for %s: %s", affiliation, jid, error);
}
}
void
ui_handle_room_role_set_error(const char *const roomjid, const char *const nick, const char *const role,
const char *const error)
{
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
if (window) {
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s role for %s: %s", role, nick, error);
}
}
void
ui_show_room_info(ProfMucWin *mucwin)
{
char *role = muc_role_str(mucwin->roomjid);
char *affiliation = muc_affiliation_str(mucwin->roomjid);
ProfWin *window = (ProfWin*) mucwin;
win_vprint(window, '!', 0, NULL, 0, 0, "", "Room: %s", mucwin->roomjid);
win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation);
win_vprint(window, '!', 0, NULL, 0, 0, "", "Role: %s", role);
win_print(window, '-', 0, NULL, 0, 0, "", "");
}
void
ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role)
{
@ -767,6 +734,39 @@ ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role)
}
}
void
ui_handle_room_affiliation_set_error(const char *const roomjid, const char *const jid, const char *const affiliation,
const char *const error)
{
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
if (window) {
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s affiliation for %s: %s", affiliation, jid, error);
}
}
void
ui_handle_room_role_set_error(const char *const roomjid, const char *const nick, const char *const role,
const char *const error)
{
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
if (window) {
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s role for %s: %s", role, nick, error);
}
}
void
ui_show_room_info(ProfMucWin *mucwin)
{
char *role = muc_role_str(mucwin->roomjid);
char *affiliation = muc_affiliation_str(mucwin->roomjid);
ProfWin *window = (ProfWin*) mucwin;
win_vprint(window, '!', 0, NULL, 0, 0, "", "Room: %s", mucwin->roomjid);
win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation);
win_vprint(window, '!', 0, NULL, 0, 0, "", "Role: %s", role);
win_print(window, '-', 0, NULL, 0, 0, "", "");
}
void
ui_room_update_occupants(const char *const roomjid)
{

View File

@ -163,7 +163,7 @@ void ui_handle_room_affiliation_set_error(const char *const roomjid, const char
void ui_handle_room_role_set_error(const char *const roomjid, const char *const nick, const char *const role,
const char *const error);
void mucwin_role_list_error(const char *const roomjid, const char *const role, const char *const error);
void ui_handle_room_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(const char *const roomjid, const char *const nick, const char *const error);
void ui_show_form(ProfMucConfWin *confwin);
void ui_show_form_field(ProfWin *window, DataForm *form, char *tag);

View File

@ -1412,7 +1412,7 @@ _room_role_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const sta
}
}
ui_handle_room_role_list(from, role, nicks);
mucwin_handle_role_list(from, role, nicks);
free(role);
g_slist_free(nicks);

View File

@ -283,7 +283,7 @@ void ui_handle_room_affiliation_set_error(const char * const roomjid, const char
void ui_handle_room_role_set_error(const char * const roomjid, const char * const nick, const char * const role,
const char * const error) {}
void mucwin_role_list_error(const char * const roomjid, const char * const role, const char * const error) {}
void ui_handle_room_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(const char * const roomjid, const char * const nick, const char * const error) {}
void ui_show_form(ProfMucConfWin *confwin) {}
void ui_show_form_field(ProfWin *window, DataForm *form, char *tag) {}