mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
if cell is set, always pass in path to gtk_tree_view_get_cell_area()
2007-09-13 Kristian Rietveld <kris@imendio.com> * gtk/gtktreeview.c (gtk_tree_view_set_toooltip_cell): if cell is set, always pass in path to gtk_tree_view_get_cell_area() whether it is NULL or set. Added explanatory comment and added this side case to the API documentation. svn path=/trunk/; revision=18812
This commit is contained in:
parent
99ddf6d705
commit
bd24768db6
@ -1,3 +1,10 @@
|
||||
2007-09-13 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_toooltip_cell): if cell
|
||||
is set, always pass in path to gtk_tree_view_get_cell_area() whether
|
||||
it is NULL or set. Added explanatory comment and added this
|
||||
side case to the API documentation.
|
||||
|
||||
2007-09-12 Emmanuele Bassi <ebassi@gnome.org>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (render_recent_icon): Use the
|
||||
|
@ -15383,6 +15383,11 @@ gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view,
|
||||
* area will be set to the full area covered by @column. See also
|
||||
* gtk_tooltip_set_tip_area().
|
||||
*
|
||||
* Note that if @path is not specified and @cell is set and part of a column
|
||||
* containing the expander, the tooltip might not show and hide at the correct
|
||||
* position. In such cases @path must be set to the current node under the
|
||||
* mouse cursor for this function to operate correctly.
|
||||
*
|
||||
* Since: 2.12
|
||||
*/
|
||||
void
|
||||
@ -15409,11 +15414,16 @@ gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view,
|
||||
GdkRectangle tmp;
|
||||
gint start, width;
|
||||
|
||||
gtk_tree_view_get_cell_area (tree_view, NULL, column, &tmp);
|
||||
/* We always pass in path here, whether it is NULL or not.
|
||||
* For cells in expander columns path must be specified so that
|
||||
* we can correctly account for the indentation. This also means
|
||||
* that the tooltip is constrained vertically by the "Determine y
|
||||
* values" code below; this is not a real problem since cells actually
|
||||
* don't stretch vertically in constrast to columns.
|
||||
*/
|
||||
gtk_tree_view_get_cell_area (tree_view, path, column, &tmp);
|
||||
gtk_tree_view_column_cell_get_position (column, cell, &start, &width);
|
||||
|
||||
/* FIXME: a need a path here to correctly correct for indent */
|
||||
|
||||
gtk_tree_view_convert_bin_window_to_widget_coords (tree_view,
|
||||
tmp.x + start, 0,
|
||||
&rect.x, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user