summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2002-03-28 20:08:25 +0000
committerTim Janik <timj@src.gnome.org>2002-03-28 20:08:25 +0000
commit76e0cec01fb71d48c75d3062071b9aa8cc9c038a (patch)
tree02cf16c3db9c0cc1f382d53d56dcb65ba92d381e
parent1075a5b92440ddc7f0ad657e5a3ee9ab546fd7a7 (diff)
downloadgdk-pixbuf-76e0cec01fb71d48c75d3062071b9aa8cc9c038a.tar.gz
when encountering non-UTF-8 file names, alert the user with g_message()
Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org> * gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file names, alert the user with g_message() instead of g_warning() and put out the actual conversion error.
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-26
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gtk/gtkfilesel.c13
7 files changed, 46 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e9e0c9dba..b7345e1ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
+ names, alert the user with g_message() instead of g_warning() and
+ put out the actual conversion error.
+
2002-03-28 Dave Camp <dave@ximian.com>
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index e9e0c9dba..b7345e1ba 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
+ names, alert the user with g_message() instead of g_warning() and
+ put out the actual conversion error.
+
2002-03-28 Dave Camp <dave@ximian.com>
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index e9e0c9dba..b7345e1ba 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,9 @@
+Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
+ names, alert the user with g_message() instead of g_warning() and
+ put out the actual conversion error.
+
2002-03-28 Dave Camp <dave@ximian.com>
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index e9e0c9dba..b7345e1ba 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,9 @@
+Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
+ names, alert the user with g_message() instead of g_warning() and
+ put out the actual conversion error.
+
2002-03-28 Dave Camp <dave@ximian.com>
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index e9e0c9dba..b7345e1ba 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
+ names, alert the user with g_message() instead of g_warning() and
+ put out the actual conversion error.
+
2002-03-28 Dave Camp <dave@ximian.com>
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index e9e0c9dba..b7345e1ba 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
+ names, alert the user with g_message() instead of g_warning() and
+ put out the actual conversion error.
+
2002-03-28 Dave Camp <dave@ximian.com>
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index b6cfc5f10..9b8594273 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -2964,6 +2964,8 @@ open_new_dir (gchar *dir_name,
for (i = 0; i < entry_count; i += 1)
{
+ GError *error = NULL;
+
dirent = g_dir_read_name (directory);
if (!dirent)
@@ -2974,14 +2976,19 @@ open_new_dir (gchar *dir_name,
return NULL;
}
- sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent, -1, NULL, NULL, NULL);
+ sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent, -1, NULL, NULL, &error);
if (sent->entries[n_entries].entry_name == NULL
|| !g_utf8_validate (sent->entries[n_entries].entry_name, -1, NULL))
{
- g_warning (_("The filename %s couldn't be converted to UTF-8. Try setting the environment variable G_BROKEN_FILENAMES."), dirent);
+ g_message (_("The filename \"%s\" couldn't be converted to UTF-8 "
+ "(try setting the environment variable G_BROKEN_FILENAMES): %s"),
+ dirent,
+ error->message ? error->message : _("Invalid Utf-8"));
+ g_clear_error (&error);
continue;
}
-
+ g_clear_error (&error);
+
g_string_assign (path, sys_dir_name);
if (path->str[path->len-1] != G_DIR_SEPARATOR)
{