Index: gio/gunixmounts.c
===================================================================
--- gio/gunixmounts.c	(revision 7436)
+++ gio/gunixmounts.c	(working copy)
@@ -45,6 +45,7 @@
 #include <string.h>
 #include <signal.h>
 #include <gstdio.h>
+#include <glib.h>
 
 #include "gunixmounts.h"
 #include "gfile.h"
@@ -1760,6 +1761,61 @@ type_to_icon (GUnixMountType type, gbool
   return icon_name;
 }
 
+static char *
+mount_to_icon_or_name (GUnixMountEntry *mount, gboolean get_icon)
+{
+  GKeyFile *key_file;
+  char *path;
+  char *name;
+
+  name = NULL;
+
+  path = g_build_filename (mount->mount_path, ".xdg-volume-info", NULL);
+  if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+    {
+      key_file = g_key_file_new ();
+      g_key_file_load_from_file (key_file, path, G_KEY_FILE_NONE, NULL);
+      if (get_icon)
+        {
+          if (g_key_file_has_key (key_file, "Volume Info", "Icon", NULL))
+            name = g_key_file_get_string (key_file, "Volume Info", "Icon", NULL);
+          if (name == NULL)
+            name = g_strdup (type_to_icon (g_unix_mount_guess_type (mount), FALSE));
+          else
+            {
+              char *icon_path;
+
+              icon_path = g_build_filename (mount->mount_path, name, NULL);
+              if (g_file_test (icon_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+                {
+                  g_free (name);
+                  name = g_strdup (icon_path);
+                }
+              g_free (icon_path);
+            }
+        }
+      else
+        {
+          if (g_key_file_has_key (key_file, "Volume Info", "Name", NULL))
+            name = g_key_file_get_string (key_file, "Volume Info", "Name", NULL);
+          if (name == NULL)
+            name = g_filename_display_basename (mount->mount_path);
+        }
+      g_key_file_free (key_file);
+    }
+  g_free (path);
+
+  if (name != NULL)
+    return name;
+  else
+    {
+      if (get_icon)
+        return g_strdup (type_to_icon (g_unix_mount_guess_type (mount), FALSE));
+      else
+        return g_filename_display_basename (mount->mount_path);
+    }
+}
+
 /**
  * g_unix_mount_guess_name:
  * @mount_entry: a #GUnixMountEntry
@@ -1778,7 +1834,7 @@ g_unix_mount_guess_name (GUnixMountEntry
   if (strcmp (mount_entry->mount_path, "/") == 0)
     name = g_strdup (_("Filesystem root"));
   else
-    name = g_filename_display_basename (mount_entry->mount_path);
+    name = mount_to_icon_or_name (mount_entry, FALSE);
 
   return name;
 }
@@ -1794,7 +1850,23 @@ g_unix_mount_guess_name (GUnixMountEntry
 GIcon *
 g_unix_mount_guess_icon (GUnixMountEntry *mount_entry)
 {
-  return g_themed_icon_new_with_default_fallbacks (type_to_icon (g_unix_mount_guess_type (mount_entry), FALSE));
+  GIcon *icon;
+  char *icon_name;
+
+  icon_name = mount_to_icon_or_name (mount_entry, TRUE);
+  if (g_path_is_absolute (icon_name))
+    {
+      GFile *file;
+
+      file = g_file_new_for_path (icon_name);
+      icon = g_file_icon_new (file);
+      g_object_unref (file);
+    }
+  else
+    icon = g_themed_icon_new_with_default_fallbacks (icon_name);
+  g_free (icon_name);
+
+  return icon;
 }
 
 /**
