[banshee] [Hyena.Gui] Fix ListView grid interactions



commit d418ffb67ae831fcb8384be0ec0cc75dc7419d1b
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Wed Mar 10 17:40:08 2010 -0800

    [Hyena.Gui] Fix ListView grid interactions

 .../ListView/ListView_Interaction.cs               |    2 +-
 .../Hyena.Data.Gui/ListView/ListView_Rendering.cs  |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
index 917f2aa..afaf78b 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
@@ -163,7 +163,7 @@ namespace Hyena.Data.Gui
             bool handled = false;
             // FIXME: hard-coded grid logic here...
             bool grid = ViewLayout != null;
-            int items_per_row = grid ? 1 : 1;
+            int items_per_row = grid ? (ViewLayout as DataViewLayoutGrid).Columns : 1;
 
             switch (press.Key) {
                 case Gdk.Key.a:
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
index 1e4cbe3..2883132 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
@@ -549,7 +549,11 @@ namespace Hyena.Data.Gui
 
         private Gdk.Size child_size = Gdk.Size.Empty;
         public Gdk.Size ChildSize {
-            get { return child_size; }
+            get {
+                return ViewLayout != null
+                    ? new Gdk.Size ((int)ViewLayout.ChildSize.Width, (int)ViewLayout.ChildSize.Height)
+                    : child_size;
+            }
         }
 
         private bool measure_pending;



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