Commit c8efb68c authored by Felipe Borges's avatar Felipe Borges 👣

Include "gedit" 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 gedit is now named "Text Editor", a query for "gedit" would
match the "Exec" key and present the application in the search
results as expected. Unfortunately that doesn't happen for Flaptaked
gedit, which would get its desktop file "Exec" key overwritten to
something such as Exec=/usr/bin/flatpak run --branch=stable
--arch=x86_64 --command=gedit org.gnome.gedit --new-document

This way, searching for "gedit" when only the Flatpaked version
of it is installed returns no results. Searching for "Text Editor"
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 "gedit", "totem", "evince".
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.

[1] glib#1706
parent bce7f1c2
Pipeline #79215 passed with stage
in 18 minutes and 48 seconds
......@@ -14,7 +14,7 @@ Actions=new-window;new-document;
# TRANSLATORS: Do NOT translate or localize the semicolons!
# The list MUST also end with a semicolon!
# Search terms to find this application.
[Desktop Action new-window]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment