Hello, I noticed that since glib 2.17, gio introduced a way to
associate an icon to the desktop folder, so that filemanagers will
display this icon instead of the normal folder icon.
Since we have XDG folders I think that this association can be done
for them too.
so I wrote a very simple patch to glib (that I attached) which needs
new "standard icons" to be added:
xdg-directory-documents
xdg-directory-downloads
xdg-directory-music
xdg-directory-pictures
xdg-directory-videos
xdg-directory-public-share
xdg-directory-templates

Is it possible to officially introduce them?
Thank you very much
--- gio/glocalfileinfo.c	2008-06-12 16:25:40.000000000 +0200
+++ patched/gio/glocalfileinfo.c	2008-07-02 19:03:37.000000000 +0200
@@ -1577,6 +1577,21 @@
                         preferred_icon = "user-home";
                       else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0) 
                         preferred_icon = "user-desktop";
+                      else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS)) == 0) 
+                        preferred_icon = "xdg-directory-documents";
+                      else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD)) == 0) 
+                        preferred_icon = "xdg-directory-downloads";
+                      else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_MUSIC)) == 0) 
+                        preferred_icon = "xdg-directory-music";
+                      else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_PICTURES)) == 0) 
+                        preferred_icon = "xdg-directory-pictures";
+                      else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_PUBLIC_SHARE)) == 0) 
+                        preferred_icon = "xdg-directory-public-share";
+                      else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_TEMPLATES)) == 0) 
+                        preferred_icon = "xdg-directory-templates";
+                      else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS)) == 0) 
+                        preferred_icon = "xdg-directory-videos";
+
                       if (S_ISDIR (statbuf.st_mode)) 
                         type_icon = "folder";
                       else if (statbuf.st_mode & S_IXUSR)
_______________________________________________
xdg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to