show client name only if we have it

git-svn-id: file:///home/lennart/svn/public/pavucontrol/trunk@31 c17c95f2-f111-0410-90bf-f30a9569010c
This commit is contained in:
Lennart Poettering 2006-07-21 20:17:49 +00:00
parent 14c08015e0
commit 83e58b3393
1 changed files with 10 additions and 4 deletions

View File

@ -478,10 +478,16 @@ void MainWindow::updateSinkInput(const pa_sink_input_info &info) {
} }
char *txt; char *txt;
w->boldNameLabel->set_markup(txt = g_markup_printf_escaped("<b>%s</b>", clientNames[info.client])); if (clientNames.count(info.client)) {
g_free(txt); w->boldNameLabel->set_markup(txt = g_markup_printf_escaped("<b>%s</b>", clientNames[info.client]));
w->nameLabel->set_markup(txt = g_markup_printf_escaped(": %s", info.name)); g_free(txt);
g_free(txt); w->nameLabel->set_markup(txt = g_markup_printf_escaped(": %s", info.name));
g_free(txt);
} else {
w->boldNameLabel->set_label("");
w->nameLabel->set_label(info.name);
}
w->setVolume(info.volume); w->setVolume(info.volume);
updateLabels(); updateLabels();