[gnome-builder] build-manager: notify of pipeline changes



commit f135fa69859d3b84bd826ce7ef018c1e802d4e15
Author: Christian Hergert <chergert redhat com>
Date:   Tue Feb 21 00:07:40 2017 -0800

    build-manager: notify of pipeline changes
    
    This makes it easier to know when the current runtime is changing because
    you can just watch the buildmanager::pipeline for updates.

 libide/buildsystem/ide-build-manager.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-manager.c b/libide/buildsystem/ide-build-manager.c
index 737aaad..9ea3dca 100644
--- a/libide/buildsystem/ide-build-manager.c
+++ b/libide/buildsystem/ide-build-manager.c
@@ -61,6 +61,7 @@ enum {
   PROP_HAS_DIAGNOSTICS,
   PROP_LAST_BUILD_TIME,
   PROP_MESSAGE,
+  PROP_PIPELINE,
   PROP_RUNNING_TIME,
   N_PROPS
 };
@@ -263,6 +264,8 @@ ide_build_manager_ensure_runtime_cb (GObject      *object,
       IDE_GOTO (failure);
     }
 
+  g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_PIPELINE]);
+
   IDE_EXIT;
 
 failure:
@@ -469,6 +472,10 @@ ide_build_manager_get_property (GObject    *object,
       g_value_set_boolean (value, self->diagnostic_count > 0);
       break;
 
+    case PROP_PIPELINE:
+      g_value_set_object (value, self->pipeline);
+      break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     }
@@ -537,6 +544,13 @@ ide_build_manager_class_init (IdeBuildManagerClass *klass)
                          NULL,
                          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
 
+  properties [PROP_PIPELINE] =
+    g_param_spec_object ("pipeline",
+                         "Pipeline",
+                         "The build pipeline",
+                         IDE_TYPE_BUILD_PIPELINE,
+                         (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
   /**
    * IdeBuildManager:running-time:
    *


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