[gtk/gtk-3-24: 1/2] gtkfilechooser: Fix open() references in documentation
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] gtkfilechooser: Fix open() references in documentation
- Date: Mon, 12 Oct 2020 12:26:47 +0000 (UTC)
commit 7072d57d12036964ff4f54405df7f8fe851d7982
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Oct 12 12:09:42 2020 +0100
gtkfilechooser: Fix open() references in documentation
While it’s true that you can pass the results of
`gtk_file_chooser_get_filename()` straight to `open()` or `fopen()` on
Linux, you can’t do so on Windows as it expects the filename to be in
the ANSI codepage. Using the GLib wrappers `g_open()`/`g_fopen()`
instead means that the appropriate UTF-8 → UTF-16 → `wopen()`/`wfopen()`
conversions are done.
Spotted by Fabian Keßler in
https://gitlab.gnome.org/GNOME/glib/-/issues/2212.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
gtk/gtkfilechooser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c
index 4e22c52b06..0be35921e1 100644
--- a/gtk/gtkfilechooser.c
+++ b/gtk/gtkfilechooser.c
@@ -68,7 +68,7 @@
* variable.
*
* This means that while you can pass the result of
- * gtk_file_chooser_get_filename() to open() or fopen(),
+ * gtk_file_chooser_get_filename() to g_open() or g_fopen(),
* you may not be able to directly set it as the text of a
* #GtkLabel widget unless you convert it first to UTF-8,
* which all GTK+ widgets expect. You should use g_filename_to_utf8()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]