evas_object_smart_callback_call(cp->parent, SIG_CHANGED, NULL);
cp->button_state = L_BUTTON_PRESSED;
if (wd->lp_timer) ecore_timer_del(wd->lp_timer);
- wd->lp_timer = ecore_timer_add(1.0, _long_press_timer, cp);
+ wd->lp_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press_timer, cp);
}
static void
_draw_rects(data, x);
evas_object_smart_callback_call(cp->parent, SIG_CHANGED, NULL);
cp->button_state = R_BUTTON_PRESSED;
- wd->lp_timer = ecore_timer_add(1.0, _long_press_timer, cp);
+ wd->lp_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press_timer, cp);
}
static void
if (ev->button != 1) return;
// if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
if (wd->longpress_timer) ecore_timer_del(wd->longpress_timer);
- wd->longpress_timer = ecore_timer_add(1.0, _long_press, data);
+ wd->longpress_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press, data);
wd->downx = ev->canvas.x;
wd->downy = ev->canvas.y;
}
}
if (!strncmp(item, "file://", 7))
{
- char *fname = item + 7;
+ const char *fname = item + 7;
o = evas_object_image_filled_add(evas_object_evas_get(data));
evas_object_image_file_set(o, fname, NULL);
evas_object_smart_callback_call(item->wd->self, "clicked", item);
if (item->long_timer) ecore_timer_del(item->long_timer);
if (item->realized)
- item->long_timer = ecore_timer_add(1.0, _long_press, item);
+ item->long_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press, item);
else
item->long_timer = NULL;
}
wd->mode = ELM_LIST_SCROLL;
wd->max_items_per_block = MAX_ITEMS_PER_BLOCK;
wd->item_cache_max = wd->max_items_per_block * 2;
- wd->longpress_timeout = LONGPRESS_TIMEOUT;
+ wd->longpress_timeout = _elm_config->longpress_timeout;
evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
evas_object_smart_callback_add(obj, "scroll-hold-off", _hold_off, obj);
_item_hilight(it);
wd->longpressed = EINA_FALSE;
if (it->long_timer) ecore_timer_del(it->long_timer);
- it->long_timer = ecore_timer_add(1.0, _long_press, it);
+ it->long_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press, it);
if (it->swipe_timer) ecore_timer_del(it->swipe_timer);
it->swipe_timer = ecore_timer_add(0.4, _swipe_cancel, it);
/* Always call the callbacks last - the user may delete our context! */
evas_object_smart_callback_call(data, SIG_PRESS, NULL);
wd->longpressed = EINA_FALSE;
if (wd->long_timer) ecore_timer_del(wd->long_timer);
- wd->long_timer = ecore_timer_add(1.0, _long_press, data);
+ wd->long_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press, data);
}
static void
evas_object_smart_callback_call(data, "press", NULL);
wd->longpressed = EINA_FALSE;
if (wd->long_timer) ecore_timer_del(wd->long_timer);
- wd->long_timer = ecore_timer_add(1.0, _long_press, data);
+ wd->long_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press, data);
}
static void