summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-10-21 04:36:25 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-10-21 04:36:25 +0000
commit6c10a447b170542029641803143d13eec4630496 (patch)
tree2eb595aa7759a20bab2f41120caffdea3732e4ae /legacy
parent1444302c2939e5e5e48ff2e22f8814158ce03c50 (diff)
and really move all toggle stuff over to check.
SVN revision: 64231
Diffstat (limited to 'legacy')
-rw-r--r--legacy/elementary/data/themes/widgets/toggle.edc13
-rw-r--r--legacy/elementary/src/lib/elm_check.c32
2 files changed, 12 insertions, 33 deletions
diff --git a/legacy/elementary/data/themes/widgets/toggle.edc b/legacy/elementary/data/themes/widgets/toggle.edc
index 9b9a6772e0..8194d5486b 100644
--- a/legacy/elementary/data/themes/widgets/toggle.edc
+++ b/legacy/elementary/data/themes/widgets/toggle.edc
@@ -1,5 +1,4 @@
1group { name: "elm/check/base/toggle"; 1group { name: "elm/check/base/toggle";
2 alias: "elm/toggle/base/default";
3 images { 2 images {
4 image: "shelf_inset.png" COMP; 3 image: "shelf_inset.png" COMP;
5 image: "bt_basew.png" COMP; 4 image: "bt_basew.png" COMP;
@@ -313,16 +312,16 @@ group { name: "elm/check/base/toggle";
313 } 312 }
314 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) || 313 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
315 (get_int(is_rtl) == 0) && (dx > 0.5)) { 314 (get_int(is_rtl) == 0) && (dx > 0.5)) {
316 emit("elm,action,toggle,on", ""); 315 emit("elm,action,check,on", "");
317 } 316 }
318 else { 317 else {
319 emit("elm,action,toggle,off", ""); 318 emit("elm,action,check,off", "");
320 } 319 }
321 320
322 } 321 }
323 } 322 }
324 program { name: "toggle_on"; 323 program { name: "check_on";
325 signal: "elm,state,toggle,on"; 324 signal: "elm,state,check,on";
326 source: "elm"; 325 source: "elm";
327 script { 326 script {
328 new Float:drag; 327 new Float:drag;
@@ -335,8 +334,8 @@ group { name: "elm/check/base/toggle";
335 set_drag(PART:"button", drag, 0.0); 334 set_drag(PART:"button", drag, 0.0);
336 } 335 }
337 } 336 }
338 program { name: "toggle_off"; 337 program { name: "check_off";
339 signal: "elm,state,toggle,off"; 338 signal: "elm,state,check,off";
340 source: "elm"; 339 source: "elm";
341 script { 340 script {
342 new Float:drag; 341 new Float:drag;
diff --git a/legacy/elementary/src/lib/elm_check.c b/legacy/elementary/src/lib/elm_check.c
index 2a7990c01b..7f08900f1f 100644
--- a/legacy/elementary/src/lib/elm_check.c
+++ b/legacy/elementary/src/lib/elm_check.c
@@ -101,15 +101,9 @@ _theme_hook(Evas_Object *obj)
101 else 101 else
102 edje_object_signal_emit(wd->chk, "elm,state,icon,hidden", "elm"); 102 edje_object_signal_emit(wd->chk, "elm,state,icon,hidden", "elm");
103 if (wd->state) 103 if (wd->state)
104 { 104 edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm");
105 edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm");
106 edje_object_signal_emit(wd->chk, "elm,state,toggle,on", "elm");
107 }
108 else 105 else
109 { 106 edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm");
110 edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm");
111 edje_object_signal_emit(wd->chk, "elm,state,toggle,off", "elm");
112 }
113 if (wd->label) 107 if (wd->label)
114 edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm"); 108 edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
115 else 109 else
@@ -182,7 +176,6 @@ _signal_check_off(void *data, Evas_Object *obj __UNUSED__, const char *emission
182 wd->state = EINA_FALSE; 176 wd->state = EINA_FALSE;
183 if (wd->statep) *wd->statep = wd->state; 177 if (wd->statep) *wd->statep = wd->state;
184 edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm"); 178 edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm");
185 edje_object_signal_emit(wd->chk, "elm,state,toggle,off", "elm");
186 evas_object_smart_callback_call(data, SIG_CHANGED, NULL); 179 evas_object_smart_callback_call(data, SIG_CHANGED, NULL);
187} 180}
188 181
@@ -194,7 +187,6 @@ _signal_check_on(void *data, Evas_Object *obj __UNUSED__, const char *emission _
194 wd->state = EINA_TRUE; 187 wd->state = EINA_TRUE;
195 if (wd->statep) *wd->statep = wd->state; 188 if (wd->statep) *wd->statep = wd->state;
196 edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm"); 189 edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm");
197 edje_object_signal_emit(wd->chk, "elm,state,toggle,on", "elm");
198 evas_object_smart_callback_call(data, SIG_CHANGED, NULL); 190 evas_object_smart_callback_call(data, SIG_CHANGED, NULL);
199} 191}
200 192
@@ -466,15 +458,9 @@ elm_check_state_set(Evas_Object *obj, Eina_Bool state)
466 wd->state = state; 458 wd->state = state;
467 if (wd->statep) *wd->statep = wd->state; 459 if (wd->statep) *wd->statep = wd->state;
468 if (wd->state) 460 if (wd->state)
469 { 461 edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm");
470 edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm");
471 edje_object_signal_emit(wd->chk, "elm,state,toggle,on", "elm");
472 }
473 else 462 else
474 { 463 edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm");
475 edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm");
476 edje_object_signal_emit(wd->chk, "elm,state,toggle,off", "elm");
477 }
478 } 464 }
479 edje_object_message_signal_process(wd->chk); 465 edje_object_message_signal_process(wd->chk);
480} 466}
@@ -501,15 +487,9 @@ elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep)
501 { 487 {
502 wd->state = *wd->statep; 488 wd->state = *wd->statep;
503 if (wd->state) 489 if (wd->state)
504 { 490 edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm");
505 edje_object_signal_emit(wd->chk, "elm,state,check,on", "elm");
506 edje_object_signal_emit(wd->chk, "elm,state,toggle,on", "elm");
507 }
508 else 491 else
509 { 492 edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm");
510 edje_object_signal_emit(wd->chk, "elm,state,check,off", "elm");
511 edje_object_signal_emit(wd->chk, "elm,state,toggle,off", "elm");
512 }
513 } 493 }
514 } 494 }
515 else 495 else