Ticket #186: show_sink_names.diff
| File show_sink_names.diff, 1.7 kB (added by kritzstapf, 1 year ago) |
|---|
-
pavucontrol.cc
old new 109 109 110 110 SinkType type; 111 111 Glib::ustring description; 112 Glib::ustring name; 112 113 113 114 virtual void onMuteToggleButton(); 114 115 uint32_t index; … … 468 469 void SinkInputWidget::buildMenu() { 469 470 for (std::map<uint32_t, SinkWidget*>::iterator i = mainWindow->sinkWidgets.begin(); i != mainWindow->sinkWidgets.end(); ++i) { 470 471 SinkMenuItem *m; 471 sinkMenuItems[i->second->index] = m = new SinkMenuItem(this, i->second->description.c_str(), i->second->index, i->second->index == sinkIndex); 472 473 char itemText[256]; 474 snprintf(itemText, 256, "%s [%s]", i->second->description.c_str(), i->second->name.c_str()); 475 476 sinkMenuItems[i->second->index] = m = new SinkMenuItem(this, itemText, i->second->index, i->second->index == sinkIndex); 472 477 submenu.append(m->menuItem); 473 478 } 474 479 … … 557 562 558 563 w->type = info.flags & PA_SINK_HARDWARE ? SINK_HARDWARE : SINK_VIRTUAL; 559 564 w->description = info.description; 565 w->name = info.name; 560 566 561 567 w->boldNameLabel->set_text(""); 562 568 gchar *txt; 563 w->nameLabel->set_markup(txt = g_markup_printf_escaped("%s ", info.description));569 w->nameLabel->set_markup(txt = g_markup_printf_escaped("%s [%s]", info.description, info.name)); 564 570 g_free(txt); 565 571 566 572 w->setVolume(info.volume); … … 588 594 589 595 w->boldNameLabel->set_text(""); 590 596 gchar *txt; 591 w->nameLabel->set_markup(txt = g_markup_printf_escaped("%s ", info.description));597 w->nameLabel->set_markup(txt = g_markup_printf_escaped("%s [%s]", info.description, info.name)); 592 598 g_free(txt); 593 599 594 600 w->setVolume(info.volume);
