summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-09-24 16:32:30 +0100
committerTom Hacohen <tom@stosb.com>2014-09-24 16:32:30 +0100
commitfe5e09784fc001438ec078a2655f64c63659601a (patch)
tree7791e6397f61f5d193f4400bba1bb4dbf482fd5d
parent0c6d60e2325d9ed863fff376d14bdd18ccf6a32d (diff)
Added a working page indicator.
-rw-r--r--data/default.edc56
-rw-r--r--src/bin/main.c5
2 files changed, 44 insertions, 17 deletions
diff --git a/data/default.edc b/data/default.edc
index bcf7894..6e2c6be 100644
--- a/data/default.edc
+++ b/data/default.edc
@@ -53,26 +53,48 @@ collections {
53 } 53 }
54 } 54 }
55 } 55 }
56 text { name: "countdown_text"; 56 rect { name: "lower_part";
57 desc { state: "default" 0.0; 57 desc {
58 color: 255 255 255 255; 58 color: 0 0 0 0;
59 rel1.relative: 0.0 0.9; 59 rel1.relative: 0.0 0.9;
60 text {
61 text: "00:00:10";
62 ellipsis: -1;
63 font: "Sans";
64 size: 30;
65 min: 1 1;
66 align: 0.5 0.5;
67 }
68 } 60 }
69 desc { state: "almost_done"; 61 part { name: "countdown_text";
70 inherit: "default" 0.0; 62 type: TEXT;
71 color: 0 255 0 255; 63 desc { state: "default" 0.0;
64 color: 255 255 255 255;
65 rel2.relative: 0.5 1.0;
66 text {
67 text: "00:00:00";
68 ellipsis: -1;
69 font: "Sans";
70 size: 30;
71 min: 1 1;
72 align: 0.5 0.5;
73 }
74 }
75 desc { state: "almost_done";
76 inherit: "default" 0.0;
77 color: 0 255 0 255;
78 }
79 desc { state: "done";
80 inherit: "default" 0.0;
81 color: 255 0 0 255;
82 }
72 } 83 }
73 desc { state: "done"; 84 part { name: "slides_counter";
74 inherit: "default" 0.0; 85 type: TEXT;
75 color: 255 0 0 255; 86 desc { state: "default" 0.0;
87 color: 255 255 255 255;
88 rel1.relative: 0.5 0.0;
89 text {
90 text: "0/0";
91 ellipsis: -1;
92 font: "Sans";
93 size: 30;
94 min: 1 1;
95 align: 0.5 0.5;
96 }
97 }
76 } 98 }
77 } 99 }
78 /* Ignored. */ 100 /* Ignored. */
diff --git a/src/bin/main.c b/src/bin/main.c
index 57782ed..0d525b1 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -70,6 +70,11 @@ _pdf_page_set_all(int page)
70 } 70 }
71 } 71 }
72 72
73 {
74 char buf[256];
75 snprintf(buf, sizeof(buf), "%d/%d", page + 1, ctx.num_pages);
76 eo_do(ctx.preview.layout, elm_obj_widget_part_text_set("slides_counter", buf));
77 }
73 DBG("Set page: %s:%d", ctx.filename, page); 78 DBG("Set page: %s:%d", ctx.filename, page);
74} 79}
75 80