aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_gengrid.c
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-08-28 13:54:50 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2015-08-28 13:59:52 +0530
commit5483d064c71e034807716c923839dcd6286a2a94 (patch)
tree59dcafb579abc98420ac0d635dd75bd6dfad259f /legacy/elementary/src/bin/test_gengrid.c
parentelementary: Port evas object smart callbacks to use eo event callbacks (diff)
downloadefl-5483d064c71e034807716c923839dcd6286a2a94.tar.gz
test_gengrid: add item_select_on_focus_disabled option in gengrid2 test
Diffstat (limited to 'legacy/elementary/src/bin/test_gengrid.c')
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index 1de161ab79..e41f2127c2 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -775,6 +775,15 @@ _size_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
elm_gengrid_item_size_set(grid, ELM_SCALE_SIZE(size), ELM_SCALE_SIZE(size));
}
+static void
+_gg_focus_item_select_on_focus_disable_changed_cb(void *data EINA_UNUSED,
+ Evas_Object *obj,
+ void *event_info
+ EINA_UNUSED)
+{
+ elm_config_item_select_on_focus_disabled_set(elm_check_state_get(obj));
+}
+
void
test_gengrid2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@@ -872,6 +881,17 @@ test_gengrid2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
elm_box_pack_end(hbx, ck);
evas_object_show(ck);
+ ck = elm_check_add(hbx);
+ elm_object_text_set(ck, "Item Select on Focus disable");
+ elm_check_state_set(ck, elm_config_item_select_on_focus_disabled_get());
+ evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
+ evas_object_smart_callback_add(ck, "changed",
+ _gg_focus_item_select_on_focus_disable_changed_cb,
+ NULL);
+ elm_box_pack_end(hbx, ck);
+ evas_object_show(ck);
+
+
gic = elm_gengrid_item_class_new();
gic->item_style = "default";
gic->func.text_get = grid_text_get;
@@ -1669,15 +1689,6 @@ _grid_reorder_mode(void *data, Evas_Object *obj,
}
static void
-_gg_focus_item_select_on_focus_disable_changed_cb(void *data EINA_UNUSED,
- Evas_Object *obj,
- void *event_info
- EINA_UNUSED)
-{
- elm_config_item_select_on_focus_disabled_set(elm_check_state_get(obj));
-}
-
-static void
_gg_first_item_focus_on_first_focus_in_cb(void *data EINA_UNUSED, Evas_Object *obj,
void *event_info EINA_UNUSED)
{