diff options
author | Max Kellermann <max@duempel.org> | 2008-11-07 13:27:31 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-07 13:27:31 +0100 |
commit | 54674384020f5d8019ca71f6c283d18ba32d5171 (patch) | |
tree | 8684aa7a9ccd18c808ad265e7c7bb9e283833cdc /src/screen_play.c | |
parent | 9e8806dadee58efe36151a6bca22d65487ed02ee (diff) | |
download | mpd-54674384020f5d8019ca71f6c283d18ba32d5171.tar.gz mpd-54674384020f5d8019ca71f6c283d18ba32d5171.tar.xz mpd-54674384020f5d8019ca71f6c283d18ba32d5171.zip |
disable more features with --enable-mini
Disable lots of smaller features which don't have a separate configure
option:
- xterm title
- screen list
- horizontal scrolling
- MPD version number check
- key binding checks
- character set conversion
- bitrate display
- highlighting in the file browser
- completion / history
Diffstat (limited to 'src/screen_play.c')
-rw-r--r-- | src/screen_play.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/screen_play.c b/src/screen_play.c index 90b06aa0e..58bf65a54 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -39,12 +39,14 @@ #define MAX_SONG_LENGTH 512 +#ifndef NCMPC_MINI typedef struct { GList **list; GList **dir_list; mpdclient_t *c; } completion_callback_data_t; +#endif static struct mpdclient_playlist *playlist; static int current_song_id = -1; @@ -127,6 +129,7 @@ center_playing_item(mpdclient_t *c) list_window_check_selected(lw, length); } +#ifndef NCMPC_MINI static void save_pre_completion_cb(GCompletion *gcmp, mpd_unused gchar *line, void *data) { @@ -148,16 +151,24 @@ save_post_completion_cb(mpd_unused GCompletion *gcmp, mpd_unused gchar *line, if (g_list_length(items) >= 1) screen_display_completion_list(items); } +#endif int playlist_save(mpdclient_t *c, char *name, char *defaultname) { gchar *filename; gint error; +#ifndef NCMPC_MINI GCompletion *gcmp; GList *list = NULL; completion_callback_data_t data; +#endif + +#ifdef NCMPC_MINI + (void)defaultname; +#endif +#ifndef NCMPC_MINI if (name == NULL) { /* initialize completion support */ gcmp = g_completion_new(NULL); @@ -186,6 +197,7 @@ playlist_save(mpdclient_t *c, char *name, char *defaultname) if( filename ) filename=g_strstrip(filename); } else +#endif filename=g_strdup(name); if (filename == NULL || filename[0] == '\0') @@ -229,6 +241,7 @@ playlist_save(mpdclient_t *c, char *name, char *defaultname) return 0; } +#ifndef NCMPC_MINI static void add_dir(GCompletion *gcmp, gchar *dir, GList **dir_list, GList **list, mpdclient_t *c) { @@ -274,11 +287,13 @@ static void add_post_completion_cb(GCompletion *gcmp, gchar *line, add_dir(gcmp, line, dir_list, list, c); } } +#endif static int handle_add_to_playlist(mpdclient_t *c) { gchar *path; +#ifndef NCMPC_MINI GCompletion *gcmp; GList *list = NULL; GList *dir_list = NULL; @@ -293,21 +308,29 @@ handle_add_to_playlist(mpdclient_t *c) wrln_completion_callback_data = &data; wrln_pre_completion_callback = add_pre_completion_cb; wrln_post_completion_callback = add_post_completion_cb; +#endif /* get path */ path = screen_readln(screen.status_window.w, _("Add: "), NULL, NULL, - gcmp); +#ifdef NCMPC_MINI + NULL +#else + gcmp +#endif + ); /* destroy completion data */ +#ifndef NCMPC_MINI wrln_completion_callback_data = NULL; wrln_pre_completion_callback = NULL; wrln_post_completion_callback = NULL; g_completion_free(gcmp); string_list_free(list); string_list_free(dir_list); +#endif /* add the path to the playlist */ if (path && path[0]) |