gtk+ r20792 - in trunk: . gtk



Author: paulp
Date: Sun Jul  6 22:24:24 2008
New Revision: 20792
URL: http://svn.gnome.org/viewvc/gtk+?rev=20792&view=rev

Log:
2008-07-07  Christian Dywan  <christian imendio com>

	* gtk/gtkcontainer.c (gtk_container_add_with_properties): Remove
	erroneously added g_return_if_fail (bug #541811).


Modified:
   trunk/ChangeLog
   trunk/gtk/gtkcomboboxentry.c
   trunk/gtk/gtkcontainer.c

Modified: trunk/gtk/gtkcomboboxentry.c
==============================================================================
--- trunk/gtk/gtkcomboboxentry.c	(original)
+++ trunk/gtk/gtkcomboboxentry.c	Sun Jul  6 22:24:24 2008
@@ -50,6 +50,7 @@
 						  GtkWidget             *child);
 static void gtk_combo_box_entry_remove           (GtkContainer          *container,
 						  GtkWidget             *child);
+static GType gtk_combo_box_entry_child_type      (GtkContainer          *container);
 
 static gchar *gtk_combo_box_entry_get_active_text (GtkComboBox *combo_box);
 static void gtk_combo_box_entry_active_changed   (GtkComboBox           *combo_box,
@@ -96,6 +97,7 @@
   container_class = (GtkContainerClass *)klass;
   container_class->add = gtk_combo_box_entry_add;
   container_class->remove = gtk_combo_box_entry_remove;
+  container_class->child_type = gtk_combo_box_entry_child_type;
 
   combo_class = (GtkComboBoxClass *)klass;
   combo_class->get_active_text = gtk_combo_box_entry_get_active_text;
@@ -236,6 +238,16 @@
   GTK_CONTAINER_CLASS (gtk_combo_box_entry_parent_class)->remove (container, child);
 }
 
+static GType
+gtk_combo_box_entry_child_type (GtkContainer *container)
+{
+  if (!GTK_BIN (container)->child)
+    return GTK_TYPE_ENTRY;
+  else
+    return G_TYPE_NONE;
+}
+
+
 static void
 gtk_combo_box_entry_active_changed (GtkComboBox *combo_box,
                                     gpointer     user_data)

Modified: trunk/gtk/gtkcontainer.c
==============================================================================
--- trunk/gtk/gtkcontainer.c	(original)
+++ trunk/gtk/gtkcontainer.c	Sun Jul  6 22:24:24 2008
@@ -819,7 +819,6 @@
   g_return_if_fail (GTK_IS_CONTAINER (container));
   g_return_if_fail (GTK_IS_WIDGET (widget));
   g_return_if_fail (widget->parent == NULL);
-  g_return_if_fail (widget->parent == container);
 
   g_object_ref (container);
   g_object_ref (widget);



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