forked from enlightenment/efl
Edje entry: Enable allow_set for DEFAULT select mode.
We need to be able to disable selection even when the mode is default. A good use case is thumb scrolling on a desktop.
This commit is contained in:
parent
c061e76927
commit
211845c885
|
@ -2224,9 +2224,9 @@ _edje_part_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
|
|||
}
|
||||
}
|
||||
}
|
||||
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
|
||||
{
|
||||
if (en->select_allow)
|
||||
{
|
||||
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
|
||||
{
|
||||
if (en->had_sel)
|
||||
{
|
||||
|
@ -2239,9 +2239,11 @@ _edje_part_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
|
|||
_sel_extend(en->ed, en->cursor, rp->object, en);
|
||||
//evas_textblock_cursor_copy(en->cursor, en->sel_end);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_textblock_cursor_copy(en->cursor, en->sel_end);
|
||||
}
|
||||
}
|
||||
if (en->selecting)
|
||||
{
|
||||
if (en->have_selection)
|
||||
|
@ -2323,9 +2325,9 @@ _edje_part_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
|
|||
_curs_lin_end(en->cursor, rp->object, en);
|
||||
}
|
||||
}
|
||||
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
|
||||
{
|
||||
if (en->select_allow)
|
||||
{
|
||||
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
|
||||
{
|
||||
if (en->had_sel)
|
||||
{
|
||||
|
@ -2337,13 +2339,11 @@ _edje_part_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
|
|||
else
|
||||
_sel_extend(en->ed, en->cursor, rp->object, en);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_sel_extend(en->ed, en->cursor, rp->object, en);
|
||||
}
|
||||
if (en->select_allow)
|
||||
{
|
||||
|
||||
if (evas_textblock_cursor_compare(en->sel_start, en->sel_end) != 0)
|
||||
_sel_enable(en->ed, en->cursor, rp->object, en);
|
||||
if (en->have_selection)
|
||||
|
@ -3026,8 +3026,7 @@ _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow)
|
|||
(!rp->typedata.text)) return;
|
||||
en = rp->typedata.text->entry_data;
|
||||
if (!en) return;
|
||||
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT)
|
||||
return;
|
||||
|
||||
en->select_allow = allow;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue