Commit graph

6 commits

Author SHA1 Message Date
braph
32dc22c2bf alsamixer: Use a struct for storing color attributes
This commit is a preparation for the configuration file parser.

The `int attr_*` variables have been moved into a separate struct.
Members of that struct are alphabetically ordered, so an attribute can
later be accessed by its name.

Added `int get_color_pair(short fg, short bg)` for returning or
creating a color pair number.

Added call to `use_default_colors()` for enabling access to the
terminal's default color (-1).

Signed-off-by: Benjamin Abendroth <braph93@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-07-01 16:10:35 +02:00
braph
6e9e84ba60 alsamixer: Replaced hardcoded keys by binding arrays
This commit is a preparation for making keybindings configurable.

The hardcoded keys in the switch statements of mixer_widget.c,
textbox.c, proc_files.c and card_select.c have been replaced by
command enums. The command that shall be executed is looked up in
the arrays `mixer_bindings` and `textbox_bindings`.

The channel_mask enum has been made public, since LEFT and RIGHT are
used as command arguments in bindings.c.

Signed-off-by: Benjamin Abendroth <braph93@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-07-01 16:10:35 +02:00
Clemens Ladisch
f2e9e9a5b0 alsamixer: remove obsolete e-mail
Tim Janik's e-mail address is no longer valid.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-11-10 10:14:53 +01:00
Clemens Ladisch
730e8253ef alsamixer: fix text box clipping with multi-column characters
When a multi-column character would straddle the left window border of
a text box, we have to take the inserted space character into account
when we compute how many characters fit into the rest of the line.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-05-28 09:16:11 +02:00
Takashi Iwai
b8f567461e alsamixer - Fix uninitialized variable warning
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-27 14:16:30 +02:00
Clemens Ladisch
5b6b5fd14b alsamixer: show channel names for multichannel controls
For multichannel mixer controls, add the channel name to each screen
control.

Also make some other small changes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-05-25 10:26:22 +02:00