From: Max Kellermann Date: Fri, 19 Sep 2008 14:22:44 +0000 (+0200) Subject: filelist: drop "mpdclient" prefix X-Git-Tag: v0.12_alpha1~223 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e3b42caa5d39d084ba511aee43fada91e367ae3e;p=ncmpc.git filelist: drop "mpdclient" prefix The separate filelist library does not depend on mpdclient, so the prefix is superfluous. --- diff --git a/src/filelist.c b/src/filelist.c index 7b45416..55b4cfa 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -24,7 +24,7 @@ #include void -mpdclient_filelist_free(struct filelist *filelist) +filelist_free(struct filelist *filelist) { GList *list = g_list_first(filelist->list); @@ -47,8 +47,7 @@ mpdclient_filelist_free(struct filelist *filelist) } struct filelist_entry * -mpdclient_filelist_find_song(struct filelist *fl, - const struct mpd_song *song) +filelist_find_song(struct filelist *fl, const struct mpd_song *song) { GList *list = g_list_first(fl->list); diff --git a/src/filelist.h b/src/filelist.h index 81ff5a3..3b33eb4 100644 --- a/src/filelist.h +++ b/src/filelist.h @@ -44,10 +44,9 @@ typedef struct filelist { } mpdclient_filelist_t; void -mpdclient_filelist_free(struct filelist *filelist); +filelist_free(struct filelist *filelist); struct filelist_entry * -mpdclient_filelist_find_song(struct filelist *flist, - const struct mpd_song *song); +filelist_find_song(struct filelist *flist, const struct mpd_song *song); #endif diff --git a/src/mpdclient.c b/src/mpdclient.c index 2f5591f..5a630fb 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -808,7 +808,7 @@ mpdclient_filelist_search_utf8(mpdclient_t *c, } if (mpdclient_finish_command(c)) { - mpdclient_filelist_free(filelist); + filelist_free(filelist); return NULL; } @@ -841,7 +841,7 @@ mpdclient_filelist_update(mpdclient_t *c, mpdclient_filelist_t *filelist) { gchar *path = g_strdup(filelist->path); - mpdclient_filelist_free(filelist); + filelist_free(filelist); filelist = mpdclient_filelist_get(c, path); g_free(path); return filelist; diff --git a/src/screen_artist.c b/src/screen_artist.c index c5d5a26..61f05cc 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -102,7 +102,7 @@ update_metalist(mpdclient_t *c, char *m_artist, char *m_album) metalist = string_list_free(metalist); if (browser.filelist) { mpdclient_remove_playlist_callback(c, playlist_changed_callback); - mpdclient_filelist_free(browser.filelist); + filelist_free(browser.filelist); browser.filelist = NULL; } @@ -186,7 +186,7 @@ static void quit(void) { if (browser.filelist) - mpdclient_filelist_free(browser.filelist); + filelist_free(browser.filelist); if (metalist) string_list_free(metalist); g_free(artist); @@ -287,7 +287,7 @@ add_query(mpdclient_t *c, int table, char *_filter) addlist = mpdclient_filelist_search_utf8(c, TRUE, table, _filter); if (addlist) { mpdclient_filelist_add_all(c, addlist); - mpdclient_filelist_free(addlist); + filelist_free(addlist); } } diff --git a/src/screen_browser.c b/src/screen_browser.c index 828cbe2..47fda6a 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -54,7 +54,7 @@ clear_highlights(mpdclient_filelist_t *fl) static void set_highlight(mpdclient_filelist_t *fl, mpd_Song *song, int highlight) { - struct filelist_entry *entry = mpdclient_filelist_find_song(fl, song); + struct filelist_entry *entry = filelist_find_song(fl, song); mpd_InfoEntity *entity; if (entry == NULL) @@ -201,7 +201,7 @@ browser_change_directory(struct screen_browser *browser, mpdclient_t *c, } else return -1; - mpdclient_filelist_free(browser->filelist); + filelist_free(browser->filelist); browser->filelist = mpdclient_filelist_get(c, path); sync_highlights(c, browser->filelist); list_window_check_selected(browser->lw, browser->filelist->length); diff --git a/src/screen_file.c b/src/screen_file.c index ea20f95..3df1a3f 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -133,7 +133,7 @@ static void browse_exit(void) { if (browser.filelist) - mpdclient_filelist_free(browser.filelist); + filelist_free(browser.filelist); list_window_free(browser.lw); list_window_free_state(browser.lw_state); } diff --git a/src/screen_search.c b/src/screen_search.c index 549221e..822729a 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -167,7 +167,7 @@ search_clear(mpd_unused screen_t *screen, mpdclient_t *c, { if (browser.filelist) { mpdclient_remove_playlist_callback(c, playlist_changed_callback); - mpdclient_filelist_free(browser.filelist); + filelist_free(browser.filelist); browser.filelist = NULL; } if (clear_pattern && pattern) { @@ -292,7 +292,7 @@ search_advanced_query(char *query, mpdclient_t *c) } if (mpdclient_finish_command(c) && fl) - mpdclient_filelist_free(fl); + filelist_free(fl); fl->updated = TRUE; } @@ -355,7 +355,7 @@ quit(void) if (search_history) string_list_free(search_history); if (browser.filelist) - mpdclient_filelist_free(browser.filelist); + filelist_free(browser.filelist); list_window_free(browser.lw); if (pattern) { diff --git a/src/utils.c b/src/utils.c index 9241296..65eacec 100644 --- a/src/utils.c +++ b/src/utils.c @@ -116,6 +116,6 @@ gcmp_list_from_path(mpdclient_t *c, const gchar *path, GList *list, gint types) flist = flist->next; } - mpdclient_filelist_free(filelist); + filelist_free(filelist); return list; }