Re: GEmblemedIcons help



Ok, thanks for the support. If I'm not wrong, you are also the GIO
maintainer, so please observe this patch to GIO for emblems!
#
# Lauchpad URL: https://bugs.launchpad.net/bugs/126103
# Description: with this patch GIO filemanagers will pick an emblemed icon for each xdg-user-dir
#

--- glib2.0-2.19.6/gio/glocalfileinfo.c	2009-02-02 20:17:45.000000000 +0100
+++ glib2.0-2.19.6.new/gio/glocalfileinfo.c	2009-02-13 20:44:33.000000000 +0100
@@ -1576,6 +1576,21 @@ _g_local_file_info_get (const char      
                 icon = g_themed_icon_new ("user-home");
               else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0) 
                 icon = g_themed_icon_new ("user-desktop");
+              else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS)) == 0)
+                icon = g_emblemed_icon_new (g_themed_icon_new("folder"), g_emblem_new(g_themed_icon_new("emblem-documents")));
+              else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_MUSIC)) == 0)
+                icon = g_emblemed_icon_new (g_themed_icon_new("folder"), g_emblem_new(g_themed_icon_new("emblem-sound")));
+              else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_PICTURES)) == 0)
+                icon = g_emblemed_icon_new (g_themed_icon_new("folder"), g_emblem_new(g_themed_icon_new("emblem-photos")));
+              else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS)) == 0)
+                icon = g_emblemed_icon_new (g_themed_icon_new("folder"), g_emblem_new(g_themed_icon_new("emblem-multimedia")));
+              else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD)) == 0)
+                icon = g_emblemed_icon_new (g_themed_icon_new("folder"), g_emblem_new(g_themed_icon_new("emblem-web")));
+              /*else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_PUBLIC_SHARE)) == 0)
+                icon = g_emblemed_icon_new (g_themed_icon_new("folder"), g_emblem_new(g_themed_icon_new("emblem-shared")));*/ /* nautilus already appends this emblem */
+              else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_TEMPLATES)) == 0)
+                icon = g_emblemed_icon_new (g_themed_icon_new("folder"), g_emblem_new(g_themed_icon_new("emblem-new")));
+              
               else 
                 {
                   icon = g_content_type_get_icon (content_type);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]