trayicon: click action handler
This commit is contained in:
parent
b9a2e8cde3
commit
4b97762631
@ -118,6 +118,11 @@ void TrayIcon::onGotPulseCardInfo(const pa_card_info& cardInfo, int eol)
|
||||
}
|
||||
profileAction->setData(cardInfo.profiles[i].name);
|
||||
|
||||
int cardIndex = cardInfo.index;
|
||||
connect(profileAction, &QAction::triggered, [=]() {
|
||||
this->pulse.SetCardProfile(cardIndex, profileAction->data().toString().toUtf8().data());
|
||||
});
|
||||
|
||||
cardMenu->addAction(profileAction);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user