summaryrefslogtreecommitdiff
path: root/src/bin/options_font.c
diff options
context:
space:
mode:
authorFlavio Vinicius Alvares Ceolin <flavio.ceolin@profusion.mobi>2012-10-19 22:04:01 +0000
committerFlavio Vinicius Alvares Ceolin <flavio.ceolin@profusion.mobi>2012-10-19 22:04:01 +0000
commit0dcc9e20440e34edea7b2e27151ad6ffbf4e07e4 (patch)
tree50352d12c715fb06ec628a3bc8ca256961c9fdbf /src/bin/options_font.c
parent26c02a3f9e7ce0874a79a97c82cebf4cc03236f7 (diff)
Using the edje_codegen to handle with the theme
Using the code generated to handle the parts of the edj file. Trying to avoid mistakes with the parts names and make the code more independent from the theme (the parts can change the name since it maintaining the same api) SVN revision: 78271
Diffstat (limited to 'src/bin/options_font.c')
-rw-r--r--src/bin/options_font.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/options_font.c b/src/bin/options_font.c
index af578a0..908a7cc 100644
--- a/src/bin/options_font.c
+++ b/src/bin/options_font.c
@@ -7,6 +7,8 @@
7#include "options_font.h" 7#include "options_font.h"
8#include "utils.h" 8#include "utils.h"
9 9
10#include "fontpreview_generated.h"
11
10#define TEST_STRING "oislOIS.015!|," 12#define TEST_STRING "oislOIS.015!|,"
11 13
12static Evas_Object *op_fontslider, *op_fontlist, *op_fsml, *op_fbig; 14static Evas_Object *op_fontslider, *op_fontlist, *op_fsml, *op_fbig;
@@ -84,7 +86,7 @@ static void
84_cb_op_font_preview_del(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event __UNUSED__) 86_cb_op_font_preview_del(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event __UNUSED__)
85{ 87{
86 Evas_Object *o; 88 Evas_Object *o;
87 o = edje_object_part_swallow_get(obj, "terminology.text.preview"); 89 o = fontpreview_text_preview_get(obj);
88 if (o) evas_object_del(o); 90 if (o) evas_object_del(o);
89} 91}
90 92
@@ -98,7 +100,7 @@ _cb_op_font_preview_eval(void *data, Evas *e __UNUSED__, Evas_Object *obj, void
98 char buf[4096]; 100 char buf[4096];
99 101
100 if (!evas_object_visible_get(obj)) return; 102 if (!evas_object_visible_get(obj)) return;
101 if (edje_object_part_swallow_get(obj, "terminology.text.preview")) return; 103 if (fontpreview_text_preview_get(obj)) return;
102 evas_object_geometry_get(obj, &ox, &oy, &ow, &oh); 104 evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
103 if ((ow < 2) || (oh < 2)) return; 105 if ((ow < 2) || (oh < 2)) return;
104 evas_output_viewport_get(evas_object_evas_get(obj), &vx, &vy, &vw, &vh); 106 evas_output_viewport_get(evas_object_evas_get(obj), &vx, &vy, &vw, &vh);
@@ -118,7 +120,7 @@ _cb_op_font_preview_eval(void *data, Evas *e __UNUSED__, Evas_Object *obj, void
118 evas_object_text_font_set(o, f->name, config->font.size); 120 evas_object_text_font_set(o, f->name, config->font.size);
119 evas_object_geometry_get(o, NULL, NULL, &ow, &oh); 121 evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
120 evas_object_size_hint_min_set(o, ow, oh); 122 evas_object_size_hint_min_set(o, ow, oh);
121 edje_object_part_swallow(obj, "terminology.text.preview", o); 123 fontpreview_text_preview_set(obj, o);
122 } 124 }
123} 125}
124 126
@@ -189,7 +191,6 @@ _cb_font_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *
189 evas_object_event_callback_del_full(term, EVAS_CALLBACK_RESIZE, 191 evas_object_event_callback_del_full(term, EVAS_CALLBACK_RESIZE,
190 _cb_term_resize, term); 192 _cb_term_resize, term);
191} 193}
192
193void 194void
194options_font_clear(void) 195options_font_clear(void)
195{ 196{