comparison src/aosd/aosd_trigger.c @ 787:9794a5487524 trunk

[svn] aosd: do not use str_to_utf8
author giacomo
date Tue, 06 Mar 2007 06:53:31 -0800
parents 53f63f43663f
children e6d51d079a46
comparison
equal deleted inserted replaced
786:c23705487009 787:9794a5487524
161 /* pick what we have as song title */ 161 /* pick what we have as song title */
162 Playlist *active = playlist_get_active(); 162 Playlist *active = playlist_get_active();
163 gint pos = playlist_get_position(active); 163 gint pos = playlist_get_position(active);
164 title = playlist_get_songtitle(active, pos); 164 title = playlist_get_songtitle(active, pos);
165 } 165 }
166 gchar *utf8_title = str_to_utf8( title ); 166 gchar *utf8_title = g_strdup( title );
167 if ( g_utf8_validate( utf8_title , -1 , NULL ) == TRUE ) 167 if ( g_utf8_validate( utf8_title , -1 , NULL ) == TRUE )
168 { 168 {
169 gchar *utf8_title_markup = g_markup_printf_escaped( 169 gchar *utf8_title_markup = g_markup_printf_escaped(
170 "<span font_desc='%s'>%s</span>" , global_config->osd->text.fonts_name[0] , utf8_title ); 170 "<span font_desc='%s'>%s</span>" , global_config->osd->text.fonts_name[0] , utf8_title );
171 aosd_display( utf8_title_markup , global_config->osd , FALSE ); 171 aosd_display( utf8_title_markup , global_config->osd , FALSE );
228 if ( ( pl_entry->filename != NULL ) && ( !strcmp(pl_entry->filename,prevs->filename) ) ) 228 if ( ( pl_entry->filename != NULL ) && ( !strcmp(pl_entry->filename,prevs->filename) ) )
229 { 229 {
230 if ( ( pl_entry->title != NULL ) && ( strcmp(pl_entry->title,prevs->title) ) ) 230 if ( ( pl_entry->title != NULL ) && ( strcmp(pl_entry->title,prevs->title) ) )
231 { 231 {
232 /* string formatting is done here a.t.m. - TODO - improve this area */ 232 /* string formatting is done here a.t.m. - TODO - improve this area */
233 gchar *utf8_title = str_to_utf8( pl_entry->title ); 233 gchar *utf8_title = g_strdup( pl_entry->title );
234 if ( g_utf8_validate( utf8_title , -1 , NULL ) == TRUE ) 234 if ( g_utf8_validate( utf8_title , -1 , NULL ) == TRUE )
235 { 235 {
236 gchar *utf8_title_markup = g_markup_printf_escaped( 236 gchar *utf8_title_markup = g_markup_printf_escaped(
237 "<span font_desc='%s'>%s</span>" , global_config->osd->text.fonts_name[0] , utf8_title ); 237 "<span font_desc='%s'>%s</span>" , global_config->osd->text.fonts_name[0] , utf8_title );
238 aosd_display( utf8_title_markup , global_config->osd , FALSE ); 238 aosd_display( utf8_title_markup , global_config->osd , FALSE );