]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkliststore.c
GtkEntry: Sanity check the end_pos value in _get_display_text()
[~andy/gtk] / gtk / gtkliststore.c
index f19b64e9d298c261e85b5402a42288e0a584f3b1..467bac0f15dc4da7b0a98336a01fe22f63952e7c 100644 (file)
@@ -418,7 +418,7 @@ iter_is_valid (GtkTreeIter  *iter,
  * in.  Note that only types derived from standard GObject fundamental types
  * are supported.
  *
- * As an example, <literal>gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
+ * As an example, <literal>gtk_list_store_new (3, G_TYPE_INT, G_TYPE_STRING,
  * GDK_TYPE_PIXBUF);</literal> will create a new #GtkListStore with three columns, of type
  * int, string and #GdkPixbuf respectively.
  *
@@ -2437,10 +2437,12 @@ list_store_start_element (GMarkupParseContext *context,
   else if (strcmp (element_name, "row") == 0)
     ;
   else if (strcmp (element_name, "column") == 0)
-    for (i = 0; names[i]; i++)
-      if (strcmp (names[i], "type") == 0)
-       data->column_type_names = g_slist_prepend (data->column_type_names,
-                                                  g_strdup (values[i]));
+    {
+      for (i = 0; names[i]; i++)
+        if (strcmp (names[i], "type") == 0)
+          data->column_type_names = g_slist_prepend (data->column_type_names,
+                                                     g_strdup (values[i]));
+    }
   else if (strcmp (element_name, "columns") == 0)
     ;
   else if (strcmp (element_name, "data") == 0)