aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_photocam.c
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-06-09 16:09:47 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-06-09 20:22:42 +0900
commit7a7fca0bf282300d67d1c114eb2de3741bff53e2 (patch)
tree5134aafdd03339540d6805d3d90c9f6fb07b683d /src/bin/elementary/test_photocam.c
parentelm_widget: add factory method to the widget (diff)
downloadefl-7a7fca0bf282300d67d1c114eb2de3741bff53e2.tar.gz
Efl.Ui.Image.Zoomable: make zoomable to work with edj file
image.zoomable can load edj files now. usage: efl_file_set(zoomable, "../somefile.edj", "mygroupname"); test: elm_test -> photocam click "open" btn select an edj file, it would show first group in selected edj file. @feature
Diffstat (limited to 'src/bin/elementary/test_photocam.c')
-rw-r--r--src/bin/elementary/test_photocam.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c
index 26c520ffcc..ed549c2865 100644
--- a/src/bin/elementary/test_photocam.c
+++ b/src/bin/elementary/test_photocam.c
@@ -133,8 +133,21 @@ my_bt_open(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
Evas_Object *ph = data;
const char *file = event_info;
- if (file)
+ if (file && !eina_str_has_extension(file, ".edj"))
elm_photocam_file_set(ph, file);
+ else if (file)
+ {
+ Eina_List *grps = edje_file_collection_list(file);
+
+ if (eina_list_count(grps) > 0)
+ {
+ efl_file_set(ph, file, eina_list_nth(grps, 0));
+ printf("Successfully set the edje file: %s, group: %s\n", file, eina_list_nth(grps, 0));
+ }
+ else printf("Failed to set edje file\n");
+
+ eina_list_free(grps);
+ }
}
static void