[Monodevelop-patches-list] r987 - trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Feb 22 17:43:20 EST 2004
Author: tberman
Date: 2004-02-22 17:43:20 -0500 (Sun, 22 Feb 2004)
New Revision: 987
Modified:
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons/FileIconLoader.cs
Log:
fix potential breakage
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons/FileIconLoader.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons/FileIconLoader.cs 2004-02-22 22:02:36 UTC (rev 986)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/FileIcons/FileIconLoader.cs 2004-02-22 22:43:20 UTC (rev 987)
@@ -27,7 +27,12 @@
public static Gdk.Pixbuf GetPixbufForFile (string filename, int width, int height)
{
Gnome.IconLookupResultFlags result;
- string icon = Gnome.Icon.LookupSync (iconTheme, thumbnailFactory, filename, "", Gnome.IconLookupFlags.None, out result);
+ string icon;
+ try {
+ icon = Gnome.Icon.LookupSync (iconTheme, thumbnailFactory, filename, "", Gnome.IconLookupFlags.None, out result);
+ } catch {
+ icon = "gnome-fs-regular";
+ }
Gdk.Pixbuf pix = GetPixbufForType (icon);
return pix.ScaleSimple (height, width, Gdk.InterpType.Bilinear);
}
More information about the Monodevelop-patches-list
mailing list