From: WooHyun Jung <wh0705.jung@samsung.com>

Subject: [E-devel] [PATCH] Some modifications for adapting
elm_longpress_timeout_get().

 I made a patch for adapting elm_longpress_timeout_get() function to all
 winsets, using long press event. 
 
 And I checked one warning in elm_entry.c , so I modified it. 
 


SVN revision: 55339
This commit is contained in:
WooHyun Jung 2010-12-07 05:04:45 +00:00 committed by Carsten Haitzler
parent 394b4f1bff
commit 34a3ad17b9
7 changed files with 9 additions and 9 deletions

View File

@ -532,7 +532,7 @@ _left_button_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__
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
@ -570,7 +570,7 @@ _right_button_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_
_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

View File

@ -834,7 +834,7 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, 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;
}
@ -1517,7 +1517,7 @@ _get_item(void *data, Evas_Object *edje __UNUSED__, const char *part __UNUSED__,
}
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);

View File

@ -783,7 +783,7 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
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;
}

View File

@ -2227,7 +2227,7 @@ elm_genlist_add(Evas_Object *parent)
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);

View File

@ -842,7 +842,7 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void
_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! */

View File

@ -1038,7 +1038,7 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void
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

View File

@ -654,7 +654,7 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, 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