about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/core.c18
-rw-r--r--src/ui/ui.h1
2 files changed, 19 insertions, 0 deletions
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)
 {
diff --git a/src/ui/ui.h b/src/ui/ui.h
index fd81f68a..d22a5c7f 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -203,6 +203,7 @@ void ui_redraw_all_room_rosters(void);
 void ui_show_all_room_rosters(void);
 void ui_hide_all_room_rosters(void);
 gboolean ui_chat_win_exists(const char * const barejid);
+void ui_handle_software_version_error(const char * const roomjid, const char * const message);
 
 gboolean ui_tidy_wins(void);
 void ui_prune_wins(void);