[gnome-software] trivial: Go back to the overview page if the file or URL failed to be converted



commit 495a8e254ae942018af596639c97d086e236f1b4
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jul 10 10:37:07 2017 +0100

    trivial: Go back to the overview page if the file or URL failed to be converted

 src/gs-details-page.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 41366d4..a65a502 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1534,6 +1534,8 @@ gs_details_page_file_to_app_cb (GObject *source,
                                                    &error);
        if (list == NULL) {
                g_warning ("failed to convert file to GsApp: %s", error->message);
+               /* go back to the overview */
+               gs_shell_change_mode (self->shell, GS_SHELL_MODE_OVERVIEW, NULL, FALSE);
        } else {
                GsApp *app = gs_app_list_index (list, 0);
                set_app (self, app);
@@ -1555,6 +1557,8 @@ gs_details_page_url_to_app_cb (GObject *source,
                                                    &error);
        if (list == NULL) {
                g_warning ("failed to convert URL to GsApp: %s", error->message);
+               /* go back to the overview */
+               gs_shell_change_mode (self->shell, GS_SHELL_MODE_OVERVIEW, NULL, FALSE);
        } else {
                GsApp *app = gs_app_list_index (list, 0);
                set_app (self, app);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]