[sysprof/wip/gtk4-port: 32/125] display: inherit from GtkWidget
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/gtk4-port: 32/125] display: inherit from GtkWidget
- Date: Fri, 29 Oct 2021 02:02:31 +0000 (UTC)
commit 91fdbeea7ae5a7d377df5e50af7ebca3743eea26
Author: Christian Hergert <chergert redhat com>
Date: Tue Sep 28 14:21:57 2021 -0700
display: inherit from GtkWidget
src/libsysprof-ui/sysprof-display.c | 3 ++-
src/libsysprof-ui/sysprof-display.h | 4 ++--
src/libsysprof-ui/sysprof-display.ui | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-display.c b/src/libsysprof-ui/sysprof-display.c
index bc968bdb..415d3fc6 100644
--- a/src/libsysprof-ui/sysprof-display.c
+++ b/src/libsysprof-ui/sysprof-display.c
@@ -71,7 +71,7 @@ typedef struct
SysprofCaptureFlags flags;
} SysprofDisplayPrivate;
-G_DEFINE_TYPE_WITH_PRIVATE (SysprofDisplay, sysprof_display, GTK_TYPE_BIN)
+G_DEFINE_TYPE_WITH_PRIVATE (SysprofDisplay, sysprof_display, GTK_TYPE_WIDGET)
enum {
PROP_0,
@@ -452,6 +452,7 @@ sysprof_display_class_init (SysprofDisplayClass *klass)
"/org/gnome/sysprof/css/SysprofDisplay-shared.css");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-display.ui");
+ gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_css_name (widget_class, "SysprofDisplay");
gtk_widget_class_bind_template_child_private (widget_class, SysprofDisplay, assistant);
gtk_widget_class_bind_template_child_private (widget_class, SysprofDisplay, details);
diff --git a/src/libsysprof-ui/sysprof-display.h b/src/libsysprof-ui/sysprof-display.h
index b228179b..16cd9f55 100644
--- a/src/libsysprof-ui/sysprof-display.h
+++ b/src/libsysprof-ui/sysprof-display.h
@@ -32,11 +32,11 @@ G_BEGIN_DECLS
#define SYSPROF_TYPE_DISPLAY (sysprof_display_get_type())
SYSPROF_AVAILABLE_IN_ALL
-G_DECLARE_DERIVABLE_TYPE (SysprofDisplay, sysprof_display, SYSPROF, DISPLAY, GtkBin)
+G_DECLARE_DERIVABLE_TYPE (SysprofDisplay, sysprof_display, SYSPROF, DISPLAY, GtkWidget)
struct _SysprofDisplayClass
{
- GtkBinClass parent_class;
+ GtkWidgetClass parent_class;
/*< private >*/
gpointer _reserved[16];
diff --git a/src/libsysprof-ui/sysprof-display.ui b/src/libsysprof-ui/sysprof-display.ui
index 8ab984c6..95bd6723 100644
--- a/src/libsysprof-ui/sysprof-display.ui
+++ b/src/libsysprof-ui/sysprof-display.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <template class="SysprofDisplay" parent="GtkBin">
+ <template class="SysprofDisplay" parent="GtkWidget">
<child>
<object class="GtkStack" id="stack">
<property name="homogeneous">false</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]