summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2021-12-11 13:14:28 +0100
committerLars-Dominik Braun <lars@6xq.net>2021-12-11 13:23:24 +0100
commit6b91489132bc600cc9a3658f2cc91e61feb3d27e (patch)
tree53207b8fb4d87b58e6acc03879934933bf46cc87 /src
parent88b3fded598a16d52211b0dec442adc2810b2c6b (diff)
downloadpianobar-6b91489132bc600cc9a3658f2cc91e61feb3d27e.tar.gz
pianobar-6b91489132bc600cc9a3658f2cc91e61feb3d27e.tar.bz2
pianobar-6b91489132bc600cc9a3658f2cc91e61feb3d27e.zip
Disable station mode selection for QuickMix
It does not have any modes anyway. Fixes #723.
Diffstat (limited to 'src')
-rw-r--r--src/ui_act.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/ui_act.c b/src/ui_act.c
index 43d5b6e..ace50ce 100644
--- a/src/ui_act.c
+++ b/src/ui_act.c
@@ -814,15 +814,22 @@ BarUiActCallback(BarUiActManageStation) {
strcat (question, "[f]eedback");
*allowedPos++ = 'f';
}
- /* station mode is always available */
if (allowedPos != allowedActions) {
strcat (question, "? ");
}
- strcat (question, "Manage [m]ode? ");
- *allowedPos++ = 'm';
+ /* station mode is not available for QuickMix. */
+ if (!selStation->isQuickMix) {
+ strcat (question, "Manage [m]ode? ");
+ *allowedPos++ = 'm';
+ }
*allowedPos = '\0';
+ if (allowedPos == allowedActions) {
+ BarUiMsg (&app->settings, MSG_INFO, "No actions available.\n");
+ return;
+ }
+
assert (strlen (question) < sizeof (question) / sizeof (*question));
BarUiMsg (&app->settings, MSG_QUESTION, "%s", question);