[gnome-builder] buildui: show build panel when build starts



commit 542014dd00b0ea53d7c3f67852951f4551752427
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jan 20 22:24:38 2018 -0800

    buildui: show build panel when build starts
    
    I'm still not sure if we want to do this unconditionally in the long term,
    but this is probably fine for now.
    
    My concern long term is that we might get into a situation where the user
    had another panel of importance open and keeps getting ping-pong'd away
    from it.
    
    But until our panel system is a bit more complex, this is likely a fine
    solution.

 src/libide/buildui/ide-build-workbench-addin.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/libide/buildui/ide-build-workbench-addin.c b/src/libide/buildui/ide-build-workbench-addin.c
index 3c740840c..9013cc326 100644
--- a/src/libide/buildui/ide-build-workbench-addin.c
+++ b/src/libide/buildui/ide-build-workbench-addin.c
@@ -68,14 +68,15 @@ ide_build_workbench_addin_set_pipeline (IdeBuildWorkbenchAddin *self,
   if (g_set_object (&self->pipeline, pipeline))
     {
       ide_build_log_panel_set_pipeline (self->build_log_panel, pipeline);
+      g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_PIPELINE]);
+    }
 
-      if (!gtk_widget_get_visible (GTK_WIDGET (self->build_log_panel)))
-        {
-          gtk_widget_show (GTK_WIDGET (self->build_log_panel));
-          dzl_dock_item_present (DZL_DOCK_ITEM (self->build_log_panel));
-        }
+  if (pipeline != NULL)
+    {
+      gtk_widget_show (GTK_WIDGET (self->build_log_panel));
 
-      g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_PIPELINE]);
+      if (ide_build_pipeline_get_requested_phase (pipeline) >= IDE_BUILD_PHASE_BUILD)
+        dzl_dock_item_present (DZL_DOCK_ITEM (self->build_log_panel));
     }
 }
 


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