From 75b505cf6a72627bf669d95d40303ee062a1d4b9 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:11:30 +0000 Subject: [PATCH 01/36] Renamed ui_room_role_change -> mucwin_role_change --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index bfac6ddd..af7cf6ca 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -592,7 +592,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c // role changed } else if (g_strcmp0(role, old_role) != 0) { - ui_room_role_change(room, role, actor, reason); + mucwin_role_change(room, role, actor, reason); // affiliation changed } else if (g_strcmp0(affiliation, old_affiliation) != 0) { diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 5e54a24d..9a3ae6b3 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -39,7 +39,7 @@ #include "ui/window.h" void -ui_room_role_change(const char *const roomjid, const char *const role, const char *const actor, +mucwin_role_change(const char *const roomjid, const char *const role, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index 52389a11..d9d7b7fb 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -92,7 +92,7 @@ void ui_disconnected(void); void ui_outgoing_private_msg(ProfPrivateWin *privwin, const char *const message); void ui_room_join(const char *const roomjid, gboolean focus); void ui_switch_to_room(const char *const roomjid); -void ui_room_role_change(const char *const roomjid, const char *const role, const char *const actor, +void mucwin_role_change(const char *const roomjid, const char *const role, const char *const actor, const char *const reason); void ui_room_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, const char *const reason); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index d146341a..7157b0e1 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -191,7 +191,7 @@ void ui_outgoing_private_msg(ProfPrivateWin *privwin, const char * const message void ui_room_join(const char * const roomjid, gboolean focus) {} void ui_switch_to_room(const char * const roomjid) {} -void ui_room_role_change(const char * const roomjid, const char * const role, const char * const actor, +void mucwin_role_change(const char * const roomjid, const char * const role, const char * const actor, const char * const reason) {} void ui_room_affiliation_change(const char * const roomjid, const char * const affiliation, const char * const actor, const char * const reason) {} From d706dcd4bc0819ac0fb9f4b617a95a1a0658650f Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:12:53 +0000 Subject: [PATCH 02/36] Renamed ui_room_affiliation_change -> mucwin_affiliation_change --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index af7cf6ca..eef13965 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -596,7 +596,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c // affiliation changed } else if (g_strcmp0(affiliation, old_affiliation) != 0) { - ui_room_affiliation_change(room, affiliation, actor, reason); + mucwin_affiliation_change(room, affiliation, actor, reason); } } } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 9a3ae6b3..9d7f9746 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -54,7 +54,7 @@ mucwin_role_change(const char *const roomjid, const char *const role, const char } void -ui_room_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, +mucwin_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index d9d7b7fb..3b23aa5d 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -94,7 +94,7 @@ void ui_room_join(const char *const roomjid, gboolean focus); void ui_switch_to_room(const char *const roomjid); void mucwin_role_change(const char *const roomjid, const char *const role, const char *const actor, const char *const reason); -void ui_room_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, +void mucwin_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, const char *const reason); void ui_room_role_and_affiliation_change(const char *const roomjid, const char *const role, const char *const affiliation, const char *const actor, const char *const reason); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 7157b0e1..8dc0b602 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -193,7 +193,7 @@ void ui_switch_to_room(const char * const roomjid) {} void mucwin_role_change(const char * const roomjid, const char * const role, const char * const actor, const char * const reason) {} -void ui_room_affiliation_change(const char * const roomjid, const char * const affiliation, const char * const actor, +void mucwin_affiliation_change(const char * const roomjid, const char * const affiliation, const char * const actor, const char * const reason) {} void ui_room_role_and_affiliation_change(const char * const roomjid, const char * const role, const char * const affiliation, const char * const actor, const char * const reason) {} From 1a87132dc71848f45a0cc81ef52a82507f905592 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:14:01 +0000 Subject: [PATCH 03/36] Renamed ui_room_role_and_affiliation_change -> mucwin_role_and_affiliation_change --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index eef13965..28ccd025 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -588,7 +588,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) { // both changed if ((g_strcmp0(role, old_role) != 0) && (g_strcmp0(affiliation, old_affiliation) != 0)) { - ui_room_role_and_affiliation_change(room, role, affiliation, actor, reason); + mucwin_role_and_affiliation_change(room, role, affiliation, actor, reason); // role changed } else if (g_strcmp0(role, old_role) != 0) { diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 9d7f9746..4fa7d437 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -69,7 +69,7 @@ mucwin_affiliation_change(const char *const roomjid, const char *const affiliati } void -ui_room_role_and_affiliation_change(const char *const roomjid, const char *const role, const char *const affiliation, +mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role, const char *const affiliation, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index 3b23aa5d..85773d00 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -96,7 +96,7 @@ void mucwin_role_change(const char *const roomjid, const char *const role, const const char *const reason); void mucwin_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, const char *const reason); -void ui_room_role_and_affiliation_change(const char *const roomjid, const char *const role, +void mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role, const char *const affiliation, const char *const actor, const char *const reason); void ui_room_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, const char *const actor, const char *const reason); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 8dc0b602..e9bf8830 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -195,7 +195,7 @@ void mucwin_role_change(const char * const roomjid, const char * const role, con const char * const reason) {} void mucwin_affiliation_change(const char * const roomjid, const char * const affiliation, const char * const actor, const char * const reason) {} -void ui_room_role_and_affiliation_change(const char * const roomjid, const char * const role, +void mucwin_role_and_affiliation_change(const char * const roomjid, const char * const role, const char * const affiliation, const char * const actor, const char * const reason) {} void ui_room_occupant_role_change(const char * const roomjid, const char * const nick, const char * const role, const char * const actor, const char * const reason) {} From eae0b5931040bfeeca68dddbbfc92bdc794ac69b Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:15:14 +0000 Subject: [PATCH 04/36] Renamed ui_room_occupant_role_change -> mucwin_occupant_role_change --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 28ccd025..f60ef04a 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -663,7 +663,7 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const // role changed } else if (g_strcmp0(role, old_role) != 0) { - ui_room_occupant_role_change(room, nick, role, actor, reason); + mucwin_occupant_role_change(room, nick, role, actor, reason); // affiliation changed } else if (g_strcmp0(affiliation, old_affiliation) != 0) { diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 4fa7d437..a825e9b1 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -85,7 +85,7 @@ mucwin_role_and_affiliation_change(const char *const roomjid, const char *const void -ui_room_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, +mucwin_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index 85773d00..bae70e68 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -98,7 +98,7 @@ void mucwin_affiliation_change(const char *const roomjid, const char *const affi const char *const reason); void mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role, const char *const affiliation, const char *const actor, const char *const reason); -void ui_room_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, +void mucwin_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, const char *const actor, const char *const reason); void ui_room_occupant_affiliation_change(const char *const roomjid, const char *const nick, const char *const affiliation, const char *const actor, const char *const reason); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index e9bf8830..be5d9eb5 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -197,7 +197,7 @@ void mucwin_affiliation_change(const char * const roomjid, const char * const af const char * const reason) {} void mucwin_role_and_affiliation_change(const char * const roomjid, const char * const role, const char * const affiliation, const char * const actor, const char * const reason) {} -void ui_room_occupant_role_change(const char * const roomjid, const char * const nick, const char * const role, +void mucwin_occupant_role_change(const char * const roomjid, const char * const nick, const char * const role, const char * const actor, const char * const reason) {} void ui_room_occupant_affiliation_change(const char * const roomjid, const char * const nick, const char * const affiliation, const char * const actor, const char * const reason) {} From 88206dc39b613548f5df6f4a0c21a20cc1102e2e Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:16:22 +0000 Subject: [PATCH 05/36] Renamed ui_room_occupant_affiliation_change -> mucwin_occupant_affiliation_change --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index f60ef04a..4967a8a3 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -667,7 +667,7 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const // affiliation changed } else if (g_strcmp0(affiliation, old_affiliation) != 0) { - ui_room_occupant_affiliation_change(room, nick, affiliation, actor, reason); + mucwin_occupant_affiliation_change(room, nick, affiliation, actor, reason); } } occupantswin_occupants(room); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index a825e9b1..e24f67fc 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -100,7 +100,7 @@ mucwin_occupant_role_change(const char *const roomjid, const char *const nick, c } void -ui_room_occupant_affiliation_change(const char *const roomjid, const char *const nick, const char *const affiliation, +mucwin_occupant_affiliation_change(const char *const roomjid, const char *const nick, const char *const affiliation, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index bae70e68..c3a9095b 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -100,7 +100,7 @@ void mucwin_role_and_affiliation_change(const char *const roomjid, const char *c const char *const affiliation, const char *const actor, const char *const reason); void mucwin_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, const char *const actor, const char *const reason); -void ui_room_occupant_affiliation_change(const char *const roomjid, const char *const nick, +void mucwin_occupant_affiliation_change(const char *const roomjid, const char *const nick, const char *const affiliation, const char *const actor, const char *const reason); void ui_room_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, const char *const role, const char *const affiliation, const char *const actor, const char *const reason); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index be5d9eb5..51de9c51 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -199,7 +199,7 @@ void mucwin_role_and_affiliation_change(const char * const roomjid, const char * const char * const affiliation, const char * const actor, const char * const reason) {} void mucwin_occupant_role_change(const char * const roomjid, const char * const nick, const char * const role, const char * const actor, const char * const reason) {} -void ui_room_occupant_affiliation_change(const char * const roomjid, const char * const nick, const char * const affiliation, +void mucwin_occupant_affiliation_change(const char * const roomjid, const char * const nick, const char * const affiliation, const char * const actor, const char * const reason) {} void ui_room_occupant_role_and_affiliation_change(const char * const roomjid, const char * const nick, const char * const role, const char * const affiliation, const char * const actor, const char * const reason) {} From 94f05ff42fb1b0e99b4f5890a638bb4443a0ec2d Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:17:13 +0000 Subject: [PATCH 06/36] Renamed ui_room_occupant_role_and_affiliation_change -> mucwin_occupant_role_and_affiliation_change --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 4967a8a3..6ffd8805 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -659,7 +659,7 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) { // both changed if ((g_strcmp0(role, old_role) != 0) && (g_strcmp0(affiliation, old_affiliation) != 0)) { - ui_room_occupant_role_and_affiliation_change(room, nick, role, affiliation, actor, reason); + mucwin_occupant_role_and_affiliation_change(room, nick, role, affiliation, actor, reason); // role changed } else if (g_strcmp0(role, old_role) != 0) { diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index e24f67fc..08ef824f 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -115,7 +115,7 @@ mucwin_occupant_affiliation_change(const char *const roomjid, const char *const } void -ui_room_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, const char *const role, +mucwin_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, const char *const role, const char *const affiliation, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index c3a9095b..47b087ac 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -102,7 +102,7 @@ void mucwin_occupant_role_change(const char *const roomjid, const char *const ni const char *const actor, const char *const reason); void mucwin_occupant_affiliation_change(const char *const roomjid, const char *const nick, const char *const affiliation, const char *const actor, const char *const reason); -void ui_room_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, +void mucwin_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, const char *const role, const char *const affiliation, const char *const actor, const char *const reason); void ui_room_roster(const char *const roomjid, GList *occupants, const char *const presence); void ui_room_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 51de9c51..a85f512d 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -201,7 +201,7 @@ void mucwin_occupant_role_change(const char * const roomjid, const char * const const char * const actor, const char * const reason) {} void mucwin_occupant_affiliation_change(const char * const roomjid, const char * const nick, const char * const affiliation, const char * const actor, const char * const reason) {} -void ui_room_occupant_role_and_affiliation_change(const char * const roomjid, const char * const nick, const char * const role, +void mucwin_occupant_role_and_affiliation_change(const char * const roomjid, const char * const nick, const char * const role, const char * const affiliation, const char * const actor, const char * const reason) {} void ui_room_roster(const char * const roomjid, GList *occupants, const char * const presence) {} void ui_room_history(const char * const roomjid, const char * const nick, From bb14b19bb194bb0212e244eefc8d025e536d7386 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:18:13 +0000 Subject: [PATCH 07/36] Renamed ui_handle_room_info_error -> mucwin_room_info_error --- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 08ef824f..6515eb7a 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -130,7 +130,7 @@ mucwin_occupant_role_and_affiliation_change(const char *const roomjid, const cha } void -ui_handle_room_info_error(const char *const roomjid, const char *const error) +mucwin_room_info_error(const char *const roomjid, const char *const error) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 47b087ac..addb6e9c 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -114,7 +114,7 @@ void ui_room_destroy(const char *const roomjid); void ui_show_room_info(ProfMucWin *mucwin); void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role); void ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); -void ui_handle_room_info_error(const char *const roomjid, const char *const error); +void mucwin_room_info_error(const char *const roomjid, const char *const error); void ui_show_room_disco_info(const char *const roomjid, GSList *identities, GSList *features); void ui_room_destroyed(const char *const roomjid, const char *const reason, const char *const new_jid, const char *const password); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 8f19871b..d6a7ad55 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1507,7 +1507,7 @@ _room_info_response_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { if (cb_data->display) { char *error_message = stanza_get_error_message(stanza); - ui_handle_room_info_error(cb_data->room, error_message); + mucwin_room_info_error(cb_data->room, error_message); free(error_message); } free(cb_data->room); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index a85f512d..40a50ff3 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -214,7 +214,7 @@ void ui_room_destroy(const char * const roomjid) {} void ui_show_room_info(ProfMucWin *mucwin) {} void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role) {} void ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) {} -void ui_handle_room_info_error(const char * const roomjid, const char * const error) {} +void mucwin_room_info_error(const char * const roomjid, const char * const error) {} void ui_show_room_disco_info(const char * const roomjid, GSList *identities, GSList *features) {} void ui_room_destroyed(const char * const roomjid, const char * const reason, const char * const new_jid, const char * const password) {} From fdd00b33a448c20682834ff64210ad914cc9f522 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:19:08 +0000 Subject: [PATCH 08/36] Renamed ui_show_room_disco_info -> mucwin_room_disco_info --- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 6515eb7a..b87ba1f8 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -140,7 +140,7 @@ mucwin_room_info_error(const char *const roomjid, const char *const error) } void -ui_show_room_disco_info(const char *const roomjid, GSList *identities, GSList *features) +mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSList *features) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window) { diff --git a/src/ui/ui.h b/src/ui/ui.h index addb6e9c..661801a7 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -115,7 +115,7 @@ void ui_show_room_info(ProfMucWin *mucwin); void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role); void ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); void mucwin_room_info_error(const char *const roomjid, const char *const error); -void ui_show_room_disco_info(const char *const roomjid, GSList *identities, GSList *features); +void mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSList *features); void ui_room_destroyed(const char *const roomjid, const char *const reason, const char *const new_jid, const char *const password); void ui_room_kicked(const char *const roomjid, const char *const actor, const char *const reason); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index d6a7ad55..f4c02279 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1561,7 +1561,7 @@ _room_info_response_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza muc_set_features(cb_data->room, features); if (cb_data->display) { - ui_show_room_disco_info(cb_data->room, identities, features); + mucwin_room_disco_info(cb_data->room, identities, features); } g_slist_free_full(features, free); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 40a50ff3..12234684 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -215,7 +215,7 @@ void ui_show_room_info(ProfMucWin *mucwin) {} void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role) {} void ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) {} void mucwin_room_info_error(const char * const roomjid, const char * const error) {} -void ui_show_room_disco_info(const char * const roomjid, GSList *identities, GSList *features) {} +void mucwin_room_disco_info(const char * const roomjid, GSList *identities, GSList *features) {} void ui_room_destroyed(const char * const roomjid, const char * const reason, const char * const new_jid, const char * const password) {} void ui_room_kicked(const char * const roomjid, const char * const actor, const char * const reason) {} From 51c9d4186ec3bcd21e684415f66fdbf69cfa53c9 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:20:11 +0000 Subject: [PATCH 09/36] Renamed ui_room_roster -> mucwin_roster --- src/command/commands.c | 8 ++++---- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index d8408937..59e3979f 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1158,7 +1158,7 @@ _who_room(ProfWin *window, const char *const command, gchar **args) // no arg, show all contacts if ((presence == NULL) || (g_strcmp0(presence, "any") == 0)) { - ui_room_roster(mucwin->roomjid, occupants, NULL); + mucwin_roster(mucwin->roomjid, occupants, NULL); // available } else if (strcmp("available", presence) == 0) { @@ -1172,7 +1172,7 @@ _who_room(ProfWin *window, const char *const command, gchar **args) occupants = g_list_next(occupants); } - ui_room_roster(mucwin->roomjid, filtered, "available"); + mucwin_roster(mucwin->roomjid, filtered, "available"); // unavailable } else if (strcmp("unavailable", presence) == 0) { @@ -1186,7 +1186,7 @@ _who_room(ProfWin *window, const char *const command, gchar **args) occupants = g_list_next(occupants); } - ui_room_roster(mucwin->roomjid, filtered, "unavailable"); + mucwin_roster(mucwin->roomjid, filtered, "unavailable"); // show specific status } else { @@ -1201,7 +1201,7 @@ _who_room(ProfWin *window, const char *const command, gchar **args) occupants = g_list_next(occupants); } - ui_room_roster(mucwin->roomjid, filtered, presence); + mucwin_roster(mucwin->roomjid, filtered, presence); } g_list_free(occupants); diff --git a/src/event/server_events.c b/src/event/server_events.c index 6ffd8805..0684903a 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -559,7 +559,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c // show roster if occupants list disabled by default if (!prefs_get_boolean(PREF_OCCUPANTS)) { GList *occupants = muc_roster(room); - ui_room_roster(room, occupants, NULL); + mucwin_roster(room, occupants, NULL); g_list_free(occupants); } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index b87ba1f8..d574604c 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -181,7 +181,7 @@ mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSList *fe } void -ui_room_roster(const char *const roomjid, GList *roster, const char *const presence) +mucwin_roster(const char *const roomjid, GList *roster, const char *const presence) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 661801a7..adf54b14 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -104,7 +104,7 @@ void mucwin_occupant_affiliation_change(const char *const roomjid, const char *c const char *const affiliation, const char *const actor, const char *const reason); void mucwin_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, const char *const role, const char *const affiliation, const char *const actor, const char *const reason); -void ui_room_roster(const char *const roomjid, GList *occupants, const char *const presence); +void mucwin_roster(const char *const roomjid, GList *occupants, const char *const presence); void ui_room_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, const char *const message); void ui_room_message(const char *const roomjid, const char *const nick, const char *const message); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 12234684..572dba59 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -203,7 +203,7 @@ void mucwin_occupant_affiliation_change(const char * const roomjid, const char * const char * const actor, const char * const reason) {} void mucwin_occupant_role_and_affiliation_change(const char * const roomjid, const char * const nick, const char * const role, const char * const affiliation, const char * const actor, const char * const reason) {} -void ui_room_roster(const char * const roomjid, GList *occupants, const char * const presence) {} +void mucwin_roster(const char * const roomjid, GList *occupants, const char * const presence) {} void ui_room_history(const char * const roomjid, const char * const nick, GDateTime *timestamp, const char * const message) {} void ui_room_message(const char * const roomjid, const char * const nick, From 445452696eb7fff83d67d37acfb79f8cdcd7c844 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:23:37 +0000 Subject: [PATCH 10/36] Renamed ui_room_member_offline -> mucwin_occupant_offline --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 0684903a..433944eb 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -486,7 +486,7 @@ sv_ev_room_occupant_offline(const char *const room, const char *const nick, char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC); if (g_strcmp0(muc_status_pref, "none") != 0) { - ui_room_member_offline(room, nick); + mucwin_occupant_offline(room, nick); } prefs_free_string(muc_status_pref); occupantswin_occupants(room); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index d574604c..c3b3d94f 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -221,7 +221,7 @@ mucwin_roster(const char *const roomjid, GList *roster, const char *const presen } void -ui_room_member_offline(const char *const roomjid, const char *const nick) +mucwin_occupant_offline(const char *const roomjid, const char *const nick) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { diff --git a/src/ui/ui.h b/src/ui/ui.h index adf54b14..50d55428 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -126,7 +126,7 @@ void ui_room_member_banned(const char *const roomjid, const char *const nick, co const char *const reason); void ui_leave_room(const char *const roomjid); void ui_room_broadcast(const char *const roomjid, const char *const message); -void ui_room_member_offline(const char *const roomjid, const char *const nick); +void mucwin_occupant_offline(const char *const roomjid, const char *const nick); void ui_room_member_online(const char *const roomjid, const char *const nick, const char *const roles, const char *const affiliation, const char *const show, const char *const status); void ui_room_member_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 572dba59..b11fb47d 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -227,7 +227,7 @@ void ui_room_member_banned(const char * const roomjid, const char * const nick, void ui_leave_room(const char * const roomjid) {} void ui_room_broadcast(const char * const roomjid, const char * const message) {} -void ui_room_member_offline(const char * const roomjid, const char * const nick) {} +void mucwin_occupant_offline(const char * const roomjid, const char * const nick) {} void ui_room_member_online(const char * const roomjid, const char * const nick, const char * const roles, const char * const affiliation, const char * const show, const char * const status) {} void ui_room_member_nick_change(const char * const roomjid, From b8e1e5a546f2f4f66cda217cca71e5640705f047 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:24:49 +0000 Subject: [PATCH 11/36] Renamed ui_room_member_kicked -> mucwin_occupant_kicked --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 433944eb..161e05a8 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -497,7 +497,7 @@ sv_ev_room_occupent_kicked(const char *const room, const char *const nick, const const char *const reason) { muc_roster_remove(room, nick); - ui_room_member_kicked(room, nick, actor, reason); + mucwin_occupant_kicked(room, nick, actor, reason); occupantswin_occupants(room); } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index c3b3d94f..14f330a2 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -232,7 +232,7 @@ mucwin_occupant_offline(const char *const roomjid, const char *const nick) } void -ui_room_member_kicked(const char *const roomjid, const char *const nick, const char *const actor, +mucwin_occupant_kicked(const char *const roomjid, const char *const nick, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index 50d55428..bdf2c9bf 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -119,7 +119,7 @@ void mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSLis void ui_room_destroyed(const char *const roomjid, const char *const reason, const char *const new_jid, const char *const password); void ui_room_kicked(const char *const roomjid, const char *const actor, const char *const reason); -void ui_room_member_kicked(const char *const roomjid, const char *const nick, const char *const actor, +void mucwin_occupant_kicked(const char *const roomjid, const char *const nick, const char *const actor, const char *const reason); void ui_room_banned(const char *const roomjid, const char *const actor, const char *const reason); void ui_room_member_banned(const char *const roomjid, const char *const nick, const char *const actor, diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index b11fb47d..761b2771 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -219,7 +219,7 @@ void mucwin_room_disco_info(const char * const roomjid, GSList *identities, GSLi void ui_room_destroyed(const char * const roomjid, const char * const reason, const char * const new_jid, const char * const password) {} void ui_room_kicked(const char * const roomjid, const char * const actor, const char * const reason) {} -void ui_room_member_kicked(const char * const roomjid, const char * const nick, const char * const actor, +void mucwin_occupant_kicked(const char * const roomjid, const char * const nick, const char * const actor, const char * const reason) {} void ui_room_banned(const char * const roomjid, const char * const actor, const char * const reason) {} void ui_room_member_banned(const char * const roomjid, const char * const nick, const char * const actor, From 1e47749f3a42a04ae80b921a75a650838d7c7f91 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:25:55 +0000 Subject: [PATCH 12/36] Renamed ui_room_member_banned -> mucwin_occupant_banned --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 161e05a8..63e52b69 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -506,7 +506,7 @@ sv_ev_room_occupent_banned(const char *const room, const char *const nick, const const char *const reason) { muc_roster_remove(room, nick); - ui_room_member_banned(room, nick, actor, reason); + mucwin_occupant_banned(room, nick, actor, reason); occupantswin_occupants(room); } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 14f330a2..e6ce912a 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -256,7 +256,7 @@ mucwin_occupant_kicked(const char *const roomjid, const char *const nick, const } void -ui_room_member_banned(const char *const roomjid, const char *const nick, const char *const actor, +mucwin_occupant_banned(const char *const roomjid, const char *const nick, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index bdf2c9bf..1822d75a 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -122,7 +122,7 @@ void ui_room_kicked(const char *const roomjid, const char *const actor, const ch void mucwin_occupant_kicked(const char *const roomjid, const char *const nick, const char *const actor, const char *const reason); void ui_room_banned(const char *const roomjid, const char *const actor, const char *const reason); -void ui_room_member_banned(const char *const roomjid, const char *const nick, const char *const actor, +void mucwin_occupant_banned(const char *const roomjid, const char *const nick, const char *const actor, const char *const reason); void ui_leave_room(const char *const roomjid); void ui_room_broadcast(const char *const roomjid, const char *const message); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 761b2771..849056aa 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -222,7 +222,7 @@ void ui_room_kicked(const char * const roomjid, const char * const actor, const void mucwin_occupant_kicked(const char * const roomjid, const char * const nick, const char * const actor, const char * const reason) {} void ui_room_banned(const char * const roomjid, const char * const actor, const char * const reason) {} -void ui_room_member_banned(const char * const roomjid, const char * const nick, const char * const actor, +void mucwin_occupant_banned(const char * const roomjid, const char * const nick, const char * const actor, const char * const reason) {} void ui_leave_room(const char * const roomjid) {} void ui_room_broadcast(const char * const roomjid, From 7821b2261deb79a405ad2d7af1e7a3252dc813b2 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:27:00 +0000 Subject: [PATCH 13/36] Renamed ui_room_member_online -> mucwin_occupant_online --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 63e52b69..7c86885c 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -638,7 +638,7 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const if (!occupant) { char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC); if (g_strcmp0(muc_status_pref, "none") != 0) { - ui_room_member_online(room, nick, role, affiliation, show, status); + mucwin_occupant_online(room, nick, role, affiliation, show, status); } prefs_free_string(muc_status_pref); occupantswin_occupants(room); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index e6ce912a..739e5f71 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -280,7 +280,7 @@ mucwin_occupant_banned(const char *const roomjid, const char *const nick, const } void -ui_room_member_online(const char *const roomjid, const char *const nick, const char *const role, +mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const role, const char *const affiliation, const char *const show, const char *const status) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index 1822d75a..b2507c6e 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -127,7 +127,7 @@ void mucwin_occupant_banned(const char *const roomjid, const char *const nick, c void ui_leave_room(const char *const roomjid); void ui_room_broadcast(const char *const roomjid, const char *const message); void mucwin_occupant_offline(const char *const roomjid, const char *const nick); -void ui_room_member_online(const char *const roomjid, const char *const nick, const char *const roles, +void mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const roles, const char *const affiliation, const char *const show, const char *const status); void ui_room_member_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); void ui_room_nick_change(const char *const roomjid, const char *const nick); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 849056aa..39408431 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -228,7 +228,7 @@ void ui_leave_room(const char * const roomjid) {} void ui_room_broadcast(const char * const roomjid, const char * const message) {} void mucwin_occupant_offline(const char * const roomjid, const char * const nick) {} -void ui_room_member_online(const char * const roomjid, const char * const nick, const char * const roles, +void mucwin_occupant_online(const char * const roomjid, const char * const nick, const char * const roles, const char * const affiliation, const char * const show, const char * const status) {} void ui_room_member_nick_change(const char * const roomjid, const char * const old_nick, const char * const nick) {} From 0ea7636db3be0f73932db161f9321051696d6df0 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:27:56 +0000 Subject: [PATCH 14/36] Renamed ui_room_member_presence -> mucwin_occupant_presence --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 7c86885c..de7b479f 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -649,7 +649,7 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const if (updated) { char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC); if (g_strcmp0(muc_status_pref, "all") == 0) { - ui_room_member_presence(room, nick, show, status); + mucwin_occupant_presence(room, nick, show, status); } prefs_free_string(muc_status_pref); occupantswin_occupants(room); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 739e5f71..d6d336b9 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -301,7 +301,7 @@ mucwin_occupant_online(const char *const roomjid, const char *const nick, const } void -ui_room_member_presence(const char *const roomjid, const char *const nick, +mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, const char *const status) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index b2507c6e..0e2a8ace 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -131,7 +131,7 @@ void mucwin_occupant_online(const char *const roomjid, const char *const nick, c const char *const affiliation, const char *const show, const char *const status); void ui_room_member_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); void ui_room_nick_change(const char *const roomjid, const char *const nick); -void ui_room_member_presence(const char *const roomjid, const char *const nick, const char *const show, +void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, const char *const status); void ui_room_update_occupants(const char *const roomjid); void ui_room_show_occupants(const char *const roomjid); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 39408431..9e6e3979 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -233,7 +233,7 @@ void mucwin_occupant_online(const char * const roomjid, const char * const nick, void ui_room_member_nick_change(const char * const roomjid, const char * const old_nick, const char * const nick) {} void ui_room_nick_change(const char * const roomjid, const char * const nick) {} -void ui_room_member_presence(const char * const roomjid, +void mucwin_occupant_presence(const char * const roomjid, const char * const nick, const char * const show, const char * const status) {} void ui_room_update_occupants(const char * const roomjid) {} void ui_room_show_occupants(const char * const roomjid) {} From 27632581ebdeb97a27afdc1e58ab21ac52198715 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:28:53 +0000 Subject: [PATCH 15/36] Renamed ui_room_member_nick_change -> mucwin_occupant_nick_change --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index de7b479f..44ba80b5 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -628,7 +628,7 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const // handle nickname change char *old_nick = muc_roster_nick_change_complete(room, nick); if (old_nick) { - ui_room_member_nick_change(room, old_nick, nick); + mucwin_occupant_nick_change(room, old_nick, nick); free(old_nick); occupantswin_occupants(room); return; diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index d6d336b9..adb18ee9 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -313,7 +313,7 @@ mucwin_occupant_presence(const char *const roomjid, const char *const nick, } void -ui_room_member_nick_change(const char *const roomjid, +mucwin_occupant_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index 0e2a8ace..294eb105 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -129,7 +129,7 @@ void ui_room_broadcast(const char *const roomjid, const char *const message); void mucwin_occupant_offline(const char *const roomjid, const char *const nick); void mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const roles, const char *const affiliation, const char *const show, const char *const status); -void ui_room_member_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); +void mucwin_occupant_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); void ui_room_nick_change(const char *const roomjid, const char *const nick); void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, const char *const status); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 9e6e3979..4abca9f7 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -230,7 +230,7 @@ void ui_room_broadcast(const char * const roomjid, void mucwin_occupant_offline(const char * const roomjid, const char * const nick) {} void mucwin_occupant_online(const char * const roomjid, const char * const nick, const char * const roles, const char * const affiliation, const char * const show, const char * const status) {} -void ui_room_member_nick_change(const char * const roomjid, +void mucwin_occupant_nick_change(const char * const roomjid, const char * const old_nick, const char * const nick) {} void ui_room_nick_change(const char * const roomjid, const char * const nick) {} void mucwin_occupant_presence(const char * const roomjid, From d7c1c6f9bfa994e9237df350469be9defa88f00a Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:29:48 +0000 Subject: [PATCH 16/36] Renamed ui_room_nick_change -> mucwin_nick_change --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 44ba80b5..5865d84c 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -541,7 +541,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c // handle self nick change if (muc_nick_change_pending(room)) { muc_nick_change_complete(room, nick); - ui_room_nick_change(room, nick); + mucwin_nick_change(room, nick); // handle roster complete } else if (!muc_roster_complete(room)) { diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index adb18ee9..9035ee95 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -325,7 +325,7 @@ mucwin_occupant_nick_change(const char *const roomjid, } void -ui_room_nick_change(const char *const roomjid, const char *const nick) +mucwin_nick_change(const char *const roomjid, const char *const nick) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 294eb105..d6f81089 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -130,7 +130,7 @@ void mucwin_occupant_offline(const char *const roomjid, const char *const nick); void mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const roles, const char *const affiliation, const char *const show, const char *const status); void mucwin_occupant_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); -void ui_room_nick_change(const char *const roomjid, const char *const nick); +void mucwin_nick_change(const char *const roomjid, const char *const nick); void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, const char *const status); void ui_room_update_occupants(const char *const roomjid); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 4abca9f7..e90c38c6 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -232,7 +232,7 @@ void mucwin_occupant_online(const char * const roomjid, const char * const nick, const char * const affiliation, const char * const show, const char * const status) {} void mucwin_occupant_nick_change(const char * const roomjid, const char * const old_nick, const char * const nick) {} -void ui_room_nick_change(const char * const roomjid, const char * const nick) {} +void mucwin_nick_change(const char * const roomjid, const char * const nick) {} void mucwin_occupant_presence(const char * const roomjid, const char * const nick, const char * const show, const char * const status) {} void ui_room_update_occupants(const char * const roomjid) {} From 29af5d4a3bef53e975981b9ea9b3bcaec31fa443 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:30:39 +0000 Subject: [PATCH 17/36] Renamed ui_room_history -> mucwin_history --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 5865d84c..5b99bdc1 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -155,7 +155,7 @@ void sv_ev_room_history(const char *const room_jid, const char *const nick, GDateTime *timestamp, const char *const message) { - ui_room_history(room_jid, nick, timestamp, message); + mucwin_history(room_jid, nick, timestamp, message); } void diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 9035ee95..51d7e922 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -336,7 +336,7 @@ mucwin_nick_change(const char *const roomjid, const char *const nick) } void -ui_room_history(const char *const roomjid, const char *const nick, +mucwin_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, const char *const message) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index d6f81089..c870ea8b 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -105,7 +105,7 @@ void mucwin_occupant_affiliation_change(const char *const roomjid, const char *c void mucwin_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, const char *const role, const char *const affiliation, const char *const actor, const char *const reason); void mucwin_roster(const char *const roomjid, GList *occupants, const char *const presence); -void ui_room_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, +void mucwin_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, const char *const message); void ui_room_message(const char *const roomjid, const char *const nick, const char *const message); void ui_room_subject(const char *const roomjid, const char *const nick, const char *const subject); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index e90c38c6..7ba6028a 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -204,7 +204,7 @@ void mucwin_occupant_affiliation_change(const char * const roomjid, const char * void mucwin_occupant_role_and_affiliation_change(const char * const roomjid, const char * const nick, const char * const role, const char * const affiliation, const char * const actor, const char * const reason) {} void mucwin_roster(const char * const roomjid, GList *occupants, const char * const presence) {} -void ui_room_history(const char * const roomjid, const char * const nick, +void mucwin_history(const char * const roomjid, const char * const nick, GDateTime *timestamp, const char * const message) {} void ui_room_message(const char * const roomjid, const char * const nick, const char * const message) {} From f435d081b09c8023db5262a7fe110fe3d18eea1c Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:31:54 +0000 Subject: [PATCH 18/36] Renamed ui_room_message -> mucwin_message --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 5b99bdc1..e6f749be 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -162,7 +162,7 @@ void sv_ev_room_message(const char *const room_jid, const char *const nick, const char *const message) { - ui_room_message(room_jid, nick, message); + mucwin_message(room_jid, nick, message); if (prefs_get_boolean(PREF_GRLOG)) { Jid *jid = jid_create(jabber_get_fulljid()); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 51d7e922..62f8f48f 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -362,7 +362,7 @@ mucwin_history(const char *const roomjid, const char *const nick, } void -ui_room_message(const char *const roomjid, const char *const nick, +mucwin_message(const char *const roomjid, const char *const nick, const char *const message) { ProfMucWin *mucwin = wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index c870ea8b..b00df993 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -107,7 +107,7 @@ void mucwin_occupant_role_and_affiliation_change(const char *const roomjid, cons void mucwin_roster(const char *const roomjid, GList *occupants, const char *const presence); void mucwin_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, const char *const message); -void ui_room_message(const char *const roomjid, const char *const nick, const char *const message); +void mucwin_message(const char *const roomjid, const char *const nick, const char *const message); void ui_room_subject(const char *const roomjid, const char *const nick, const char *const subject); void ui_room_requires_config(const char *const roomjid); void ui_room_destroy(const char *const roomjid); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 7ba6028a..56b74780 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -206,7 +206,7 @@ void mucwin_occupant_role_and_affiliation_change(const char * const roomjid, con void mucwin_roster(const char * const roomjid, GList *occupants, const char * const presence) {} void mucwin_history(const char * const roomjid, const char * const nick, GDateTime *timestamp, const char * const message) {} -void ui_room_message(const char * const roomjid, const char * const nick, +void mucwin_message(const char * const roomjid, const char * const nick, const char * const message) {} void ui_room_subject(const char * const roomjid, const char * const nick, const char * const subject) {} void ui_room_requires_config(const char * const roomjid) {} From bd922a26511e7fc2be2229673b4cc81745e7403d Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:32:35 +0000 Subject: [PATCH 19/36] Renamed ui_room_requires_config -> mucwin_requires_config --- src/event/server_events.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index e6f749be..09fb7642 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -580,7 +580,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c // room configuration required if (config_required) { muc_set_requires_config(room, TRUE); - ui_room_requires_config(room); + mucwin_requires_config(room); } // check for change in role/affiliation diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 62f8f48f..29604189 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -446,7 +446,7 @@ mucwin_message(const char *const roomjid, const char *const nick, } void -ui_room_requires_config(const char *const roomjid) +mucwin_requires_config(const char *const roomjid) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { diff --git a/src/ui/ui.h b/src/ui/ui.h index b00df993..0649e361 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -109,7 +109,7 @@ void mucwin_history(const char *const roomjid, const char *const nick, GDateTime const char *const message); void mucwin_message(const char *const roomjid, const char *const nick, const char *const message); void ui_room_subject(const char *const roomjid, const char *const nick, const char *const subject); -void ui_room_requires_config(const char *const roomjid); +void mucwin_requires_config(const char *const roomjid); void ui_room_destroy(const char *const roomjid); void ui_show_room_info(ProfMucWin *mucwin); void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 56b74780..3ea1ff93 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -209,7 +209,7 @@ void mucwin_history(const char * const roomjid, const char * const nick, void mucwin_message(const char * const roomjid, const char * const nick, const char * const message) {} void ui_room_subject(const char * const roomjid, const char * const nick, const char * const subject) {} -void ui_room_requires_config(const char * const roomjid) {} +void mucwin_requires_config(const char * const roomjid) {} void ui_room_destroy(const char * const roomjid) {} void ui_show_room_info(ProfMucWin *mucwin) {} void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role) {} From 25020df0f0905c0f8b469765fd75fa366161a29c Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:33:16 +0000 Subject: [PATCH 20/36] Renamed ui_room_subject -> mucwin_subject --- src/event/server_events.c | 4 ++-- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index 09fb7642..dc28867e 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -147,7 +147,7 @@ sv_ev_room_subject(const char *const room, const char *const nick, const char *c { muc_set_subject(room, subject); if (muc_roster_complete(room)) { - ui_room_subject(room, nick, subject); + mucwin_subject(room, nick, subject); } } @@ -565,7 +565,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c char *subject = muc_subject(room); if (subject) { - ui_room_subject(room, NULL, subject); + mucwin_subject(room, NULL, subject); } GList *pending_broadcasts = muc_pending_broadcasts(room); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 29604189..b2de4825 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -481,7 +481,7 @@ mucwin_requires_config(const char *const roomjid) } void -ui_room_subject(const char *const roomjid, const char *const nick, const char *const subject) +mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 0649e361..6699444c 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -108,7 +108,7 @@ void mucwin_roster(const char *const roomjid, GList *occupants, const char *cons void mucwin_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, const char *const message); void mucwin_message(const char *const roomjid, const char *const nick, const char *const message); -void ui_room_subject(const char *const roomjid, const char *const nick, const char *const subject); +void mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject); void mucwin_requires_config(const char *const roomjid); void ui_room_destroy(const char *const roomjid); void ui_show_room_info(ProfMucWin *mucwin); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 3ea1ff93..68028c3a 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -208,7 +208,7 @@ void mucwin_history(const char * const roomjid, const char * const nick, GDateTime *timestamp, const char * const message) {} void mucwin_message(const char * const roomjid, const char * const nick, const char * const message) {} -void ui_room_subject(const char * const roomjid, const char * const nick, const char * const subject) {} +void mucwin_subject(const char * const roomjid, const char * const nick, const char * const subject) {} void mucwin_requires_config(const char * const roomjid) {} void ui_room_destroy(const char * const roomjid) {} void ui_show_room_info(ProfMucWin *mucwin) {} From a575ab174cba020a96c24e6a43d1120523bd7e4e Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:34:28 +0000 Subject: [PATCH 21/36] Renamed ui_handle_room_kick_error -> mucwin_kick_error --- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index b2de4825..058565a2 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -517,7 +517,7 @@ mucwin_subject(const char *const roomjid, const char *const nick, const char *co } void -ui_handle_room_kick_error(const char *const roomjid, const char *const nick, const char *const error) +mucwin_kick_error(const char *const roomjid, const char *const nick, const char *const error) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 6699444c..d8ca5b8c 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -164,7 +164,7 @@ void ui_handle_room_role_set_error(const char *const roomjid, const char *const const char *const error); void ui_handle_room_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 ui_handle_room_kick_error(const char *const roomjid, const char *const nick, const char *const error); +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); void ui_show_form_help(ProfMucConfWin *confwin); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index f4c02279..4f09f565 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1463,7 +1463,7 @@ _room_kick_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - ui_handle_room_kick_error(from, nick, error_message); + mucwin_kick_error(from, nick, error_message); free(error_message); free(nick); return 0; diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 68028c3a..8fdc6b98 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -284,7 +284,7 @@ void ui_handle_room_role_set_error(const char * const roomjid, const char * cons const char * const error) {} void ui_handle_room_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 ui_handle_room_kick_error(const char * const roomjid, const char * const nick, const char * const error) {} +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) {} void ui_show_form_help(ProfMucConfWin *confwin) {} From b26e6060615cfff42b56ef5e40c178a2e9502368 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:35:15 +0000 Subject: [PATCH 22/36] Renamed ui_room_broadcast -> mucwin_broadcast --- src/event/server_events.c | 4 ++-- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index dc28867e..7d39267b 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -136,7 +136,7 @@ void sv_ev_room_broadcast(const char *const room_jid, const char *const message) { if (muc_roster_complete(room_jid)) { - ui_room_broadcast(room_jid, message); + mucwin_broadcast(room_jid, message); } else { muc_pending_broadcasts_add(room_jid, message); } @@ -572,7 +572,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c if (pending_broadcasts) { GList *curr = pending_broadcasts; while (curr) { - ui_room_broadcast(room, curr->data); + mucwin_broadcast(room, curr->data); curr = g_list_next(curr); } } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 058565a2..8b1cbd68 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -528,7 +528,7 @@ mucwin_kick_error(const char *const roomjid, const char *const nick, const char } void -ui_room_broadcast(const char *const roomjid, const char *const message) +mucwin_broadcast(const char *const roomjid, const char *const message) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { diff --git a/src/ui/ui.h b/src/ui/ui.h index d8ca5b8c..c3bcbac1 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -125,7 +125,7 @@ void ui_room_banned(const char *const roomjid, const char *const actor, const ch void mucwin_occupant_banned(const char *const roomjid, const char *const nick, const char *const actor, const char *const reason); void ui_leave_room(const char *const roomjid); -void ui_room_broadcast(const char *const roomjid, const char *const message); +void mucwin_broadcast(const char *const roomjid, const char *const message); void mucwin_occupant_offline(const char *const roomjid, const char *const nick); void mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const roles, const char *const affiliation, const char *const show, const char *const status); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 8fdc6b98..1dc6843b 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -225,7 +225,7 @@ void ui_room_banned(const char * const roomjid, const char * const actor, const void mucwin_occupant_banned(const char * const roomjid, const char * const nick, const char * const actor, const char * const reason) {} void ui_leave_room(const char * const roomjid) {} -void ui_room_broadcast(const char * const roomjid, +void mucwin_broadcast(const char * const roomjid, const char * const message) {} void mucwin_occupant_offline(const char * const roomjid, const char * const nick) {} void mucwin_occupant_online(const char * const roomjid, const char * const nick, const char * const roles, From 21d560f068590023ac9f5ae9301c5737a4614205 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:37:09 +0000 Subject: [PATCH 23/36] Renamed ui_handle_room_affiliation_list_error -> mucwin_affiliation_list_error --- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 8b1cbd68..396f6331 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -551,7 +551,7 @@ mucwin_broadcast(const char *const roomjid, const char *const message) } void -ui_handle_room_affiliation_list_error(const char *const roomjid, const char *const affiliation, +mucwin_affiliation_list_error(const char *const roomjid, const char *const affiliation, const char *const error) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index c3bcbac1..b0fa4867 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -155,7 +155,7 @@ void ui_handle_room_configuration(const char *const roomjid, DataForm *form); void ui_handle_room_configuration_form_error(const char *const roomjid, const char *const message); 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_affiliation_list_error(const char *const roomjid, const char *const affiliation, +void mucwin_affiliation_list_error(const char *const roomjid, const char *const affiliation, const char *const error); void ui_handle_room_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids); void ui_handle_room_affiliation_set_error(const char *const roomjid, const char *const jid, diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 4f09f565..3f70587e 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1342,7 +1342,7 @@ _room_affiliation_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *co if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); log_debug("Error retrieving %s list for room %s: %s", affiliation, from, error_message); - ui_handle_room_affiliation_list_error(from, affiliation, error_message); + mucwin_affiliation_list_error(from, affiliation, error_message); free(error_message); free(affiliation); return 0; diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 1dc6843b..b9a44dd5 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -275,7 +275,7 @@ void ui_handle_room_configuration(const char * const roomjid, DataForm *form) {} void ui_handle_room_configuration_form_error(const char * const roomjid, const char * const message) {} 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_affiliation_list_error(const char * const roomjid, const char * const affiliation, +void mucwin_affiliation_list_error(const char * const roomjid, const char * const affiliation, const char * const error) {} void ui_handle_room_affiliation_list(const char * const roomjid, const char * const affiliation, GSList *jids) {} void ui_handle_room_affiliation_set_error(const char * const roomjid, const char * const jid, From fa0ed64190983b9965bf86ff38599cb2bc43f5d8 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:45:59 +0000 Subject: [PATCH 24/36] Renamed ui_handle_room_affiliation_list -> mucwin_handle_affiliation_list --- src/ui/mucwin.c | 122 +++++++++++++++++------------------ src/ui/ui.h | 2 +- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 396f6331..e1c5bac3 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -561,7 +561,7 @@ mucwin_affiliation_list_error(const char *const roomjid, const char *const affil } void -ui_handle_room_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids) +mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window) { @@ -581,6 +581,66 @@ ui_handle_room_affiliation_list(const char *const roomjid, const char *const aff } } +void +ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) +{ + ProfWin *window = (ProfWin*) mucwin; + GSList *occupants = muc_occupants_by_affiliation(mucwin->roomjid, affiliation); + + if (!occupants) { + switch (affiliation) { + case MUC_AFFILIATION_OWNER: + win_print(window, '!', 0, NULL, 0, 0, "", "No owners found."); + break; + case MUC_AFFILIATION_ADMIN: + win_print(window, '!', 0, NULL, 0, 0, "", "No admins found."); + break; + case MUC_AFFILIATION_MEMBER: + win_print(window, '!', 0, NULL, 0, 0, "", "No members found."); + break; + case MUC_AFFILIATION_OUTCAST: + win_print(window, '!', 0, NULL, 0, 0, "", "No outcasts found."); + break; + default: + break; + } + win_print(window, '-', 0, NULL, 0, 0, "", ""); + } else { + switch (affiliation) { + case MUC_AFFILIATION_OWNER: + win_print(window, '!', 0, NULL, 0, 0, "", "Owners:"); + break; + case MUC_AFFILIATION_ADMIN: + win_print(window, '!', 0, NULL, 0, 0, "", "Admins:"); + break; + case MUC_AFFILIATION_MEMBER: + win_print(window, '!', 0, NULL, 0, 0, "", "Members:"); + break; + case MUC_AFFILIATION_OUTCAST: + win_print(window, '!', 0, NULL, 0, 0, "", "Outcasts:"); + break; + default: + break; + } + + GSList *curr_occupant = occupants; + while(curr_occupant) { + Occupant *occupant = curr_occupant->data; + if (occupant->affiliation == affiliation) { + if (occupant->jid) { + win_vprint(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid); + } else { + win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick); + } + } + + curr_occupant = g_slist_next(curr_occupant); + } + + win_print(window, '-', 0, NULL, 0, 0, "", ""); + } +} + void ui_handle_room_role_list_error(const char *const roomjid, const char *const role, const char *const error) { @@ -707,66 +767,6 @@ ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role) } } -void -ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) -{ - ProfWin *window = (ProfWin*) mucwin; - GSList *occupants = muc_occupants_by_affiliation(mucwin->roomjid, affiliation); - - if (!occupants) { - switch (affiliation) { - case MUC_AFFILIATION_OWNER: - win_print(window, '!', 0, NULL, 0, 0, "", "No owners found."); - break; - case MUC_AFFILIATION_ADMIN: - win_print(window, '!', 0, NULL, 0, 0, "", "No admins found."); - break; - case MUC_AFFILIATION_MEMBER: - win_print(window, '!', 0, NULL, 0, 0, "", "No members found."); - break; - case MUC_AFFILIATION_OUTCAST: - win_print(window, '!', 0, NULL, 0, 0, "", "No outcasts found."); - break; - default: - break; - } - win_print(window, '-', 0, NULL, 0, 0, "", ""); - } else { - switch (affiliation) { - case MUC_AFFILIATION_OWNER: - win_print(window, '!', 0, NULL, 0, 0, "", "Owners:"); - break; - case MUC_AFFILIATION_ADMIN: - win_print(window, '!', 0, NULL, 0, 0, "", "Admins:"); - break; - case MUC_AFFILIATION_MEMBER: - win_print(window, '!', 0, NULL, 0, 0, "", "Members:"); - break; - case MUC_AFFILIATION_OUTCAST: - win_print(window, '!', 0, NULL, 0, 0, "", "Outcasts:"); - break; - default: - break; - } - - GSList *curr_occupant = occupants; - while(curr_occupant) { - Occupant *occupant = curr_occupant->data; - if (occupant->affiliation == affiliation) { - if (occupant->jid) { - win_vprint(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid); - } else { - win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick); - } - } - - curr_occupant = g_slist_next(curr_occupant); - } - - win_print(window, '-', 0, NULL, 0, 0, "", ""); - } -} - void ui_room_update_occupants(const char *const roomjid) { diff --git a/src/ui/ui.h b/src/ui/ui.h index b0fa4867..b138386d 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -157,7 +157,7 @@ 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 mucwin_affiliation_list_error(const char *const roomjid, const char *const affiliation, const char *const error); -void ui_handle_room_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids); +void mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids); void ui_handle_room_affiliation_set_error(const char *const roomjid, const char *const jid, const char *const affiliation, const char *const error); void ui_handle_room_role_set_error(const char *const roomjid, const char *const nick, const char *const role, diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 3f70587e..06ef7e10 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1365,7 +1365,7 @@ _room_affiliation_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *co } muc_jid_autocomplete_add_all(from, jids); - ui_handle_room_affiliation_list(from, affiliation, jids); + mucwin_handle_affiliation_list(from, affiliation, jids); free(affiliation); g_slist_free(jids); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index b9a44dd5..5275648e 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -277,7 +277,7 @@ 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 mucwin_affiliation_list_error(const char * const roomjid, const char * const affiliation, const char * const error) {} -void ui_handle_room_affiliation_list(const char * const roomjid, const char * const affiliation, GSList *jids) {} +void mucwin_handle_affiliation_list(const char * const roomjid, const char * const affiliation, GSList *jids) {} void ui_handle_room_affiliation_set_error(const char * const roomjid, const char * const jid, const char * const affiliation, const char * const error) {} void ui_handle_room_role_set_error(const char * const roomjid, const char * const nick, const char * const role, From 381bce385fff894e2222fc8271f1090aafa4844d Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:46:57 +0000 Subject: [PATCH 25/36] Renamed ui_show_room_affiliation_list -> mucwin_show_affiliation_list --- src/command/commands.c | 8 ++++---- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index 59e3979f..cab92ef7 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1222,19 +1222,19 @@ _who_room(ProfWin *window, const char *const command, gchar **args) } if (g_strcmp0(args[0], "owner") == 0) { - ui_show_room_affiliation_list(mucwin, MUC_AFFILIATION_OWNER); + mucwin_show_affiliation_list(mucwin, MUC_AFFILIATION_OWNER); return; } if (g_strcmp0(args[0], "admin") == 0) { - ui_show_room_affiliation_list(mucwin, MUC_AFFILIATION_ADMIN); + mucwin_show_affiliation_list(mucwin, MUC_AFFILIATION_ADMIN); return; } if (g_strcmp0(args[0], "member") == 0) { - ui_show_room_affiliation_list(mucwin, MUC_AFFILIATION_MEMBER); + mucwin_show_affiliation_list(mucwin, MUC_AFFILIATION_MEMBER); return; } if (g_strcmp0(args[0], "outcast") == 0) { - ui_show_room_affiliation_list(mucwin, MUC_AFFILIATION_OUTCAST); + mucwin_show_affiliation_list(mucwin, MUC_AFFILIATION_OUTCAST); return; } } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index e1c5bac3..3a57f2da 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -582,7 +582,7 @@ mucwin_handle_affiliation_list(const char *const roomjid, const char *const affi } void -ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) +mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) { ProfWin *window = (ProfWin*) mucwin; GSList *occupants = muc_occupants_by_affiliation(mucwin->roomjid, affiliation); diff --git a/src/ui/ui.h b/src/ui/ui.h index b138386d..10cc66e2 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -113,7 +113,7 @@ void mucwin_requires_config(const char *const roomjid); void ui_room_destroy(const char *const roomjid); void ui_show_room_info(ProfMucWin *mucwin); void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role); -void ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); +void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); void mucwin_room_info_error(const char *const roomjid, const char *const error); void mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSList *features); void ui_room_destroyed(const char *const roomjid, const char *const reason, const char *const new_jid, diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 5275648e..1814c807 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -213,7 +213,7 @@ void mucwin_requires_config(const char * const roomjid) {} void ui_room_destroy(const char * const roomjid) {} void ui_show_room_info(ProfMucWin *mucwin) {} void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role) {} -void ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) {} +void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) {} void mucwin_room_info_error(const char * const roomjid, const char * const error) {} void mucwin_room_disco_info(const char * const roomjid, GSList *identities, GSList *features) {} void ui_room_destroyed(const char * const roomjid, const char * const reason, const char * const new_jid, From 2cc5f17871e2fe3c6c8acdf747b4bfb7acc13566 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:48:28 +0000 Subject: [PATCH 26/36] Renamed ui_handle_room_role_list_error -> mucwin_role_list_error --- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 3a57f2da..f0617ff5 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -642,7 +642,7 @@ mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) } void -ui_handle_room_role_list_error(const char *const roomjid, const char *const role, const char *const error) +mucwin_role_list_error(const char *const roomjid, const char *const role, const char *const error) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 10cc66e2..cde39c01 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -162,7 +162,7 @@ void ui_handle_room_affiliation_set_error(const char *const roomjid, const char const char *const affiliation, const char *const error); void ui_handle_room_role_set_error(const char *const roomjid, const char *const nick, const char *const role, const char *const error); -void ui_handle_room_role_list_error(const char *const roomjid, 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_kick_error(const char *const roomjid, const char *const nick, const char *const error); void ui_show_form(ProfMucConfWin *confwin); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 06ef7e10..d5f9c554 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1390,7 +1390,7 @@ _room_role_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const sta if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); log_debug("Error retrieving %s list for room %s: %s", role, from, error_message); - ui_handle_room_role_list_error(from, role, error_message); + mucwin_role_list_error(from, role, error_message); free(error_message); free(role); return 0; diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 1814c807..c3b263df 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -282,7 +282,7 @@ void ui_handle_room_affiliation_set_error(const char * const roomjid, const char const char * const affiliation, const char * const error) {} void ui_handle_room_role_set_error(const char * const roomjid, const char * const nick, const char * const role, const char * const error) {} -void ui_handle_room_role_list_error(const char * const roomjid, 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_kick_error(const char * const roomjid, const char * const nick, const char * const error) {} void ui_show_form(ProfMucConfWin *confwin) {} From 556985ec39685a164b877e597838d16dc2848ea6 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:50:32 +0000 Subject: [PATCH 27/36] Renamed ui_handle_room_role_list -> mucwin_handle_role_list --- src/ui/mucwin.c | 68 ++++++++++++++++++------------------ src/ui/ui.h | 2 +- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 37 insertions(+), 37 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) { @@ -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) { 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); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index c3b263df..55685dab 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -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) {} From d47da01c0009a0f40652dd3bb0da564edba412ab Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:51:24 +0000 Subject: [PATCH 28/36] Renamed ui_show_room_role_list -> mucwin_show_role_list --- src/command/commands.c | 6 +++--- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index cab92ef7..3910af34 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1209,15 +1209,15 @@ _who_room(ProfWin *window, const char *const command, gchar **args) // role or affiliation filter } else { if (g_strcmp0(args[0], "moderator") == 0) { - ui_show_room_role_list(mucwin, MUC_ROLE_MODERATOR); + mucwin_show_role_list(mucwin, MUC_ROLE_MODERATOR); return; } if (g_strcmp0(args[0], "participant") == 0) { - ui_show_room_role_list(mucwin, MUC_ROLE_PARTICIPANT); + mucwin_show_role_list(mucwin, MUC_ROLE_PARTICIPANT); return; } if (g_strcmp0(args[0], "visitor") == 0) { - ui_show_room_role_list(mucwin, MUC_ROLE_VISITOR); + mucwin_show_role_list(mucwin, MUC_ROLE_VISITOR); return; } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index d0e18e70..6dd93bcb 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -681,7 +681,7 @@ mucwin_handle_role_list(const char *const roomjid, const char *const role, GSLis } void -ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role) +mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role) { ProfWin *window = (ProfWin*) mucwin; GSList *occupants = muc_occupants_by_role(mucwin->roomjid, role); diff --git a/src/ui/ui.h b/src/ui/ui.h index adc6db0b..982f838d 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -112,7 +112,7 @@ void mucwin_subject(const char *const roomjid, const char *const nick, const cha void mucwin_requires_config(const char *const roomjid); void ui_room_destroy(const char *const roomjid); void ui_show_room_info(ProfMucWin *mucwin); -void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role); +void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role); void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); void mucwin_room_info_error(const char *const roomjid, const char *const error); void mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSList *features); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 55685dab..a81654a9 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -212,7 +212,7 @@ void mucwin_subject(const char * const roomjid, const char * const nick, const c void mucwin_requires_config(const char * const roomjid) {} void ui_room_destroy(const char * const roomjid) {} void ui_show_room_info(ProfMucWin *mucwin) {} -void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role) {} +void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role) {} void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) {} void mucwin_room_info_error(const char * const roomjid, const char * const error) {} void mucwin_room_disco_info(const char * const roomjid, GSList *identities, GSList *features) {} From 50765190f79bb874229f2ea93e25d37d86dd1d94 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:52:27 +0000 Subject: [PATCH 29/36] Renamed ui_handle_room_affiliation_set_error -> mucwin_affiliation_set_error --- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 6dd93bcb..71b25fc2 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -735,7 +735,7 @@ mucwin_show_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, +mucwin_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); diff --git a/src/ui/ui.h b/src/ui/ui.h index 982f838d..26a3e9fc 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -158,7 +158,7 @@ void ui_handle_room_config_submit_result_error(const char *const roomjid, const void mucwin_affiliation_list_error(const char *const roomjid, const char *const affiliation, const char *const error); void mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids); -void ui_handle_room_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); void ui_handle_room_role_set_error(const char *const roomjid, const char *const nick, const char *const role, const char *const error); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 55645783..07ab232b 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1283,7 +1283,7 @@ _room_affiliation_set_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *con if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); log_debug("Error setting affiliation %s list for room %s, user %s: %s", affiliation_set->privilege, from, affiliation_set->item, error_message); - ui_handle_room_affiliation_set_error(from, affiliation_set->item, affiliation_set->privilege, error_message); + mucwin_affiliation_set_error(from, affiliation_set->item, affiliation_set->privilege, error_message); free(error_message); } diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index a81654a9..ed88dd68 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -278,7 +278,7 @@ void ui_handle_room_config_submit_result_error(const char * const roomjid, const void mucwin_affiliation_list_error(const char * const roomjid, const char * const affiliation, const char * const error) {} void mucwin_handle_affiliation_list(const char * const roomjid, const char * const affiliation, GSList *jids) {} -void ui_handle_room_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) {} void ui_handle_room_role_set_error(const char * const roomjid, const char * const nick, const char * const role, const char * const error) {} From 67f8faf6452788532a435ecedc3ff53fcbe04e57 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:53:12 +0000 Subject: [PATCH 30/36] Renamed ui_handle_room_role_set_error -> mucwin_role_set_error --- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 71b25fc2..d0842afa 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -745,7 +745,7 @@ mucwin_affiliation_set_error(const char *const roomjid, const char *const jid, c } void -ui_handle_room_role_set_error(const char *const roomjid, const char *const nick, const char *const role, +mucwin_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); diff --git a/src/ui/ui.h b/src/ui/ui.h index 26a3e9fc..777f2fa3 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -160,7 +160,7 @@ void mucwin_affiliation_list_error(const char *const roomjid, const char *const void mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids); void mucwin_affiliation_set_error(const char *const roomjid, const char *const jid, const char *const affiliation, const char *const error); -void ui_handle_room_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); void mucwin_role_list_error(const char *const roomjid, const char *const role, const char *const error); void mucwin_handle_role_list(const char *const roomjid, const char *const role, GSList *nicks); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 07ab232b..034be2a2 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1313,7 +1313,7 @@ _room_role_set_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stan if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); log_debug("Error setting role %s list for room %s, user %s: %s", role_set->privilege, from, role_set->item, error_message); - ui_handle_room_role_set_error(from, role_set->item, role_set->privilege, error_message); + mucwin_role_set_error(from, role_set->item, role_set->privilege, error_message); free(error_message); } diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index ed88dd68..0978f39e 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -280,7 +280,7 @@ void mucwin_affiliation_list_error(const char * const roomjid, const char * cons void mucwin_handle_affiliation_list(const char * const roomjid, const char * const affiliation, GSList *jids) {} void mucwin_affiliation_set_error(const char * const roomjid, const char * const jid, const char * const affiliation, const char * const error) {} -void ui_handle_room_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) {} void mucwin_role_list_error(const char * const roomjid, const char * const role, const char * const error) {} void mucwin_handle_role_list(const char * const roomjid, const char * const role, GSList *nicks) {} From e4e76ec58b5e3cddeacd954d9fa592d6439fe0e9 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:54:31 +0000 Subject: [PATCH 31/36] Renamed ui_show_room_info -> mucwin_info --- src/command/commands.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index 3910af34..efb05f23 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2085,7 +2085,7 @@ cmd_info(ProfWin *window, const char *const command, gchar **args) ProfMucWin *mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); iq_room_info_request(mucwin->roomjid, TRUE); - ui_show_room_info(mucwin); + mucwin_info(mucwin); return TRUE; } break; diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index d0842afa..d75140d2 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -755,7 +755,7 @@ mucwin_role_set_error(const char *const roomjid, const char *const nick, const c } void -ui_show_room_info(ProfMucWin *mucwin) +mucwin_info(ProfMucWin *mucwin) { char *role = muc_role_str(mucwin->roomjid); char *affiliation = muc_affiliation_str(mucwin->roomjid); diff --git a/src/ui/ui.h b/src/ui/ui.h index 777f2fa3..4095adaf 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -111,7 +111,7 @@ void mucwin_message(const char *const roomjid, const char *const nick, const cha void mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject); void mucwin_requires_config(const char *const roomjid); void ui_room_destroy(const char *const roomjid); -void ui_show_room_info(ProfMucWin *mucwin); +void mucwin_info(ProfMucWin *mucwin); void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role); void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); void mucwin_room_info_error(const char *const roomjid, const char *const error); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 0978f39e..d8d35928 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -211,7 +211,7 @@ void mucwin_message(const char * const roomjid, const char * const nick, void mucwin_subject(const char * const roomjid, const char * const nick, const char * const subject) {} void mucwin_requires_config(const char * const roomjid) {} void ui_room_destroy(const char * const roomjid) {} -void ui_show_room_info(ProfMucWin *mucwin) {} +void mucwin_info(ProfMucWin *mucwin) {} void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role) {} void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) {} void mucwin_room_info_error(const char * const roomjid, const char * const error) {} From 46973933733f0580fae0a77adb2c7baa401f806d Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:55:16 +0000 Subject: [PATCH 32/36] Renamed ui_room_update_occupants -> mucwin_update_occupants --- src/command/commands.c | 4 ++-- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index efb05f23..514ddce8 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -3171,14 +3171,14 @@ cmd_occupants(ProfWin *window, const char *const command, gchar **args) if (g_strcmp0(args[0], "show") == 0) { if (g_strcmp0(args[1], "jid") == 0) { mucwin->showjid = TRUE; - ui_room_update_occupants(mucwin->roomjid); + mucwin_update_occupants(mucwin->roomjid); } else { ui_room_show_occupants(mucwin->roomjid); } } else if (g_strcmp0(args[0], "hide") == 0) { if (g_strcmp0(args[1], "jid") == 0) { mucwin->showjid = FALSE; - ui_room_update_occupants(mucwin->roomjid); + mucwin_update_occupants(mucwin->roomjid); } else { ui_room_hide_occupants(mucwin->roomjid); } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index d75140d2..9d13a799 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -768,7 +768,7 @@ mucwin_info(ProfMucWin *mucwin) } void -ui_room_update_occupants(const char *const roomjid) +mucwin_update_occupants(const char *const roomjid) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window && win_has_active_subwin(window)) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 4095adaf..e9d322a2 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -133,7 +133,7 @@ void mucwin_occupant_nick_change(const char *const roomjid, const char *const ol void mucwin_nick_change(const char *const roomjid, const char *const nick); void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, const char *const status); -void ui_room_update_occupants(const char *const roomjid); +void mucwin_update_occupants(const char *const roomjid); void ui_room_show_occupants(const char *const roomjid); void ui_room_hide_occupants(const char *const roomjid); void ui_show_roster(void); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index d8d35928..ed082225 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -235,7 +235,7 @@ void mucwin_occupant_nick_change(const char * const roomjid, void mucwin_nick_change(const char * const roomjid, const char * const nick) {} void mucwin_occupant_presence(const char * const roomjid, const char * const nick, const char * const show, const char * const status) {} -void ui_room_update_occupants(const char * const roomjid) {} +void mucwin_update_occupants(const char * const roomjid) {} void ui_room_show_occupants(const char * const roomjid) {} void ui_room_hide_occupants(const char * const roomjid) {} void ui_show_roster(void) {} From 2e0891084180480aefcb662477c31003f8fb75cd Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:56:17 +0000 Subject: [PATCH 33/36] Renamed ui_room_show_occupants -> mucwin_occupants --- src/command/commands.c | 2 +- src/ui/core.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index 514ddce8..9c966dd8 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -3173,7 +3173,7 @@ cmd_occupants(ProfWin *window, const char *const command, gchar **args) mucwin->showjid = TRUE; mucwin_update_occupants(mucwin->roomjid); } else { - ui_room_show_occupants(mucwin->roomjid); + mucwin_occupants(mucwin->roomjid); } } else if (g_strcmp0(args[0], "hide") == 0) { if (g_strcmp0(args[1], "jid") == 0) { diff --git a/src/ui/core.c b/src/ui/core.c index 6fcfc8f5..458b05df 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -668,7 +668,7 @@ ui_show_all_room_rosters(void) if (window->type == WIN_MUC && !win_has_active_subwin(window)) { ProfMucWin *mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); - ui_room_show_occupants(mucwin->roomjid); + mucwin_occupants(mucwin->roomjid); } curr = g_list_next(curr); } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 9d13a799..d65048e7 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -777,7 +777,7 @@ mucwin_update_occupants(const char *const roomjid) } void -ui_room_show_occupants(const char *const roomjid) +mucwin_occupants(const char *const roomjid) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window && !win_has_active_subwin(window)) { diff --git a/src/ui/ui.h b/src/ui/ui.h index e9d322a2..18bd0cea 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -134,7 +134,7 @@ void mucwin_nick_change(const char *const roomjid, const char *const nick); void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, const char *const status); void mucwin_update_occupants(const char *const roomjid); -void ui_room_show_occupants(const char *const roomjid); +void mucwin_occupants(const char *const roomjid); void ui_room_hide_occupants(const char *const roomjid); void ui_show_roster(void); void ui_hide_roster(void); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index ed082225..a1aacdc3 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -236,7 +236,7 @@ void mucwin_nick_change(const char * const roomjid, const char * const nick) {} void mucwin_occupant_presence(const char * const roomjid, const char * const nick, const char * const show, const char * const status) {} void mucwin_update_occupants(const char * const roomjid) {} -void ui_room_show_occupants(const char * const roomjid) {} +void mucwin_occupants(const char * const roomjid) {} void ui_room_hide_occupants(const char * const roomjid) {} void ui_show_roster(void) {} void ui_hide_roster(void) {} From a08f112fd0fceaaed37028d657b2298005856e44 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:57:18 +0000 Subject: [PATCH 34/36] Renamed mucwin_occupants -> mucwin_show_occupants --- src/command/commands.c | 2 +- src/ui/core.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index 9c966dd8..7ca7149c 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -3173,7 +3173,7 @@ cmd_occupants(ProfWin *window, const char *const command, gchar **args) mucwin->showjid = TRUE; mucwin_update_occupants(mucwin->roomjid); } else { - mucwin_occupants(mucwin->roomjid); + mucwin_show_occupants(mucwin->roomjid); } } else if (g_strcmp0(args[0], "hide") == 0) { if (g_strcmp0(args[1], "jid") == 0) { diff --git a/src/ui/core.c b/src/ui/core.c index 458b05df..2ae9616a 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -668,7 +668,7 @@ ui_show_all_room_rosters(void) if (window->type == WIN_MUC && !win_has_active_subwin(window)) { ProfMucWin *mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); - mucwin_occupants(mucwin->roomjid); + mucwin_show_occupants(mucwin->roomjid); } curr = g_list_next(curr); } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index d65048e7..2d6cbd68 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -777,7 +777,7 @@ mucwin_update_occupants(const char *const roomjid) } void -mucwin_occupants(const char *const roomjid) +mucwin_show_occupants(const char *const roomjid) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window && !win_has_active_subwin(window)) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 18bd0cea..d1fc08f0 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -134,7 +134,7 @@ void mucwin_nick_change(const char *const roomjid, const char *const nick); void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, const char *const status); void mucwin_update_occupants(const char *const roomjid); -void mucwin_occupants(const char *const roomjid); +void mucwin_show_occupants(const char *const roomjid); void ui_room_hide_occupants(const char *const roomjid); void ui_show_roster(void); void ui_hide_roster(void); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index a1aacdc3..f8e072ff 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -236,7 +236,7 @@ void mucwin_nick_change(const char * const roomjid, const char * const nick) {} void mucwin_occupant_presence(const char * const roomjid, const char * const nick, const char * const show, const char * const status) {} void mucwin_update_occupants(const char * const roomjid) {} -void mucwin_occupants(const char * const roomjid) {} +void mucwin_show_occupants(const char * const roomjid) {} void ui_room_hide_occupants(const char * const roomjid) {} void ui_show_roster(void) {} void ui_hide_roster(void) {} From ed2324900a40ffba770e51661cce6d2c366ccfd4 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 21:57:57 +0000 Subject: [PATCH 35/36] Renamed ui_room_hide_occupants -> mucwin_hide_occupants --- src/command/commands.c | 2 +- src/ui/core.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index 7ca7149c..540300de 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -3180,7 +3180,7 @@ cmd_occupants(ProfWin *window, const char *const command, gchar **args) mucwin->showjid = FALSE; mucwin_update_occupants(mucwin->roomjid); } else { - ui_room_hide_occupants(mucwin->roomjid); + mucwin_hide_occupants(mucwin->roomjid); } } else { cons_bad_cmd_usage(command); diff --git a/src/ui/core.c b/src/ui/core.c index 2ae9616a..b6cc5b3c 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -647,7 +647,7 @@ ui_hide_all_room_rosters(void) if (window->type == WIN_MUC && win_has_active_subwin(window)) { ProfMucWin *mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); - ui_room_hide_occupants(mucwin->roomjid); + mucwin_hide_occupants(mucwin->roomjid); } curr = g_list_next(curr); } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 2d6cbd68..2e722585 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -787,7 +787,7 @@ mucwin_show_occupants(const char *const roomjid) } void -ui_room_hide_occupants(const char *const roomjid) +mucwin_hide_occupants(const char *const roomjid) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window && win_has_active_subwin(window)) { diff --git a/src/ui/ui.h b/src/ui/ui.h index d1fc08f0..ba713c4f 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -135,7 +135,7 @@ void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const status); void mucwin_update_occupants(const char *const roomjid); void mucwin_show_occupants(const char *const roomjid); -void ui_room_hide_occupants(const char *const roomjid); +void mucwin_hide_occupants(const char *const roomjid); void ui_show_roster(void); void ui_hide_roster(void); void ui_roster_add(const char *const barejid, const char *const name); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index f8e072ff..9a3f704a 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -237,7 +237,7 @@ void mucwin_occupant_presence(const char * const roomjid, const char * const nick, const char * const show, const char * const status) {} void mucwin_update_occupants(const char * const roomjid) {} void mucwin_show_occupants(const char * const roomjid) {} -void ui_room_hide_occupants(const char * const roomjid) {} +void mucwin_hide_occupants(const char * const roomjid) {} void ui_show_roster(void) {} void ui_hide_roster(void) {} void ui_roster_add(const char * const barejid, const char * const name) {} From 2be3b7d9a298eae3fef2829b5c51895a17b10a0e Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Nov 2015 22:02:22 +0000 Subject: [PATCH 36/36] Tidied ui.h --- src/ui/ui.h | 98 +++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/src/ui/ui.h b/src/ui/ui.h index ba713c4f..226d31aa 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -92,50 +92,12 @@ void ui_disconnected(void); void ui_outgoing_private_msg(ProfPrivateWin *privwin, const char *const message); void ui_room_join(const char *const roomjid, gboolean focus); void ui_switch_to_room(const char *const roomjid); -void mucwin_role_change(const char *const roomjid, const char *const role, const char *const actor, - const char *const reason); -void mucwin_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, - const char *const reason); -void mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role, - const char *const affiliation, const char *const actor, const char *const reason); -void mucwin_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, - const char *const actor, const char *const reason); -void mucwin_occupant_affiliation_change(const char *const roomjid, const char *const nick, - const char *const affiliation, const char *const actor, const char *const reason); -void mucwin_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, - const char *const role, const char *const affiliation, const char *const actor, const char *const reason); -void mucwin_roster(const char *const roomjid, GList *occupants, const char *const presence); -void mucwin_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, - const char *const message); -void mucwin_message(const char *const roomjid, const char *const nick, const char *const message); -void mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject); -void mucwin_requires_config(const char *const roomjid); void ui_room_destroy(const char *const roomjid); -void mucwin_info(ProfMucWin *mucwin); -void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role); -void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); -void mucwin_room_info_error(const char *const roomjid, const char *const error); -void mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSList *features); void ui_room_destroyed(const char *const roomjid, const char *const reason, const char *const new_jid, const char *const password); void ui_room_kicked(const char *const roomjid, const char *const actor, const char *const reason); -void mucwin_occupant_kicked(const char *const roomjid, const char *const nick, const char *const actor, - const char *const reason); void ui_room_banned(const char *const roomjid, const char *const actor, const char *const reason); -void mucwin_occupant_banned(const char *const roomjid, const char *const nick, const char *const actor, - const char *const reason); void ui_leave_room(const char *const roomjid); -void mucwin_broadcast(const char *const roomjid, const char *const message); -void mucwin_occupant_offline(const char *const roomjid, const char *const nick); -void mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const roles, - const char *const affiliation, const char *const show, const char *const status); -void mucwin_occupant_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); -void mucwin_nick_change(const char *const roomjid, const char *const nick); -void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, - const char *const status); -void mucwin_update_occupants(const char *const roomjid); -void mucwin_show_occupants(const char *const roomjid); -void mucwin_hide_occupants(const char *const roomjid); void ui_show_roster(void); void ui_hide_roster(void); void ui_roster_add(const char *const barejid, const char *const name); @@ -155,16 +117,6 @@ void ui_handle_room_configuration(const char *const roomjid, DataForm *form); void ui_handle_room_configuration_form_error(const char *const roomjid, const char *const message); 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 mucwin_affiliation_list_error(const char *const roomjid, 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_affiliation_set_error(const char *const roomjid, const char *const jid, - 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, - const char *const error); -void mucwin_role_list_error(const char *const roomjid, 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_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); void ui_show_form_help(ProfMucConfWin *confwin); @@ -208,6 +160,56 @@ void chatwin_otr_untrust(ProfChatWin *chatwin); void chatwin_otr_smp_event(ProfChatWin *chatwin, prof_otr_smp_event_t event, void *data); #endif +// MUC window +void mucwin_role_change(const char *const roomjid, const char *const role, const char *const actor, + const char *const reason); +void mucwin_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, + const char *const reason); +void mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role, + const char *const affiliation, const char *const actor, const char *const reason); +void mucwin_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, + const char *const actor, const char *const reason); +void mucwin_occupant_affiliation_change(const char *const roomjid, const char *const nick, + const char *const affiliation, const char *const actor, const char *const reason); +void mucwin_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, + const char *const role, const char *const affiliation, const char *const actor, const char *const reason); +void mucwin_roster(const char *const roomjid, GList *occupants, const char *const presence); +void mucwin_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, + const char *const message); +void mucwin_message(const char *const roomjid, const char *const nick, const char *const message); +void mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject); +void mucwin_requires_config(const char *const roomjid); +void mucwin_info(ProfMucWin *mucwin); +void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role); +void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); +void mucwin_room_info_error(const char *const roomjid, const char *const error); +void mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSList *features); +void mucwin_occupant_kicked(const char *const roomjid, const char *const nick, const char *const actor, + const char *const reason); +void mucwin_occupant_banned(const char *const roomjid, const char *const nick, const char *const actor, + const char *const reason); +void mucwin_broadcast(const char *const roomjid, const char *const message); +void mucwin_occupant_offline(const char *const roomjid, const char *const nick); +void mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const roles, + const char *const affiliation, const char *const show, const char *const status); +void mucwin_occupant_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); +void mucwin_nick_change(const char *const roomjid, const char *const nick); +void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, + const char *const status); +void mucwin_update_occupants(const char *const roomjid); +void mucwin_show_occupants(const char *const roomjid); +void mucwin_hide_occupants(const char *const roomjid); +void mucwin_affiliation_list_error(const char *const roomjid, 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_affiliation_set_error(const char *const roomjid, const char *const jid, + 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, + const char *const error); +void mucwin_role_list_error(const char *const roomjid, 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_kick_error(const char *const roomjid, const char *const nick, const char *const error); + // xml console void xmlwin_show(ProfXMLWin *xmlwin, const char *const msg);