[sysprof/wip/gtk4-port: 48/131] recordingstateview: port to GTK 4




commit c6da3d3898a2e6230a94d935cae75eabcae38d46
Author: Christian Hergert <chergert redhat com>
Date:   Tue Sep 28 17:14:53 2021 -0700

    recordingstateview: port to GTK 4

 src/libsysprof-ui/sysprof-recording-state-view.c  | 3 ++-
 src/libsysprof-ui/sysprof-recording-state-view.h  | 6 ++----
 src/libsysprof-ui/sysprof-recording-state-view.ui | 2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-recording-state-view.c 
b/src/libsysprof-ui/sysprof-recording-state-view.c
index dafecf1e..1e2ecebf 100644
--- a/src/libsysprof-ui/sysprof-recording-state-view.c
+++ b/src/libsysprof-ui/sysprof-recording-state-view.c
@@ -31,7 +31,7 @@ typedef struct
   gulong            notify_elapsed_handler;
 } SysprofRecordingStateViewPrivate;
 
-G_DEFINE_TYPE_WITH_PRIVATE (SysprofRecordingStateView, sysprof_recording_state_view, GTK_TYPE_BIN)
+G_DEFINE_TYPE_WITH_PRIVATE (SysprofRecordingStateView, sysprof_recording_state_view, GTK_TYPE_WIDGET)
 
 enum {
   PROP_0,
@@ -153,6 +153,7 @@ sysprof_recording_state_view_class_init (SysprofRecordingStateViewClass *klass)
   g_object_class_install_properties (object_class, N_PROPS, properties);
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/sysprof/ui/sysprof-recording-state-view.ui");
+  gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
   gtk_widget_class_bind_template_child_private (widget_class, SysprofRecordingStateView, elapsed);
   gtk_widget_class_bind_template_child_private (widget_class, SysprofRecordingStateView, samples);
 
diff --git a/src/libsysprof-ui/sysprof-recording-state-view.h 
b/src/libsysprof-ui/sysprof-recording-state-view.h
index ffc149cf..b53481f4 100644
--- a/src/libsysprof-ui/sysprof-recording-state-view.h
+++ b/src/libsysprof-ui/sysprof-recording-state-view.h
@@ -27,13 +27,11 @@ G_BEGIN_DECLS
 
 #define SYSPROF_TYPE_RECORDING_STATE_VIEW (sysprof_recording_state_view_get_type())
 
-G_DECLARE_DERIVABLE_TYPE (SysprofRecordingStateView, sysprof_recording_state_view, SYSPROF, 
RECORDING_STATE_VIEW, GtkBin)
+G_DECLARE_DERIVABLE_TYPE (SysprofRecordingStateView, sysprof_recording_state_view, SYSPROF, 
RECORDING_STATE_VIEW, GtkWidget)
 
 struct _SysprofRecordingStateViewClass
 {
-  GtkBinClass parent;
-
-  gpointer padding[4];
+  GtkWidgetClass parent;
 };
 
 GtkWidget *sysprof_recording_state_view_new          (void);
diff --git a/src/libsysprof-ui/sysprof-recording-state-view.ui 
b/src/libsysprof-ui/sysprof-recording-state-view.ui
index 08f06ae1..4bfccf89 100644
--- a/src/libsysprof-ui/sysprof-recording-state-view.ui
+++ b/src/libsysprof-ui/sysprof-recording-state-view.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <interface>
-  <template class="SysprofRecordingStateView" parent="GtkBin">
+  <template class="SysprofRecordingStateView" parent="GtkWidget">
     <child>
       <object class="GtkBox">
         <property name="width-request">500</property>


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