X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtktreemodel.c;h=31d8843509121af396e3b33d9e2efe8dfa6efbce;hb=320613c439c6c7eeb5bc64685522195e0a6adc4e;hp=4bbd803b620753d26c976602b99054eece9d361a;hpb=9d0febc9a64a5bfb0fcfc3a88de4757f6c1ff090;p=~andy%2Fgtk diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c index 4bbd803b6..31d884350 100644 --- a/gtk/gtktreemodel.c +++ b/gtk/gtktreemodel.c @@ -168,12 +168,12 @@ * /* Fill the list store with data */ * populate_model (list_store); * - * /* Get the first iter in the list */ - * valid = gtk_tree_model_get_iter_first (list_store, &iter); - * - * while (valid) + * /* Get the first iter in the list, check it is valid and walk + * * through the list, reading each row. */ + * for (valid = gtk_tree_model_get_iter_first (list_store, &iter); + * valid; + * valid = gtk_tree_model_iter_next (list_store, &iter)) * { - * /* Walk through the list, reading each row */ * gchar *str_data; * gint int_data; * @@ -190,7 +190,6 @@ * g_free (str_data); * * row_count++; - * valid = gtk_tree_model_iter_next (list_store, &iter); * } * * @@ -2208,8 +2207,8 @@ gtk_tree_row_reference_unref_path (GtkTreePath *path, * Creates a row reference based on @path. * * This reference will keep pointing to the node pointed to - * by @path, so long as it exists. It listens to all signals - * emitted by @model, and updates its path appropriately. If + * by @path, so long as it exists. Any changes that occur on @model are + * propagated, and the path is updated appropriately. If * @path isn't a valid path in @model, then %NULL is returned. * * Return value: a newly allocated #GtkTreeRowReference, or %NULL