From a3e9178ea2ff8d45376b729ccee3f2c45c572485 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 2 Nov 2015 22:05:17 +0000 Subject: [PATCH 1/4] Renamed mucconfwin functions --- src/command/commands.c | 54 ++++++++++++++++++------------------ src/ui/mucconfwin.c | 22 +++++++-------- src/ui/ui.h | 10 +++---- src/xmpp/iq.c | 2 +- tests/unittests/ui/stub_ui.c | 10 +++---- 5 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index f7965576..4b4b8249 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2485,14 +2485,14 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) if (g_strcmp0(value, "on") == 0) { form_set_value(form, tag, "1"); ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); } else if (g_strcmp0(value, "off") == 0) { form_set_value(form, tag, "0"); ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); } else { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); } break; @@ -2503,24 +2503,24 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) value = args[0]; if (value == NULL) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); } else { form_set_value(form, tag, value); ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); } break; case FIELD_LIST_SINGLE: value = args[0]; if ((value == NULL) || !form_field_contains_option(form, tag, value)) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); } else { form_set_value(form, tag, value); ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); } break; @@ -2531,32 +2531,32 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) } if ((g_strcmp0(cmd, "add") != 0) && (g_strcmp0(cmd, "remove"))) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); break; } if (value == NULL) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); break; } if (g_strcmp0(cmd, "add") == 0) { form_add_value(form, tag, value); ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); break; } if (g_strcmp0(args[0], "remove") == 0) { if (!g_str_has_prefix(value, "val")) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); break; } if (strlen(value) < 4) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); break; } @@ -2564,7 +2564,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) int index = strtol(&value[3], NULL, 10); if ((index < 1) || (index > form_get_value_count(form, tag))) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); break; } @@ -2572,7 +2572,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) removed = form_remove_text_multi_value(form, tag, index); if (removed) { ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); } else { ui_current_print_line("Could not remove %s from %s", value, tag); } @@ -2585,13 +2585,13 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) } if ((g_strcmp0(cmd, "add") != 0) && (g_strcmp0(cmd, "remove"))) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); break; } if (value == NULL) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); break; } @@ -2601,13 +2601,13 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) added = form_add_unique_value(form, tag, value); if (added) { ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); } else { ui_current_print_line("Value %s already selected for %s", value, tag); } } else { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); } break; @@ -2618,13 +2618,13 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) removed = form_remove_value(form, tag, value); if (removed) { ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); } else { ui_current_print_line("Value %s is not currently set for %s", value, tag); } } else { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); } } @@ -2636,13 +2636,13 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) } if ((g_strcmp0(cmd, "add") != 0) && (g_strcmp0(cmd, "remove"))) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); break; } if (value == NULL) { ui_current_print_line("Invalid command, usage:"); - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); ui_current_print_line(""); break; } @@ -2650,7 +2650,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) added = form_add_unique_value(form, tag, value); if (added) { ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); } else { ui_current_print_line("JID %s already exists in %s", value, tag); } @@ -2660,7 +2660,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) removed = form_remove_value(form, tag, value); if (removed) { ui_current_print_line("Field updated..."); - ui_show_form_field(window, form, tag); + mucconfwin_show_form_field(window, form, tag); } else { ui_current_print_line("Field %s does not contain %s", tag, value); } @@ -2702,16 +2702,16 @@ cmd_form(ProfWin *window, const char *const command, gchar **args) assert(confwin->memcheck == PROFCONFWIN_MEMCHECK); if (g_strcmp0(args[0], "show") == 0) { - ui_show_form(confwin); + mucconfwin_show_form(confwin); return TRUE; } if (g_strcmp0(args[0], "help") == 0) { char *tag = args[1]; if (tag) { - ui_show_form_field_help(confwin, tag); + mucconfwin_field_help(confwin, tag); } else { - ui_show_form_help(confwin); + mucconfwin_form_help(confwin); const gchar **help_text = NULL; Command *command = g_hash_table_lookup(commands, "/form"); diff --git a/src/ui/mucconfwin.c b/src/ui/mucconfwin.c index a583cf4f..17c34e76 100644 --- a/src/ui/mucconfwin.c +++ b/src/ui/mucconfwin.c @@ -39,10 +39,10 @@ #include "ui/win_types.h" #include "window_list.h" -static void _ui_handle_form_field(ProfWin *window, char *tag, FormField *field); +static void _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field); void -ui_show_form(ProfMucConfWin *confwin) +mucconfwin_show_form(ProfMucConfWin *confwin) { ProfWin *window = (ProfWin*) confwin; if (confwin->form->title) { @@ -53,7 +53,7 @@ ui_show_form(ProfMucConfWin *confwin) } win_print(window, '-', 0, NULL, 0, 0, "", ""); - ui_show_form_help(confwin); + mucconfwin_form_help(confwin); GSList *fields = confwin->form->fields; GSList *curr_field = fields; @@ -67,7 +67,7 @@ ui_show_form(ProfMucConfWin *confwin) } } else if (g_strcmp0(field->type, "hidden") != 0 && field->var) { char *tag = g_hash_table_lookup(confwin->form->var_to_tag, field->var); - _ui_handle_form_field(window, tag, field); + _mucconfwin_form_field(window, tag, field); } curr_field = g_slist_next(curr_field); @@ -75,22 +75,22 @@ ui_show_form(ProfMucConfWin *confwin) } void -ui_show_form_field(ProfWin *window, DataForm *form, char *tag) +mucconfwin_show_form_field(ProfWin *window, DataForm *form, char *tag) { FormField *field = form_get_field_by_tag(form, tag); - _ui_handle_form_field(window, tag, field); + _mucconfwin_form_field(window, tag, field); win_println(window, 0, ""); } void -ui_handle_room_configuration(const char *const roomjid, DataForm *form) +mucconfwin_handle_configuration(const char *const roomjid, DataForm *form) { ProfWin *window = wins_new_muc_config(roomjid, form); ProfMucConfWin *confwin = (ProfMucConfWin*)window; assert(confwin->memcheck == PROFCONFWIN_MEMCHECK); ui_focus_win(window); - ui_show_form(confwin); + mucconfwin_show_form(confwin); win_print(window, '-', 0, NULL, 0, 0, "", ""); win_print(window, '-', 0, NULL, 0, 0, "", "Use '/form submit' to save changes."); @@ -100,7 +100,7 @@ ui_handle_room_configuration(const char *const roomjid, DataForm *form) } void -ui_show_form_field_help(ProfMucConfWin *confwin, char *tag) +mucconfwin_field_help(ProfMucConfWin *confwin, char *tag) { ProfWin *window = (ProfWin*) confwin; FormField *field = form_get_field_by_tag(confwin->form, tag); @@ -181,7 +181,7 @@ ui_show_form_field_help(ProfMucConfWin *confwin, char *tag) } void -ui_show_form_help(ProfMucConfWin *confwin) +mucconfwin_form_help(ProfMucConfWin *confwin) { if (confwin->form->instructions) { ProfWin *window = (ProfWin*) confwin; @@ -192,7 +192,7 @@ ui_show_form_help(ProfMucConfWin *confwin) } static void -_ui_handle_form_field(ProfWin *window, char *tag, FormField *field) +_mucconfwin_form_field(ProfWin *window, char *tag, FormField *field) { win_vprint(window, '-', 0, NULL, NO_EOL, THEME_AWAY, "", "[%s] ", tag); win_vprint(window, '-', 0, NULL, NO_EOL | NO_DATE, 0, "", "%s", field->label); diff --git a/src/ui/ui.h b/src/ui/ui.h index c93e6a81..2deb9514 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -108,14 +108,14 @@ void ui_handle_recipient_error(const char *const recipient, const char *const er void ui_handle_error(const char *const err_msg); void ui_clear_win_title(void); void ui_goodbye_title(void); -void ui_handle_room_configuration(const char *const roomjid, DataForm *form); +void mucconfwin_handle_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_show_form(ProfMucConfWin *confwin); -void ui_show_form_field(ProfWin *window, DataForm *form, char *tag); -void ui_show_form_help(ProfMucConfWin *confwin); -void ui_show_form_field_help(ProfMucConfWin *confwin, char *tag); +void mucconfwin_show_form(ProfMucConfWin *confwin); +void mucconfwin_show_form_field(ProfWin *window, DataForm *form, char *tag); +void mucconfwin_form_help(ProfMucConfWin *confwin); +void mucconfwin_field_help(ProfMucConfWin *confwin, char *tag); void ui_show_lines(ProfWin *window, const gchar** lines); void ui_redraw_all_room_rosters(void); void ui_show_all_room_rosters(void); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 252dcd71..ad5a88bf 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1260,7 +1260,7 @@ _room_config_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, } DataForm *form = form_create(x); - ui_handle_room_configuration(from, form); + mucconfwin_handle_configuration(from, form); return 0; } diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 8fa40ff7..df8358cb 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -244,7 +244,7 @@ void ui_handle_error(const char * const err_msg) void ui_clear_win_title(void) {} void ui_goodbye_title(void) {} -void ui_handle_room_configuration(const char * const roomjid, DataForm *form) {} +void mucconfwin_handle_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) {} @@ -257,10 +257,10 @@ void mucwin_role_set_error(ProfMucWin *mucwin, const char * const nick, const ch void mucwin_role_list_error(ProfMucWin *mucwin, const char * const role, const char * const error) {} void mucwin_handle_role_list(ProfMucWin *mucwin, const char * const role, GSList *nicks) {} void mucwin_kick_error(ProfMucWin *mucwin, 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) {} -void ui_show_form_field_help(ProfMucConfWin *confwin, char *tag) {} +void mucconfwin_show_form(ProfMucConfWin *confwin) {} +void mucconfwin_show_form_field(ProfWin *window, DataForm *form, char *tag) {} +void mucconfwin_form_help(ProfMucConfWin *confwin) {} +void mucconfwin_field_help(ProfMucConfWin *confwin, char *tag) {} void ui_show_lines(ProfWin *window, const gchar** lines) {} void ui_redraw_all_room_rosters(void) {} void ui_show_all_room_rosters(void) {} From 2a65aa00301c3221cad02a4df0eb48d61509dccd Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 2 Nov 2015 22:06:12 +0000 Subject: [PATCH 2/4] Added assert check to mucconfwin_form_help --- src/ui/mucconfwin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/mucconfwin.c b/src/ui/mucconfwin.c index 17c34e76..2a4576a1 100644 --- a/src/ui/mucconfwin.c +++ b/src/ui/mucconfwin.c @@ -183,6 +183,8 @@ mucconfwin_field_help(ProfMucConfWin *confwin, char *tag) void mucconfwin_form_help(ProfMucConfWin *confwin) { + assert(confwin != NULL); + if (confwin->form->instructions) { ProfWin *window = (ProfWin*) confwin; win_print(window, '-', 0, NULL, 0, 0, "", "Supplied instructions:"); From 9106029261cd48edbb6f020f920e1ff9a0ae62ce Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 2 Nov 2015 22:07:07 +0000 Subject: [PATCH 3/4] Added assert check to mucconfwin_field_help --- src/ui/mucconfwin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/mucconfwin.c b/src/ui/mucconfwin.c index 2a4576a1..12850e1a 100644 --- a/src/ui/mucconfwin.c +++ b/src/ui/mucconfwin.c @@ -102,6 +102,8 @@ mucconfwin_handle_configuration(const char *const roomjid, DataForm *form) void mucconfwin_field_help(ProfMucConfWin *confwin, char *tag) { + assert(confwin != NULL); + ProfWin *window = (ProfWin*) confwin; FormField *field = form_get_field_by_tag(confwin->form, tag); if (field) { From 38255e9be49f390bb10daff83bbfe244fd0bdaec Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 2 Nov 2015 22:19:01 +0000 Subject: [PATCH 4/4] Make all mucconfwin functions take ProfMucConfWin --- src/command/commands.c | 20 ++++++++++---------- src/ui/mucconfwin.c | 13 ++++++++----- src/ui/ui.h | 4 ++-- src/xmpp/iq.c | 3 ++- tests/unittests/ui/stub_ui.c | 4 ++-- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index 4b4b8249..c87e3eaa 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2485,11 +2485,11 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) if (g_strcmp0(value, "on") == 0) { form_set_value(form, tag, "1"); ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); } else if (g_strcmp0(value, "off") == 0) { form_set_value(form, tag, "0"); ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); } else { ui_current_print_line("Invalid command, usage:"); mucconfwin_field_help(confwin, tag); @@ -2508,7 +2508,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) } else { form_set_value(form, tag, value); ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); } break; case FIELD_LIST_SINGLE: @@ -2520,7 +2520,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) } else { form_set_value(form, tag, value); ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); } break; @@ -2544,7 +2544,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) if (g_strcmp0(cmd, "add") == 0) { form_add_value(form, tag, value); ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); break; } if (g_strcmp0(args[0], "remove") == 0) { @@ -2572,7 +2572,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) removed = form_remove_text_multi_value(form, tag, index); if (removed) { ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); } else { ui_current_print_line("Could not remove %s from %s", value, tag); } @@ -2601,7 +2601,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) added = form_add_unique_value(form, tag, value); if (added) { ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); } else { ui_current_print_line("Value %s already selected for %s", value, tag); } @@ -2618,7 +2618,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) removed = form_remove_value(form, tag, value); if (removed) { ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); } else { ui_current_print_line("Value %s is not currently set for %s", value, tag); } @@ -2650,7 +2650,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) added = form_add_unique_value(form, tag, value); if (added) { ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); } else { ui_current_print_line("JID %s already exists in %s", value, tag); } @@ -2660,7 +2660,7 @@ cmd_form_field(ProfWin *window, char *tag, gchar **args) removed = form_remove_value(form, tag, value); if (removed) { ui_current_print_line("Field updated..."); - mucconfwin_show_form_field(window, form, tag); + mucconfwin_show_form_field(confwin, form, tag); } else { ui_current_print_line("Field %s does not contain %s", tag, value); } diff --git a/src/ui/mucconfwin.c b/src/ui/mucconfwin.c index 12850e1a..dd614306 100644 --- a/src/ui/mucconfwin.c +++ b/src/ui/mucconfwin.c @@ -75,21 +75,24 @@ mucconfwin_show_form(ProfMucConfWin *confwin) } void -mucconfwin_show_form_field(ProfWin *window, DataForm *form, char *tag) +mucconfwin_show_form_field(ProfMucConfWin *confwin, DataForm *form, char *tag) { + assert(confwin != NULL); + FormField *field = form_get_field_by_tag(form, tag); + ProfWin *window = (ProfWin*)confwin; _mucconfwin_form_field(window, tag, field); win_println(window, 0, ""); } void -mucconfwin_handle_configuration(const char *const roomjid, DataForm *form) +mucconfwin_handle_configuration(ProfMucConfWin *confwin, DataForm *form) { - ProfWin *window = wins_new_muc_config(roomjid, form); - ProfMucConfWin *confwin = (ProfMucConfWin*)window; - assert(confwin->memcheck == PROFCONFWIN_MEMCHECK); + assert(confwin != NULL); + ProfWin *window = (ProfWin*)confwin; ui_focus_win(window); + mucconfwin_show_form(confwin); win_print(window, '-', 0, NULL, 0, 0, "", ""); diff --git a/src/ui/ui.h b/src/ui/ui.h index 2deb9514..c3d65978 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -108,12 +108,12 @@ void ui_handle_recipient_error(const char *const recipient, const char *const er void ui_handle_error(const char *const err_msg); void ui_clear_win_title(void); void ui_goodbye_title(void); -void mucconfwin_handle_configuration(const char *const roomjid, DataForm *form); +void mucconfwin_handle_configuration(ProfMucConfWin *confwin, 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 mucconfwin_show_form(ProfMucConfWin *confwin); -void mucconfwin_show_form_field(ProfWin *window, DataForm *form, char *tag); +void mucconfwin_show_form_field(ProfMucConfWin *confwin, DataForm *form, char *tag); void mucconfwin_form_help(ProfMucConfWin *confwin); void mucconfwin_field_help(ProfMucConfWin *confwin, char *tag); void ui_show_lines(ProfWin *window, const gchar** lines); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index ad5a88bf..9aa8cdb7 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1260,7 +1260,8 @@ _room_config_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, } DataForm *form = form_create(x); - mucconfwin_handle_configuration(from, form); + ProfMucConfWin *confwin = (ProfMucConfWin*)wins_new_muc_config(from, form); + mucconfwin_handle_configuration(confwin, form); return 0; } diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index df8358cb..2d979af0 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -244,7 +244,7 @@ void ui_handle_error(const char * const err_msg) void ui_clear_win_title(void) {} void ui_goodbye_title(void) {} -void mucconfwin_handle_configuration(const char * const roomjid, DataForm *form) {} +void mucconfwin_handle_configuration(ProfMucConfWin *confwin, 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) {} @@ -258,7 +258,7 @@ void mucwin_role_list_error(ProfMucWin *mucwin, const char * const role, const c void mucwin_handle_role_list(ProfMucWin *mucwin, const char * const role, GSList *nicks) {} void mucwin_kick_error(ProfMucWin *mucwin, const char * const nick, const char * const error) {} void mucconfwin_show_form(ProfMucConfWin *confwin) {} -void mucconfwin_show_form_field(ProfWin *window, DataForm *form, char *tag) {} +void mucconfwin_show_form_field(ProfMucConfWin *confwin, DataForm *form, char *tag) {} void mucconfwin_form_help(ProfMucConfWin *confwin) {} void mucconfwin_field_help(ProfMucConfWin *confwin, char *tag) {} void ui_show_lines(ProfWin *window, const gchar** lines) {}