From 3bf6c6f4547f4cb00ba71a8da62a1a290119a1f7 Mon Sep 17 00:00:00 2001 From: raster Date: Fri, 21 Oct 2011 04:36:25 +0000 Subject: [PATCH] and really move all toggle stuff over to check. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64231 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- data/themes/widgets/toggle.edc | 13 ++++++------- src/lib/elm_check.c | 32 ++++++-------------------------- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/data/themes/widgets/toggle.edc b/data/themes/widgets/toggle.edc index 9b9a677..8194d54 100644 --- a/data/themes/widgets/toggle.edc +++ b/data/themes/widgets/toggle.edc @@ -1,5 +1,4 @@ group { name: "elm/check/base/toggle"; - alias: "elm/toggle/base/default"; images { image: "shelf_inset.png" COMP; image: "bt_basew.png" COMP; @@ -313,16 +312,16 @@ group { name: "elm/check/base/toggle"; } if (((get_int(is_rtl) == 1) && (dx <= 0.5)) || (get_int(is_rtl) == 0) && (dx > 0.5)) { - emit("elm,action,toggle,on", ""); + emit("elm,action,check,on", ""); } else { - emit("elm,action,toggle,off", ""); + emit("elm,action,check,off", ""); } } } - program { name: "toggle_on"; - signal: "elm,state,toggle,on"; + program { name: "check_on"; + signal: "elm,state,check,on"; source: "elm"; script { new Float:drag; @@ -335,8 +334,8 @@ group { name: "elm/check/base/toggle"; set_drag(PART:"button", drag, 0.0); } } - program { name: "toggle_off"; - signal: "elm,state,toggle,off"; + program { name: "check_off"; + signal: "elm,state,check,off"; source: "elm"; script { new Float:drag; diff --git a/src/lib/elm_check.c b/src/lib/elm_check.c index 2a7990c..7f08900 100644 --- a/src/lib/elm_check.c +++ b/src/lib/elm_check.c @@ -101,15 +101,9 @@ _theme_hook(Evas_Object *obj) else edje_object_signal_emit(wd->chk, "elm,state,icon,hidden", "elm"); if (wd->state) - { - edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm"); - edje_object_signal_emit(wd->chk, "elm,state,toggle,on", "elm"); - } + edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm"); else - { - edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm"); - edje_object_signal_emit(wd->chk, "elm,state,toggle,off", "elm"); - } + edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm"); if (wd->label) edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm"); else @@ -182,7 +176,6 @@ _signal_check_off(void *data, Evas_Object *obj __UNUSED__, const char *emission wd->state = EINA_FALSE; if (wd->statep) *wd->statep = wd->state; edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm"); - edje_object_signal_emit(wd->chk, "elm,state,toggle,off", "elm"); evas_object_smart_callback_call(data, SIG_CHANGED, NULL); } @@ -194,7 +187,6 @@ _signal_check_on(void *data, Evas_Object *obj __UNUSED__, const char *emission _ wd->state = EINA_TRUE; if (wd->statep) *wd->statep = wd->state; edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm"); - edje_object_signal_emit(wd->chk, "elm,state,toggle,on", "elm"); evas_object_smart_callback_call(data, SIG_CHANGED, NULL); } @@ -466,15 +458,9 @@ elm_check_state_set(Evas_Object *obj, Eina_Bool state) wd->state = state; if (wd->statep) *wd->statep = wd->state; if (wd->state) - { - edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm"); - edje_object_signal_emit(wd->chk, "elm,state,toggle,on", "elm"); - } + edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm"); else - { - edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm"); - edje_object_signal_emit(wd->chk, "elm,state,toggle,off", "elm"); - } + edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm"); } edje_object_message_signal_process(wd->chk); } @@ -501,15 +487,9 @@ elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) { wd->state = *wd->statep; if (wd->state) - { - edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm"); - edje_object_signal_emit(wd->chk, "elm,state,toggle,on", "elm"); - } + edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm"); else - { - edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm"); - edje_object_signal_emit(wd->chk, "elm,state,toggle,off", "elm"); - } + edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm"); } } else -- 2.7.4