2011-04-09 [colin] 3.7.8cvs77
authorColin Leroy <colin@colino.net>
Sat, 9 Apr 2011 06:41:38 +0000 (06:41 +0000)
committerColin Leroy <colin@colino.net>
Sat, 9 Apr 2011 06:41:38 +0000 (06:41 +0000)
* src/gtk/filesel.c
Revert part of yesterday's patch. While gtk_file_chooser_set_current_name()
wants an UTF-8 string, gtk_file_chooser_set_current_folder() wants a glib-
encoding filename. Hooray for stupid.

ChangeLog
PATCHSETS
configure.ac
src/gtk/filesel.c

index 0c23e5c..0a6176e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-04-09 [colin]     3.7.8cvs77
+
+       * src/gtk/filesel.c
+               Revert part of yesterday's patch. While gtk_file_chooser_set_current_name()
+               wants an UTF-8 string, gtk_file_chooser_set_current_folder() wants a glib-
+               encoding filename. Hooray for stupid.
+
 2011-04-08 [colin]     3.7.8cvs76
 
        * src/action.c
index df02d37..339c76e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.49.2.139 -r 1.49.2.140 src/procmime.c;  ) > 3.7.8cvs74.patchset
 ( cvs diff -u -r 1.61.2.96 -r 1.61.2.97 src/account.c;  cvs diff -u -r 1.213.2.200 -r 1.213.2.201 src/folder.c;  cvs diff -u -r 1.87.2.63 -r 1.87.2.64 src/folder.h;  cvs diff -u -r 1.2.2.36 -r 1.2.2.37 src/folder_item_prefs.c;  cvs diff -u -r 1.2.2.23 -r 1.2.2.24 src/folder_item_prefs.h;  cvs diff -u -r 1.105.2.165 -r 1.105.2.166 src/prefs_account.c;  ) > 3.7.8cvs75.patchset
 ( cvs diff -u -r 1.12.2.64 -r 1.12.2.65 src/action.c;  ) > 3.7.8cvs76.patchset
+( cvs diff -u -r 1.2.2.43 -r 1.2.2.44 src/gtk/filesel.c;  ) > 3.7.8cvs77.patchset
index 8174895..81e8afa 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=76
+EXTRA_VERSION=77
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a511aab..726abbf 100644 (file)
@@ -169,8 +169,11 @@ static GList *filesel_create(const gchar *title, const gchar *path,
                        realpath = g_strdup(get_home_dir());
                }
                if (g_utf8_validate(realpath, -1, NULL))
-                       gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser),
-                                                           realpath);
+                       tmp = g_filename_from_utf8(realpath, -1, NULL, NULL, NULL);
+               if (tmp == NULL)
+                       tmp = g_strdup(realpath);
+               gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), tmp);
+               g_free(tmp);
                if (action == GTK_FILE_CHOOSER_ACTION_SAVE) {
                        if (g_utf8_validate(filename, -1, NULL))
                                gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(chooser),