GNOME GIT source code repository

summaryrefslogtreecommitdiff
authorMatthias Clasen <mclasen@redhat.com>2009-06-15 05:45:34 (GMT)
committer Matthias Clasen <mclasen@redhat.com>2009-06-15 05:45:34 (GMT)
commit129eb074823101102611690f053ffa246bb7784d (patch) (side-by-side diff)
treea4cd1eed8f61647ff4628d856dab182e9d662e3e
parent50a7f530557e35c6dfc543d969c0369d53d45a87 (diff)
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.
-rw-r--r--gio/glocalfileinfo.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 8289ef4..95ccf2e 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1577,9 +1577,23 @@ _g_local_file_info_get (const char *basename,
if (strcmp (path, g_get_home_dir ()) == 0)
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");
- else
+ 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
{
icon = g_content_type_get_icon (content_type);
if (G_IS_THEMED_ICON (icon))