diff options
author | Athul Iddya <athul@iddya.com> | 2023-01-13 07:24:57 -0800 |
---|---|---|
committer | Athul Iddya <athul@iddya.com> | 2023-01-13 07:53:01 -0800 |
commit | 60bd06138accf14e89cc5a30b756db932f9fa3bc (patch) | |
tree | c89e04384f4399a57be0c5688c0882c3d9663593 | |
parent | 2293e813d3cd1cc47b2b8750f7140647aa066fc8 (diff) | |
download | nautilus-60bd06138accf14e89cc5a30b756db932f9fa3bc.tar.gz |
grid-cell: Set tooltip values using text, not markup
Tooltips are not showing up for long file names that have Pango markup
characters. This is happening because the cell widget label is set using
`set_text`, but is retrieved in the `query-tooltip` signal handler using
`get_label`. While `get_label` can return Pango markup, it is not
guaranteed to return text with markup characters escaped. Avoid this
problem by fetching the file name from label and setting tooltip using
text.
-rw-r--r-- | src/nautilus-grid-cell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nautilus-grid-cell.c b/src/nautilus-grid-cell.c index fb0276d6e..59b5a33c1 100644 --- a/src/nautilus-grid-cell.c +++ b/src/nautilus-grid-cell.c @@ -189,7 +189,7 @@ on_label_query_tooltip (GtkWidget *widget, if (pango_layout_is_ellipsized (gtk_label_get_layout (label))) { - gtk_tooltip_set_markup (tooltip, gtk_label_get_label (label)); + gtk_tooltip_set_text (tooltip, gtk_label_get_text (label)); return TRUE; } |