diff options
author | Armin Weatherwax | 2010-01-01 13:34:42 +0100 |
---|---|---|
committer | Jacek Antonelli | 2010-01-03 16:32:00 -0600 |
commit | 3e56d26cba710d8f222ab3683c6f646022006cd3 (patch) | |
tree | c3609144f06721a98aa029a12b33171c6370d6d3 /linden/indra/newview | |
parent | Fix just another hardcoded path to Linux-i686. (diff) | |
download | meta-impy-3e56d26cba710d8f222ab3683c6f646022006cd3.zip meta-impy-3e56d26cba710d8f222ab3683c6f646022006cd3.tar.gz meta-impy-3e56d26cba710d8f222ab3683c6f646022006cd3.tar.bz2 meta-impy-3e56d26cba710d8f222ab3683c6f646022006cd3.tar.xz |
Fix filepicker not working in 64bit build.
(Cherry picked by Jacek from 08cc8bc2)
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/llfilepicker.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/linden/indra/newview/llfilepicker.cpp b/linden/indra/newview/llfilepicker.cpp index 60fa608..6334688 100644 --- a/linden/indra/newview/llfilepicker.cpp +++ b/linden/indra/newview/llfilepicker.cpp | |||
@@ -919,22 +919,24 @@ void LLFilePicker::add_to_selectedfiles(gpointer data, gpointer user_data) | |||
919 | 919 | ||
920 | LLFilePicker* picker = (LLFilePicker*) user_data; | 920 | LLFilePicker* picker = (LLFilePicker*) user_data; |
921 | GError *error = NULL; | 921 | GError *error = NULL; |
922 | gchar* filename_utf8 = g_filename_to_utf8((gchar*)data, | 922 | // gchar* filename_utf8 = g_filename_to_utf8((gchar*)data, |
923 | -1, NULL, NULL, &error); | 923 | // -1, NULL, NULL, &error); |
924 | gchar* filename_utf8 = g_filename_display_name ((gchar*) data); | ||
924 | if (error) | 925 | if (error) |
925 | { | 926 | { |
926 | // *FIXME. | 927 | // *FIXME. |
927 | // This condition should really be notified to the user, e.g. | 928 | // This condition should really be notified to the user, e.g. |
928 | // through a message box. Just logging it is inappropriate. | 929 | // through a message box. Just logging it is inappropriate. |
929 | 930 | ||
930 | // g_filename_display_name is ideal, but >= glib 2.6, so: | 931 | // Ghhhh. g_filename_display_name is new to glib 2.6, and it |
931 | // a hand-rolled hacky makeASCII which disallows control chars | 932 | // is too new for SL! (Note that the latest glib as of this |
932 | std::string display_name; | 933 | // writing is 2.22. *sigh*) LL supplied *makeASCII family are |
933 | for (const gchar *str = (const gchar *)data; *str; str++) | 934 | // also unsuitable since they allow control characters... |
934 | { | 935 | |
935 | display_name += (char)((*str >= 0x20 && *str <= 0x7E) ? *str : '?'); | 936 | // muhahaha ... Imprudence can ! |
936 | } | 937 | |
937 | llwarns << "g_filename_to_utf8 failed on \"" << display_name << "\": " << error->message << llendl; | 938 | |
939 | llwarns << "g_filename_display_name failed on" << filename_utf8 << ": "<< error->message << llendl; | ||
938 | } | 940 | } |
939 | 941 | ||
940 | if (filename_utf8) | 942 | if (filename_utf8) |