summaryrefslogtreecommitdiff
path: root/src/modules/datetime_input_ctxpopup
diff options
context:
space:
mode:
authorKim Shinwoo <kimcinoo.efl@gmail.com>2012-08-29 09:02:21 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-08-29 09:02:21 +0000
commit7adba5a9f6a95e9921de3651ef3a4a2914ff8f34 (patch)
treef45eed4be8ac57495c7f475ee3f7231201cc3664 /src/modules/datetime_input_ctxpopup
parentde607d2165bf3eb7c3195aff1a1f16a38362673a (diff)
From: Kim Shinwoo <kimcinoo.efl@gmail.com>
Subject: [E-devel] [patch][elementary] diskselector - select option, disabling auto selection. datetime - show even number of items by default, an diskselector item which is right in the center of diskselector is selected automatically. and if the item style emit elm,action,click signal, the item is selected also. so there would be a case that item select callback is called by two ways. one is clicking the item, the other is locating item right in the center of diskselector (if number of displayed item is odd, then after scrolling the selected callback is called always). because of this reason, datetime module always set number of displayed item to even number. to resolve this issue, i add a api to enable or disable default behavior - the auto selection - that can be found on the attachment. moreover the second attachment is for datetime module, now the datetime can show even number of items. SVN revision: 75820
Diffstat (limited to 'src/modules/datetime_input_ctxpopup')
-rw-r--r--src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c b/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c
index 7c58d32b9..7a72bc744 100644
--- a/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c
+++ b/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c
@@ -185,9 +185,9 @@ _field_clicked_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
185 evas_object_geometry_get(obj, &x, &y, &w, &h); 185 evas_object_geometry_get(obj, &x, &y, &w, &h);
186 evas_object_geometry_get(elm_widget_top_get(ctx_mod->mod_data.base), NULL, NULL, &width, NULL); 186 evas_object_geometry_get(elm_widget_top_get(ctx_mod->mod_data.base), NULL, NULL, &width, NULL);
187 evas_object_size_hint_min_set(ctx_mod->ctxpopup, width, -1); 187 evas_object_size_hint_min_set(ctx_mod->ctxpopup, width, -1);
188 display_item_num = width / (w + elm_config_finger_size_get()); 188 display_item_num = w + elm_config_finger_size_get();
189 // always display even number of items to avoid autoselection 189
190 if (display_item_num % 2) display_item_num -= 1; 190 elm_diskselector_autoselect_set(diskselector, EINA_FALSE);
191 if (display_item_num < DISKSELECTOR_MIN_ITEMS) 191 if (display_item_num < DISKSELECTOR_MIN_ITEMS)
192 display_item_num = DISKSELECTOR_MIN_ITEMS; 192 display_item_num = DISKSELECTOR_MIN_ITEMS;
193 elm_diskselector_display_item_num_set(diskselector, display_item_num); 193 elm_diskselector_display_item_num_set(diskselector, display_item_num);