Shut up valgrind complaining about uninitialized values
==5330== Conditional jump or move depends on uninitialised value(s)
==5330== at 0x624FF4C: gdk_window_move_resize_internal
(gdkwindow.c:6037)
==5330== by 0x62502C3: gdk_window_move_resize (gdkwindow.c:6274)
==5330== by 0x5E4FBB5: _gtk_tree_view_column_allocate
(gtktreeviewcolumn.c:2169)
==5330== by 0x5E3846B: gtk_tree_view_size_allocate_columns
(gtktreeview.c:2631)
==5330== by 0x5E43D76: gtk_tree_view_size_allocate
(gtktreeview.c:2686)
==5330== by 0x7F03959: g_closure_invoke (gclosure.c:774)
==5330== by 0x7F16446: signal_emit_unlocked_R (gsignal.c:3202)
==5330== by 0x7F20256: g_signal_emit_valist (gsignal.c:3003)
==5330== by 0x7F20421: g_signal_emit (gsignal.c:3060)
==5330== by 0x5E6DFBE: gtk_widget_size_allocate (gtkwidget.c:4886)
==5330== by 0x5D94ADD: gtk_scrolled_window_allocate_child
(gtkscrolledwindow.c:1506)
==5330== by 0x5D95299: gtk_scrolled_window_size_allocate
(gtkscrolledwindow.c:1704)
==5330== by 0x7F03959: g_closure_invoke (gclosure.c:774)
==5330== by 0x7F16446: signal_emit_unlocked_R (gsignal.c:3202)
==5330== by 0x7F20256: g_signal_emit_valist (gsignal.c:3003)
==5330== by 0x7F20421: g_signal_emit (gsignal.c:3060)
==5330== by 0x5E6DFBE: gtk_widget_size_allocate (gtkwidget.c:4886)
==5330== by 0x5C62708: gtk_box_size_allocate (gtkbox.c:658)
==5330== by 0x7F03959: g_closure_invoke (gclosure.c:774)
==5330== by 0x7F16446: signal_emit_unlocked_R (gsignal.c:3202)
==5330== Uninitialised value was created by a stack allocation
==5330== at 0x5E4FA8D: _gtk_tree_view_column_allocate
(gtktreeviewcolumn.c:2139)
Fixes#640741 - gtk_tree_view_column_get_cell_position() seems to be broken
It is supposed to return the offset within the column, but returned
the offset within the tree, changed by allocation.x of the column's
button (which I don't really unserstand and was clearly not working).
Patches by Benjamin Otte.
The "invalidate last column" hack is removed. It is now of no use since
the entire widget will be redrawn when a single column changes.
I've decided that it is isn't feasible to make cell areas runtime-settable
in the time we have left before 3.0, therefore, I'm going with the
approach to allow init() functions to instantiate the default cell area
and issue a warning if a construct property is ignored.
This is not ideal, but it keeps existing icon view and combo box
subclasses working.
https://bugzilla.gnome.org/show_bug.cgi?id=639139
Expander animation has been replaced by implicit animations
from the style context.
Column headers are also properly themed, GtkContainer::get_path_for_child()
is implemented and the treeview resets column buttons style on columns
being reordered.
The default CSS has changed to theme treeviews sensibly.
This function is useful to figure out whether the tree view is "blank"
at a given location. For such locations you might want to popup a
custom popup menu, clear the current selection or start rubber banding.
In the future, we are planning on updating GtkTreeView's user
interactions to take advantage of this new function.
Part of bug 350618.
Check (x, y) is inside background area. If yes, continue processing
and clamp the coordinates into cell area. This way we will properly
handle getting a cell (which is only used for setting the focus cell)
for clicks in the indentation area (in LTR and RTL mode) and clicks
in the focus rectangle area in case focus-line-width is large.
No longer need to detect if we're currently resetting the context since
the context properly now avoids re-triggering the reset by properly
avoiding to notify properties that dont change as a result of the reset.
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.
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.
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).
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 fix has evolved in the staging branch since all column members are
on a private structure, but since it causes warnings when closing the
windows of the testcellarea test (because the combo-boxes use a treeviewcolumn)
I thought it nice for now to just manually include the fix.
The fix is just proper bookkeeping of delegate objects at dispose() time.