forked from enlightenment/efl
genlist, gengrid: Add ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL
Summary: Some applications like file viewer allow multiple selection only with Control key was pressed. Reviewers: seoz, raster Reviewed By: raster Differential Revision: https://phab.enlightenment.org/D251 Conflicts: ChangeLog NEWS
This commit is contained in:
parent
6027ce9bad
commit
5836a25bc8
|
@ -1735,3 +1735,9 @@
|
|||
2013-10-30 Shilpa Onkar Singh
|
||||
|
||||
* slider: Added elm_slider_step_get(), elm_slider_step_set().
|
||||
|
||||
2013-10-02 Ryuan Choi (ryuan)
|
||||
|
||||
* genlist , gengrid: Add ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL.
|
||||
It disallow multiple selection when clicked without control pressed although
|
||||
multiple selection is enabled.
|
||||
|
|
|
@ -101,6 +101,7 @@ Additions:
|
|||
* Add support for "clicked" callback on Return/space/KP_Enter key press for image.
|
||||
* Add "virtualkeypad,size,changed" callback on virtualkeypad min size change for conformant.
|
||||
* Add elm_slider_step_get(), elm_slider_step_set() for slider.
|
||||
* Add ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL select mode for genlist/gengrid.
|
||||
|
||||
Improvements:
|
||||
|
||||
|
|
|
@ -126,6 +126,7 @@ typedef enum
|
|||
ELM_OBJECT_SELECT_MODE_ALWAYS, /**< always select mode */
|
||||
ELM_OBJECT_SELECT_MODE_NONE, /**< no select mode */
|
||||
ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY, /**< no select mode with no finger size rule*/
|
||||
ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL, /**< disallow mutiple selection when clicked without control key pressed */
|
||||
ELM_OBJECT_SELECT_MODE_MAX
|
||||
} Elm_Object_Select_Mode;
|
||||
|
||||
|
|
|
@ -596,7 +596,9 @@ _item_mouse_up_cb(void *data,
|
|||
_elm_gengrid_item_unrealize(it, EINA_FALSE);
|
||||
}
|
||||
if (elm_widget_item_disabled_get(it) || (dragged)) return;
|
||||
if (sd->multi)
|
||||
if (sd->multi &&
|
||||
((sd->select_mode != ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL) ||
|
||||
(evas_key_modifier_is_set(ev->modifiers, "Control"))))
|
||||
{
|
||||
if (!it->selected)
|
||||
{
|
||||
|
|
|
@ -799,8 +799,12 @@ EAPI Eina_Bool elm_gengrid_filled_get(const Evas_Object *obj
|
|||
* - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
|
||||
* entirely and they will neither appear selected nor call selected
|
||||
* callback functions.
|
||||
* - ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL : Only one item will be selected
|
||||
* although multi-selection is enabled, if clicked without pressing control
|
||||
* key. This mode is only available with multi-selection.
|
||||
*
|
||||
* @see elm_gengrid_select_mode_get()
|
||||
* @see elm_gengrid_multi_select_set()
|
||||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
|
|
|
@ -4220,7 +4220,9 @@ _item_mouse_up_cb(void *data,
|
|||
return;
|
||||
|
||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
||||
if (sd->multi)
|
||||
if (sd->multi &&
|
||||
((sd->select_mode != ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL) ||
|
||||
(evas_key_modifier_is_set(ev->modifiers, "Control"))))
|
||||
{
|
||||
if (!it->selected)
|
||||
{
|
||||
|
|
|
@ -575,8 +575,12 @@ EAPI Eina_Bool elm_genlist_tree_effect_enabled_get(const Evas_Object *o
|
|||
* - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
|
||||
* entirely and they will neither appear selected nor call selected
|
||||
* callback functions.
|
||||
* - ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL : Only one item will be selected
|
||||
* although multi-selection is enabled, if clicked without pressing control
|
||||
* key. This mode is only available with multi-selection.
|
||||
*
|
||||
* @see elm_genlist_select_mode_get()
|
||||
* @see elm_genlist_multi_select_set()
|
||||
*
|
||||
* @ingroup Genlist
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue