--- a/demo/data/demo.ui Thu Feb 03 20:20:40 2022 -0600
+++ b/demo/data/demo.ui Thu Feb 03 20:31:33 2022 -0600
@@ -34,11 +34,13 @@
<property name="wide-handle">1</property>
<object class="TalkatuScrolledWindow">
- <object class="TalkatuHistory" id="history">
- <property name="name">history</property>
- <property name="hexpand-set">True</property>
- <property name="vexpand-set">True</property>
+ <child internal-child="scrolled_window"> + <object class="GtkScrolledWindow" id="scrolled_window"> + <object class="TalkatuHistory" id="history"> + <property name="name">history</property> --- a/talkatu/data/scrolledwindow.ui Thu Feb 03 20:20:40 2022 -0600
+++ b/talkatu/data/scrolledwindow.ui Thu Feb 03 20:31:33 2022 -0600
@@ -5,11 +5,11 @@
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="vexpand">1</property>
+ <property name="hexpand">1</property> <property name="focusable">1</property>
<property name="vadjustment">vadjustment</property>
+ <property name="min-content-height">150</property> + <property name="vscrollbar-policy">2</property> --- a/talkatu/talkatuscrolledwindow.c Thu Feb 03 20:20:40 2022 -0600
+++ b/talkatu/talkatuscrolledwindow.c Thu Feb 03 20:31:33 2022 -0600
@@ -76,31 +76,6 @@
/******************************************************************************
- * GtkBuildable Implementation
- *****************************************************************************/
-static GtkBuildableIface *parent_buildable_iface = NULL;
-talkatu_scrolled_window_build_add_child(GtkBuildable *buildable,
- GtkBuilder *builder, GObject *child,
- if(GTK_IS_WIDGET(child)) {
- talkatu_scrolled_window_set_child(TALKATU_SCROLLED_WINDOW(buildable),
- parent_buildable_iface->add_child(buildable, builder, child, type);
-talkatu_scrolled_window_buildable_init(GtkBuildableIface *iface) {
- parent_buildable_iface = g_type_interface_peek_parent(iface);
- iface->add_child = talkatu_scrolled_window_build_add_child;
-/******************************************************************************
*****************************************************************************/
G_DEFINE_TYPE(TalkatuScrolledWindow, talkatu_scrolled_window, GTK_TYPE_WIDGET)
@@ -138,6 +113,15 @@
+talkatu_scrolled_window_dispose(GObject *obj) { + TalkatuScrolledWindow *sw = TALKATU_SCROLLED_WINDOW(obj); + g_clear_pointer(&sw->scrolled_window, gtk_widget_unparent); + G_OBJECT_CLASS(talkatu_scrolled_window_parent_class)->dispose(obj); talkatu_scrolled_window_init(TalkatuScrolledWindow *sw) {
gtk_widget_init_template(GTK_WIDGET(sw));
@@ -151,6 +135,7 @@
obj_class->get_property = tatlkatu_scrolled_window_get_property;
obj_class->set_property = tatlkatu_scrolled_window_set_property;
+ obj_class->dispose = talkatu_scrolled_window_dispose; * TalkatuScrolledWindow::child:
@@ -170,8 +155,9 @@
"/org/imfreedom/keep/talkatu/talkatu/ui/scrolledwindow.ui"
- gtk_widget_class_bind_template_child(widget_class, TalkatuScrolledWindow,
+ gtk_widget_class_bind_template_child_internal(widget_class, gtk_widget_class_bind_template_child(widget_class, TalkatuScrolledWindow,