summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Rietveld <kris@imendio.com>2007-09-13 14:15:40 +0000
committerKristian Rietveld <kristian@src.gnome.org>2007-09-13 14:15:40 +0000
commitbd24768db64e57c7869b6124ba748f1009264b88 (patch)
tree5b0a0b3e81e71246334999fad266b0167d62d272
parent99ddf6d705ae6f95d47ec211b8b719a476f7fd39 (diff)
downloadgdk-pixbuf-bd24768db64e57c7869b6124ba748f1009264b88.tar.gz
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
-rw-r--r--ChangeLog7
-rw-r--r--gtk/gtktreeview.c16
2 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b401d079..f1e9c9183 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index e36af7d64..5de6080e4 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -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);