mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof: clear column view models before chaining up dispose
This works around an issue caused by GNOME/gtk!6758 which has caused an infloop of warnings trying to cleanup GtkColumnView.
This commit is contained in:
@ -339,6 +339,15 @@ sysprof_callgraph_view_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
SysprofCallgraphView *self = (SysprofCallgraphView *)object;
|
SysprofCallgraphView *self = (SysprofCallgraphView *)object;
|
||||||
|
|
||||||
|
if (self->functions_column_view)
|
||||||
|
gtk_column_view_set_model (self->functions_column_view, NULL);
|
||||||
|
|
||||||
|
if (self->callers_column_view)
|
||||||
|
gtk_column_view_set_model (self->callers_column_view, NULL);
|
||||||
|
|
||||||
|
if (self->descendants_column_view)
|
||||||
|
gtk_column_view_set_model (self->descendants_column_view, NULL);
|
||||||
|
|
||||||
if (self->traceables_signals)
|
if (self->traceables_signals)
|
||||||
{
|
{
|
||||||
g_signal_group_set_target (self->traceables_signals, NULL);
|
g_signal_group_set_target (self->traceables_signals, NULL);
|
||||||
|
|||||||
@ -36,6 +36,7 @@ struct _SysprofCpuSection
|
|||||||
|
|
||||||
SysprofTimeScrubber *scrubber;
|
SysprofTimeScrubber *scrubber;
|
||||||
GtkColumnView *column_view;
|
GtkColumnView *column_view;
|
||||||
|
GtkColumnView *cpu_column_view;
|
||||||
GtkColumnViewColumn *time_column;
|
GtkColumnViewColumn *time_column;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -46,6 +47,12 @@ sysprof_cpu_section_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
SysprofCpuSection *self = (SysprofCpuSection *)object;
|
SysprofCpuSection *self = (SysprofCpuSection *)object;
|
||||||
|
|
||||||
|
if (self->column_view)
|
||||||
|
gtk_column_view_set_model (self->column_view, NULL);
|
||||||
|
|
||||||
|
if (self->cpu_column_view)
|
||||||
|
gtk_column_view_set_model (self->cpu_column_view, NULL);
|
||||||
|
|
||||||
gtk_widget_dispose_template (GTK_WIDGET (self), SYSPROF_TYPE_CPU_SECTION);
|
gtk_widget_dispose_template (GTK_WIDGET (self), SYSPROF_TYPE_CPU_SECTION);
|
||||||
|
|
||||||
G_OBJECT_CLASS (sysprof_cpu_section_parent_class)->dispose (object);
|
G_OBJECT_CLASS (sysprof_cpu_section_parent_class)->dispose (object);
|
||||||
@ -61,6 +68,7 @@ sysprof_cpu_section_class_init (SysprofCpuSectionClass *klass)
|
|||||||
|
|
||||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/sysprof-cpu-section.ui");
|
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/sysprof-cpu-section.ui");
|
||||||
gtk_widget_class_bind_template_child (widget_class, SysprofCpuSection, column_view);
|
gtk_widget_class_bind_template_child (widget_class, SysprofCpuSection, column_view);
|
||||||
|
gtk_widget_class_bind_template_child (widget_class, SysprofCpuSection, cpu_column_view);
|
||||||
gtk_widget_class_bind_template_child (widget_class, SysprofCpuSection, scrubber);
|
gtk_widget_class_bind_template_child (widget_class, SysprofCpuSection, scrubber);
|
||||||
gtk_widget_class_bind_template_child (widget_class, SysprofCpuSection, time_column);
|
gtk_widget_class_bind_template_child (widget_class, SysprofCpuSection, time_column);
|
||||||
|
|
||||||
|
|||||||
@ -113,6 +113,9 @@ sysprof_network_section_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
SysprofNetworkSection *self = (SysprofNetworkSection *)object;
|
SysprofNetworkSection *self = (SysprofNetworkSection *)object;
|
||||||
|
|
||||||
|
if (self->column_view != NULL)
|
||||||
|
gtk_column_view_set_model (self->column_view, NULL);
|
||||||
|
|
||||||
gtk_widget_dispose_template (GTK_WIDGET (self), SYSPROF_TYPE_NETWORK_SECTION);
|
gtk_widget_dispose_template (GTK_WIDGET (self), SYSPROF_TYPE_NETWORK_SECTION);
|
||||||
|
|
||||||
g_clear_object (&self->pairs);
|
g_clear_object (&self->pairs);
|
||||||
|
|||||||
Reference in New Issue
Block a user