diff options
author | William Jon McCann <jmccann@redhat.com> | 2012-08-28 18:13:59 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2012-08-30 11:24:19 -0400 |
commit | c47f093895ceb648429ef4ab85004b9c3941438d (patch) | |
tree | a1b4f406e29f5206743b015c77d85d81f0df9454 /programs | |
parent | 96daf6359e857818c3255d49c0c7d9375870aaa5 (diff) | |
download | gvfs-c47f093895ceb648429ef4ab85004b9c3941438d.tar.gz |
Add support for getting symbolic icons
https://bugzilla.gnome.org/show_bug.cgi?id=681458
Diffstat (limited to 'programs')
-rw-r--r-- | programs/gvfs-mount.c | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/programs/gvfs-mount.c b/programs/gvfs-mount.c index 1188ad93..2addcee7 100644 --- a/programs/gvfs-mount.c +++ b/programs/gvfs-mount.c @@ -351,12 +351,12 @@ iterate_gmain(void) } static void -show_themed_icon_names (GThemedIcon *icon, int indent) +show_themed_icon_names (GThemedIcon *icon, gboolean symbolic, int indent) { char **names; char **iter; - g_print ("%*sthemed icons:", indent, " "); + g_print ("%*s%sthemed icons:", indent, " ", symbolic ? "symbolic " : ""); names = NULL; @@ -472,7 +472,16 @@ list_mounts (GList *mounts, if (icon) { if (G_IS_THEMED_ICON (icon)) - show_themed_icon_names (G_THEMED_ICON (icon), indent + 2); + show_themed_icon_names (G_THEMED_ICON (icon), FALSE, indent + 2); + + g_object_unref (icon); + } + + icon = g_mount_get_symbolic_icon (mount); + if (icon) + { + if (G_IS_THEMED_ICON (icon)) + show_themed_icon_names (G_THEMED_ICON (icon), TRUE, indent + 2); g_object_unref (icon); } @@ -576,7 +585,16 @@ list_volumes (GList *volumes, if (icon) { if (G_IS_THEMED_ICON (icon)) - show_themed_icon_names (G_THEMED_ICON (icon), indent + 2); + show_themed_icon_names (G_THEMED_ICON (icon), FALSE, indent + 2); + + g_object_unref (icon); + } + + icon = g_volume_get_symbolic_icon (volume); + if (icon) + { + if (G_IS_THEMED_ICON (icon)) + show_themed_icon_names (G_THEMED_ICON (icon), TRUE, indent + 2); g_object_unref (icon); } @@ -649,10 +667,19 @@ list_drives (GList *drives, if (icon) { if (G_IS_THEMED_ICON (icon)) - show_themed_icon_names (G_THEMED_ICON (icon), indent + 2); + show_themed_icon_names (G_THEMED_ICON (icon), FALSE, indent + 2); g_object_unref (icon); } + icon = g_drive_get_symbolic_icon (drive); + if (icon) + { + if (G_IS_THEMED_ICON (icon)) + show_themed_icon_names (G_THEMED_ICON (icon), TRUE, indent + 2); + + g_object_unref (icon); + } + g_print ("%*sis_media_removable=%d\n", indent + 2, "", g_drive_is_media_removable (drive)); g_print ("%*shas_media=%d\n", indent + 2, "", g_drive_has_media (drive)); g_print ("%*sis_media_check_automatic=%d\n", indent + 2, "", g_drive_is_media_check_automatic (drive)); |