[banshee] [ListView] Escape the text in the tooltip



commit a997ef9c747d5085c1692fa1a56aba9d633d93f8
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Fri Jun 26 21:22:32 2009 +0200

    [ListView] Escape the text in the tooltip
    
    Without escaping, a label with an & causes lots of Gtk-WARNINGs when
    the tooltip is displayed.

 .../Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs     |    2 +-
 .../Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
index 8b43f17..ab18de7 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
@@ -108,7 +108,7 @@ namespace Hyena.Data.Gui
         public string GetTooltipMarkup (CellContext cellContext, double columnWidth)
         {
             UpdateText (cellContext, columnWidth);
-            return IsEllipsized ? Text : null;
+            return IsEllipsized ? GLib.Markup.EscapeText (Text) : null;
         }
         
         protected virtual string GetText (object obj)
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs
index c0b6cbb..e6d61eb 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs
@@ -73,7 +73,7 @@ namespace Hyena.Data.Gui
                         // TODO not right - could be smaller if at the top/bottom and only partially showing
                         rect.Height = RowHeight;
                         
-                        args.Tooltip.Markup = markup; //GLib.Markup.EscapeText (cell.Text);
+                        args.Tooltip.Markup = markup;
                         args.Tooltip.TipArea = rect;
                         args.RetVal = true;
                     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]