summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c238364)
raw | patch | inline | side by side (parent: c238364)
author | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 15:17:21 +0000 (16:17 +0100) | ||
committer | Max 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.
work with locale strings, and remove the _utf8 suffix from the others.
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 7907eead5d293862265a95b2bfea884d40b70036..3da280cefc588843b32f3dfa2e5096c24aa8b4a9 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
}
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);
}
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;
}
GList *
-mpdclient_get_artists_utf8(mpdclient_t *c)
+mpdclient_get_artists(mpdclient_t *c)
{
gchar *str = NULL;
GList *list = NULL;
}
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 d0d5cdfd23f62488d034eb2237c462571d68637b..e3b662a3fbda9f9110b6bcb96c68f87679822032 100644 (file)
--- a/src/mpdclient.h
+++ b/src/mpdclient.h
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);
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 17641df997a2bfb5fc3efdebd16d431c30e8884c..c8ba729893695035471aad305a207d0ba5a50022 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
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 35db917762e1ec76f1dfaa094edc7091d760baac..c66ae53f99ed62595e3e5b512d96453e949c0b7c 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.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);
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 69e39ffaf57f2023944f794a561116e69b731378..dfae309e3af6195a57064fd05fb38ea76f33564f 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
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 f4229797137d598498f675e0b0df5266e8a7d1fd..0c24af25d4df9ad16a7f476152215bdecb1a7f7a 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
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);