From 2a92169351f88ab3bfe1acf15628878c5e8ef520 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 5 Aug 2015 00:26:29 +0100 Subject: Use id handler for software version requests, handle errors --- src/ui/core.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/ui/core.c') diff --git a/src/ui/core.c b/src/ui/core.c index bbaebe31..9cbd873a 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -2792,6 +2792,24 @@ ui_hide_roster(void) } } +void +ui_handle_software_version_error(const char * const roomjid, const char * const message) +{ + GString *message_str = g_string_new(""); + + ProfWin *window = wins_get_console(); + g_string_printf(message_str, "Could not get software version"); + + if (message) { + g_string_append(message_str, ": "); + g_string_append(message_str, message); + } + + win_print(window, '-', 0, NULL, 0, THEME_ERROR, "", message_str->str); + + g_string_free(message_str, TRUE); +} + static void _win_show_history(ProfChatWin *chatwin, const char * const contact) { -- cgit 1.4.1-2-gfad0