[libdazzle] tests: add standard icon type
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] tests: add standard icon type
- Date: Tue, 5 Dec 2017 10:23:22 +0000 (UTC)
commit c816b57df0583dc46435198fccf5be87dc7ce032
Author: Christian Hergert <chergert redhat com>
Date: Tue Dec 5 02:17:59 2017 -0800
tests: add standard icon type
We could use symbolics, but this is a bit more fun for now.
tests/test-tree.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/tests/test-tree.c b/tests/test-tree.c
index 0665a4c..db2dcc9 100644
--- a/tests/test-tree.c
+++ b/tests/test-tree.c
@@ -19,6 +19,7 @@ build_node_cb (DzlTreeBuilder *builder,
enumerator = g_file_enumerate_children (file,
G_FILE_ATTRIBUTE_STANDARD_NAME","
+ G_FILE_ATTRIBUTE_STANDARD_ICON","
G_FILE_ATTRIBUTE_STANDARD_TYPE,
0, NULL, NULL);
@@ -34,15 +35,11 @@ build_node_cb (DzlTreeBuilder *builder,
child_node = dzl_tree_node_new ();
dzl_tree_node_set_item (child_node, G_OBJECT (child));
dzl_tree_node_set_text (child_node, g_file_info_get_name (info));
+ dzl_tree_node_set_gicon (child_node, g_file_info_get_icon (info));
dzl_tree_node_set_reset_on_collapse (child_node, TRUE);
if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
- {
- dzl_tree_node_set_children_possible (child_node, TRUE);
- dzl_tree_node_set_icon_name (child_node, "folder-symbolic");
- }
- else
- dzl_tree_node_set_icon_name (child_node, "text-x-generic-symbolic");
+ dzl_tree_node_set_children_possible (child_node, TRUE);
dzl_tree_node_append (node, child_node);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]