changeset 4608:23a9ded30c70

Use str_assert_utf8() where it makes sense in the core.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 04 Jun 2008 23:30:29 +0300
parents 829c30fc87ba
children 30782d57c7e6
files src/audacious/playlist.c src/audacious/tuple_formatter.c src/audacious/ui_jumptotrack.c src/audacious/ui_jumptotrack_cache.c src/audacious/ui_skinned_playlist.c src/audacious/ui_skinned_textbox.c
diffstat 6 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playlist.c	Wed Jun 04 23:26:23 2008 +0300
+++ b/src/audacious/playlist.c	Wed Jun 04 23:30:29 2008 +0300
@@ -170,7 +170,7 @@
 
     entry = mowgli_heap_alloc(playlist_entry_heap);
     entry->filename = g_strdup(filename);
-    entry->title = str_to_utf8(title);
+    entry->title = str_assert_utf8(title);
     entry->length = length;
     entry->selected = FALSE;
     entry->decoder = dec;
@@ -406,7 +406,7 @@
         return FALSE;
     }
 
-    playlist->title = str_to_utf8(title);
+    playlist->title = str_assert_utf8(title);
     g_free(oldtitle);
     hook_call("playlist update", NULL);
     return TRUE;
@@ -1552,7 +1552,7 @@
     /* FIXME: there should not be a need to do additional conversion,
      * if playlist is properly maintained */
     if (playlist->position->title) {
-        title = str_to_utf8(playlist->position->title);
+        title = str_assert_utf8(playlist->position->title);
     }
     else {
         gchar *realfn = g_filename_from_uri(playlist->position->filename, NULL, NULL);
@@ -1864,7 +1864,7 @@
         return str_replace(title, filename_to_utf8(title));
     }
 
-    return str_to_utf8(title);
+    return str_assert_utf8(title);
 }
 
 Tuple *
--- a/src/audacious/tuple_formatter.c	Wed Jun 04 23:26:23 2008 +0300
+++ b/src/audacious/tuple_formatter.c	Wed Jun 04 23:30:29 2008 +0300
@@ -602,7 +602,7 @@
         if(file_name) {
             gchar *realfn = g_filename_from_uri(file_name, NULL, NULL);
             g_free(rv);
-            rv = str_to_utf8(realfn ? realfn : file_name);
+            rv = str_assert_utf8(realfn ? realfn : file_name);
             g_free(realfn);
         }
         else {
--- a/src/audacious/ui_jumptotrack.c	Wed Jun 04 23:26:23 2008 +0300
+++ b/src/audacious/ui_jumptotrack.c	Wed Jun 04 23:30:29 2008 +0300
@@ -277,9 +277,9 @@
             gchar *realfn = NULL;
             realfn = g_filename_from_uri(entry->filename, NULL, NULL);
             if (strchr(realfn ? realfn : entry->filename, '/'))
-                desc_buf = str_to_utf8(strrchr(realfn ? realfn : entry->filename, '/') + 1);
+                desc_buf = str_assert_utf8(strrchr(realfn ? realfn : entry->filename, '/') + 1);
             else
-                desc_buf = str_to_utf8(realfn ? realfn : entry->filename);
+                desc_buf = str_assert_utf8(realfn ? realfn : entry->filename);
             g_free(realfn); realfn = NULL;
         }
 
@@ -344,9 +344,9 @@
             gchar *realfn = NULL;
             realfn = g_filename_from_uri(entry->filename, NULL, NULL);
             if (strchr(realfn ? realfn : entry->filename, '/'))
-                title = str_to_utf8(strrchr(realfn ? realfn : entry->filename, '/') + 1);
+                title = str_assert_utf8(strrchr(realfn ? realfn : entry->filename, '/') + 1);
             else
-                title = str_to_utf8(realfn ? realfn : entry->filename);
+                title = str_assert_utf8(realfn ? realfn : entry->filename);
             g_free(realfn); realfn = NULL;
         }
         gtk_list_store_append(store, &iter);
@@ -397,9 +397,9 @@
             gchar *realfn = NULL;
             realfn = g_filename_from_uri(entry->filename, NULL, NULL);
             if (strchr(realfn ? realfn : entry->filename, '/'))
-                desc_buf = str_to_utf8(strrchr(realfn ? realfn : entry->filename, '/') + 1);
+                desc_buf = str_assert_utf8(strrchr(realfn ? realfn : entry->filename, '/') + 1);
             else
-                desc_buf = str_to_utf8(realfn ? realfn : entry->filename);
+                desc_buf = str_assert_utf8(realfn ? realfn : entry->filename);
             g_free(realfn); realfn = NULL;
         }
 
--- a/src/audacious/ui_jumptotrack_cache.c	Wed Jun 04 23:26:23 2008 +0300
+++ b/src/audacious/ui_jumptotrack_cache.c	Wed Jun 04 23:30:29 2008 +0300
@@ -302,7 +302,7 @@
             } else {
                 gchar *realfn = NULL;
                 realfn = g_filename_from_uri(playlist_entry->filename, NULL, NULL);
-                gchar *tmp_title = str_to_utf8(realfn ? realfn : playlist_entry->filename);
+                gchar *tmp_title = str_assert_utf8(realfn ? realfn : playlist_entry->filename);
                 title = normalize_search_string(tmp_title);
                 g_free(tmp_title);
                 g_free(realfn); realfn = NULL;
--- a/src/audacious/ui_skinned_playlist.c	Wed Jun 04 23:26:23 2008 +0300
+++ b/src/audacious/ui_skinned_playlist.c	Wed Jun 04 23:30:29 2008 +0300
@@ -576,7 +576,7 @@
             g_free(basename); g_free(realfn);
         }
         else
-            title = str_to_utf8(entry->title);
+            title = str_assert_utf8(entry->title);
 
         title = convert_title_text(title);
 
--- a/src/audacious/ui_skinned_textbox.c	Wed Jun 04 23:26:23 2008 +0300
+++ b/src/audacious/ui_skinned_textbox.c	Wed Jun 04 23:30:29 2008 +0300
@@ -499,7 +499,7 @@
     if (textbox->text)
         g_free(textbox->text);
 
-    textbox->text = str_to_utf8(text);
+    textbox->text = str_assert_utf8(text);
     priv->scroll_back = FALSE;
     gtk_widget_queue_draw(GTK_WIDGET(textbox));
 }