diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-01-31 15:07:34 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2014-01-31 15:07:34 +0400 |
commit | 508584acf871c18e7b3d21b42d126778c34b04c3 (patch) | |
tree | e34ec3b5ecd06d7fd60fed834a7cf37770ee8dd9 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop | |
parent | 15a8419c1a5db2608a4c985ea6dbd6007d5f09c5 (diff) |
Disable use of platform-specific file icons
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs index 74c3ffb222..b4e9b4042f 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs @@ -48,6 +48,7 @@ namespace MonoDevelop.Ide.Desktop public abstract class PlatformService { Hashtable iconHash = new Hashtable (); + const bool UsePlatformFileIcons = false; public abstract string DefaultMonospaceFont { get; } public abstract string Name { get; } @@ -149,8 +150,8 @@ namespace MonoDevelop.Ide.Desktop string icon = GetIconIdForFile (filename); if (icon != null) pic = ImageService.GetIcon (icon, false); - - if (pic == null) + + if (pic == null && UsePlatformFileIcons) pic = Xwt.Desktop.GetFileIcon (filename); if (pic == null) { @@ -182,16 +183,16 @@ namespace MonoDevelop.Ide.Desktop } // Try getting a pixbuff - bf = OnGetIconForType (type); - if (bf != null) - break; + if (UsePlatformFileIcons) { + bf = OnGetIconForType (type); + if (bf != null) + break; + } } - if (bf == null) { - bf = ImageService.GetIcon (mimeType, false); - if (bf == null) - bf = GetDefaultIcon (); - } + if (bf == null) + bf = GetDefaultIcon (); + iconHash [mimeType] = bf; return bf; } @@ -230,8 +231,10 @@ namespace MonoDevelop.Ide.Desktop MimeTypeNode mt = FindMimeType (type); if (mt != null) return mt.Icon; - else + else if (UsePlatformFileIcons) return OnGetIconIdForType (type); + else + return null; } static List<MimeTypeNode> mimeTypeNodes = new List<MimeTypeNode> (); |