From 7599ab698e6b14ac1c54ea2dff6ba96280704da3 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 25 Jul 2023 19:49:41 -0700 Subject: [PATCH] sysprof: add counter values for network section --- src/sysprof/sysprof-network-section.c | 11 ++ src/sysprof/sysprof-network-section.ui | 191 ++++++++++++++++++++++++- 2 files changed, 201 insertions(+), 1 deletion(-) diff --git a/src/sysprof/sysprof-network-section.c b/src/sysprof/sysprof-network-section.c index 2ee044c7..d1b51f34 100644 --- a/src/sysprof/sysprof-network-section.c +++ b/src/sysprof/sysprof-network-section.c @@ -32,7 +32,11 @@ struct _SysprofNetworkSection { SysprofSection parent_instance; + GListStore *pairs; + + GtkColumnView *column_view; + GtkColumnViewColumn *time_column; }; G_DEFINE_FINAL_TYPE (SysprofNetworkSection, sysprof_network_section, SYSPROF_TYPE_SECTION) @@ -156,6 +160,9 @@ sysprof_network_section_class_init (SysprofNetworkSectionClass *klass) gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/sysprof-network-section.ui"); + gtk_widget_class_bind_template_child (widget_class, SysprofNetworkSection, column_view); + gtk_widget_class_bind_template_child (widget_class, SysprofNetworkSection, time_column); + g_type_ensure (SYSPROF_TYPE_CHART); g_type_ensure (SYSPROF_TYPE_DUPLEX_LAYER); g_type_ensure (SYSPROF_TYPE_PAIR); @@ -167,4 +174,8 @@ sysprof_network_section_init (SysprofNetworkSection *self) self->pairs = g_list_store_new (SYSPROF_TYPE_PAIR); gtk_widget_init_template (GTK_WIDGET (self)); + + gtk_column_view_sort_by_column (self->column_view, + self->time_column, + GTK_SORT_ASCENDING); } diff --git a/src/sysprof/sysprof-network-section.ui b/src/sysprof/sysprof-network-section.ui index 51287059..30f1af82 100644 --- a/src/sysprof/sysprof-network-section.ui +++ b/src/sysprof/sysprof-network-section.ui @@ -236,7 +236,196 @@ - + + + + + + + + column_view + + + + + + + + + + + + + exact + Network + + + + + + + + + SysprofNetworkSection + + + + + + + + + + + + + + + + Time + + + ascending + + + + + + + + + + + +]]> + + + + + + + + Category + + + + + + + + + + + + + + + +]]> + + + + + + + + Name + + + + + + + + + + + + + + + +]]> + + + + + + + + Value + + + + + + + + + + + + + +]]> + + + + +