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



commit 44004883dcd72925f86ff9c2ac84b508cbd8d3a1
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 c8ead9a..ca17561 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -363,11 +363,20 @@ remove_button_cb (GtkWidget *widget, GsSourcesDialog *dialog)
 }
 
 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]