aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index 81522f9d7..b48bd0091 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,6 +34,8 @@
#include "screen.h"
#include "conf.h"
+#define BUFSIZE 256
+
static mpdclient_t *mpd = NULL;
static gboolean connected = FALSE;
static GTimer *timer = NULL;
@@ -106,6 +108,7 @@ main(int argc, const char *argv[])
options_t *options;
struct sigaction act;
const char *charset = NULL;
+ gboolean key_error;
#ifdef HAVE_LOCALE_H
/* time and date formatting */
@@ -133,14 +136,10 @@ main(int argc, const char *argv[])
/* read configuration */
read_configuration(options);
-
- /* check key bindings */
- if( check_key_bindings() )
- {
- fprintf(stderr, _("Confusing key bindings - exiting!\n"));
- exit(EXIT_FAILURE);
- }
+ /* check key bindings */
+ key_error = check_key_bindings(NULL, 0);
+
/* parse command line options - 2 pass */
options_parse(argc, argv);
@@ -209,6 +208,14 @@ main(int argc, const char *argv[])
{
static gdouble t = G_MAXDOUBLE;
+ if( key_error )
+ {
+ char buf[BUFSIZE];
+
+ key_error=check_key_bindings(buf, BUFSIZE);
+ screen_status_printf("%s", buf);
+ }
+
if( connected && (t>=MPD_UPDATE_TIME || mpd->need_update) )
{
mpdclient_update(mpd);