[gedit/gnome-3-16] gedit-recent: fix filtering of a filenames that need uri escaping
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/gnome-3-16] gedit-recent: fix filtering of a filenames that need uri escaping
- Date: Sun, 16 Aug 2015 15:02:38 +0000 (UTC)
commit 82afb0876c8dea08239ba8ea6845f01d1e2b5231
Author: Ray Strode <rstrode redhat com>
Date: Mon Aug 10 13:03:48 2015 -0400
gedit-recent: fix filtering of a filenames that need uri escaping
When a user types a filename into the search popover, gedit tries
to find matches from recently used documents. It does this by
returning all recently used documents that have what the user typed
as a substring of the document uri.
GtkRecentInfo provides two different apis for returning the associated
uri: gtk_recent_info_get_uri() and gtk_recent_info_get_uri_display().
The former returns the uri in a canonical representation with non-ascii
characters escaped using url escaping rules. The latter returns the
uri with non-ascii characters unescaped. GeditRecent uses the
canonicalized, escaping function, so its substring search fails
on non-ascii filenames.
This commit changes the code over to use the other variant.
https://bugzilla.gnome.org/show_bug.cgi?id=753481
gedit/gedit-recent.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-recent.c b/gedit/gedit-recent.c
index bcae0ac..45457f3 100644
--- a/gedit/gedit-recent.c
+++ b/gedit/gedit-recent.c
@@ -253,7 +253,7 @@ gedit_recent_get_items (GeditRecentConfiguration *config)
{
gchar *uri_lower;
- uri_lower = g_utf8_strdown (gtk_recent_info_get_uri (info), -1);
+ uri_lower = g_utf8_strdown (gtk_recent_info_get_uri_display (info), -1);
if (strstr (uri_lower, config->substring_filter) == NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]