summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-09-22 16:22:52 +0100
committerTom Hacohen <tom@stosb.com>2014-09-22 16:34:30 +0100
commita1f38651fa7ecd9b07c8678ef6d4ef8ab284fbcb (patch)
treeecae6539bd9c9dc3c58a1df4ac6ae5c09237b1cf
parent205949580e123189e839a874b70dc68c36a79c81 (diff)
Improve pdf loading handling.
-rw-r--r--src/bin/main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index aee0413..c9034db 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -24,6 +24,14 @@ my_win_del(void *data, Evas_Object *obj, void *event_info)
24 24
25Evas_Object *main_win = NULL; 25Evas_Object *main_win = NULL;
26 26
27static void
28_pdf_file_set(const char *filename, int page)
29{
30 char buf[20];
31 snprintf(buf, sizeof(buf), "%d", page);
32 efl_file_set(filename, buf);
33}
34
27int 35int
28main(int argc, char *argv[]) 36main(int argc, char *argv[])
29{ 37{
@@ -91,7 +99,7 @@ main(int argc, char *argv[])
91 pdf = eo_add(ELM_IMAGE_CLASS, main_win, 99 pdf = eo_add(ELM_IMAGE_CLASS, main_win,
92 elm_obj_image_smooth_set(EINA_TRUE), 100 elm_obj_image_smooth_set(EINA_TRUE),
93 elm_obj_image_aspect_fixed_set(EINA_TRUE), 101 elm_obj_image_aspect_fixed_set(EINA_TRUE),
94 efl_file_set(filename, "0"), 102 _pdf_file_set(filename, 0),
95 evas_obj_visibility_set(EINA_TRUE)); 103 evas_obj_visibility_set(EINA_TRUE));
96 elm_win_resize_object_add(main_win, pdf); 104 elm_win_resize_object_add(main_win, pdf);
97 eo_unref(pdf); 105 eo_unref(pdf);