[gnome-control-center] background: Use GLib API to convert absolute filename to URI



commit 4a403aa825c134f5a2dbeb31e24c5df0ace446f3
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Feb 13 09:51:48 2014 +0100

    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 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/panels/background/cc-background-chooser-dialog.c 
b/panels/background/cc-background-chooser-dialog.c
index f7395a1..b37d337 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 ("<a href=\"file://%s\">%s</a>", pictures_dir, pictures_dir_basename);
+  pictures_dir_uri = g_filename_to_uri (pictures_dir, NULL, NULL);
+  href = g_markup_printf_escaped ("<a href=\"%s\">%s</a>", 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]