[gedit] gedit-recent: fix filtering of a filenames that need uri escaping



commit 2564431e33198166ef4f82fc17a0aa59f5c19d96
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 e262707..0097c96 100644
--- a/gedit/gedit-recent.c
+++ b/gedit/gedit-recent.c
@@ -251,7 +251,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]