mainwindow: escape nameLabel

Fixes a warning with the 'Valve VR Radio & HMD Mic' device.
This commit is contained in:
Christoph Haag 2019-11-05 22:35:24 +01:00 committed by Arun Raghavan
parent 0ae904bd49
commit 4f31ec83a8
1 changed files with 3 additions and 1 deletions

View File

@ -374,7 +374,9 @@ void MainWindow::updateCard(const pa_card_info &info) {
description = pa_proplist_gets(info.proplist, PA_PROP_DEVICE_DESCRIPTION); description = pa_proplist_gets(info.proplist, PA_PROP_DEVICE_DESCRIPTION);
w->name = description ? description : info.name; w->name = description ? description : info.name;
w->nameLabel->set_markup(w->name.c_str()); gchar *txt;
w->nameLabel->set_markup(txt = g_markup_printf_escaped("%s", w->name.c_str()));
g_free(txt);
icon = pa_proplist_gets(info.proplist, PA_PROP_DEVICE_ICON_NAME); icon = pa_proplist_gets(info.proplist, PA_PROP_DEVICE_ICON_NAME);
set_icon_name_fallback(w->iconImage, icon ? icon : "audio-card", Gtk::ICON_SIZE_SMALL_TOOLBAR); set_icon_name_fallback(w->iconImage, icon ? icon : "audio-card", Gtk::ICON_SIZE_SMALL_TOOLBAR);