banshee r3793 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView



Author: scottp
Date: Fri Apr 18 07:09:54 2008
New Revision: 3793
URL: http://svn.gnome.org/viewvc/banshee?rev=3793&view=rev

Log:
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs:
We were instantiating a List<string> on every render. Now we just
use one list per instance and clear it on each render.

Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs

Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs	(original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs	Fri Apr 18 07:09:54 2008
@@ -61,6 +61,8 @@
         private CellContext cell_context;
         private Pango.Layout pango_layout;
         
+        private List<int> selected_rows = new List<int> ();
+        
         private Theme theme;
         protected Theme Theme {
             get { return theme; }
@@ -313,7 +315,7 @@
             
             int selection_height = 0;
             int selection_y = 0;
-            List<int> selected_rows = new List<int> ();
+            selected_rows.Clear ();
 
             for (int ri = first_row; ri < last_row; ri++) {
                 if (Selection.Contains (ri)) {



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