[hyena] ListView: Remove CanvasItem warnings by acting like CanvasHost
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] ListView: Remove CanvasItem warnings by acting like CanvasHost
- Date: Wed, 17 Aug 2011 11:30:59 +0000 (UTC)
commit 0f052ac93a76e7a93697aed81d66be5c2a7da51d
Author: Mackenan Grassi <mackenan gmail com>
Date: Wed Apr 27 09:28:56 2011 -0700
ListView: Remove CanvasItem warnings by acting like CanvasHost
Calls to Invalidate ColumnCellRating and ColumnCellCheckBox would cause
CanvasItem warnings to be emitted because those items were never
assigned a CanvasManager. This patch makes ListView act more like a
CanvasHost in assigning a CanvasManager to each CanvasItem. Fixes
bgo#638475.
Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>
Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs | 3 +++
.../Hyena.Data.Gui/ListView/ListView_Rendering.cs | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs
index 1f35928..e5142a1 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView.cs
@@ -34,6 +34,8 @@ namespace Hyena.Data.Gui
{
public partial class ListView<T> : ListViewBase, IListView<T>
{
+ private CanvasManager manager;
+
protected ListView (IntPtr ptr) : base (ptr)
{
}
@@ -47,6 +49,7 @@ namespace Hyena.Data.Gui
HasTooltip = true;
QueryTooltip += OnQueryTooltip;
DirectionChanged += (o, a) => SetDirection ();
+ manager = new CanvasManager (this);
}
private void OnQueryTooltip (object o, Gtk.QueryTooltipArgs args)
diff --git a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
index 78bf70c..dd0cca8 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
@@ -437,6 +437,7 @@ namespace Hyena.Data.Gui
{
ColumnCell cell = column_cache[column_index].Column.GetCell (0);
cell.Bind (item);
+ cell.Manager = manager;
ColumnCellDataProvider (cell, item);
ITextCell text_cell = cell as ITextCell;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]