Index: gcontenttype.c
===================================================================
--- gcontenttype.c	(revision 7037)
+++ gcontenttype.c	(working copy)
@@ -179,9 +179,17 @@
   return g_strdup ("application/octet-stream");
 }
 
+G_LOCK_DEFINE_STATIC (_type_icons);
+static GHashTable *_type_icons = NULL;
+
 GIcon *
 g_content_type_get_icon (const char *type)
 {
+  GIcon *themed_icon;
+  char *icon_names[4];
+  char *name = NULL;
+  int n = 0;
+
   g_return_val_if_fail (type != NULL, NULL);
 
   /* TODO: How do we represent icons???
@@ -194,7 +202,50 @@
      gtkfilesystemwin32.c in gtk-2-12 is probably a good place to look
      for inspiration.
   */
-  return NULL;
+  G_LOCK (_type_icons);
+  if (!_type_icons)
+    _type_icons = g_hash_table_new (g_str_hash, g_str_equal);
+  name = g_hash_table_lookup (_type_icons, type);
+  if (!name && type[0] == '.')
+    {
+      /* double lookup by extension */
+      gchar *key = get_registry_classes_key (type, NULL);
+      if (!key)
+        key = g_strconcat (type+1, "file\\DefaultIcon", NULL);
+      else
+        {
+	  gchar *key2 = g_strconcat (key, "\\DefaultIcon", NULL);
+	  g_free (key);
+	  key = key2;
+	}
+      name = get_registry_classes_key (key, NULL);
+      if (name && strcmp (name, "%1") == 0)
+        {
+	  g_free (name);
+	  name = NULL;
+	}
+      if (name)
+        g_hash_table_insert (_type_icons, g_strdup (type), g_strdup (name));
+      g_print ("%s -> %s\n", type, name ? name : "?");
+      g_free (key);
+    }
+
+  /* icon-name similar to how it was with gtk-2-12 */
+  if (name)
+    {
+      themed_icon = g_themed_icon_new (name);
+    }
+  else
+    {
+      /* if not found an icon fall back to gtk-builtins */
+      name = strcmp (type, "inode/directory") == 0 ? "gtk-directory" : 
+	                   g_content_type_can_be_executable (type) ? "gtk-execute" : "gtk-file";
+      g_hash_table_insert (_type_icons, g_strdup (type), g_strdup (name));
+      themed_icon = g_themed_icon_new_with_default_fallbacks (name);
+    }
+  G_UNLOCK (_type_icons);
+
+  return G_ICON (themed_icon);
 }
 
 gboolean
Index: glocalfile.c
===================================================================
--- glocalfile.c	(revision 7037)
+++ glocalfile.c	(working copy)
@@ -812,6 +812,7 @@
 
   if (result == -1)
     {
+#ifndef _MSC_VER    
       OSVERSIONINFOEX ver_info = {0};
       DWORDLONG cond_mask = 0;
       int op = VER_GREATER_EQUAL;
@@ -826,6 +827,9 @@
       result = VerifyVersionInfo (&ver_info,
 				  VER_MAJORVERSION | VER_MINORVERSION, 
 				  cond_mask) != 0;
+#else
+      result = ((DWORD)(LOBYTE(LOWORD(GetVersion())))) >= 5;  
+#endif
     }
 
   return result;
@@ -916,7 +920,7 @@
 {
   GLocalFile *local = G_LOCAL_FILE (file);
   GFileInfo *info;
-  int statfs_result;
+  int statfs_result = 0;
   gboolean no_size;
 #ifndef G_OS_WIN32
   guint64 block_size;
