[sysprof/wip/chergert/sysprof-3] libsysprof-ui: load counters if we discover the feature
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/sysprof-3] libsysprof-ui: load counters if we discover the feature
- Date: Tue, 14 May 2019 02:20:36 +0000 (UTC)
commit fd071b3a773b31dedb443949d4c7b6d52d7ad23e
Author: Christian Hergert <chergert redhat com>
Date: Mon May 13 19:14:47 2019 -0700
libsysprof-ui: load counters if we discover the feature
src/libsysprof-ui/sysprof-capture-view.c | 9 +++++++++
src/libsysprof-ui/ui/sysprof-capture-view.ui | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/src/libsysprof-ui/sysprof-capture-view.c b/src/libsysprof-ui/sysprof-capture-view.c
index 5d2b903..b8900d3 100644
--- a/src/libsysprof-ui/sysprof-capture-view.c
+++ b/src/libsysprof-ui/sysprof-capture-view.c
@@ -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] =
diff --git a/src/libsysprof-ui/ui/sysprof-capture-view.ui b/src/libsysprof-ui/ui/sysprof-capture-view.ui
index 16860c8..94805c9 100644
--- a/src/libsysprof-ui/ui/sysprof-capture-view.ui
+++ b/src/libsysprof-ui/ui/sysprof-capture-view.ui
@@ -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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]