summaryrefslogtreecommitdiff
path: root/src/bin/options_font.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-06-18 02:56:58 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-06-18 02:56:58 +0000
commitfa397e90f68a67e38f8df86e4a3e48421d25fe9b (patch)
tree0c4779bf0f69b62ba0cb74a7f8c039665c117195 /src/bin/options_font.c
parentb090970d163e6963a820ae7b51830ee84892e308 (diff)
terminology: reload theme when file change.
NOTE: use edje_watch to test the change to your own theme faster. SVN revision: 72332
Diffstat (limited to 'src/bin/options_font.c')
-rw-r--r--src/bin/options_font.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bin/options_font.c b/src/bin/options_font.c
index d1feaac..b06d34d 100644
--- a/src/bin/options_font.c
+++ b/src/bin/options_font.c
@@ -23,6 +23,18 @@ static Eina_List *fonts = NULL;
23static Eina_Hash *fonthash = NULL; 23static Eina_Hash *fonthash = NULL;
24 24
25static void 25static void
26_reload_theme(void *data __UNUSED__, Evas_Object *obj,
27 const char *emission __UNUSED__, const char *source __UNUSED__)
28{
29 const char *file;
30 const char *group;
31
32 edje_object_file_get(obj, &file, &group);
33 edje_object_file_set(obj, file, group);
34 fprintf(stderr, "RELOADING THEME\n");
35}
36
37static void
26_update_preview(void) 38_update_preview(void)
27{ 39{
28 const Eina_List *l; 40 const Eina_List *l;
@@ -97,6 +109,7 @@ _cb_op_font_content_get(void *data, Evas_Object *obj, const char *part)
97 o = edje_object_add(evas_object_evas_get(obj)); 109 o = edje_object_add(evas_object_evas_get(obj));
98 edje_object_file_set(o, config_theme_path_get(config), 110 edje_object_file_set(o, config_theme_path_get(config),
99 "terminology/fontpreview"); 111 "terminology/fontpreview");
112 edje_object_signal_callback_add(o, "edje,change,file", "edje", _reload_theme, NULL);
100 113
101 if (!f->bitmap) 114 if (!f->bitmap)
102 font = f->name; 115 font = f->name;