[gnome-games] libgames-support: Use g_uri_escape_string to construct the help URI
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] libgames-support: Use g_uri_escape_string to construct the help URI
- Date: Thu, 9 Jul 2009 23:11:20 +0000 (UTC)
commit ae90363f3418e81311dba7fde9dfa815982dab00
Author: Christian Persch <chpe gnome org>
Date: Fri Jul 3 19:41:10 2009 +0200
libgames-support: Use g_uri_escape_string to construct the help URI
Escape the help section.
libgames-support/games-help.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libgames-support/games-help.c b/libgames-support/games-help.c
index 51264f3..3654ac5 100644
--- a/libgames-support/games-help.c
+++ b/libgames-support/games-help.c
@@ -60,7 +60,16 @@ games_help_display (GtkWidget *window,
#if defined(WITH_HELP_METHOD_GHELP)
if (section != NULL) {
+#if GLIB_CHECK_VERSION (2, 16, 0)
+ char *escaped_section;
+
+ escaped_section = g_uri_escape_string (section, NULL, TRUE);
+ help_uri = g_strdup_printf ("ghelp:%s?%s", doc_module, escaped_section);
+ g_free (escaped_section);
+#else
+ /* Not ideal, but the best we can do */
help_uri = g_strdup_printf ("ghelp:%s?%s", doc_module, section);
+#endif /* GLIB >= 2.16.0 */
} else {
help_uri = g_strdup_printf ("ghelp:%s", doc_module);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]