--- glade3-3.8.6/gladeui/glade-command.c	2017-08-07 19:17:32.000000000 +0100
+++ glade3-3.8.6/gladeui/glade-command.c	2025-07-08 21:08:29.435781234 +0100
@@ -708,7 +708,7 @@
 		g_assert (G_IS_VALUE (nvalue));
 
 		sdata = g_new (GCSetPropData, 1);
-		sdata->property = g_object_ref (G_OBJECT (prop));
+		sdata->property = GLADE_PROPERTY (g_object_ref (G_OBJECT (prop)));
 		sdata->old_value = g_new0 (GValue, 1);
 		sdata->new_value = g_new0 (GValue, 1);
 		g_value_init (sdata->old_value, G_VALUE_TYPE (ovalue));
@@ -1015,7 +1015,7 @@
 			g_critical ("Internal widget in Add");
 
 		/* Widget */
-		cdata->widget = g_object_ref (G_OBJECT (widget));
+		cdata->widget = GLADE_WIDGET (g_object_ref (G_OBJECT (widget)));
 
 		/* Parentless ref */
 		if ((cdata->reffed = get_all_parentless_reffed_widgets (cdata->reffed, widget)) != NULL)
@@ -1188,7 +1188,7 @@
 		widget         = list->data;
 
 		cdata          = g_new0 (CommandData, 1);
-		cdata->widget  = g_object_ref (G_OBJECT (widget));
+		cdata->widget  = GLADE_WIDGET (g_object_ref (G_OBJECT (widget)));
 		cdata->parent  = glade_widget_get_parent (widget);
 		cdata->project = glade_widget_get_project (widget);
 
@@ -1548,7 +1548,7 @@
  	me = g_object_new(GLADE_COMMAND_CLIPBOARD_ADD_REMOVE_TYPE, NULL);
 	for (list = widgets; list && list->data; list = list->next)
 	{
- 		widget = g_object_ref(G_OBJECT(list->data));
+ 		widget = GLADE_WIDGET(g_object_ref(G_OBJECT(list->data)));
  		me->widgets = g_list_prepend (me->widgets, widget);
 	}
 	me->add = add;
--- glade3-3.8.6/gladeui/glade-marshallers.c	2017-08-07 20:33:40.000000000 +0100
+++ glade3-3.8.6/gladeui/glade-marshallers.c	2025-07-08 21:05:51.190448617 +0100
@@ -1,3 +1,4 @@
+/* This file is generated by glib-genmarshal, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */
 #include <glib-object.h>
 
 #ifdef G_ENABLE_DEBUG
