From 4a403aa825c134f5a2dbeb31e24c5df0ace446f3 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 13 Feb 2014 09:51:48 +0100 Subject: [PATCH] background: Use GLib API to convert absolute filename to URI https://bugzilla.gnome.org/show_bug.cgi?id=709771 --- panels/background/cc-background-chooser-dialog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panels/background/cc-background-chooser-dialog.c b/panels/background/cc-background-chooser-dialog.c index f7395a1a5..b37d3372c 100644 --- a/panels/background/cc-background-chooser-dialog.c +++ b/panels/background/cc-background-chooser-dialog.c @@ -270,6 +270,7 @@ cc_background_chooser_dialog_init (CcBackgroundChooserDialog *chooser) gchar *markup, *href; const gchar *pictures_dir; gchar *pictures_dir_basename; + gchar *pictures_dir_uri; chooser->priv = CC_CHOOSER_DIALOG_GET_PRIVATE (chooser); priv = chooser->priv; @@ -404,7 +405,9 @@ cc_background_chooser_dialog_init (CcBackgroundChooserDialog *chooser) else pictures_dir_basename = g_path_get_basename (pictures_dir); - href = g_markup_printf_escaped ("%s", pictures_dir, pictures_dir_basename); + pictures_dir_uri = g_filename_to_uri (pictures_dir, NULL, NULL); + href = g_markup_printf_escaped ("%s", pictures_dir_uri, pictures_dir_basename); + g_free (pictures_dir_uri); g_free (pictures_dir_basename); /* translators: %s here is the name of the Pictures directory, the string should be translated in