Author: aolk
Date: 2006-11-09 19:11:14 -0500 (Thu, 09 Nov 2006)
New Revision: 67654

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs
Log:
2006-11-10  Alexander Olk  <[EMAIL PROTECTED]>

        * MimeIcon.cs: Don't throw an exception on windows. Mime stuff is
          only available on Linux.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-10 00:08:43 UTC (rev 67653)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-10 00:11:14 UTC (rev 67654)
@@ -1,3 +1,8 @@
+2006-11-10  Alexander Olk  <[EMAIL PROTECTED]>
+
+       * MimeIcon.cs: Don't throw an exception on windows. Mime stuff is
+         only available on Linux.
+
 2006-11-09  Everaldo Canuto  <[EMAIL PROTECTED]>
 
        * Toolbar.cs, ToolBarButton.cs: Fix wrong separator size and

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs      
2006-11-10 00:08:43 UTC (rev 67653)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs      
2006-11-10 00:11:14 UTC (rev 67654)
@@ -128,16 +128,12 @@
                public static int GetIconIndexForFile (string full_filename)
                {
                        lock (lock_object) {
-                               string mime_type = Mime.GetMimeTypeForFile 
(full_filename);
-                               
                                if (platform == EPlatformHandler.Default) {
-                                       if (mime_type == "inode/directory") {
-                                               return (int)MimeIconIndex 
["inode/directory"];
-                                       } else {
-                                               return (int)MimeIconIndex 
["unknown/unknown"];
-                                       }
+                                       return (int)MimeIconIndex 
["unknown/unknown"];
                                }
                                
+                               string mime_type = Mime.GetMimeTypeForFile 
(full_filename);
+                               
                                object oindex = GetIconIndex (mime_type);
                                
                                // not found, add it

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to