Re: Non-atomicity in gtk_list_store_insert(), gtk_list_store_set()

Federico Mena Quintero <federico ximian com> writes:

> The idea is to call it like this:
> 	gtk_list_store_insert_and_set (list_store, &iter, N,
> 				       0, "foo",
> 				       1, "bar",
> 				       -1);
> This would make the insertion+modification atomic; the append_and_set()
> version would be analogous.  Only the "insert-row" signal would be
> emitted.

This function is probably fine to add.  A couple comments:

 * I am not really sold on the name.  I think insert_with_values sounds
   a bit better.

 * We also need a non-varargs version for language bindings.

> Should we have this, and deprecate the old insert()/append() functions? 
> set() can remain in place, as it is needed to modify existing rows.

I'd rather not deprecate the old functions here.  It doesn't buy us anything.


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