This fix is incorrect, treeviews dont rely on the expander size for drawing
separator rows (added XXX comment in line), need to fix this somewhere else
- Dont try fetching a cell renderer for an event when the event
coordinate is outside the cell area allocation (can happen
on the y axis, not all events are button events).
- Dont remove focus-line-width (inner area) an extra time from
GtkCellArea->event
- Dont remove focus-line-width from the cell area at all for the
editable widget... use the whole area including the focus line
(compared with git master behaviour and now it looks right, check
the multiline editable string in testtreeedit).
This fixes autosize columns... result can be viewable by checking
tests/testtreeview and setting the second column to autosize and then
expanding/colapsing some rows.
Now we bookkeep the treeview assigned padding asides from the
requested width stored in the GtkCellAreaContext, this removes
the need for bookkeeping the deepest expanded depth in gtktreeview.c
At allocation time, just remove the padding from the allocated width
of the column and feed the rest to the underlying cell area.
gtk_cell_area_foreach_alloc() itterates over an allocated list of cells
and calls a callback with the cell's allocation until the callback returns
TRUE.
- Removed vfunc get_cell_allocation() and implemented
gtk_cell_area_get_cell_allocation() using foreach_alloc()
- Added gtk_cell_area_get_cell_at_position() using foreach_alloc()
- Removed GtkCellAreaBox ->event() implementation and implemented
mouse "click" cell activation in GtkCellArea class directly using
gtk_cell_area_get_cell_at_position().
The function has been re-implemented around GtkCellArea. This commits
also brings back the invocation of this function in
gtk_tree_view_button_press(). I shouldn't have removed this.
Now consult gtk_cell_area_context_get_preferred_height().
It can be that height-for-widths requested here were too large
when multiple cells are in play because of the alignments stored
in the context... removing the temporary focus-line-width hack.
Allow feeding treeviewcolumn a custom cell-area (or not a custom one,
but allow sharing the cell-area with say, the combo-box area).
This patch also:
- Fixes signal connections to the area (now they do eventually get
disconnected at dispose time, they are handled regardless if a
treeview is set but execute safely, at least there is only one
connection/disconnection).
- Fixes refcounting on the cell_area (GtkCellArea is GInitiallyUnowned).
- Adds a constructor() in order to build the cell-area if one has
not been provided by the caller before hand at g_object_new()
construct time.
This is a premature patch, it traverses the tree's expanded
rows and fetches the deepest depth every time we allocate a
column. The deepest depth should rather be cached and pushed
when a row expands, then recalculated when the deepest expanded
row collapses.
Removed gtk_tree_view_get_real_requested_width_from_column() from
gtktreeview.c in favor of this function in the treeviewcolumn domain
(since this function goes and checks treeviewcolumn internals, settings
and derives the real requested width, seems logical this should be done
by the treeviewcolumn instead).
Now the GtkTreeViewColumn takes care of move/resizing its window and
allocating its button (except for the special case of current drag_column
where the column doesnt actually get reallocated).
Some details:
- button_request was not needed, consult the minimum request of the button
- gtk_tree_view_column_get_button() needed to be public as people can set
tooltips on the button (and libgail accesses the button).