diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-10-26 20:54:20 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-10-26 20:54:20 +0800 |
commit | 39246b052b1c9188cadbbcc2582f9d9430a8f1ae (patch) | |
tree | 5e9c9c92168db5db9b308d0bb680d322ffc05137 | |
parent | 9606f610928632663ae8bba5691aa614d098936e (diff) | |
download | gsoc2013-epiphany-39246b052b1c9188cadbbcc2582f9d9430a8f1ae.tar gsoc2013-epiphany-39246b052b1c9188cadbbcc2582f9d9430a8f1ae.tar.gz gsoc2013-epiphany-39246b052b1c9188cadbbcc2582f9d9430a8f1ae.tar.bz2 gsoc2013-epiphany-39246b052b1c9188cadbbcc2582f9d9430a8f1ae.tar.lz gsoc2013-epiphany-39246b052b1c9188cadbbcc2582f9d9430a8f1ae.tar.xz gsoc2013-epiphany-39246b052b1c9188cadbbcc2582f9d9430a8f1ae.tar.zst gsoc2013-epiphany-39246b052b1c9188cadbbcc2582f9d9430a8f1ae.zip |
Convert filenames from/to UTF-8 when persisting the directory.
2003-10-26 Christian Persch <chpe@cvs.gnome.org>
* lib/ephy-file-chooser.c: (current_folder_changed_cb),
(ephy_file_chooser_set_persist_key):
Convert filenames from/to UTF-8 when persisting the directory.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/ephy-file-chooser.c | 29 |
2 files changed, 27 insertions, 9 deletions
@@ -1,5 +1,12 @@ 2003-10-26 Christian Persch <chpe@cvs.gnome.org> + * lib/ephy-file-chooser.c: (current_folder_changed_cb), + (ephy_file_chooser_set_persist_key): + + Convert filenames from/to UTF-8 when persisting the directory. + +2003-10-26 Christian Persch <chpe@cvs.gnome.org> + * src/window-commands.c: (open_response_cb): Really used the converted string [in UTF-8] instead of diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c index 1f2f853d2..819661876 100644 --- a/lib/ephy-file-chooser.c +++ b/lib/ephy-file-chooser.c @@ -82,12 +82,16 @@ current_folder_changed_cb (GtkFileChooser *chooser, EphyFileChooser *dialog) { if (dialog->priv->persist_key) { - char *dir; + char *dir, *converted; dir = gtk_file_chooser_get_current_folder (chooser); if (dir != NULL) { + converted = g_filename_to_utf8 (dir, -1, NULL, NULL, NULL); + eel_gconf_set_string (dialog->priv->persist_key, dir); + + g_free (converted); g_free (dir); } } @@ -128,21 +132,28 @@ ephy_file_chooser_set_persist_key (EphyFileChooser *dialog, const char *key) if (key != NULL) { - char *uri; + char *dir; - uri = eel_gconf_get_string (key); + dir = eel_gconf_get_string (key); - if (uri != NULL) + if (dir != NULL) { - char *expanded; + char *expanded, *converted; + + converted = g_filename_from_utf8 + (dir, -1, NULL, NULL, NULL); - expanded = gnome_vfs_expand_initial_tilde (uri); + expanded = gnome_vfs_expand_initial_tilde (converted); - gtk_file_chooser_set_current_folder - (GTK_FILE_CHOOSER (dialog), expanded); + if (expanded != NULL) + { + gtk_file_chooser_set_current_folder + (GTK_FILE_CHOOSER (dialog), expanded); + } g_free (expanded); - g_free (uri); + g_free (converted); + g_free (dir); } } } |