diff --git a/src/options.c b/src/options.c
index 8f24e107a652e00a958b208c0042df2f4ff90952..b6a49e3c68204d7cdef42abb9271c5c8d0e73145 100644 (file)
--- a/src/options.c
+++ b/src/options.c
typedef void (*option_callback_fn_t)(int c, const char *arg);
-options_t options;
+options_t options = {
+ .port = DEFAULT_PORT,
+ .crossfade_time = DEFAULT_CROSSFADE_TIME,
+ .seek_time = 1,
+#ifdef ENABLE_LYRICS_SCREEN
+ .lyrics_timeout = DEFAULT_LYRICS_TIMEOUT,
+#endif
+ .find_wrap = true,
+ .wide_cursor = true,
+ .audible_bell = true,
+#ifndef NCMPC_MINI
+ .scroll = DEFAULT_SCROLL,
+ .welcome_screen_list = true,
+#endif
+};
static const arg_opt_t option_table[] = {
{ '?', "help", NULL, "Show this help message" },
{ 'S', "no-splash", NULL, "Don't show the splash screen" },
#ifndef NDEBUG
{ 'K', "dump-keys", NULL, "Dump key bindings to stdout" },
- { 'D', "debug", NULL, "Enable debug output on stderr" },
#endif
};
#endif
break;
case 'm': /* --mouse */
+#ifdef HAVE_GETMOUSE
options.enable_mouse = true;
+#endif
break;
case 'M': /* --no-mouse */
+#ifdef HAVE_GETMOUSE
options.enable_mouse = false;
+#endif
break;
case 'e': /* --exit */
- options.reconnect = false;
+ /* deprecated */
break;
case 'p': /* --port */
options.port = atoi(arg);
write_key_bindings(stdout, KEYDEF_WRITE_ALL | KEYDEF_COMMENT_ALL);
exit(EXIT_SUCCESS);
break;
- case 'D': /* --debug */
- options.debug = true;
- break;
#endif
default:
fprintf(stderr,"Unknown Option %c = %s\n", c, arg);
/* get initial values for port from MPD_PORT (enviroment) */
if ((value = g_getenv(MPD_PORT_ENV)))
options.port = atoi(value);
- else
- options.port = DEFAULT_PORT;
/* default option values */
options.list_format = g_strdup(DEFAULT_LIST_FORMAT);
options.status_format = g_strdup(DEFAULT_STATUS_FORMAT);
- options.reconnect = true;
- options.find_wrap = true;
- options.wide_cursor = true;
- options.welcome_screen_list = true;
- options.audible_bell = true;
- options.crossfade_time = DEFAULT_CROSSFADE_TIME;
- options.seek_time = 1;
options.screen_list = g_strsplit_set(DEFAULT_SCREEN_LIST, " ", 0);
options.timedisplay_type = g_strdup(DEFAULT_TIMEDISPLAY_TYPE);
- options.lyrics_timeout = DEFAULT_LYRICS_TIMEOUT;
- options.scroll = DEFAULT_SCROLL;
+#ifndef NCMPC_MINI
options.scroll_sep = g_strdup(DEFAULT_SCROLL_SEP);
+#endif
}