[f-spot/rubenv-gsoc-2009: 29/86] Remove obsolete code.



commit a997b25f94ef773b43b3fcb44b7257ae3d502724
Author: Ruben Vermeersch <ruben savanne be>
Date:   Tue Jul 28 19:32:58 2009 +0200

    Remove obsolete code.

 src/Imaging/PixbufUtils.cs  |    8 --------
 src/PixbufCache.cs          |    3 ++-
 src/SlideView.cs            |    4 ++--
 src/ThumbnailCache.cs       |    2 +-
 src/Widgets/Filmstrip.cs    |    2 +-
 src/Widgets/IconView.cs     |    2 +-
 src/Widgets/PreviewPopup.cs |    2 +-
 7 files changed, 8 insertions(+), 15 deletions(-)
---
diff --git a/src/Imaging/PixbufUtils.cs b/src/Imaging/PixbufUtils.cs
index d073432..fddf9ec 100644
--- a/src/Imaging/PixbufUtils.cs
+++ b/src/Imaging/PixbufUtils.cs
@@ -131,14 +131,6 @@ public class PixbufUtils {
 		}
 	}
 
-	[Obsolete ("Use the extension method instead!")]
-	public static Pixbuf ShallowCopy (Pixbuf pixbuf)
-	{
-		if (pixbuf == null)
-			return null;
-		return pixbuf.ShallowCopy ();
-	}
-
 	public static Pixbuf ScaleToMaxSize (Pixbuf pixbuf, int width, int height)
 	{
 		return ScaleToMaxSize (pixbuf, width, height, true);
diff --git a/src/PixbufCache.cs b/src/PixbufCache.cs
index 81f653b..99ec5cc 100644
--- a/src/PixbufCache.cs
+++ b/src/PixbufCache.cs
@@ -11,6 +11,7 @@ using System;
 using System.Collections;
 using System.Threading;
 
+using FSpot.Utils;
 using FSpot.Platform;
 
 namespace FSpot {
@@ -353,7 +354,7 @@ namespace FSpot {
 					if (pixbuf == null)
 						return null;
 					
-					return PixbufUtils.ShallowCopy (pixbuf);
+					return pixbuf.ShallowCopy ();
 				}
 			}
 			
diff --git a/src/SlideView.cs b/src/SlideView.cs
index 03bdea2..352df37 100644
--- a/src/SlideView.cs
+++ b/src/SlideView.cs
@@ -236,7 +236,7 @@ namespace FSpot {
 					
 					next = GetScaled (photos [idx]);
 					if (next == null)
-						next = GetScaled (PixbufUtils.ShallowCopy (FSpotPixbufUtils.ErrorPixbuf));
+						next = GetScaled (FSpotPixbufUtils.ErrorPixbuf.ShallowCopy ());
 					
 					next_idx = idx;
 					StartTweenIdle ();
@@ -248,7 +248,7 @@ namespace FSpot {
 
 					next = GetScaled (photos [0]);
 					if (next == null)
-						next = GetScaled (PixbufUtils.ShallowCopy (FSpotPixbufUtils.ErrorPixbuf));
+						next = GetScaled (FSpotPixbufUtils.ErrorPixbuf.ShallowCopy ());
 					next_idx = 0;
 					StartTweenIdle ();
 					
diff --git a/src/ThumbnailCache.cs b/src/ThumbnailCache.cs
index 1910bdc..9fbb9dc 100644
--- a/src/ThumbnailCache.cs
+++ b/src/ThumbnailCache.cs
@@ -80,7 +80,7 @@ public class ThumbnailCache : IDisposable {
 		pixbuf_mru.Remove (item);
 		pixbuf_mru.Insert (0, item);
 
-		return PixbufUtils.ShallowCopy (item.pixbuf);
+		return item.pixbuf.ShallowCopy ();
 	}
 
 	public void RemoveThumbnailForUri (Uri uri)
diff --git a/src/Widgets/Filmstrip.cs b/src/Widgets/Filmstrip.cs
index 464b121..9c713bb 100644
--- a/src/Widgets/Filmstrip.cs
+++ b/src/Widgets/Filmstrip.cs
@@ -614,7 +614,7 @@ namespace FSpot.Widgets
 			Pixbuf current;
 			Uri uri = (selection.Collection [i]).DefaultVersion.Uri;
 			try {
-				current = PixbufUtils.ShallowCopy (thumb_cache.Get (uri));
+				current = thumb_cache.Get (uri).ShallowCopy ();
 			} catch (IndexOutOfRangeException) {
 				current = null;
 			}
diff --git a/src/Widgets/IconView.cs b/src/Widgets/IconView.cs
index 7eb3a86..679e607 100644
--- a/src/Widgets/IconView.cs
+++ b/src/Widgets/IconView.cs
@@ -920,7 +920,7 @@ namespace FSpot.Widgets
 
 						lock (entry) {
 							if (entry.Reload && expansion == 0 && !entry.IsDisposed) {
-								entry.SetPixbufExtended (PixbufUtils.ShallowCopy (temp_thumbnail), false);
+								entry.SetPixbufExtended (temp_thumbnail.ShallowCopy (), false);
 								entry.Reload = true;
 							}
 						}
diff --git a/src/Widgets/PreviewPopup.cs b/src/Widgets/PreviewPopup.cs
index be5fefb..1d4467e 100644
--- a/src/Widgets/PreviewPopup.cs
+++ b/src/Widgets/PreviewPopup.cs
@@ -108,7 +108,7 @@ namespace FSpot {
 			
 			string orig_path = item.DefaultVersion.Uri.LocalPath;
 
-			Gdk.Pixbuf pixbuf = PixbufUtils.ShallowCopy (preview_cache.Get (orig_path + show_histogram.ToString ()));
+			Gdk.Pixbuf pixbuf = preview_cache.Get (orig_path + show_histogram.ToString ()).ShallowCopy ();
 			if (pixbuf == null) {
 				// A bizarre pixbuf = hack to try to deal with cinematic displays, etc.
 				int preview_size = ((this.Screen.Width + this.Screen.Height)/2)/3;



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