[gnome-control-center] search: Unescape the names in Search Locations
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] search: Unescape the names in Search Locations
- Date: Thu, 28 Feb 2013 18:46:52 +0000 (UTC)
commit c8b3bc5948de683c9f3dbeb26e3ff52c9b226169
Author: Kalev Lember <kalevlember gmail com>
Date: Thu Feb 28 15:52:14 2013 +0100
search: Unescape the names in Search Locations
Instead of using g_path_get_basename() on raw URIs, use GFile functions
for getting the properly unescaped basenames of the files.
https://bugzilla.gnome.org/show_bug.cgi?id=694447
panels/search/cc-search-locations-dialog.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/panels/search/cc-search-locations-dialog.c b/panels/search/cc-search-locations-dialog.c
index e9ea62c..90dadb5 100644
--- a/panels/search/cc-search-locations-dialog.c
+++ b/panels/search/cc-search-locations-dialog.c
@@ -111,12 +111,13 @@ get_bookmarks (void)
}
bookmark = g_slice_new0 (Place);
+ bookmark->location = g_file_new_for_uri (lines[idx]);
+
if (label != NULL)
bookmark->display_name = label;
else
- bookmark->display_name = g_path_get_basename (lines[idx]);
+ bookmark->display_name = g_file_get_basename (bookmark->location);
- bookmark->location = g_file_new_for_uri (lines[idx]);
bookmark->place_type = PLACE_BOOKMARKS;
bookmarks = g_list_prepend (bookmarks, bookmark);
@@ -162,7 +163,7 @@ get_xdg_dirs (void)
xdg_dir = g_slice_new0 (Place);
xdg_dir->location = g_file_new_for_path (path);
- xdg_dir->display_name = g_path_get_basename (path);
+ xdg_dir->display_name = g_file_get_basename (xdg_dir->location);
xdg_dir->place_type = PLACE_XDG;
xdg_dirs = g_list_prepend (xdg_dirs, xdg_dir);
@@ -247,7 +248,7 @@ get_tracker_locations (void)
location = g_slice_new0 (Place);
location->location = g_file_new_for_commandline_arg (path);
- location->display_name = g_path_get_basename (path);
+ location->display_name = g_file_get_basename (location->location);
location->place_type = PLACE_OTHER;
list = g_list_prepend (list, location);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]