[sysprof/wip/gtk4-port: 43/132] detailspage: port to GTK 4




commit 1fae5f77620eb68a103935a84c03723eb7b6c4d4
Author: Christian Hergert <chergert redhat com>
Date:   Tue Sep 28 16:02:09 2021 -0700

    detailspage: port to GTK 4

 src/libsysprof-ui/sysprof-details-page.c  | 5 +++--
 src/libsysprof-ui/sysprof-details-page.h  | 2 +-
 src/libsysprof-ui/sysprof-details-page.ui | 4 +---
 3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-details-page.c b/src/libsysprof-ui/sysprof-details-page.c
index f62d1c79..0ec566e6 100644
--- a/src/libsysprof-ui/sysprof-details-page.c
+++ b/src/libsysprof-ui/sysprof-details-page.c
@@ -32,7 +32,7 @@
 
 struct _SysprofDetailsPage
 {
-  SysprofPage   parent_instance;
+  GtkWidget     parent_instance;
 
   /* Template Objects */
   EggThreeGrid *three_grid;
@@ -52,7 +52,7 @@ struct _SysprofDetailsPage
   guint         next_row;
 };
 
-G_DEFINE_TYPE (SysprofDetailsPage, sysprof_details_page, GTK_TYPE_BIN)
+G_DEFINE_TYPE (SysprofDetailsPage, sysprof_details_page, GTK_TYPE_WIDGET)
 
 #if GLIB_CHECK_VERSION(2, 56, 0)
 # define _g_date_time_new_from_iso8601 g_date_time_new_from_iso8601
@@ -83,6 +83,7 @@ sysprof_details_page_class_init (SysprofDetailsPageClass *klass)
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/sysprof/ui/sysprof-details-page.ui");
+  gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
   gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, allocations);
   gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, counters);
   gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, cpu_label);
diff --git a/src/libsysprof-ui/sysprof-details-page.h b/src/libsysprof-ui/sysprof-details-page.h
index 251bbe56..21a5e518 100644
--- a/src/libsysprof-ui/sysprof-details-page.h
+++ b/src/libsysprof-ui/sysprof-details-page.h
@@ -39,7 +39,7 @@ SYSPROF_ALIGNED_END (8);
 
 #define SYSPROF_TYPE_DETAILS_PAGE (sysprof_details_page_get_type())
 
-G_DECLARE_FINAL_TYPE (SysprofDetailsPage, sysprof_details_page, SYSPROF, DETAILS_PAGE, GtkBin)
+G_DECLARE_FINAL_TYPE (SysprofDetailsPage, sysprof_details_page, SYSPROF, DETAILS_PAGE, GtkWidget)
 
 GtkWidget *sysprof_details_page_new        (void);
 void       sysprof_details_page_set_reader (SysprofDetailsPage    *self,
diff --git a/src/libsysprof-ui/sysprof-details-page.ui b/src/libsysprof-ui/sysprof-details-page.ui
index e49f1d1e..2e803b22 100644
--- a/src/libsysprof-ui/sysprof-details-page.ui
+++ b/src/libsysprof-ui/sysprof-details-page.ui
@@ -1,8 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.0 -->
 <interface>
-  <requires lib="gtk+" version="3.22"/>
-  <template class="SysprofDetailsPage" parent="GtkBin">
+  <template class="SysprofDetailsPage" parent="GtkWidget">
     <property name="can_focus">False</property>
     <child>
       <object class="GtkScrolledWindow">


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