mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Adapt to new g_string_free() usage
Somehow this must have been overlooked when doing
e59c401c84
.
This commit is contained in:
parent
12b997c5f3
commit
ac440e72d7
@ -514,10 +514,7 @@ chatwin_get_string(ProfChatWin* chatwin)
|
|||||||
g_string_append_printf(res, ", %d unread", chatwin->unread);
|
g_string_append_printf(res, ", %d unread", chatwin->unread);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* resstr = res->str;
|
return g_string_free(res, FALSE);
|
||||||
g_string_free(res, FALSE);
|
|
||||||
|
|
||||||
return resstr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -943,17 +943,11 @@ mucwin_get_string(ProfMucWin* mucwin)
|
|||||||
{
|
{
|
||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
GString* res = g_string_new("Room ");
|
|
||||||
g_string_append(res, mucwin->roomjid);
|
|
||||||
|
|
||||||
if (mucwin->unread > 0) {
|
if (mucwin->unread > 0) {
|
||||||
g_string_append_printf(res, ", %d unread", mucwin->unread);
|
return g_strdup_printf("Room %s, %d unread", mucwin->roomjid, mucwin->unread);
|
||||||
|
} else {
|
||||||
|
return g_strdup_printf("Room %s", mucwin->roomjid);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* resstr = res->str;
|
|
||||||
g_string_free(res, FALSE);
|
|
||||||
|
|
||||||
return resstr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user