[gnome-software] sources dialog: Reload the list of repos when packages are added / removed



commit 16730e6d5296475aea6e3834b1dce357e6e0d06a
Author: Kalev Lember <kalevlember gmail com>
Date:   Mon May 25 22:22:34 2015 +0200

    sources dialog: Reload the list of repos when packages are added / removed
    
    This makes sure that when someone installs or removes a package
    containing a .repo file, the sources dialog reloads its contents.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730456

 src/gs-sources-dialog.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-sources-dialog.c b/src/gs-sources-dialog.c
index 63b2c58..6985a9b 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -399,11 +399,20 @@ get_os_name (void)
 }
 
 static void
+updates_changed_cb (GsPluginLoader *plugin_loader,
+                    GsSourcesDialog *dialog)
+{
+       reload_sources (dialog);
+}
+
+static void
 set_plugin_loader (GsSourcesDialog *dialog, GsPluginLoader *plugin_loader)
 {
        GsSourcesDialogPrivate *priv = gs_sources_dialog_get_instance_private (dialog);
 
        priv->plugin_loader = g_object_ref (plugin_loader);
+       g_signal_connect (priv->plugin_loader, "updates-changed",
+                         G_CALLBACK (updates_changed_cb), dialog);
 }
 
 static void


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