diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2010-11-18 21:21:55 +0100 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2010-11-21 12:35:28 +0100 |
commit | 2b31c97de6fa541719cd26f9a61053cfc0e71203 (patch) | |
tree | d131aadb5277d293199666651810c547f4d0152d /src/settings.c | |
parent | c58688994ae409c4d9c748a9bc2add16ca02e6de (diff) | |
download | pianobar-2b31c97de6fa541719cd26f9a61053cfc0e71203.tar.gz pianobar-2b31c97de6fa541719cd26f9a61053cfc0e71203.tar.bz2 pianobar-2b31c97de6fa541719cd26f9a61053cfc0e71203.zip |
Show custom rating icon in upcoming/history song list
Closes issue #54
Diffstat (limited to 'src/settings.c')
-rw-r--r-- | src/settings.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c index d085aff..43d2ca4 100644 --- a/src/settings.c +++ b/src/settings.c @@ -77,6 +77,8 @@ void BarSettingsDestroy (BarSettings_t *settings) { free (settings->password); free (settings->autostartStation); free (settings->eventCmd); + free (settings->loveIcon); + free (settings->banIcon); memset (settings, 0, sizeof (*settings)); } @@ -175,6 +177,10 @@ void BarSettingsRead (BarSettings_t *settings) { break; } } + } else if (strcmp ("love_icon", key) == 0) { + settings->loveIcon = strdup (val); + } else if (strcmp ("ban_icon", key) == 0) { + settings->banIcon = strdup (val); } } @@ -186,5 +192,13 @@ void BarSettingsRead (BarSettings_t *settings) { } } + /* use default strings */ + if (settings->loveIcon == NULL) { + settings->loveIcon = strdup ("<3"); + } + if (settings->banIcon == NULL) { + settings->banIcon = strdup ("</3"); + } + fclose (configfd); } |