Support special icons for xdg user dirs

The icon names are folder-documents, folder-download, folder-music,
folder-pictures, folder-publicshare, folder-templates, folder-videos.
See bug 541276.
This commit is contained in:
Matthias Clasen 2009-06-15 01:45:34 -04:00
parent 50a7f53055
commit 129eb07482

View File

@ -1579,6 +1579,20 @@ _g_local_file_info_get (const char *basename,
icon = g_themed_icon_new ("user-home"); icon = g_themed_icon_new ("user-home");
else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0) else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0)
icon = g_themed_icon_new ("user-desktop"); icon = g_themed_icon_new ("user-desktop");
else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS)) == 0)
icon = g_themed_icon_new_with_default_fallbacks ("folder-documents");
else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD)) == 0)
icon = g_themed_icon_new_with_default_fallbacks ("folder-download");
else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_MUSIC)) == 0)
icon = g_themed_icon_new_with_default_fallbacks ("folder-music");
else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_PICTURES)) == 0)
icon = g_themed_icon_new_with_default_fallbacks ("folder-pictures");
else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_PUBLIC_SHARE)) == 0)
icon = g_themed_icon_new_with_default_fallbacks ("folder-publicshare");
else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_TEMPLATES)) == 0)
icon = g_themed_icon_new_with_default_fallbacks ("folder-templates");
else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS)) == 0)
icon = g_themed_icon_new_with_default_fallbacks ("folder-videos");
else else
{ {
icon = g_content_type_get_icon (content_type); icon = g_content_type_get_icon (content_type);