[gvfs/wip/rishi/goa: 5/6] Valid folder icons
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/rishi/goa: 5/6] Valid folder icons
- Date: Thu, 20 Aug 2015 12:42:56 +0000 (UTC)
commit 8bdb3a824f35636ab74d78f129063d2a8fb0752c
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Aug 20 13:59:09 2015 +0200
Valid folder icons
daemon/gvfsbackendgoogle.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c
index 5fd0ea5..dad8381 100644
--- a/daemon/gvfsbackendgoogle.c
+++ b/daemon/gvfsbackendgoogle.c
@@ -430,6 +430,7 @@ build_file_info (GVfsBackendGoogle *self,
if (content_type != NULL)
{
GIcon *icon;
+ GIcon *symbolic_icon;
/* We want native Drive content to open in the browser. */
if (!is_symlink && g_str_has_prefix (content_type, CONTENT_TYPE_PREFIX_GOOGLE))
@@ -446,13 +447,22 @@ build_file_info (GVfsBackendGoogle *self,
g_file_info_set_content_type (info, content_type);
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, content_type);
- icon = g_content_type_get_icon (content_type);
+ if (file_type == G_FILE_TYPE_DIRECTORY)
+ {
+ icon = g_themed_icon_new ("folder");
+ symbolic_icon = g_themed_icon_new ("folder-symbolic");
+ }
+ else
+ {
+ icon = g_content_type_get_icon (content_type);
+ symbolic_icon = g_content_type_get_symbolic_icon (content_type);
+ }
+
g_file_info_set_icon (info, icon);
- g_object_unref (icon);
+ g_file_info_set_symbolic_icon (info, symbolic_icon);
- icon = g_content_type_get_symbolic_icon (content_type);
- g_file_info_set_symbolic_icon (info, icon);
g_object_unref (icon);
+ g_object_unref (symbolic_icon);
}
g_file_info_set_file_type (info, file_type);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]