File gnome-software-launch-gpk-update-viewer-for-updates.patch of Package gnome-software

Index: gnome-software-3.34.2/src/gs-application.c
===================================================================
--- gnome-software-3.34.2.orig/src/gs-application.c
+++ gnome-software-3.34.2/src/gs-application.c
@@ -511,20 +511,34 @@ set_mode_activated (GSimpleAction *actio
 	GsApplication *app = GS_APPLICATION (data);
 	const gchar *mode;
 
-	gs_application_present_window (app, NULL);
-
-	gs_shell_reset_state (app->shell);
-
 	mode = g_variant_get_string (parameter, NULL);
 	if (g_strcmp0 (mode, "updates") == 0) {
+		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);
+                }
 		gs_shell_set_mode (app->shell, GS_SHELL_MODE_UPDATES);
 	} else if (g_strcmp0 (mode, "installed") == 0) {
+		gs_application_present_window (app, NULL);
+		gs_shell_reset_state (app->shell);
 		gs_shell_set_mode (app->shell, GS_SHELL_MODE_INSTALLED);
 	} else if (g_strcmp0 (mode, "moderate") == 0) {
+		gs_application_present_window (app, NULL);
+		gs_shell_reset_state (app->shell);
 		gs_shell_set_mode (app->shell, GS_SHELL_MODE_MODERATE);
 	} else if (g_strcmp0 (mode, "overview") == 0) {
+		gs_application_present_window (app, NULL);
+		gs_shell_reset_state (app->shell);
 		gs_shell_set_mode (app->shell, GS_SHELL_MODE_OVERVIEW);
 	} else if (g_strcmp0 (mode, "updated") == 0) {
+		gs_application_present_window (app, NULL);
+		gs_shell_reset_state (app->shell);
 		gs_shell_set_mode (app->shell, GS_SHELL_MODE_UPDATES);
 		gs_shell_show_installed_updates (app->shell);
 	} else {
openSUSE Build Service is sponsored by