window: Drop some dead code
authorMatthias Clasen <mclasen@redhat.com>
Mon, 20 Sep 2021 04:01:24 +0000 (00:01 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 20 Sep 2021 04:01:24 +0000 (00:01 -0400)
The gtk_window_set_buildable_property implementation
was only used to set the unused builder_visible flag.
Remove both the flag and the vfunc.

This means we no longer have any set_buildable_property
implementations and could eventually drop that vfunc and
the support for it in GtkBuilder.

gtk/gtkwindow.c

index d17d102441984b10fb44233791b5b531940d086f..a1a34359c94ddbf12b829542c2bd6e8d299572a9 100644 (file)
@@ -211,7 +211,6 @@ typedef struct
    */
   guint    need_default_size         : 1;
 
-  guint    builder_visible           : 1;
   guint    decorated                 : 1;
   guint    deletable                 : 1;
   guint    destroy_with_parent       : 1;
@@ -472,10 +471,6 @@ static void     gtk_window_buildable_add_child              (GtkBuildable
                                                              GtkBuilder         *builder,
                                                              GObject            *child,
                                                              const char         *type);
-static void     gtk_window_buildable_set_buildable_property (GtkBuildable       *buildable,
-                                                             GtkBuilder         *builder,
-                                                             const char         *name,
-                                                             const GValue       *value);
 
 static void             gtk_window_shortcut_manager_interface_init      (GtkShortcutManagerInterface *iface);
 /* GtkRoot */
@@ -1916,7 +1911,6 @@ static void
 gtk_window_buildable_interface_init (GtkBuildableIface *iface)
 {
   parent_buildable_iface = g_type_interface_peek_parent (iface);
-  iface->set_buildable_property = gtk_window_buildable_set_buildable_property;
   iface->add_child = gtk_window_buildable_add_child;
 }
 
@@ -1934,23 +1928,6 @@ gtk_window_buildable_add_child (GtkBuildable *buildable,
     parent_buildable_iface->add_child (buildable, builder, child, type);
 }
 
-static void
-gtk_window_buildable_set_buildable_property (GtkBuildable *buildable,
-                                             GtkBuilder   *builder,
-                                             const char   *name,
-                                             const GValue *value)
-{
-  GtkWindow *window = GTK_WINDOW (buildable);
-  GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
-  if (strcmp (name, "visible") == 0 && g_value_get_boolean (value))
-    priv->builder_visible = TRUE;
-  else if (parent_buildable_iface->set_buildable_property)
-    parent_buildable_iface->set_buildable_property (buildable, builder, name, value);
-  else
-    g_object_set_property (G_OBJECT (buildable), name, value);
-}
-
 static void
 gtk_window_shortcut_manager_interface_init (GtkShortcutManagerInterface *iface)
 {