summaryrefslogtreecommitdiff
path: root/src/settings.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2011-02-02 16:17:13 +0100
committerLars-Dominik Braun <lars@6xq.net>2011-02-02 16:44:19 +0100
commit58398e4b2a9666a94aacced30453c1fc46b4a2e8 (patch)
tree410b31cee14ee2577eb8262bdbebb2ecc024b1eb /src/settings.c
parent0a76b7239781e6e0cb77169302219e6566b6c4d3 (diff)
downloadpianobar-58398e4b2a9666a94aacced30453c1fc46b4a2e8.tar.gz
pianobar-58398e4b2a9666a94aacced30453c1fc46b4a2e8.tar.bz2
pianobar-58398e4b2a9666a94aacced30453c1fc46b4a2e8.zip
Allow keyboard shortcuts to be disabled
Something like act_foobar = disabled disables the command foobar completely now. Useful if you don't use software volume control. See issue #78.
Diffstat (limited to 'src/settings.c')
-rw-r--r--src/settings.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/settings.c b/src/settings.c
index 9955d2e..a7a26a6 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008-2010
+Copyright (c) 2008-2011
Lars-Dominik Braun <lars@6xq.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -150,7 +150,11 @@ void BarSettingsRead (BarSettings_t *settings) {
/* keyboard shortcuts */
for (i = 0; i < BAR_KS_COUNT; i++) {
if (streq (shortcutFileKeys[i], key)) {
- settings->keys[i] = val[0];
+ if (streq (val, "disabled")) {
+ settings->keys[i] = BAR_KS_DISABLED;
+ } else {
+ settings->keys[i] = val[0];
+ }
break;
}
}