[f-spot/icon-view-cleanup: 5/7] Make TrayView to a real Tray



commit b0f20a64656c93e885551496deb25f1bccff183a
Author: Mike Gemünde <mike gemuende de>
Date:   Tue Sep 7 22:21:03 2010 +0200

    Make TrayView to a real Tray

 src/Clients/MainApp/FSpot.Widgets/TrayView.cs |   68 +++++++++---------------
 1 files changed, 26 insertions(+), 42 deletions(-)
---
diff --git a/src/Clients/MainApp/FSpot.Widgets/TrayView.cs b/src/Clients/MainApp/FSpot.Widgets/TrayView.cs
index 50411c4..fc72faf 100644
--- a/src/Clients/MainApp/FSpot.Widgets/TrayView.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/TrayView.cs
@@ -2,55 +2,39 @@
  * TrayView.cs
  *
  * Author(s):
- *	Larry Ewing  <lewing novell com>
- *
+ *  Larry Ewing <lewing novell com>
+ *  Mike Gemuende <mike gemuende de>
  *
  * Copyright (C) 2004 Novell, Inc.
+ * Copyright (C) 2010 Mike Gemuende
+ *
  * This is free software. See COPYING for details.
  */
 
+using Gdk;
+using Gtk;
+
 using FSpot.Core;
 
+
 namespace FSpot.Widgets
 {
-	public class TrayView : IconView {
-		public TrayView (System.IntPtr raw) : base (raw) {}
-
-		public TrayView (IBrowsableCollection query) : base (query)
-		{
-			DisplayDates = false;
-			DisplayTags = false;
-			cell_border_width = 10;
-			tag_icon_vspacing = 0;
-			tag_icon_size = 0;
-		}
-
-/*		protected override void UpdateLayout ()
-		{
-			//DisplayDates = false;
-			//DisplayTags = false;
-
-			int total_rows;
-			int available_width = Allocation.Width - 2 * BORDER_SIZE;
-			cells_per_row = System.Math.Max (available_width / 256, 1);
-			int width = 0;
-			//int height = 0;
-
-			do {
-				cell_width = System.Math.Min (256, available_width / cells_per_row);
-				width = cell_width - 2 * cell_border_width;
-				cell_height = (int)(width / ThumbnailRatio) + 2 * cell_border_width;
-				total_rows = (int) System.Math.Ceiling (collection.Count / (double)cells_per_row);
-				cells_per_row ++;
-			} while (total_rows > Allocation.Height / cell_height);
-			cells_per_row --;
-
-
-			if (width != ThumbnailWidth) {
-				thumbnail_width = width;
-			}
-
-			//base.UpdateLayout ();
-		}*/
-	}
+    /// <summary>
+    ///    This class implements a simply tray widget which which shows a collection of photos
+    ///    and does not react to user interaction.
+    /// </summary>
+    public class TrayView : CollectionGridView {
+
+#region Constructors
+
+        public TrayView (System.IntPtr raw) : base (raw) {}
+
+        public TrayView (IBrowsableCollection collection) : base (collection)
+        {
+            MaxColumns = 1;
+        }
+
+#endregion
+
+    }
 }



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