aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/options.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.c
parentoops i broke url fetching in generla in terminology! fix! (diff)
downloadterminology-0dcc9e20440e34edea7b2e27151ad6ffbf4e07e4.tar.gz
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.c')
-rw-r--r--src/bin/options.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/bin/options.c b/src/bin/options.c
index 80b8019..c2091f7 100644
--- a/src/bin/options.c
+++ b/src/bin/options.c
@@ -12,6 +12,8 @@
#include "config.h"
#include "termio.h"
+#include "background_generated.h"
+
static Evas_Object *op_frame, *op_box = NULL, *op_toolbar = NULL,
*op_opbox = NULL, *op_tbox = NULL, *op_temp = NULL,
*op_over = NULL;
@@ -26,7 +28,7 @@ _cb_op_font(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UN
{
if (mode == 1) return;
mode = 1;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -34,7 +36,7 @@ _cb_op_theme(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __U
{
if (mode == 2) return;
mode = 2;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -42,7 +44,7 @@ _cb_op_wallpaper(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
{
if (mode == 3) return;
mode = 3;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -50,7 +52,7 @@ _cb_op_colors(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __
{
if (mode == 4) return;
mode = 4;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -58,7 +60,7 @@ _cb_op_video(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __U
{
if (mode == 5) return;
mode = 5;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -66,7 +68,7 @@ _cb_op_behavior(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
{
if (mode == 6) return;
mode = 6;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -74,7 +76,7 @@ _cb_op_helpers(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event _
{
if (mode == 7) return;
mode = 7;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -119,7 +121,7 @@ _cb_opdt_hide_done(void *data, Evas_Object *obj __UNUSED__, const char *sig __UN
case 7: options_helpers(op_opbox, data); break;
default: break;
}
- edje_object_signal_emit(saved_bg, "optdetails,show", "terminology");
+ background_option_details_show_emit(saved_bg);
}
void
@@ -138,7 +140,7 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
op_opbox = o = elm_box_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- edje_object_part_swallow(bg, "terminology.optdetails", o);
+ background_option_details_set(bg, o);
evas_object_show(o);
op_frame = o = elm_frame_add(win);
@@ -191,25 +193,25 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
evas_object_show(o);
evas_object_smart_callback_add(o, "changed", _cb_op_tmp_chg, config);
- edje_object_part_swallow(bg, "terminology.options", op_frame);
+ background_options_set(bg, op_frame);
evas_object_show(op_frame);
}
else if ((op_opbox) && (!op_out))
- edje_object_signal_emit(bg, "optdetails,show", "terminology");
+ background_option_details_show_emit(bg);
if (!op_out)
{
- edje_object_signal_callback_add(bg, "optdetails,hide,done",
- "terminology",
- _cb_opdt_hide_done, term);
+ background_option_details_hide_done_callback_add(bg,
+ _cb_opdt_hide_done,
+ term);
op_over = o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_color_set(o, 0, 0, 0, 0);
- edje_object_part_swallow(bg, "terminology.dismiss", o);
+ background_dismiss_set(bg, o);
evas_object_show(o);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
_cb_mouse_down, term);
- edje_object_signal_emit(bg, "options,show", "terminology");
+ background_options_show_emit(bg);
op_out = EINA_TRUE;
elm_object_focus_set(op_toolbar, EINA_TRUE);
if (op_del_timer)
@@ -220,13 +222,13 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
}
else
{
- edje_object_signal_callback_del(bg, "optdetails,hide,done",
- "terminology",
- _cb_opdt_hide_done);
+ background_option_details_hide_done_callback_del_full(bg,
+ _cb_opdt_hide_done,
+ NULL);
evas_object_del(op_over);
op_over = NULL;
- edje_object_signal_emit(bg, "options,hide", "terminology");
- edje_object_signal_emit(bg, "optdetails,hide", "terminology");
+ background_options_hide_emit(bg);
+ background_option_details_hide_emit(bg);
op_out = EINA_FALSE;
elm_object_focus_set(op_frame, EINA_FALSE);
elm_object_focus_set(term, EINA_TRUE);