File gnome-software-launch-gpk-update-viewer-for-updates.patch of Package gnome-software.12676
Index: gnome-software-3.26.7/src/gs-application.c
===================================================================
--- gnome-software-3.26.7.orig/src/gs-application.c
+++ gnome-software-3.26.7/src/gs-application.c
@@ -492,18 +492,29 @@ set_mode_activated (GSimpleAction *actio
GsApplication *app = GS_APPLICATION (data);
const gchar *mode;
- initialize_ui_and_present_window (app, NULL);
-
mode = g_variant_get_string (parameter, NULL);
if (g_strcmp0 (mode, "updates") == 0) {
- gs_shell_set_mode (app->shell, GS_SHELL_MODE_UPDATES);
+ gboolean ret;
+ GError *error = NULL;
+
+ ret = g_spawn_command_line_async (BINDIR "/gpk-update-viewer",
+ &error);
+ if (!ret) {
+ g_warning ("Failure launching update viewer: %s",
+ error->message);
+ g_error_free (error);
+ }
} else if (g_strcmp0 (mode, "installed") == 0) {
+ initialize_ui_and_present_window (app, NULL);
gs_shell_set_mode (app->shell, GS_SHELL_MODE_INSTALLED);
} else if (g_strcmp0 (mode, "moderate") == 0) {
+ initialize_ui_and_present_window (app, NULL);
gs_shell_set_mode (app->shell, GS_SHELL_MODE_MODERATE);
} else if (g_strcmp0 (mode, "overview") == 0) {
+ initialize_ui_and_present_window (app, NULL);
gs_shell_set_mode (app->shell, GS_SHELL_MODE_OVERVIEW);
} else if (g_strcmp0 (mode, "updated") == 0) {
+ initialize_ui_and_present_window (app, NULL);
gs_shell_set_mode (app->shell, GS_SHELL_MODE_UPDATES);
gs_shell_show_installed_updates (app->shell);
} else {