model: Let get_n_columns() return a sane value
authorEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 17 Mar 2010 17:14:08 +0000 (17:14 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 17 Mar 2010 17:14:08 +0000 (17:14 +0000)
commitd735ac4807b556e3444ed9611691e44b00ddd915
tree6463bc3b05995f34115d5c851617f7ffe1967bf7
parent0a6497a3b6c4219e6a6a9310849159b00c864671
model: Let get_n_columns() return a sane value

If you call get_n_columns() during the instance initialization phase but
before set_name()/set_types() have been called, you'll get a (guint) -1.
This is less than ideal.

If columns haven't been initialized we should just return 0, which was
the intent of the API since the beginning.

Based on a patch by: Bastian Winkler <buz@netbuz.org>

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
clutter/clutter-model.c