]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkgrid.c
spinbutton: don't override initial text in non-numeric-only spin buttons
[~andy/gtk] / gtk / gtkgrid.c
index 8a96e827517de31a96a0d6e93aaa2785e84003ba..571f8266f2039408d600cfae7876dd4558c1811c 100644 (file)
@@ -42,7 +42,8 @@
  *
  * Children are added using gtk_grid_attach(). They can span multiple
  * rows or columns. It is also possible to add a child next to an
- * existing child, using gtk_grid_attach_next_to().
+ * existing child, using gtk_grid_attach_next_to(). The behaviour of
+ * GtkGrid when several children occupy the same grid cell is undefined.
  *
  * GtkGrid can be used like a #GtkBox by just using gtk_container_add(),
  * which will place children next to each other in the direction determined
@@ -1593,7 +1594,7 @@ gtk_grid_attach_next_to (GtkGrid         *grid,
  * Gets the child of @grid whose area covers the grid
  * cell whose upper left corner is at @left, @top.
  *
- * Returns: the child at the given position, or %NULL
+ * Returns: (transfer none): the child at the given position, or %NULL
  *
  * Since: 3.2
  */
@@ -1602,10 +1603,14 @@ gtk_grid_get_child_at (GtkGrid *grid,
                        gint     left,
                        gint     top)
 {
-  GtkGridPrivate *priv = grid->priv;
+  GtkGridPrivate *priv;
   GtkGridChild *child;
   GList *list;
 
+  g_return_val_if_fail (GTK_IS_GRID (grid), NULL);
+
+  priv = grid->priv;
+
   for (list = priv->children; list; list = list->next)
     {
       child = list->data;
@@ -1637,13 +1642,15 @@ void
 gtk_grid_insert_row (GtkGrid *grid,
                      gint     position)
 {
-  GtkGridPrivate *priv = grid->priv;
+  GtkGridPrivate *priv;
   GtkGridChild *child;
   GList *list;
   gint top, height;
 
   g_return_if_fail (GTK_IS_GRID (grid));
 
+  priv = grid->priv;
+
   for (list = priv->children; list; list = list->next)
     {
       child = list->data;
@@ -1681,13 +1688,15 @@ void
 gtk_grid_insert_column (GtkGrid *grid,
                         gint     position)
 {
-  GtkGridPrivate *priv = grid->priv;
+  GtkGridPrivate *priv;
   GtkGridChild *child;
   GList *list;
   gint left, width;
 
   g_return_if_fail (GTK_IS_GRID (grid));
 
+  priv = grid->priv;
+
   for (list = priv->children; list; list = list->next)
     {
       child = list->data;