diff options
Diffstat (limited to 'src/ui/mucwin.c')
-rw-r--r-- | src/ui/mucwin.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 097e9589..432256de 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -773,3 +773,20 @@ mucwin_hide_occupants(ProfMucWin *mucwin) } } +char* +mucwin_get_string(ProfMucWin *mucwin) +{ + assert(mucwin != NULL); + + GString *res = g_string_new("Room "); + g_string_append(res, mucwin->roomjid); + + if (mucwin->unread > 0) { + g_string_append_printf(res, ", %d unread", mucwin->unread); + } + + char *resstr = res->str; + g_string_free(res, FALSE); + + return resstr; +} |