[Monodevelop-patches-list] r749 - trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Feb 1 22:21:09 EST 2004


Author: tberman
Date: 2004-02-01 22:21:09 -0500 (Sun, 01 Feb 2004)
New Revision: 749

Modified:
   trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons/FileIconLoader.cs
Log:
better blah!


Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons/FileIconLoader.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons/FileIconLoader.cs	2004-02-02 03:14:31 UTC (rev 748)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons/FileIconLoader.cs	2004-02-02 03:21:09 UTC (rev 749)
@@ -28,19 +28,19 @@
 		{
 			Gnome.IconLookupResultFlags result;
 			string icon = Gnome.Icon.LookupSync (iconTheme, thumbnailFactory, filename, "", Gnome.IconLookupFlags.None, out result);
-			Gdk.Pixbuf big_pixbuf = (Gdk.Pixbuf) iconHash [icon];
-			if (big_pixbuf == null) {
-				big_pixbuf = GetPixbufForType (icon);
-				iconHash [icon] = big_pixbuf;
-			}
-			return big_pixbuf.ScaleSimple (height, width, Gdk.InterpType.Bilinear);
+			return GetPixbufForType (icon).ScaleSimple (height, width, Gdk.InterpType.Bilinear);
 		}
 
 		public static Gdk.Pixbuf GetPixbufForType (string type)
 		{
-			int i;
-			string p_filename = iconTheme.LookupIcon (type, 24, new Gnome.IconData (), out i);
-			return new Gdk.Pixbuf (p_filename);
+			Gdk.Pixbuf bf = (Gdk.Pixbuf) iconHash [type];
+			if (bf == null) {
+				int i;
+				string p_filename = iconTheme.LookupIcon (type, 24, new Gnome.IconData (), out i);
+				bf = new Gdk.Pixbuf (p_filename);
+				iconHash [type] = bf;
+			}
+			return bf;
 		}
 	}
 }




More information about the Monodevelop-patches-list mailing list