[f-spot/icon-view-cleanup: 7/7] Use BrowseablePointerGridView in AdjustTimeDialog



commit e1117941e8d059e958cddd5d08d6f932807c7162
Author: Mike Gemünde <mike gemuende de>
Date:   Tue Sep 7 19:04:53 2010 +0200

    Use BrowseablePointerGridView in AdjustTimeDialog

 .../MainApp/FSpot.UI.Dialog/AdjustTimeDialog.cs    |   27 ++++++-------------
 1 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/src/Clients/MainApp/FSpot.UI.Dialog/AdjustTimeDialog.cs b/src/Clients/MainApp/FSpot.UI.Dialog/AdjustTimeDialog.cs
index 4f27654..de84912 100644
--- a/src/Clients/MainApp/FSpot.UI.Dialog/AdjustTimeDialog.cs
+++ b/src/Clients/MainApp/FSpot.UI.Dialog/AdjustTimeDialog.cs
@@ -41,7 +41,7 @@ namespace FSpot.UI.Dialog {
 
 		IBrowsableCollection collection;
 		BrowsablePointer item;
-		TrayView tray;
+		CollectionGridView tray;
 		PhotoImageView view;
 		Db db;
 		TimeSpan gnome_dateedit_sucks;
@@ -51,16 +51,20 @@ namespace FSpot.UI.Dialog {
 			this.db = db;
 			this.collection = collection;
 
-			tray = new TrayView (collection);
-			tray_scrolled.Add (tray);
-			tray.Selection.Changed += HandleSelectionChanged;
-
 			view = new PhotoImageView (collection);
 			view_scrolled.Add (view);
 			item = view.Item;
 			item.Changed += HandleItemChanged;
 			item.MoveFirst ();
 
+            tray = new BrowseablePointerGridView (view.Item) {
+                MaxColumns = 1,
+                DisplayRatings = false,
+                DisplayTags = false,
+                DisplayDates = true
+            };
+            tray_scrolled.Add (tray);
+
 			//forward_button.Clicked += HandleForwardClicked;
 			//back_button.Clicked += HandleBackClicked;
 			ok_button.Clicked += HandleOkClicked;
@@ -135,11 +139,6 @@ namespace FSpot.UI.Dialog {
 			}
 			HandleTimeChanged (this, System.EventArgs.Empty);
 
-			if (!tray.Selection.Contains (item.Index)) {
-				tray.Selection.Clear ();
-				tray.Selection.Add (item.Index);
-			}
-
 			photo_spin.Value = item.Index + 1;
 		}
 
@@ -251,14 +250,6 @@ namespace FSpot.UI.Dialog {
 			view.Item.MovePrevious ();
 		}
 
-		void HandleSelectionChanged (IBrowsableCollection sender)
-		{
-			if (sender.Count > 0) {
-				view.Item.Index = ((FSpot.Widgets.SelectionCollection)sender).Ids[0];
-
-			}
-		}
-
 		void HandleCollectionChanged (IBrowsableCollection collection)
 		{
 			bool multiple = collection.Count > 1;



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