[evince/include-evince-in-desktop-keywords] desktop: Include "evince" in .desktop keywords



commit 61a793ba42b903d013a161c215ebfddfe14b4eb0
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu May 2 11:34:17 2019 +0200

    desktop: Include "evince" in .desktop keywords
    
    The GNOME Shell search results are forwarded from the results of
    GLib's g_desktop_app_info_search() function, which matches the
    Name, Exec, Keywords, GenericName, X_GNOME_FullName, and Comment
    keys from desktop files[0].
    
    Since Evince is now named "Document Viewer", a query for "evince"
    would match the "Exec" key and present the application in the search
    results as expected. Unfortunately that doesn't happen for Flaptaked
    Evince, which would get its desktop file "Exec" key overwritten to
    something such as Exec=/usr/bin/flatpak run --branch=stable
    --arch=x86_64 --command=evince org.gnome.Evince --new-document
    
    This way, searching for "evince" when only the Flatpaked version
    of it is installed returns no results. Searching for "Document
    Viewer" presents the application as expected.
    
    Its been proposed in GLib to parse the "Exec" key for searches
    but that was rejected[1] because it would imply establishing an
    API which assumes that the command line behavior of Flatpak would
    be stable/never-change.
    
    A fix was proposed in Flatpak directly[2] but it was rejected,
    leaving us with the only option of adding the historical/legacy
    application names to the "Keywords" key in their desktop files.
    
    Many users, such as myself, have the "muscle memory" of search
    for the old application's name, such as "evince", "totem", "gedit".
    Although I agree that the new names should be presented to new
    users and that the old ones shouldn't be visible in UI, it makes
    sense and little effort to support the search for the old names IMO.
    
    I proposed the same changes in "gedit"[3].
    
    [0] https://gitlab.gnome.org/GNOME/glib/blob/master/gio/gdesktopappinfo.c#L378
    [1] https://gitlab.gnome.org/GNOME/glib/issues/1706
    [2] https://github.com/flatpak/flatpak/issues/2749
    [3] https://gitlab.gnome.org/GNOME/gedit/merge_requests/44

 data/org.gnome.Evince.desktop.in.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/data/org.gnome.Evince.desktop.in.in b/data/org.gnome.Evince.desktop.in.in
index c45703c8..d4f5d013 100644
--- a/data/org.gnome.Evince.desktop.in.in
+++ b/data/org.gnome.Evince.desktop.in.in
@@ -2,7 +2,7 @@
 Name=Document Viewer
 Comment=View multi-page documents
 # Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list 
MUST also end with a semicolon!
-Keywords=pdf;ps;postscript;dvi;xps;djvu;tiff;document;presentation;viewer;
+Keywords=pdf;ps;postscript;dvi;xps;djvu;tiff;document;presentation;viewer;evince;
 TryExec=evince
 Exec=evince %U
 StartupNotify=true


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