sysprof: add scrubber to marks page

This commit is contained in:
Christian Hergert
2023-07-12 18:02:22 -07:00
parent 52090e1f77
commit af5e62a7ef
2 changed files with 50 additions and 3 deletions

View File

@ -29,7 +29,7 @@ struct _SysprofMarksSection
SysprofSection parent_instance;
SysprofMarkChart *mark_chart;
//SysprofMarkTable *mark_table;
SysprofMarkTable *mark_table;
};
G_DEFINE_FINAL_TYPE (SysprofMarksSection, sysprof_marks_section, SYSPROF_TYPE_SECTION)
@ -54,11 +54,14 @@ sysprof_marks_section_class_init (SysprofMarksSectionClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/sysprof-marks-section.ui");
gtk_widget_class_bind_template_child (widget_class, SysprofMarksSection, mark_chart);
//gtk_widget_class_bind_template_child (widget_class, SysprofMarksSection, mark_table);
gtk_widget_class_bind_template_child (widget_class, SysprofMarksSection, mark_table);
g_type_ensure (SYSPROF_TYPE_CHART);
g_type_ensure (SYSPROF_TYPE_DOCUMENT_MARK);
g_type_ensure (SYSPROF_TYPE_MARK_CHART);
g_type_ensure (SYSPROF_TYPE_MARK_TABLE);
g_type_ensure (SYSPROF_TYPE_TIME_SERIES);
g_type_ensure (SYSPROF_TYPE_TIME_SPAN_LAYER);
}
static void
@ -66,4 +69,3 @@ sysprof_marks_section_init (SysprofMarksSection *self)
{
gtk_widget_init_template (GTK_WIDGET (self));
}

View File

@ -5,6 +5,51 @@
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="SysprofTimeScrubber" id="scrubber">
<binding name="session">
<lookup name="session">SysprofMarksSection</lookup>
</binding>
<child type="chart">
<object class="SysprofChart">
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="height-request">20</property>
<child>
<object class="SysprofTimeSpanLayer">
<property name="title">Marks</property>
<binding name="axis">
<lookup name="visible-time-axis" type="SysprofSession">
<lookup name="session">SysprofMarksSection</lookup>
</lookup>
</binding>
<property name="series">
<object class="SysprofTimeSeries">
<binding name="model">
<lookup name="marks" type="SysprofDocument">
<lookup name="document" type="SysprofSession">
<lookup name="session">SysprofMarksSection</lookup>
</lookup>
</lookup>
</binding>
<property name="begin-time-expression">
<lookup name="time" type="SysprofDocumentFrame"/>
</property>
<property name="end-time-expression">
<lookup name="end-time" type="SysprofDocumentMark"/>
</property>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
</object>
</child>
<child>
<object class="AdwViewStack" id="stack">
<property name="vexpand">true</property>