[gnome-builder] pipeline: use terminal provided message when applicable
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] pipeline: use terminal provided message when applicable
- Date: Thu, 23 Nov 2017 11:44:23 +0000 (UTC)
commit 42006c6f59313d060cf073a05911f3ba28c2100b
Author: Christian Hergert <chergert redhat com>
Date: Thu Nov 23 03:21:48 2017 -0800
pipeline: use terminal provided message when applicable
If we got a message during the build stage, we want to use that instead
of our pre-canned messages.
src/libide/buildsystem/ide-build-pipeline.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/libide/buildsystem/ide-build-pipeline.c b/src/libide/buildsystem/ide-build-pipeline.c
index 99e32db..e18f40a 100644
--- a/src/libide/buildsystem/ide-build-pipeline.c
+++ b/src/libide/buildsystem/ide-build-pipeline.c
@@ -216,7 +216,7 @@ struct _IdeBuildPipeline
guint failed : 1;
/*
- * If we are within a built, this should be set.
+ * If we are within a build, this should be set.
*/
guint busy : 1;
@@ -1735,6 +1735,9 @@ ide_build_pipeline_do_flush (gpointer data)
self->position = -1;
self->in_clean = (task_data->type == TASK_CLEAN);
+ /* Clear any lingering message */
+ g_clear_pointer (&self->message, g_free);
+
/*
* The following logs some helpful information about the build to our
* debug log. This is useful to allow users to debug some problems
@@ -1798,6 +1801,7 @@ ide_build_pipeline_do_flush (gpointer data)
}
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_BUSY]);
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_MESSAGE]);
IDE_RETURN (G_SOURCE_REMOVE);
}
@@ -2498,6 +2502,10 @@ ide_build_pipeline_get_message (IdeBuildPipeline *self)
g_return_val_if_fail (IDE_IS_BUILD_PIPELINE (self), NULL);
+ /* Use any message the Pty has given us while building. */
+ if (self->busy && self->message != NULL)
+ return g_strdup (self->message);
+
if (self->in_clean)
return g_strdup (_("Cleaning…"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]