[gnome-software/1486-gs-repos-dialog-call-refresh-on-repository-setup-change] gs-overview-page: Refresh the application after third-party repositories enable/disable



commit b1277d97ba4495de434eb3be4ea1f17b80ac1ef8
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 6 14:44:09 2021 +0200

    gs-overview-page: Refresh the application after third-party repositories enable/disable
    
    The enable/disable can cause other applications being found, thus call
    the refresh, to update the repositories information.

 src/gs-overview-page.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 9ba33fb2b..bcf02243d 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -13,6 +13,7 @@
 #include <handy.h>
 #include <math.h>
 
+#include "gs-application.h"
 #include "gs-shell.h"
 #include "gs-overview-page.h"
 #include "gs-app-list-private.h"
@@ -568,6 +569,8 @@ third_party_response_cb (GtkInfoBar *info_bar,
                          gint response_id,
                          GsOverviewPage *self)
 {
+       GApplication *application;
+
        if (response_id == GTK_RESPONSE_YES)
                fedora_third_party_enable (self);
        else
@@ -575,6 +578,10 @@ third_party_response_cb (GtkInfoBar *info_bar,
 
        self->third_party_needs_question = FALSE;
        refresh_third_party_repo (self);
+
+       application = g_application_get_default ();
+       if (application)
+               gs_application_refresh (GS_APPLICATION (application));
 }
 
 static gboolean


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