aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2015-12-23 19:12:34 +0200
committerAndrii Kroitor <an.kroitor@samsung.com>2015-12-24 09:52:25 +0200
commitc03d1cfc6ffea43d7c3d99eb65ac3f73cbbb278b (patch)
treea843326122f5917d79440c1ed3a8a4d214381961
parentproject_manager: remove deprecated method calls (diff)
downloadeflete-c03d1cfc6ffea43d7c3d99eb65ac3f73cbbb278b.tar.gz
group_manager: add gm_part_type_text_get method
-rw-r--r--src/bin/project_manager/group_manager.c32
-rw-r--r--src/bin/project_manager/group_manager.h3
-rw-r--r--src/bin/ui/property_group.c4
3 files changed, 37 insertions, 2 deletions
diff --git a/src/bin/project_manager/group_manager.c b/src/bin/project_manager/group_manager.c
index 529cd3edc..4c3e4cd6b 100644
--- a/src/bin/project_manager/group_manager.c
+++ b/src/bin/project_manager/group_manager.c
@@ -679,3 +679,35 @@ gm_part_item_restack(Part_ *part, Eina_Stringshare *part_item, Eina_Stringshare
else
part->items = eina_list_append(part->items, part_item);
}
+
+/**
+ * ref http://docs.enlightenment.org/auto/edje/group__Edje__Object__Part.html
+ */
+static char *part_types[] = {
+ "NONE",
+ "RECTANGLE",
+ "TEXT",
+ "IMAGE",
+ "SWALLOW",
+ "TEXTBLOCK",
+ "GRADIENT",
+ "GROUP",
+ "BOX",
+ "TABLE",
+ "EXTERNAL",
+ "PROXY",
+ "SPACER",
+ "MESH NODE",
+ "LIGHT",
+ "CAMERA",
+ "SNAPSHOT"
+};
+static unsigned int part_types_count = 16;
+
+const char *
+gm_part_type_text_get(Edje_Part_Type part_type)
+{
+ assert(part_type <= part_types_count);
+
+ return part_types[part_type];
+}
diff --git a/src/bin/project_manager/group_manager.h b/src/bin/project_manager/group_manager.h
index af9c1ea95..ace996c07 100644
--- a/src/bin/project_manager/group_manager.h
+++ b/src/bin/project_manager/group_manager.h
@@ -136,4 +136,7 @@ gm_part_restack(Part_ *part, Part_ *rel_part);
void
gm_part_item_restack(Part_ *part, Eina_Stringshare *part_item, Eina_Stringshare *relative_part_item);
+
+const char *
+gm_part_type_text_get(Edje_Part_Type part_type);
#endif /* GROUP_MANAGER_H */
diff --git a/src/bin/ui/property_group.c b/src/bin/ui/property_group.c
index fd6907865..a20fe1a9f 100644
--- a/src/bin/ui/property_group.c
+++ b/src/bin/ui/property_group.c
@@ -1426,7 +1426,7 @@ ui_property_part_set(Evas_Object *property, Part_ *part)
item = prop_part_name_add(box, pd);
elm_box_pack_end(box, item);
- item = prop_part_type_add(box, _("type"), wm_part_type_get(pd->part->type));
+ item = prop_part_type_add(box, _("type"), gm_part_type_text_get(pd->part->type));
elm_box_pack_end(box, item);
pd->attributes.part.scale_item = prop_part_scale_add(box, pd);
elm_box_pack_end(box, pd->attributes.part.scale_item);
@@ -1468,7 +1468,7 @@ ui_property_part_set(Evas_Object *property, Part_ *part)
else
{
prop_part_name_update(pd);
- prop_part_type_update(wm_part_type_get(pd->part->type));
+ prop_part_type_update(gm_part_type_text_get(pd->part->type));
PART_ATTR_1CHECK_UPDATE(part, scale, part)
PART_ATTR_1CHECK_UPDATE(part, mouse_events, part)
PART_ATTR_1CHECK_UPDATE(part, repeat_events, part)