[gnome-software] Invalidate the update list if any applications are added or removed



commit 9d108ca2be18cfc637d9b545955fc139f6058702
Author: Richard Hughes <richard hughsie com>
Date:   Thu Aug 22 18:19:26 2013 +0100

    Invalidate the update list if any applications are added or removed

 src/gs-shell-updates.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-updates.c b/src/gs-shell-updates.c
index 817111c..0140b3d 100644
--- a/src/gs-shell-updates.c
+++ b/src/gs-shell-updates.c
@@ -362,6 +362,16 @@ gs_shell_updates_button_back_cb (GtkWidget *widget, GsShellUpdates *shell_update
 }
 
 /**
+ * gs_shell_updates_pending_apps_changed_cb:
+ */
+static void
+gs_shell_updates_pending_apps_changed_cb (GsPluginLoader *plugin_loader,
+                                         GsShellUpdates *shell_updates)
+{
+       gs_shell_updates_invalidate (shell_updates);
+}
+
+/**
  * gs_shell_updates_setup:
  */
 void
@@ -378,6 +388,9 @@ gs_shell_updates_setup (GsShellUpdates *shell_updates,
        g_return_if_fail (GS_IS_SHELL_UPDATES (shell_updates));
 
        priv->plugin_loader = g_object_ref (plugin_loader);
+       g_signal_connect (priv->plugin_loader, "pending-apps-changed",
+                         G_CALLBACK (gs_shell_updates_pending_apps_changed_cb),
+                         shell_updates);
        priv->builder = g_object_ref (builder);
 
        /* setup updates */


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