hdspmixer: Show cardname in window title

When running with more than one card, it isn't obvious which card is
shown.

Store the ALSA cardname in the corresponding class and show it in the
window title upon switching cards.

Also, don't show "(null)" but "(unsaved)" in case the user hasn't
selected a preset file.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Adrian Knoth 2011-03-07 19:03:09 +01:00 committed by Takashi Iwai
parent 1669acbe34
commit 7416c3a83c
6 changed files with 52 additions and 27 deletions

View file

@ -163,11 +163,12 @@ int HDSPMixerCard::getSpeed()
return 0;
}
HDSPMixerCard::HDSPMixerCard(int cardtype, int id)
HDSPMixerCard::HDSPMixerCard(int cardtype, int id, char *shortname)
{
type = cardtype;
card_id = id;
snprintf(name, 6, "hw:%i", card_id);
cardname = shortname;
h9632_aeb.aebi = 0;
h9632_aeb.aebo = 0;
if (type == H9632) {