[sysprof/wip/gtk4-port: 35/125] cpuaid: port to GTK 4




commit 6ef3f6f267c43478e5eb3ad8ba27b271edaf5594
Author: Christian Hergert <chergert redhat com>
Date:   Tue Sep 28 16:02:01 2021 -0700

    cpuaid: port to GTK 4

 src/libsysprof-ui/sysprof-cpu-aid.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-cpu-aid.c b/src/libsysprof-ui/sysprof-cpu-aid.c
index 56094888..225b7a6c 100644
--- a/src/libsysprof-ui/sysprof-cpu-aid.c
+++ b/src/libsysprof-ui/sysprof-cpu-aid.c
@@ -221,7 +221,7 @@ sysprof_cpu_aid_present_finish (SysprofAid    *aid,
                                "y-lower", 0.0,
                                "y-upper", 100.0,
                                NULL);
-      gtk_container_add (GTK_CONTAINER (freq), GTK_WIDGET (freq_row));
+      sysprof_visualizer_group_insert (freq, freq_row, -1, FALSE);
 
       over_row = g_object_new (SYSPROF_TYPE_LINE_VISUALIZER,
                                "title", _("CPU Usage (All)"),
@@ -323,17 +323,17 @@ sysprof_cpu_aid_present_finish (SysprofAid    *aid,
       if (has_usage && !found_combined)
         sysprof_visualizer_group_insert (usage, over_row, 0, FALSE);
       else
-        gtk_widget_destroy (GTK_WIDGET (over_row));
+        g_object_unref (GTK_WIDGET (over_row));
 
       if (has_usage)
         sysprof_display_add_group (present->display, usage);
       else
-        gtk_widget_destroy (GTK_WIDGET (usage));
+        g_object_unref (GTK_WIDGET (usage));
 
       if (has_freq)
         sysprof_display_add_group (present->display, freq);
       else
-        gtk_widget_destroy (GTK_WIDGET (freq));
+        g_object_unref (GTK_WIDGET (freq));
     }
 
   return counters != NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]