libsysprof-gtk: add new SysprofTimeSeries

This is to replace what is in libsysprof-analyze currently, so we can do
charting in a more flexible manner.
This commit is contained in:
Christian Hergert
2023-06-23 21:51:00 -07:00
parent 5c2f4dc0a9
commit a75e8f1dae
7 changed files with 540 additions and 6 deletions

View File

@ -237,19 +237,19 @@ sysprof_xy_series_get_y_expression (SysprofXYSeries *self)
void
sysprof_xy_series_set_y_expression (SysprofXYSeries *self,
GtkExpression *x_expression)
GtkExpression *y_expression)
{
g_return_if_fail (SYSPROF_IS_XY_SERIES (self));
if (self->x_expression == x_expression)
if (self->y_expression == y_expression)
return;
if (x_expression)
gtk_expression_ref (x_expression);
if (y_expression)
gtk_expression_ref (y_expression);
g_clear_pointer (&self->x_expression, gtk_expression_unref);
g_clear_pointer (&self->y_expression, gtk_expression_unref);
self->x_expression = x_expression;
self->y_expression = y_expression;
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_X_EXPRESSION]);
}