diff options
author | James Booth <boothj5@gmail.com> | 2015-11-01 21:50:32 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-11-01 21:50:32 +0000 |
commit | 556985ec39685a164b877e597838d16dc2848ea6 (patch) | |
tree | cd7f0f7d01ed535d14c660e8489857fd55536ffa /src | |
parent | 2cc5f17871e2fe3c6c8acdf747b4bfb7acc13566 (diff) | |
download | profani-tty-556985ec39685a164b877e597838d16dc2848ea6.tar.gz |
Renamed ui_handle_room_role_list -> mucwin_handle_role_list
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/mucwin.c | 68 | ||||
-rw-r--r-- | src/ui/ui.h | 2 | ||||
-rw-r--r-- | src/xmpp/iq.c | 2 |
3 files changed, 36 insertions, 36 deletions
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index f0617ff5..d0e18e70 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -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) { @@ -681,39 +681,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) { ProfWin *window = (ProfWin*) mucwin; @@ -768,6 +735,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) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index cde39c01..adc6db0b 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -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); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index d5f9c554..55645783 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -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); |