From 264952d5ee933d97f884ddc23c110b919e76436c Mon Sep 17 00:00:00 2001 From: Lorenzo Gil Sanchez Date: Mon, 5 Jul 2004 15:44:58 +0000 Subject: [PATCH] added a default method for the add virtual method of GtkContainer. * gtk/gtklayout.c (gtk_layout_add): added a default method for the add virtual method of GtkContainer. (gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual method slot of the container class. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtklayout.c | 14 ++++++++++++-- 5 files changed, 40 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f66357e719..ec334577b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-07-05 Lorenzo Gil Sanchez + + * gtk/gtklayout.c (gtk_layout_add): added a default method for the add + virtual method of GtkContainer. + (gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual + method slot of the container class. + 2004-07-05 Anders Carlsson * gtk/gtkiconview.c: (gtk_icon_view_set_markup_column): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f66357e719..ec334577b6 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2004-07-05 Lorenzo Gil Sanchez + + * gtk/gtklayout.c (gtk_layout_add): added a default method for the add + virtual method of GtkContainer. + (gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual + method slot of the container class. + 2004-07-05 Anders Carlsson * gtk/gtkiconview.c: (gtk_icon_view_set_markup_column): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f66357e719..ec334577b6 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +2004-07-05 Lorenzo Gil Sanchez + + * gtk/gtklayout.c (gtk_layout_add): added a default method for the add + virtual method of GtkContainer. + (gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual + method slot of the container class. + 2004-07-05 Anders Carlsson * gtk/gtkiconview.c: (gtk_icon_view_set_markup_column): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f66357e719..ec334577b6 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2004-07-05 Lorenzo Gil Sanchez + + * gtk/gtklayout.c (gtk_layout_add): added a default method for the add + virtual method of GtkContainer. + (gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual + method slot of the container class. + 2004-07-05 Anders Carlsson * gtk/gtkiconview.c: (gtk_icon_view_set_markup_column): diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c index e05038d77d..8e40f47406 100644 --- a/gtk/gtklayout.c +++ b/gtk/gtklayout.c @@ -81,6 +81,8 @@ static void gtk_layout_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static gint gtk_layout_expose (GtkWidget *widget, GdkEventExpose *event); +static void gtk_layout_add (GtkContainer *container, + GtkWidget *widget); static void gtk_layout_remove (GtkContainer *container, GtkWidget *widget); static void gtk_layout_forall (GtkContainer *container, @@ -468,7 +470,7 @@ gtk_layout_set_size (GtkLayout *layout, GtkWidget *widget; g_return_if_fail (GTK_IS_LAYOUT (layout)); - + widget = GTK_WIDGET (layout); g_object_freeze_notify (G_OBJECT (layout)); @@ -668,6 +670,7 @@ gtk_layout_class_init (GtkLayoutClass *class) widget_class->expose_event = gtk_layout_expose; widget_class->style_set = gtk_layout_style_set; + container_class->add = gtk_layout_add; container_class->remove = gtk_layout_remove; container_class->forall = gtk_layout_forall; @@ -1047,8 +1050,15 @@ gtk_layout_expose (GtkWidget *widget, GdkEventExpose *event) return FALSE; } -/* Container method +/* Container methods */ +static void +gtk_layout_add (GtkContainer *container, + GtkWidget *widget) +{ + gtk_layout_put (GTK_LAYOUT (container), widget, 0, 0); +} + static void gtk_layout_remove (GtkContainer *container, GtkWidget *widget)