diff --git a/src/main.c b/src/main.c
index 11f16acb842f57174986ffca34e4e7ddcd1c2769..8a26001c374beb2325b3e3e6ab136d8ff254e632 100644 (file)
--- a/src/main.c
+++ b/src/main.c
#include <signal.h>
#include <string.h>
+#ifdef ENABLE_LOCALE
+#include <locale.h>
+#endif
+
/* time between mpd updates [s] */
static const guint update_interval = 500;
main(int argc, const char *argv[])
{
struct sigaction act;
-#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI)
+#ifdef ENABLE_LOCALE
const char *charset = NULL;
#endif
GIOChannel *keyboard_channel;
GIOChannel *lirc_channel = NULL;
#endif
-#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI)
+#ifdef ENABLE_LOCALE
/* time and date formatting */
setlocale(LC_TIME,"");
/* care about sorting order etc */
charset = charset_init();
/* initialize i18n support */
+#endif
+
#ifdef ENABLE_NLS
setlocale(LC_MESSAGES, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
+#ifdef ENABLE_LOCALE
bind_textdomain_codeset(GETTEXT_PACKAGE, charset);
- textdomain(GETTEXT_PACKAGE);
#endif
+ textdomain(GETTEXT_PACKAGE);
#endif
/* initialize options */
/* parse command line options - 1 pass get configuration files */
options_parse(argc, argv);
- /* read configuration */
#ifndef NCMPC_MINI
+ /* read configuration */
read_configuration();
-#endif
/* check key bindings */
check_key_bindings(NULL, NULL, 0);
+#endif
/* parse command line options - 2 pass */
options_parse(argc, argv);
#endif
exit_and_cleanup();
+
+#ifdef ENABLE_LYRICS_SCREEN
+ lyrics_deinit();
+#endif
+
ncu_deinit();
return 0;