libsysprof-ui: load counters if we discover the feature

This commit is contained in:
Christian Hergert
2019-05-13 19:14:47 -07:00
parent af6c392ecc
commit c3ad0051ff
2 changed files with 10 additions and 1 deletions

View File

@ -25,6 +25,7 @@
#include "sysprof-callgraph-view.h"
#include "sysprof-capture-view.h"
#include "sysprof-marks-view.h"
#include "sysprof-visualizer-view.h"
#include "sysprof-zoom-manager.h"
typedef struct
@ -46,6 +47,7 @@ typedef struct
/* Template Objects */
SysprofCallgraphView *callgraph_view;
SysprofMarksView *marks_view;
SysprofVisualizerView *visualizer_view;
SysprofZoomManager *zoom_manager;
guint busy;
@ -372,6 +374,12 @@ sysprof_capture_view_load_scan_cb (GObject *object,
g_object_ref (task));
}
if (priv->features.has_counters)
{
state->n_active++;
sysprof_visualizer_view_set_reader (priv->visualizer_view, state->reader);
}
if (state->n_active == 0)
g_task_return_boolean (task, TRUE);
}
@ -492,6 +500,7 @@ sysprof_capture_view_class_init (SysprofCaptureViewClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-capture-view.ui");
gtk_widget_class_bind_template_child_private (widget_class, SysprofCaptureView, callgraph_view);
gtk_widget_class_bind_template_child_private (widget_class, SysprofCaptureView, marks_view);
gtk_widget_class_bind_template_child_private (widget_class, SysprofCaptureView, visualizer_view);
gtk_widget_class_bind_template_child_private (widget_class, SysprofCaptureView, zoom_manager);
properties [PROP_BUSY] =

View File

@ -27,7 +27,7 @@
<property name="orientation">vertical</property>
<property name="visible">true</property>
<child>
<object class="SysprofVisualizerView" id="visualizers">
<object class="SysprofVisualizerView" id="visualizer_view">
<property name="visible">true</property>
</object>
</child>