[gnome-builder/wip/chergert/visualizers: 19/19] sysprof: fix open profile after failed profiling session



commit 04c9e4b0b4c188268bba7fce3e35e5d11a657226
Author: Christian Hergert <chergert redhat com>
Date:   Mon Oct 10 01:43:47 2016 -0700

    sysprof: fix open profile after failed profiling session
    
    We could get in a state where we couldn't display the opened
    profile if we were already in a failed state from a previous
    run.

 plugins/sysprof/gbp-sysprof-perspective.c     |    4 ++++
 plugins/sysprof/gbp-sysprof-workbench-addin.c |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/sysprof/gbp-sysprof-perspective.c b/plugins/sysprof/gbp-sysprof-perspective.c
index dc74315..3044739 100644
--- a/plugins/sysprof/gbp-sysprof-perspective.c
+++ b/plugins/sysprof/gbp-sysprof-perspective.c
@@ -223,6 +223,10 @@ gbp_sysprof_perspective_set_profiler (GbpSysprofPerspective *self,
                                self,
                                G_CONNECT_SWAPPED);
     }
+  else
+    {
+      gtk_stack_set_visible_child_name (self->stack, "empty");
+    }
 }
 
 SpZoomManager *
diff --git a/plugins/sysprof/gbp-sysprof-workbench-addin.c b/plugins/sysprof/gbp-sysprof-workbench-addin.c
index c4b8398..7606bd7 100644
--- a/plugins/sysprof/gbp-sysprof-workbench-addin.c
+++ b/plugins/sysprof/gbp-sysprof-workbench-addin.c
@@ -221,6 +221,7 @@ gbp_sysprof_workbench_addin_open_cb (GObject      *object,
       return;
     }
 
+  gbp_sysprof_perspective_set_profiler (self->perspective, NULL);
   gbp_sysprof_perspective_set_reader (self->perspective, reader);
 
   gbp_sysprof_workbench_addin_update_controls (self);


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