[f-spot] Small cleanups.



commit 31226fd04922905c4c5086b3d79b5a1df0786452
Author: Ruben Vermeersch <ruben savanne be>
Date:   Tue Aug 10 13:23:44 2010 +0200

    Small cleanups.

 .../MainApp/FSpot.Widgets/ScalingIconView.cs       |   26 +------------------
 1 files changed, 2 insertions(+), 24 deletions(-)
---
diff --git a/src/Clients/MainApp/FSpot.Widgets/ScalingIconView.cs b/src/Clients/MainApp/FSpot.Widgets/ScalingIconView.cs
index 2923f23..2e43b6a 100644
--- a/src/Clients/MainApp/FSpot.Widgets/ScalingIconView.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/ScalingIconView.cs
@@ -19,14 +19,7 @@ namespace FSpot.Widgets {
 
 		protected override void UpdateLayout ()
 		{
-			//Log.Debug ("in update layout {0}", Allocation.ToString ());
-
-			int num_thumbnails;
-			if (collection != null)
-				num_thumbnails = collection.Count;
-			else
-				num_thumbnails = 0;
-
+			int num_thumbnails = collection != null ? collection.Count : 0;
 			cells_per_row = System.Math.Max (num_thumbnails, 1);
 
 			int num_rows = 1;
@@ -37,8 +30,7 @@ namespace FSpot.Widgets {
 				available_height -= tag_icon_size + tag_icon_vspacing;
 
 			if (DisplayDates && this.Style != null) {
-				Pango.FontMetrics metrics = this.PangoContext.GetMetrics (this.Style.FontDescription,
-											  Pango.Language.FromString ("en_US"));
+				Pango.FontMetrics metrics = this.PangoContext.GetMetrics (this.Style.FontDescription, Pango.Language.FromString ("en_US"));
 				available_height -= PangoPixels (metrics.Ascent + metrics.Descent);
 			}
 
@@ -55,19 +47,5 @@ namespace FSpot.Widgets {
 			Hadjustment.StepIncrement = cell_width;
 			Hadjustment.Change ();
 		}
-#if false
-		protected override void UpdateLayout ()
-		{
-			if (collection != null) {
-				int total = collection.Count;
-
-				if (total > 0)
-					thumbnail_width = (Allocation.Width - (total * 2 * cell_border_width) - 2 * BORDER_SIZE)/ total;
-			}
-
-			base.UpdateLayout ();
-		}
-#endif
-
 	}
 }



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