Both GtkListStore and GtkTreeStore had a few methods that allowed
-1 to mean 'append' when specified as a position, but others that
demanded positive position arguments. Make this consistent by
always allowing -1.
https://bugzilla.gnome.org/show_bug.cgi?id=667808
There are three bugs here:
- we should check if the value type is transformable instead of being
compatible, since that's all we care about in order to call
g_value_transform()
- the check is only meaningful in the direction
passed-in-type->column-type and not viceversa
- we should init the destination GValue to the column type before
calling g_value_transform on it, or the destination type information
will be missing and the method will fail
Thanks to Jasper St. Pierre and Colin Walters for all the help in
tracking this down.
https://bugzilla.gnome.org/show_bug.cgi?id=677649
Preferrably should be made just into a local variable for libgtk like
_gdk_debug_flags for libgdk. But for now used by
gtk/tests/textbuffer.c and modules/printbackends/cups/gtkprintbackendcups.c.
The old version wasn't introspectable as it didn't have a length
return parameter. Also, delete gtk_tree_path_get_indices_with_depth,
since it's no longer needed.
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API
https://bugzilla.gnome.org/show_bug.cgi?id=610474
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations. Merge those into the GTK source files.
Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
Properly invalidate iterators in iter_next, iter_children,
iter_nth_child and iter_parent when FALSE is returned. ListStore was
actually already mostly in order as the GSequence pointers are very
strictly checked, but to be a little stricter we've added stamp = 0
lines. TreeStore did not invalidate its iterators, so stamp = 0 lines
were added where appropriate. Unit tests have been added to check this.
Fixes bug 586374, reported by Mike Gemunde.
2008-09-11 Cosimo Cecchi <cosimoc@gnome.org>
Bug 536542 – gtk_list_store_set() documentation doesn't say whether
values are copied.
* gtk/gtkliststore.c:
* gtk/gtktreestore.c:
Explicitly mention in the docs that gtk_[list,tree]_store_set copies
or keep a reference of the values.
svn path=/trunk/; revision=21349
2007-06-05 Kristian Rietveld <kris@gtk.org>
Fix#399071, suggestion from Benoit Dejean.
* gtk/gtkliststore.[ch] (gtk_list_store_set_vector_internal): new
function, factored out code iterating (columns, values) vectors from
gtk_list_store_new_with_valuesv to here,
(gtk_list_store_set_valuesv): new public function to set list store
values using (columns, values) vectors,
(gtk_list_store_new_with_valuesv): call new _set_vector_internal
instead.
* gtk/gtktreestore.[ch] (gtk_tree_store_set_vector_internal),
(gtk_tree_store_set_valuesv), (gtk_tree_store_new_with_valuesv):
likewise.
* gtk/gtk.symbols: updated.
svn path=/trunk/; revision=18041
2006-06-26 Kristian Rietveld <kris@gtk.org>
Make the insert and set functions somewhat more convenient.
(#343841, David Necas).
* gtk/gtkliststore.c (gtk_list_store_insert_with_values): allow
a NULL iter,
(gtk_list_store_insert_with_valuesv): likewise.
* gtk/gtktreestore.c (gtk_tree_store_insert_with_values): ditto,
(gtk_tree_store_insert_with_valuesv): likewise.
2006-05-27 Kristian Rietveld <kris@gtk.org>
Small refactoring. (#340428, Paolo Borelli).
* gtk/gtkliststore.c (gtk_list_store_set_valist_internal),
(gtk_list_store_insert_with_valuesv): refactor code to determine
iter compare func into gtk_list_store_get_compare_func().
* gtk/gtktreestore.c (gtk_tree_store_set_valist_internal),
(gtk_tree_store_insert_with_valuesv): likewise.
2006-01-15 Kristian Rietveld <kris@gtk.org>
Fixes#324099, Tommi Komulainen.
* gtk/gtktreestore.[ch] (gtk_tree_store_insert_with_values),
(gtk_tree_store_insert_with_valuesv): new functions, analog to
those found in GtkListStore.
* gtk/gtktreestore.c (gtk_tree_store_real_set_value),
(gtk_tree_store_set_valist), (gtk_tree_store_set_valist_internal),
(gtk_tree_store_sort_iter_changed): refactored.
* gtk/gtk.symbols: updated.
* tests/treestoretest.c: added a test for this new functionality.