[gnome-software/gnome-3-30] Open the details page when using --details, not the search page
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-30] Open the details page when using --details, not the search page
- Date: Tue, 18 Dec 2018 01:13:43 +0000 (UTC)
commit 9fd51334e55ebd4922f1634f3435dd7fa9ad0bdc
Author: Kalev Lember <klember redhat com>
Date: Sun Nov 18 11:55:30 2018 +0100
Open the details page when using --details, not the search page
This used to work once upon a time, but things broke after the
introduction of the unique ID concept. GNOME Shell passes just the
desktop ID and never the unique ID and we broke the API on
gnome-software side expecting to get unique ID.
Fix this by using unique ID when it's passed in, and just the desktop
file name if that's what was passed in.
Also, never show the search page with --details as this seems like poor
user interaction (right click on an app in GNOME Shell, select "Show
Details" and then we get a search page).
Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/529
src/gs-application.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index bfd91f32..eeabb72d 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -573,17 +573,12 @@ details_activated (GSimpleAction *action,
if (search != NULL && search[0] != '\0')
gs_shell_show_search_result (app->shell, id, search);
else {
- if (as_utils_unique_id_valid (id)) {
- g_autoptr (GsApp) a = NULL;
+ g_autoptr (GsApp) a = NULL;
+ if (as_utils_unique_id_valid (id))
a = gs_plugin_loader_app_create (app->plugin_loader, id);
- gs_shell_show_app (app->shell, a);
- } else {
- g_autofree gchar *id_fn = g_strdup (id);
- gchar *str = g_strrstr (id_fn, ".desktop");
- if (str != NULL)
- *str = '\0';
- gs_shell_show_search (app->shell, id_fn);
- }
+ else
+ a = gs_app_new (id);
+ gs_shell_show_app (app->shell, a);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]