Re: GtkCellLayout interface




On Dec 30, 2007, at 4:53 PM, Kevin Ryde wrote:

muppet <scott asofyet org> writes:
void gtk_cell_layout_set_attributes (GtkCellLayout *cell_layout, GtkCellRenderer *cell, ...);
    PREINIT:
        gint i;
@@ -45,38 +399,79 @@ void gtk_cell_layout_set_attributes (Gtk
        if (items < 4 || 0 != (items - 2) % 2)
croak ("usage: $cell_layout->set_attributes (name => column, ...) \n"

Will "items<4" there reject a call that sets no attributes?

Yes.

(I think that may be meant to be allowed ... err, without
actually running it to try!)

That one has always been that way. The idea was, "if you're doing this, you probably mean 'clear', so just call that." I guess if you were holding all the attributes to set in a list, and the list was empty, then allowing an empty list would make it work cleanly, but it really doesn't buy you much.


--
If the monkey could type one keystroke every nanosecond, the expected waiting time until the monkey types out Hamlet is so long that the estimated age of the universe is insignificant by comparison ... this is not a practical method for writing plays.
  -- Gian-Carlo Rota





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