[banshee/grid] Restored GetRowAtY but marked obsolete



commit 478de42beb3ceb2f77834c931658f060f51594a3
Author: Aaron Bockover <abockover novell com>
Date:   Thu Dec 3 13:20:39 2009 +0800

    Restored GetRowAtY but marked obsolete
    
    The old list-only GetRowAtY method was protected, not private, so
    I am adding it back, but marking it with the Obsolete attribute
    in favor of the new GetModelRowAt method.
    
    Updated BaseTrackListView to use GetModelRowAt.

 .../Banshee.Collection.Gui/BaseTrackListView.cs    |    4 ++--
 .../ListView/ListView_Interaction.cs               |    6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BaseTrackListView.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BaseTrackListView.cs
index 5f6f6c6..e21ca34 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BaseTrackListView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BaseTrackListView.cs
@@ -163,8 +163,8 @@ namespace Banshee.Collection.Gui
                 PlaylistSource playlist = ServiceManager.SourceManager.ActiveSource as PlaylistSource;
                 if (playlist != null) {
                     //Gtk.Drag.
-                    int row = GetRowAtY (y);
-                    if (row != GetRowAtY (y + RowHeight / 2)) {
+                    int row = GetModelRowAt (0, y);
+                    if (row != GetModelRowAt (0, y + RowHeight / 2)) {
                         row += 1;
                     }
 
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 9ee9e7d..7aa0168 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
@@ -784,6 +784,12 @@ namespace Hyena.Data.Gui
             }
         }
 
+        [Obsolete ("Use GetModelRowAt (x, y) instead.")]
+        protected int GetRowAtY (int y)
+        {
+            return GetModelRowAt (0, y);
+        }
+
         protected Cairo.PointD GetViewPointForModelRow (int row)
         {
             return LayoutStyle == DataViewLayoutStyle.Grid



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