diff --git a/src/libsysprof-ui/sysprof-capture-view.c b/src/libsysprof-ui/sysprof-capture-view.c index 9bc40976..39a447a1 100644 --- a/src/libsysprof-ui/sysprof-capture-view.c +++ b/src/libsysprof-ui/sysprof-capture-view.c @@ -434,16 +434,13 @@ sysprof_capture_view_load_scan_cb (GObject *object, if (priv->features.has_counters || priv->features.has_marks) sysprof_visualizer_view_set_reader (priv->visualizer_view, state->reader); - if (priv->features.has_marks) - { - state->n_active++; - sysprof_marks_view_load_async (priv->marks_view, - state->reader, - state->selection, - g_task_get_cancellable (task), - sysprof_capture_view_load_marks_cb, - g_object_ref (task)); - } + state->n_active++; + sysprof_marks_view_load_async (priv->marks_view, + state->reader, + state->selection, + g_task_get_cancellable (task), + sysprof_capture_view_load_marks_cb, + g_object_ref (task)); sysprof_details_view_set_reader (priv->details_view, priv->reader); diff --git a/src/libsysprof-ui/sysprof-marks-view.c b/src/libsysprof-ui/sysprof-marks-view.c index 1e720d13..0175d9d1 100644 --- a/src/libsysprof-ui/sysprof-marks-view.c +++ b/src/libsysprof-ui/sysprof-marks-view.c @@ -39,6 +39,7 @@ typedef struct GtkTreeView *tree_view; GtkTreeViewColumn *duration_column; SysprofCellRendererDuration *duration_cell; + GtkStack *stack; } SysprofMarksViewPrivate; enum { @@ -216,6 +217,7 @@ sysprof_marks_view_class_init (SysprofMarksViewClass *klass) gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksView, tree_view); gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksView, duration_cell); gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksView, duration_column); + gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksView, stack); properties [PROP_ZOOM_MANAGER] = g_param_spec_object ("zoom-manager", NULL, NULL, @@ -291,6 +293,11 @@ sysprof_marks_view_load_cb (GObject *object, gtk_tree_view_set_model (priv->tree_view, GTK_TREE_MODEL (model)); + if (gtk_tree_model_iter_n_children (GTK_TREE_MODEL (model), NULL) == 0) + gtk_stack_set_visible_child_name (priv->stack, "empty-state"); + else + gtk_stack_set_visible_child_name (priv->stack, "marks"); + g_task_return_boolean (task, TRUE); } diff --git a/src/libsysprof-ui/ui/sysprof-marks-view.ui b/src/libsysprof-ui/ui/sysprof-marks-view.ui index 3a156859..06fafcbf 100644 --- a/src/libsysprof-ui/ui/sysprof-marks-view.ui +++ b/src/libsysprof-ui/ui/sysprof-marks-view.ui @@ -2,82 +2,101 @@