[f-spot/cleanup-backend: 7/23] Remove more logix from IconView.SelectionCollection
- From: Mike Gemünde <mgemuende src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot/cleanup-backend: 7/23] Remove more logix from IconView.SelectionCollection
- Date: Fri, 16 Jul 2010 17:25:56 +0000 (UTC)
commit 86cd15ea602651c63862c8407902a111ddbd7275
Author: Mike Gemünde <mike gemuende de>
Date: Thu Jul 15 19:21:13 2010 +0200
Remove more logix from IconView.SelectionCollection
src/Widgets/IconView.cs | 24 ++++++------------------
1 files changed, 6 insertions(+), 18 deletions(-)
---
diff --git a/src/Widgets/IconView.cs b/src/Widgets/IconView.cs
index 7573ae3..daf2846 100644
--- a/src/Widgets/IconView.cs
+++ b/src/Widgets/IconView.cs
@@ -303,28 +303,18 @@ namespace FSpot.Widgets
// indexes rather than having the view connect to the collection.Changed event.
public class SelectionCollection : Hyena.Collections.Selection {
IBrowsableCollection parent;
- BitArray bit_array;
- int [] selection;
- IBrowsableItem [] items;
- IBrowsableItem [] old;
public SelectionCollection (IBrowsableCollection collection)
{
this.parent = collection;
- this.bit_array = new BitArray (this.parent.Count);
this.parent.Changed += HandleParentChanged;
}
private void HandleParentChanged (IBrowsableCollection collection)
{
- IBrowsableItem [] local = old;
Clear ();
}
- public BitArray ToBitArray () {
- return bit_array;
- }
-
public int [] Ids {
get {
List<int> indices = new List<int> (this);
@@ -368,8 +358,6 @@ namespace FSpot.Widgets
public void Add (int num, bool notify)
{
- bit_array.Set (num, true);
-
if (notify)
Select (num);
else
@@ -1383,7 +1371,7 @@ namespace FSpot.Widgets
int end_y = y1 > y2 ? y1 : y2;
// Restore initial selection
- BitArray initial_selection = selection.ToBitArray();
+// BitArray initial_selection = selection.ToBitArray();
selection.Clear (false);
foreach (int i in start_select_selection)
selection.Add (i, false);
@@ -1407,12 +1395,12 @@ namespace FSpot.Widgets
selection.ToggleRect (start_row, end_row, start_line, end_line, cells_per_row);
// fire events for cells which have changed selection flag
- BitArray new_selection = selection.ToBitArray();
- BitArray selection_changed = initial_selection.Xor (new_selection);
+// BitArray new_selection = selection.ToBitArray();
+// BitArray selection_changed = initial_selection.Xor (new_selection);
System.Collections.Generic.List<int> changed = new System.Collections.Generic.List<int>();
- for (int i = 0; i < selection_changed.Length; i++)
- if (selection_changed.Get(i))
- changed.Add (i);
+// for (int i = 0; i < selection_changed.Length; i++)
+// if (selection_changed.Get(i))
+// changed.Add (i);
//if (selection_changed.Length != 0)
// selection.SignalChange (changed.ToArray());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]