From 3eca95ac1cb786d1aef59fd141d75661903c039a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Nov 2008 16:17:21 +0100 Subject: [PATCH] mpdclient: removed _utf8 suffix from function names All functions must receive UTF-8 file names. Delete all which still work with locale strings, and remove the _utf8 suffix from the others. --- src/mpdclient.c | 8 ++++---- src/mpdclient.h | 8 ++++---- src/screen.c | 2 +- src/screen_artist.c | 4 ++-- src/screen_browser.c | 2 +- src/screen_file.c | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mpdclient.c b/src/mpdclient.c index 7907eea..3da280c 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -381,7 +381,7 @@ mpdclient_cmd_crossfade(mpdclient_t *c, gint value) } gint -mpdclient_cmd_db_update_utf8(mpdclient_t *c, gchar *path) +mpdclient_cmd_db_update(mpdclient_t *c, gchar *path) { mpd_sendUpdateCommand(c->connection, path ? path : ""); return mpdclient_finish_command(c); @@ -526,7 +526,7 @@ mpdclient_cmd_save_playlist(mpdclient_t *c, gchar *filename_utf8) } gint -mpdclient_cmd_load_playlist_utf8(mpdclient_t *c, gchar *filename_utf8) +mpdclient_cmd_load_playlist(mpdclient_t *c, gchar *filename_utf8) { mpd_sendLoadCommand(c->connection, filename_utf8); c->need_update = TRUE; @@ -795,7 +795,7 @@ mpdclient_filelist_add_all(mpdclient_t *c, mpdclient_filelist_t *fl) } GList * -mpdclient_get_artists_utf8(mpdclient_t *c) +mpdclient_get_artists(mpdclient_t *c) { gchar *str = NULL; GList *list = NULL; @@ -811,7 +811,7 @@ mpdclient_get_artists_utf8(mpdclient_t *c) } GList * -mpdclient_get_albums_utf8(mpdclient_t *c, gchar *artist_utf8) +mpdclient_get_albums(mpdclient_t *c, gchar *artist_utf8) { gchar *str = NULL; GList *list = NULL; diff --git a/src/mpdclient.h b/src/mpdclient.h index d0d5cdf..e3b662a 100644 --- a/src/mpdclient.h +++ b/src/mpdclient.h @@ -57,7 +57,7 @@ gint mpdclient_cmd_clear(mpdclient_t *c); gint mpdclient_cmd_repeat(mpdclient_t *c, gint value); gint mpdclient_cmd_random(mpdclient_t *c, gint value); gint mpdclient_cmd_crossfade(mpdclient_t *c, gint value); -gint mpdclient_cmd_db_update_utf8(mpdclient_t *c, gchar *path); +gint mpdclient_cmd_db_update(mpdclient_t *c, gchar *path); gint mpdclient_cmd_volume(mpdclient_t *c, gint value); gint mpdclient_cmd_add_path(mpdclient_t *c, gchar *path); @@ -66,12 +66,12 @@ gint mpdclient_cmd_delete(mpdclient_t *c, gint index); gint mpdclient_cmd_move(mpdclient_t *c, gint old_index, gint new_index); gint mpdclient_cmd_save_playlist(mpdclient_t *c, gchar *filename); -gint mpdclient_cmd_load_playlist_utf8(mpdclient_t *c, gchar *filename_utf8); +gint mpdclient_cmd_load_playlist(mpdclient_t *c, gchar *filename_utf8); gint mpdclient_cmd_delete_playlist(mpdclient_t *c, gchar *filename_utf8); /* list functions */ -GList *mpdclient_get_artists_utf8(mpdclient_t *c); -GList *mpdclient_get_albums_utf8(mpdclient_t *c, gchar *artist_utf8); +GList *mpdclient_get_artists(mpdclient_t *c); +GList *mpdclient_get_albums(mpdclient_t *c, gchar *artist_utf8); /*** error callbacks *****************************************************/ diff --git a/src/screen.c b/src/screen.c index 17641df..c8ba729 100644 --- a/src/screen.c +++ b/src/screen.c @@ -758,7 +758,7 @@ screen_client_cmd(mpdclient_t *c, command_t cmd) break; case CMD_DB_UPDATE: if (!c->status->updatingDb) { - if( mpdclient_cmd_db_update_utf8(c,NULL)==0 ) + if( mpdclient_cmd_db_update(c,NULL)==0 ) screen_status_printf(_("Database update started!")); } else screen_status_printf(_("Database update running...")); diff --git a/src/screen_artist.c b/src/screen_artist.c index 35db917..c66ae53 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -179,7 +179,7 @@ load_artist_list(struct mpdclient *c) assert(album_list == NULL); assert(browser.filelist == NULL); - list = mpdclient_get_artists_utf8(c); + list = mpdclient_get_artists(c); /* sort list */ list = g_list_sort(list, compare_utf8); @@ -197,7 +197,7 @@ load_album_list(struct mpdclient *c) assert(album_list == NULL); assert(browser.filelist == NULL); - list = mpdclient_get_albums_utf8(c, artist); + list = mpdclient_get_albums(c, artist); /* sort list */ list = g_list_sort(list, compare_utf8); diff --git a/src/screen_browser.c b/src/screen_browser.c index 69e39ff..dfae309 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -230,7 +230,7 @@ load_playlist(mpdclient_t *c, filelist_entry_t *entry) mpd_PlaylistFile *plf = entity->info.playlistFile; char *filename = utf8_to_locale(plf->path); - if (mpdclient_cmd_load_playlist_utf8(c, plf->path) == 0) + if (mpdclient_cmd_load_playlist(c, plf->path) == 0) screen_status_printf(_("Loading playlist %s..."), g_basename(filename)); g_free(filename); diff --git a/src/screen_file.c b/src/screen_file.c index f422979..0c24af2 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -243,7 +243,7 @@ browse_cmd(mpdclient_t *c, command_t cmd) return 1; if (!c->status->updatingDb) { - if (mpdclient_cmd_db_update_utf8(c, browser.filelist->path) == 0) { + if (mpdclient_cmd_db_update(c, browser.filelist->path) == 0) { if (strcmp(browser.filelist->path, "")) { char *path_locale = utf8_to_locale(browser.filelist->path); -- 2.30.2