show checkbox next to current profile
This commit is contained in:
parent
c25705c50f
commit
257d26248d
@ -108,7 +108,16 @@ void TrayIcon::onGotPulseCardInfo(const pa_card_info& cardInfo, int eol)
|
||||
cardMenu->setIcon(QIcon::fromTheme(iconName));
|
||||
|
||||
for (size_t i = 0; i < cardInfo.n_profiles; ++i) {
|
||||
|
||||
bool isActiveProfile = (!strcmp(cardInfo.active_profile->name, cardInfo.profiles[i].name));
|
||||
|
||||
auto profileAction = new QAction(cardInfo.profiles[i].description, cardMenu);
|
||||
profileAction->setCheckable(true);
|
||||
if (isActiveProfile) {
|
||||
profileAction->setChecked(true);
|
||||
}
|
||||
profileAction->setData(cardInfo.profiles[i].name);
|
||||
|
||||
cardMenu->addAction(profileAction);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user