@@ -48,6 +49,7 @@
 
 /* VOID:POINTER,POINTER (./glade-marshallers.list:1) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_VOID__POINTER_POINTER (GClosure     *closure,
                                           GValue       *return_value,
@@ -55,6 +57,7 @@
                                           const GValue *param_values,
                                           gpointer      invocation_hint,
                                           gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_VOID__POINTER_POINTER (GClosure     *closure,
                                      GValue       *return_value G_GNUC_UNUSED,
@@ -96,6 +99,7 @@
 
 /* VOID:STRING,ULONG,UINT,STRING (./glade-marshallers.list:3) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_VOID__STRING_ULONG_UINT_STRING (GClosure     *closure,
                                                    GValue       *return_value,
@@ -103,6 +107,7 @@
                                                    const GValue *param_values,
                                                    gpointer      invocation_hint,
                                                    gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_VOID__STRING_ULONG_UINT_STRING (GClosure     *closure,
                                               GValue       *return_value G_GNUC_UNUSED,
@@ -151,6 +156,7 @@
 
 /* VOID:INT,INT (./glade-marshallers.list:6) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_VOID__INT_INT (GClosure     *closure,
                                   GValue       *return_value,
@@ -158,6 +164,7 @@
                                   const GValue *param_values,
                                   gpointer      invocation_hint,
                                   gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_VOID__INT_INT (GClosure     *closure,
                              GValue       *return_value G_GNUC_UNUSED,
@@ -196,6 +203,7 @@
 
 /* VOID:OBJECT,OBJECT (./glade-marshallers.list:7) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_VOID__OBJECT_OBJECT (GClosure     *closure,
                                         GValue       *return_value,
@@ -203,6 +211,7 @@
                                         const GValue *param_values,
                                         gpointer      invocation_hint,
                                         gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_VOID__OBJECT_OBJECT (GClosure     *closure,
                                    GValue       *return_value G_GNUC_UNUSED,
@@ -241,6 +250,7 @@
 
 /* VOID:OBJECT,BOOLEAN (./glade-marshallers.list:8) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_VOID__OBJECT_BOOLEAN (GClosure     *closure,
                                          GValue       *return_value,
@@ -248,6 +258,7 @@
                                          const GValue *param_values,
                                          gpointer      invocation_hint,
                                          gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_VOID__OBJECT_BOOLEAN (GClosure     *closure,
                                     GValue       *return_value G_GNUC_UNUSED,
@@ -286,6 +297,7 @@
 
 /* VOID:STRING,STRING,STRING (./glade-marshallers.list:9) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_VOID__STRING_STRING_STRING (GClosure     *closure,
                                                GValue       *return_value,
@@ -293,6 +305,7 @@
                                                const GValue *param_values,
                                                gpointer      invocation_hint,
                                                gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_VOID__STRING_STRING_STRING (GClosure     *closure,
                                           GValue       *return_value G_GNUC_UNUSED,
@@ -333,6 +346,7 @@
 
 /* OBJECT:POINTER (./glade-marshallers.list:10) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_OBJECT__POINTER (GClosure     *closure,
                                     GValue       *return_value,
@@ -340,6 +354,7 @@
                                     const GValue *param_values,
                                     gpointer      invocation_hint,
                                     gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_OBJECT__POINTER (GClosure     *closure,
                                GValue       *return_value,
@@ -380,6 +395,7 @@
 
 /* OBJECT:OBJECT,UINT (./glade-marshallers.list:11) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_OBJECT__OBJECT_UINT (GClosure     *closure,
                                         GValue       *return_value,
@@ -387,6 +403,7 @@
                                         const GValue *param_values,
                                         gpointer      invocation_hint,
                                         gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_OBJECT__OBJECT_UINT (GClosure     *closure,
                                    GValue       *return_value,
@@ -429,6 +446,7 @@
 
 /* BOOLEAN:STRING (./glade-marshallers.list:12) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__STRING (GClosure     *closure,
                                     GValue       *return_value,
@@ -436,6 +454,7 @@
                                     const GValue *param_values,
                                     gpointer      invocation_hint,
                                     gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__STRING (GClosure     *closure,
                                GValue       *return_value,
@@ -476,6 +495,7 @@
 
 /* BOOLEAN:BOXED (./glade-marshallers.list:13) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__BOXED (GClosure     *closure,
                                    GValue       *return_value,
@@ -483,6 +503,7 @@
                                    const GValue *param_values,
                                    gpointer      invocation_hint,
                                    gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__BOXED (GClosure     *closure,
                               GValue       *return_value,
@@ -523,6 +544,7 @@
 
 /* BOOLEAN:OBJECT (./glade-marshallers.list:14) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__OBJECT (GClosure     *closure,
                                     GValue       *return_value,
@@ -530,6 +552,7 @@
                                     const GValue *param_values,
                                     gpointer      invocation_hint,
                                     gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__OBJECT (GClosure     *closure,
                                GValue       *return_value,
@@ -570,6 +593,7 @@
 
 /* BOOLEAN:OBJECT,BOXED (./glade-marshallers.list:15) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__OBJECT_BOXED (GClosure     *closure,
                                           GValue       *return_value,
@@ -577,6 +601,7 @@
                                           const GValue *param_values,
                                           gpointer      invocation_hint,
                                           gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__OBJECT_BOXED (GClosure     *closure,
                                      GValue       *return_value,
@@ -619,6 +644,7 @@
 
 /* BOOLEAN:OBJECT,POINTER (./glade-marshallers.list:16) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__OBJECT_POINTER (GClosure     *closure,
                                             GValue       *return_value,
@@ -626,6 +652,7 @@
                                             const GValue *param_values,
                                             gpointer      invocation_hint,
                                             gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__OBJECT_POINTER (GClosure     *closure,
                                        GValue       *return_value,
@@ -668,6 +695,7 @@
 
 /* BOOLEAN:OBJECT,BOOLEAN (./glade-marshallers.list:17) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__OBJECT_BOOLEAN (GClosure     *closure,
                                             GValue       *return_value,
@@ -675,6 +703,7 @@
                                             const GValue *param_values,
                                             gpointer      invocation_hint,
                                             gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__OBJECT_BOOLEAN (GClosure     *closure,
                                        GValue       *return_value,
@@ -717,6 +746,7 @@
 
 /* BOOLEAN:OBJECT,UINT (./glade-marshallers.list:18) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__OBJECT_UINT (GClosure     *closure,
                                          GValue       *return_value,
@@ -724,6 +754,7 @@
                                          const GValue *param_values,
                                          gpointer      invocation_hint,
                                          gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__OBJECT_UINT (GClosure     *closure,
                                     GValue       *return_value,
@@ -766,6 +797,7 @@
 
 /* BOOLEAN:OBJECT,OBJECT (./glade-marshallers.list:19) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__OBJECT_OBJECT (GClosure     *closure,
                                            GValue       *return_value,
@@ -773,6 +805,7 @@
                                            const GValue *param_values,
                                            gpointer      invocation_hint,
                                            gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__OBJECT_OBJECT (GClosure     *closure,
                                       GValue       *return_value,
@@ -815,6 +848,7 @@
 
 /* BOOLEAN:OBJECT,STRING (./glade-marshallers.list:20) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__OBJECT_STRING (GClosure     *closure,
                                            GValue       *return_value,
@@ -822,6 +856,7 @@
                                            const GValue *param_values,
                                            gpointer      invocation_hint,
                                            gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__OBJECT_STRING (GClosure     *closure,
                                       GValue       *return_value,
@@ -864,6 +899,7 @@
 
 /* BOOLEAN:STRING,STRING,STRING,BOXED (./glade-marshallers.list:21) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__STRING_STRING_STRING_BOXED (GClosure     *closure,
                                                         GValue       *return_value,
@@ -871,6 +907,7 @@
                                                         const GValue *param_values,
                                                         gpointer      invocation_hint,
                                                         gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__STRING_STRING_STRING_BOXED (GClosure     *closure,
                                                    GValue       *return_value,
@@ -917,6 +954,7 @@
 
 /* BOOLEAN:STRING,BOXED,OBJECT (./glade-marshallers.list:22) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_BOOLEAN__STRING_BOXED_OBJECT (GClosure     *closure,
                                                  GValue       *return_value,
@@ -924,6 +962,7 @@
                                                  const GValue *param_values,
                                                  gpointer      invocation_hint,
                                                  gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_BOOLEAN__STRING_BOXED_OBJECT (GClosure     *closure,
                                             GValue       *return_value,
@@ -968,6 +1007,7 @@
 
 /* STRING:OBJECT (./glade-marshallers.list:23) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_STRING__OBJECT (GClosure     *closure,
                                    GValue       *return_value,
@@ -975,6 +1015,7 @@
                                    const GValue *param_values,
                                    gpointer      invocation_hint,
                                    gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_STRING__OBJECT (GClosure     *closure,
                               GValue       *return_value,
@@ -1015,6 +1056,7 @@
 
 /* INT:OBJECT,BOXED (./glade-marshallers.list:24) */
 /* Prototype for -Wmissing-prototypes */
