[brasero: 8/18] Remove a duplicate function and use the one provided by libbrasero-utils
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Subject: [brasero: 8/18] Remove a duplicate function and use the one provided by libbrasero-utils
- Date: Mon, 4 May 2009 14:16:24 -0400 (EDT)
commit 05960b2ddf355c76d78ebb733ab6c19515628c40
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Thu Apr 30 17:27:19 2009 +0200
Remove a duplicate function and use the one provided by libbrasero-utils
---
src/brasero-audio-disc.c | 34 ++--------------------------------
1 files changed, 2 insertions(+), 32 deletions(-)
diff --git a/src/brasero-audio-disc.c b/src/brasero-audio-disc.c
index c0006db..8522000 100644
--- a/src/brasero-audio-disc.c
+++ b/src/brasero-audio-disc.c
@@ -1154,36 +1154,6 @@ brasero_audio_disc_short_track_dialog (BraseroAudioDisc *disc)
GTK_MESSAGE_WARNING);
}
-static gchar *
-brasero_audio_disc_validate_utf8_name (const gchar *name)
-{
- gchar *retval, *ptr;
- const gchar *invalid;
-
- if (!name)
- return NULL;
-
- if (g_utf8_validate (name, -1, &invalid))
- return g_markup_escape_text (name, -1);
-
- retval = g_strdup (name);
- ptr = retval + (invalid - name);
- *ptr = '_';
- ptr++;
-
- while (!g_utf8_validate (ptr, -1, &invalid)) {
- ptr = (gchar*) invalid;
- *ptr = '?';
- ptr ++;
- }
-
- ptr = retval;
- retval = g_markup_escape_text (retval, -1);
- g_free (ptr);
-
- return retval;
-}
-
static gboolean
brasero_audio_disc_set_row_from_metadata (BraseroAudioDisc *disc,
GtkTreeModel *model,
@@ -1309,7 +1279,7 @@ brasero_audio_disc_set_row_from_metadata (BraseroAudioDisc *disc,
if (!title_set && g_file_info_get_attribute_string (info, BRASERO_IO_TITLE)) {
gchar *name;
- name = brasero_audio_disc_validate_utf8_name (g_file_info_get_attribute_string (info, BRASERO_IO_TITLE));
+ name = brasero_utils_validate_utf8 (g_file_info_get_attribute_string (info, BRASERO_IO_TITLE));
gtk_list_store_set (GTK_LIST_STORE (model), iter,
NAME_COL, name,
-1);
@@ -1439,7 +1409,7 @@ brasero_audio_disc_result (GObject *obj,
name = g_uri_unescape_string (escaped_name, NULL);
g_free (escaped_name);
- markup = brasero_audio_disc_validate_utf8_name (name);
+ markup = brasero_utils_validate_utf8 (name);
g_free (name);
/* Set a default name here */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]