forked from enlightenment/efl
parent
34960aa06c
commit
d4033a6dc1
|
@ -3,10 +3,19 @@
|
|||
# include "elementary_config.h"
|
||||
#endif
|
||||
#ifndef ELM_LIB_QUICKLAUNCH
|
||||
static void
|
||||
changed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
||||
{
|
||||
Evas_Object *ck2 = data;
|
||||
printf("ck %p to %i\n", obj, elm_check_state_get(obj));
|
||||
elm_check_state_set(ck2, elm_check_state_get(obj));
|
||||
printf("ck2 %p is now %i\n", ck2, elm_check_state_get(ck2));
|
||||
}
|
||||
|
||||
void
|
||||
test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Evas_Object *win, *bg, *bx, *ic, *ck;
|
||||
Evas_Object *win, *bg, *bx, *ic, *ck, *ck0;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
win = elm_win_add(NULL, "checks", ELM_WIN_BASIC);
|
||||
|
@ -37,6 +46,8 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
|||
evas_object_show(ck);
|
||||
evas_object_show(ic);
|
||||
|
||||
ck0 = ck;
|
||||
|
||||
ic = elm_icon_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||
elm_icon_file_set(ic, buf, NULL);
|
||||
|
@ -48,6 +59,8 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
|||
evas_object_show(ck);
|
||||
evas_object_show(ic);
|
||||
|
||||
evas_object_smart_callback_add(ck, "changed", changed_cb, ck0);
|
||||
|
||||
ck = elm_check_add(win);
|
||||
elm_object_text_set(ck, "Label Only");
|
||||
elm_box_pack_end(bx, ck);
|
||||
|
|
Loading…
Reference in New Issue