[gtk/kill-containers] infobar: Derive from GtkWidget



commit 0dc56dd4bd0081c7a0136612d4202e6b5111bfe8
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu May 7 13:00:51 2020 -0400

    infobar: Derive from GtkWidget
    
    GtkContainer is going away.

 gtk/gtkinfobar.c | 40 +++-------------------------------------
 1 file changed, 3 insertions(+), 37 deletions(-)
---
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index 75deead08e..1ca30d906b 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -143,7 +143,7 @@ typedef struct _GtkInfoBarClass GtkInfoBarClass;
 
 struct _GtkInfoBar
 {
-  GtkContainer parent_instance;
+  GtkWidget parent_instance;
 
   GtkWidget *content_area;
   GtkWidget *action_area;
@@ -157,7 +157,7 @@ struct _GtkInfoBar
 
 struct _GtkInfoBarClass
 {
-  GtkContainerClass parent_class;
+  GtkWidgetClass parent_class;
 
   void (* response) (GtkInfoBar *info_bar, gint response_id);
   void (* close)    (GtkInfoBar *info_bar);
@@ -208,7 +208,7 @@ static void      gtk_info_bar_buildable_add_child       (GtkBuildable *buildable
 
 
 
-G_DEFINE_TYPE_WITH_CODE (GtkInfoBar, gtk_info_bar, GTK_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkInfoBar, gtk_info_bar, GTK_TYPE_WIDGET,
                          G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
                                                 gtk_info_bar_buildable_interface_init))
 
@@ -334,35 +334,6 @@ gtk_info_bar_close (GtkInfoBar *info_bar)
                          GTK_RESPONSE_CANCEL);
 }
 
-static void
-gtk_info_bar_add (GtkContainer *container,
-                  GtkWidget    *child)
-{
-  GtkInfoBar *self = GTK_INFO_BAR (container);
-
-  gtk_container_add (GTK_CONTAINER (self->content_area), child);
-}
-
-static void
-gtk_info_bar_remove (GtkContainer *container,
-                     GtkWidget    *child)
-{
-  GtkInfoBar *self = GTK_INFO_BAR (container);
-
-  gtk_container_remove (GTK_CONTAINER (self->content_area), child);
-}
-
-static void
-gtk_info_bar_forall (GtkContainer *container,
-                     GtkCallback   callback,
-                     gpointer      user_data)
-{
-  GtkInfoBar *self = GTK_INFO_BAR (container);
-
-  if (self->revealer)
-    (*callback) (self->revealer, user_data);
-}
-
 static void
 gtk_info_bar_dispose (GObject *object)
 {
@@ -378,16 +349,11 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-  GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
 
   object_class->get_property = gtk_info_bar_get_property;
   object_class->set_property = gtk_info_bar_set_property;
   object_class->dispose = gtk_info_bar_dispose;
 
-  container_class->add = gtk_info_bar_add;
-  container_class->remove = gtk_info_bar_remove;
-  container_class->forall = gtk_info_bar_forall;
-
   klass->close = gtk_info_bar_close;
 
   /**


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