diff options
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); } |