From: Max Kellermann Date: Thu, 2 Oct 2008 15:48:01 +0000 (+0200) Subject: removed LIST_FORMAT, STATUS_FORMAT X-Git-Tag: v0.12_alpha1~108 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=45ff31548dc68c27e1af6fdf37945de97579f5f9;p=ncmpc.git removed LIST_FORMAT, STATUS_FORMAT Use options.list_format and options.status_format directly instead of these two macros. --- diff --git a/src/mpdclient.c b/src/mpdclient.c index dbf285e..9beac9e 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -19,7 +19,6 @@ #include "mpdclient.h" #include "screen_utils.h" #include "config.h" -#include "ncmpc.h" #include "support.h" #include "options.h" #include "strfsong.h" @@ -83,8 +82,8 @@ compare_filelistentry_format(gconstpointer filelist_entry1, if (e1 && e2 && e1->type == MPD_INFO_ENTITY_TYPE_SONG && e2->type == MPD_INFO_ENTITY_TYPE_SONG) { - strfsong(key1, BUFSIZE, LIST_FORMAT, e1->info.song); - strfsong(key2, BUFSIZE, LIST_FORMAT, e2->info.song); + strfsong(key1, BUFSIZE, options.list_format, e1->info.song); + strfsong(key2, BUFSIZE, options.list_format, e2->info.song); n = strcmp(key1,key2); } diff --git a/src/ncmpc.h b/src/ncmpc.h index a1cd9f9..ca4af16 100644 --- a/src/ncmpc.h +++ b/src/ncmpc.h @@ -20,10 +20,6 @@ /* time before trying to reconnect [ms] */ #define MPD_RECONNECT_TIME 1500 -#define LIST_FORMAT options.list_format - -#define STATUS_FORMAT options.status_format - void sigstop(void); diff --git a/src/screen.c b/src/screen.c index da758b1..ac4a63e 100644 --- a/src/screen.c +++ b/src/screen.c @@ -322,7 +322,8 @@ paint_status_window(mpdclient_t *c) int width = COLS-x-my_strlen(screen.buf); if (song) - strfsong(songname, MAX_SONGNAME_LENGTH, STATUS_FORMAT, song); + strfsong(songname, MAX_SONGNAME_LENGTH, + options.status_format, song); else songname[0] = '\0'; diff --git a/src/screen_browser.c b/src/screen_browser.c index ab10299..5228515 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -18,7 +18,6 @@ */ #include "screen_browser.h" -#include "ncmpc.h" #include "i18n.h" #include "options.h" #include "support.h" @@ -143,7 +142,7 @@ browser_lw_callback(unsigned idx, int *highlight, void *data) } else if( entity->type==MPD_INFO_ENTITY_TYPE_SONG ) { mpd_Song *song = entity->info.song; - strfsong(buf, BUFSIZE, LIST_FORMAT, song); + strfsong(buf, BUFSIZE, options.list_format, song); return buf; } else if( entity->type==MPD_INFO_ENTITY_TYPE_PLAYLISTFILE ) { mpd_PlaylistFile *plf = entity->info.playlistFile; @@ -233,7 +232,7 @@ enqueue_and_play(mpdclient_t *c, filelist_entry_t *entry) char buf[BUFSIZE]; entry->flags |= HIGHLIGHT; - strfsong(buf, BUFSIZE, LIST_FORMAT, song); + strfsong(buf, BUFSIZE, options.list_format, song); screen_status_printf(_("Adding \'%s\' to playlist\n"), buf); mpdclient_update(c); /* get song id */ } else @@ -363,7 +362,7 @@ browser_select_entry(mpdclient_t *c, filelist_entry_t *entry, if (mpdclient_cmd_add(c, song) == 0) { char buf[BUFSIZE]; - strfsong(buf, BUFSIZE, LIST_FORMAT, song); + strfsong(buf, BUFSIZE, options.list_format, song); screen_status_printf(_("Adding \'%s\' to playlist\n"), buf); } } else { diff --git a/src/screen_play.c b/src/screen_play.c index 309b9a5..adc46a5 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -17,7 +17,6 @@ */ #include "config.h" -#include "ncmpc.h" #include "i18n.h" #include "options.h" #include "support.h" @@ -104,7 +103,7 @@ list_callback(unsigned idx, int *highlight, void *data) c->status != NULL && !IS_STOPPED(c->status->state)) *highlight = 1; - strfsong(songname, MAX_SONG_LENGTH, LIST_FORMAT, song); + strfsong(songname, MAX_SONG_LENGTH, options.list_format, song); return songname; }