summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/settings.c4
-rw-r--r--src/ui_act.c3
-rw-r--r--src/ui_types.h3
3 files changed, 6 insertions, 4 deletions
diff --git a/src/settings.c b/src/settings.c
index 7ed10f5..297cfbc 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -197,6 +197,8 @@ void BarSettingsRead (BarSettings_t *settings) {
settings->msgFormat[MSG_QUESTION].postfix = NULL;
settings->msgFormat[MSG_LIST].prefix = strdup ("\t");
settings->msgFormat[MSG_LIST].postfix = NULL;
+ settings->msgFormat[MSG_DEBUG].prefix = NULL;
+ settings->msgFormat[MSG_DEBUG].postfix = NULL;
for (size_t i = 0; i < BAR_KS_COUNT; i++) {
settings->keys[i] = dispatchActions[i].defaultKey;
@@ -331,7 +333,7 @@ void BarSettingsRead (BarSettings_t *settings) {
} else if (strncmp (formatMsgPrefix, key,
strlen (formatMsgPrefix)) == 0) {
static const char *mapping[] = {"none", "info", "nowplaying",
- "time", "err", "question", "list"};
+ "time", "err", "question", "list", "debug"};
const char *typeStart = key + strlen (formatMsgPrefix);
for (size_t i = 0; i < sizeof (mapping) / sizeof (*mapping); i++) {
if (streq (typeStart, mapping[i])) {
diff --git a/src/ui_act.c b/src/ui_act.c
index 920ca6b..ad7e0fe 100644
--- a/src/ui_act.c
+++ b/src/ui_act.c
@@ -344,8 +344,7 @@ BarUiActCallback(BarUiActDebug) {
assert (selSong != NULL);
/* print debug-alike infos */
- BarUiMsg (&app->settings, MSG_NONE,
- "\033[2K"
+ BarUiMsg (&app->settings, MSG_DEBUG,
"album:\t%s\n"
"artist:\t%s\n"
"audioFormat:\t%i\n"
diff --git a/src/ui_types.h b/src/ui_types.h
index dd3c3f8..aab4199 100644
--- a/src/ui_types.h
+++ b/src/ui_types.h
@@ -32,7 +32,8 @@ typedef enum {
MSG_ERR = 4,
MSG_QUESTION = 5,
MSG_LIST = 6,
- MSG_COUNT = 7, /* invalid type */
+ MSG_DEBUG = 7,
+ MSG_COUNT = 8, /* invalid type */
} BarUiMsg_t;
#endif /* SRC_UI_TYPES_H_2HR75RII */