Code

mpdclient: removed _utf8 suffix from function names
authorMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 15:17:21 +0000 (16:17 +0100)
committerMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 15:17:21 +0000 (16:17 +0100)
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
src/mpdclient.h
src/screen.c
src/screen_artist.c
src/screen_browser.c
src/screen_file.c

index 7907eead5d293862265a95b2bfea884d40b70036..3da280cefc588843b32f3dfa2e5096c24aa8b4a9 100644 (file)
@@ -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;
index d0d5cdfd23f62488d034eb2237c462571d68637b..e3b662a3fbda9f9110b6bcb96c68f87679822032 100644 (file)
@@ -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 *****************************************************/
index 17641df997a2bfb5fc3efdebd16d431c30e8884c..c8ba729893695035471aad305a207d0ba5a50022 100644 (file)
@@ -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..."));
index 35db917762e1ec76f1dfaa094edc7091d760baac..c66ae53f99ed62595e3e5b512d96453e949c0b7c 100644 (file)
@@ -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);
 
index 69e39ffaf57f2023944f794a561116e69b731378..dfae309e3af6195a57064fd05fb38ea76f33564f 100644 (file)
@@ -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);
index f4229797137d598498f675e0b0df5266e8a7d1fd..0c24af25d4df9ad16a7f476152215bdecb1a7f7a 100644 (file)
@@ -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);