[nautilus] Move getting xdg user directories icons into the sidebar



commit b1c92737588e145852e126af42469425877eca2a
Author: William Jon McCann <jmccann redhat com>
Date:   Wed Jul 11 10:56:41 2012 -0400

    Move getting xdg user directories icons into the sidebar
    
    Since it is the only place it is used or needed.

 libnautilus-private/nautilus-icon-info.c |   25 -------------------------
 libnautilus-private/nautilus-icon-info.h |    2 --
 src/nautilus-places-sidebar.c            |   27 ++++++++++++++++++++++++++-
 3 files changed, 26 insertions(+), 28 deletions(-)
---
diff --git a/libnautilus-private/nautilus-icon-info.c b/libnautilus-private/nautilus-icon-info.c
index 453bd0c..9264df8 100644
--- a/libnautilus-private/nautilus-icon-info.c
+++ b/libnautilus-private/nautilus-icon-info.c
@@ -675,28 +675,3 @@ nautilus_icon_theme_can_render (GThemedIcon *icon)
 
 	return FALSE;
 }
-
-GIcon *
-nautilus_user_special_directory_get_gicon (GUserDirectory directory)
-{
-
-	#define ICON_CASE(x) \
-		case G_USER_DIRECTORY_ ## x:\
-			return g_themed_icon_new (NAUTILUS_ICON_FOLDER_ ## x);
-
-	switch (directory) {
-
-		ICON_CASE (DOCUMENTS);
-		ICON_CASE (DOWNLOAD);
-		ICON_CASE (MUSIC);
-		ICON_CASE (PICTURES);
-		ICON_CASE (PUBLIC_SHARE);
-		ICON_CASE (TEMPLATES);
-		ICON_CASE (VIDEOS);
-
-	default:
-		return g_themed_icon_new ("folder-symbolic");
-	}
-
-	#undef ICON_CASE
-}
diff --git a/libnautilus-private/nautilus-icon-info.h b/libnautilus-private/nautilus-icon-info.h
index 924918c..6a0f95a 100644
--- a/libnautilus-private/nautilus-icon-info.h
+++ b/libnautilus-private/nautilus-icon-info.h
@@ -84,8 +84,6 @@ gint  nautilus_get_icon_size_for_stock_size          (GtkIconSize        size);
 guint nautilus_icon_get_emblem_size_for_icon_size    (guint              size);
 
 gboolean nautilus_icon_theme_can_render              (GThemedIcon *icon);
-GIcon * nautilus_user_special_directory_get_gicon (GUserDirectory directory);
-
 
 G_END_DECLS
 
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 7e0578a..e6ee652 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -398,6 +398,31 @@ sidebar_update_restore_selection (NautilusPlacesSidebar *sidebar,
 	}
 }
 
+static GIcon *
+special_directory_get_gicon (GUserDirectory directory)
+{
+
+	#define ICON_CASE(x) \
+		case G_USER_DIRECTORY_ ## x:\
+			return g_themed_icon_new (NAUTILUS_ICON_FOLDER_ ## x);
+
+	switch (directory) {
+
+		ICON_CASE (DOCUMENTS);
+		ICON_CASE (DOWNLOAD);
+		ICON_CASE (MUSIC);
+		ICON_CASE (PICTURES);
+		ICON_CASE (PUBLIC_SHARE);
+		ICON_CASE (TEMPLATES);
+		ICON_CASE (VIDEOS);
+
+	default:
+		return g_themed_icon_new ("folder-symbolic");
+	}
+
+	#undef ICON_CASE
+}
+
 static void
 update_places (NautilusPlacesSidebar *sidebar)
 {
@@ -494,7 +519,7 @@ update_places (NautilusPlacesSidebar *sidebar)
 
 		root = g_file_new_for_path (path);
 		name = g_file_get_basename (root);
-		icon = nautilus_user_special_directory_get_gicon (index);
+		icon = special_directory_get_gicon (index);
 		mount_uri = g_file_get_uri (root);
 		tooltip = g_file_get_parse_name (root);
 



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