[gnome-software] Make state change notification work



commit ecdab9623f2fd452f6194b34863f470a3d5f7221
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Sep 2 01:43:30 2013 -0400

    Make state change notification work

 src/gs-app.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 259067b..258c145 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -122,7 +122,10 @@ void
 gs_app_set_state (GsApp *app, GsAppState state)
 {
        g_return_if_fail (GS_IS_APP (app));
+        if (app->priv->state == state)
+                return;
        app->priv->state = state;
+        g_object_notify (G_OBJECT (app), "state");
        g_signal_emit (app, signals[SIGNAL_STATE_CHANGED], 0);
 }
 


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