function is supposed to accept -1 to disable sorting. However it
checks for whether the column is >= the number of columns, but
clutter_model_get_n_columns() returns an unsigned int so the
column number also gets promoted to unsigned for the
comparison. Therefore -1 is always greater than the number of
columns so it wouldn't let you set it.
Merge from clutter-0-6:
* clutter/clutter-model.c:
(clutter_model_iter_set_internal_valist): Add an internal function
wrapping ClutterModelIter::set_value that does not emit the
::row-changed signal. Emitting this signal before the ::row-added
one is wrong: a row cannot change before being inserted.
(clutter_model_append), (clutter_model_prepend),
(clutter_model_insert): Use the non-signal emitting variant of
clutter_model_iter_set_valist().
(clutter_model_iter_set_valist): Use the internal version and emit
the ::row-changed signal at the end.
* clutter/clutter-model.[ch]: Add a ::copy() virtual function
for copying iterators.
* clutter/clutter-list-model.c:
(clutter_list_model_iter_copy),
(clutter_list_model_iter_class_init): Implement the ::copy()
function inside the ListModel iterator subclass.
* clutter.symbols: Add clutter_model_insertv()
* clutter/clutter-model.[ch] (clutter_model_insertv): Add a vector
based insertion API, for language bindings
* clutter/clutter-model-default.c:
(clutter_model_default_new),
(clutter_model_default_newv): Move the constructors in the
right file
* clutter/clutter-model-private.h: Add a private header for
the ClutterModel implementations
* clutter/clutter-model.c:
(clutter_model_check_type),
(clutter_model_set_n_columns),
(clutter_model_set_column_type): Mark as private to Clutter,
not static to ClutterModel
* clutter/Makefile.am: Add clutter-model-private.h
* clutter/clutter-model.h:
* clutter/clutter-model.c:
(clutter_model_appendv),
(clutter_model_prependv): Add vector based API for bindings.
(clutter_model_get_column_name),
(clutter_model_get_column_type),
(clutter_model_set_sorting_column): Fix the check in the condition
on the column index.
* tests/test-scale.c (on_timeline_completed), (main): Fix spelling
* clutter.symbols: Update public symbols
* clutter/clutter-model.c:
(clutter_model_real_get_n_rows), (clutter_model_class_init),
(clutter_model_get_n_rows): Provide a default implementation of
the get_n_rows() method, so that subclasses do not strictly need
to override it
* clutter/clutter-model-default.c:
(clutter_model_default_iter_next),
(clutter_model_default_iter_prev): Do not instantiate a new
iterator, and update the passed one instead, as we say we do
in the documentation. This avoid leaking tons of iterators.
* clutter/clutter-model.[ch]: Update the documentation.
* tests/test-model.c: Prettify some output.
* clutter/clutter-behaviour.c:
(clutter_knot_get_type): Use the I_() macro.
* clutter/clutter-model.[ch]: Make ClutterModel and ClutterModelIter
abstract classes; also, provide more virtual functions inside the
ClutterModel vtable, to allow subclasses and language bindings to
override the entire ClutterModel using other/native data types
to store the rows.
* clutter/clutter-model-default.[ch]: ClutterModelDefault is a
default implementation of ClutterModel and ClutterModelIter using
GSequence.
* clutter/Makefile.am:
* clutter/clutter.h: Build glue for ClutterModelDefault.
* tests/test-model.c: Update for constructor changes.
* tests/test-shader.c: Fix a typo.
* clutter/clutter-model.[ch]: Allow unsorting the model (passing
-1 as the sorting column)
(clutter_model_iter_get_valist): Do not initialise twice che
return value.
* clutter/clutter-model.h:
* clutter/clutter-model.c:
(clutter_model_append_value),
(clutter_model_prepend_value),
(clutter_model_insert_value): Add a _value() variant for the
insertion methods, for use of the language bindings.
(clutter_model_append),
(clutter_model_prepend),
(clutter_model_insert): Do not return a boolean: insertion should
never fail unless for a programming error, in which case we have
plenty of warnings.
* clutter/clutter-model.[ch]: Slight API change in the constructor
functions for ClutterModel: clutter_model_new() now takes a list
of GType/string pairs for both the column type and the column name.
(clutter_model_set_n_columns),
(clutter_model_set_names),
(clutter_model_set_types): Subclasses of ClutterModel will be able
to call clutter_model_set_types() and clutter_model_set_names() in
any order, provided that they don't call each function more than
once.
* tests/test-model.c: Update the test case.
Add more introspection capabilities to the base model class
* clutter/clutter-model.h:
* clutter/clutter-model.c:
(clutter_model_finalize): Do no leak the column types array.
(clutter_model_get_n_columns): Function for getting the number
of columns inside a model.
(clutter_model_set_names): Add API for setting the names of the
columns.
(clutter_model_get_column_name),
(_model_get_column_type): Add API for getting each column's name
and the default implementation for ClutterModel.
(clutter_model_get_column_type),
(_model_get_iter_at_row): Add API for getting each column's type
and the default implementation for ClutterModel.
* clutter.symbols: Add ClutterModel and ClutterModelIter symbols,
and keep the symbols file sorted.