[glib/1013-search-evince-or-totem-zero-result-from-flatpaks] try harder to get the exec name for flatpaks
- From: Nelson Benítez León <nbenitez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/1013-search-evince-or-totem-zero-result-from-flatpaks] try harder to get the exec name for flatpaks
- Date: Sun, 3 Mar 2019 22:45:09 +0000 (UTC)
commit 1acffad4bfa168555d3899f0763ac1b5e0b47494
Author: Nelson Benítez León <nbenitezl gmail com>
Date: Sat Mar 2 20:37:32 2019 -0400
try harder to get the exec name for flatpaks
so gnome-shell's application search does not
show zero result for an application that is
installed both by distro package and by flatpak.
Fixes issue gnome-shell#1013
gio/gdesktopappinfo.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 7d7425ea9..946f45ebf 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -1099,6 +1099,18 @@ desktop_file_dir_unindexed_setup_search (DesktopFileDir *dir)
/* Special handling: only match basename of first field */
gchar *space;
gchar *slash;
+ gchar *tmp;
+
+ /* For 'flatpak run' case, use --command if present. see gnome-shell#1013 */
+ if ((tmp = g_strstr_len (raw, -1, "flatpak run")) &&
+ (tmp = g_strstr_len (tmp, -1, "--command=")))
+ {
+ tmp = g_strdup (tmp + strlen("--command="));
+ g_free (raw);
+ raw = tmp;
+ tmp = NULL;
+ value = raw;
+ }
/* Remove extra arguments, if any */
space = raw + strcspn (raw, " \t\n"); /* IFS */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]