+G_BEGIN_DECLS
 extern
 void glade_marshal_INT__OBJECT_BOXED (GClosure     *closure,
                                       GValue       *return_value,
@@ -1022,6 +1064,7 @@
                                       const GValue *param_values,
                                       gpointer      invocation_hint,
                                       gpointer      marshal_data);
+G_END_DECLS
 void
 glade_marshal_INT__OBJECT_BOXED (GClosure     *closure,
                                  GValue       *return_value,
--- glade3-3.8.6/gladeui/glade-marshallers.h	2017-08-07 20:33:40.000000000 +0100
+++ glade3-3.8.6/gladeui/glade-marshallers.h	2025-07-08 21:05:51.189448619 +0100
@@ -1,4 +1,4 @@
-/* This file is generated, all changes will be lost */
+/* This file is generated by glib-genmarshal, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */
 #ifndef __GLADE_MARSHAL_MARSHAL_H__
 #define __GLADE_MARSHAL_MARSHAL_H__
 
--- glade3-3.8.6/gladeui/glade-widget.c	2017-08-07 19:17:32.000000000 +0100
+++ glade3-3.8.6/gladeui/glade-widget.c	2025-07-08 21:07:01.911357386 +0100
@@ -1644,7 +1644,7 @@
 			else
 			{
 				/* need to handle placeholders by hand here */
-				extract->placeholder = g_object_ref (child);
+				extract->placeholder = GTK_WIDGET (g_object_ref (child));
 				glade_widget_adaptor_remove (gwidget->adaptor,
 							     gwidget->object, child);
 			}
