summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 865a07f)
raw | patch | inline | side by side (parent: 865a07f)
author | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 07:27:14 +0000 (08:27 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 07:27:14 +0000 (08:27 +0100) |
configure.ac | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/screen.c | patch | blob | history | |
src/screen_list.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 212b618e5c9667d6c5c7136aa99c39b9dac8ad5a..18aa36191d33851a7b8b43adbdf632f9a96e280c 100644 (file)
--- a/configure.ac
+++ b/configure.ac
CHECK_CFLAG([-Wwrite-strings])
dnl Optional screen - help screen
-#AC_MSG_CHECKING([whether to include the help screen])
-#AC_ARG_ENABLE([help-screen],
-# AC_HELP_STRING([--enable-help-screen],
-# [Enable the help screen @<:@default=yes@:>@]),
-# [help_screen="$enableval"],
-# [help_screen=yes])
-#AC_MSG_RESULT([$help_screen])
-#if test "x$help_screen" = "xyes" ; then
-# AC_DEFINE(ENABLE_HELP_SCREEN, 1, [Enable the help screen])
-#fi
+AC_MSG_CHECKING([whether to include the help screen])
+AC_ARG_ENABLE([help-screen],
+ AS_HELP_STRING([--enable-help-screen],
+ [Enable the help screen @<:@default=yes@:>@]),
+ [help_screen="$enableval"],
+ [help_screen=$disable_mini])
+AC_MSG_RESULT([$help_screen])
+if test "x$help_screen" = "xyes" ; then
+ AC_DEFINE(ENABLE_HELP_SCREEN, 1, [Enable the help screen])
+fi
+
+AM_CONDITIONAL(ENABLE_HELP_SCREEN, test x$help_screen = xyes)
dnl Optional screen - browse screen
#AC_MSG_CHECKING([whether to include the browse screen])r
diff --git a/src/Makefile.am b/src/Makefile.am
index af91939b146cfc22d7cb521abab25d7d05eb711d..e03f645f80ca6d4e812686725e8ae962e405614e 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
screen_play.c\
screen_browser.c\
screen_file.c\
- screen_help.c\
list_window.c\
colors.c\
support.c\
utils.c\
str_pool.c
+if ENABLE_HELP_SCREEN
+ncmpc_SOURCES += screen_help.c
+endif
+
if ENABLE_ARTIST_SCREEN
ncmpc_SOURCES += screen_artist.c
endif
diff --git a/src/screen.c b/src/screen.c
index 648d07a86b4a733bd84763f0b4dcd3ff8f0602ad..c333529fd21afd9a6a91b196e054b6cef7673c9f 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
case CMD_SCREEN_FILE:
screen_switch(&screen_browse, c);
break;
+#ifdef ENABLE_HELP_SCREEN
case CMD_SCREEN_HELP:
screen_switch(&screen_help, c);
break;
+#endif
#ifdef ENABLE_SEARCH_SCREEN
case CMD_SCREEN_SEARCH:
screen_switch(&screen_search, c);
diff --git a/src/screen_list.c b/src/screen_list.c
index 31e8adaf1f8cf58f20c1e24cc78b38b4f2eb8fbf..39ec8e9f36f5b3f9afcf15f407bc74ff57566e57 100644 (file)
--- a/src/screen_list.c
+++ b/src/screen_list.c
#ifdef ENABLE_ARTIST_SCREEN
{ "artist", &screen_artist },
#endif
+#ifdef ENABLE_HELP_SCREEN
{ "help", &screen_help },
+#endif
#ifdef ENABLE_SEARCH_SCREEN
{ "search", &screen_search },
#endif