summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJee-Yong Um <jc9.um@samsung.com>2017-02-07 13:42:45 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-02-07 14:17:47 -0800
commitab68723b60e13ef4b248b24d9a362098eb1a5ccc (patch)
tree00100ba55c7a00ee96b657c89e1204e61e999204 /src/lib
parent6f9df2bb3d5579bd6de8b8493c3a6770de46464e (diff)
elm.entry: add configuration for the default value of select_allow
Summary: Small devices (like smart watch) can disallow entry selection by default. This patch enables to control this behavior with elementary configuration. Reviewers: cedric, jpeg Subscribers: id213sin, woohyun Differential Revision: https://phab.enlightenment.org/D4615 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/elm_config.c2
-rw-r--r--src/lib/elementary/elm_entry.c4
-rw-r--r--src/lib/elementary/elm_priv.h1
3 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index c6cb7b5374..a7f8547ec2 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -506,6 +506,7 @@ _desc_init(void)
506 ELM_CONFIG_VAL(D, T, popup_scrollable, T_UCHAR); 506 ELM_CONFIG_VAL(D, T, popup_scrollable, T_UCHAR);
507 ELM_CONFIG_VAL(D, T, spinner_min_max_filter_enable, T_UCHAR); 507 ELM_CONFIG_VAL(D, T, spinner_min_max_filter_enable, T_UCHAR);
508 ELM_CONFIG_VAL(D, T, icon_theme, T_STRING); 508 ELM_CONFIG_VAL(D, T, icon_theme, T_STRING);
509 ELM_CONFIG_VAL(D, T, entry_select_allow, T_UCHAR);
509#undef T 510#undef T
510#undef D 511#undef D
511#undef T_INT 512#undef T_INT
@@ -1843,6 +1844,7 @@ _config_load(void)
1843 _elm_config->popup_vertical_align = 0.5; 1844 _elm_config->popup_vertical_align = 0.5;
1844 _elm_config->icon_theme = eina_stringshare_add(ELM_CONFIG_ICON_THEME_ELEMENTARY); 1845 _elm_config->icon_theme = eina_stringshare_add(ELM_CONFIG_ICON_THEME_ELEMENTARY);
1845 _elm_config->popup_scrollable = EINA_FALSE; 1846 _elm_config->popup_scrollable = EINA_FALSE;
1847 _elm_config->entry_select_allow = EINA_TRUE;
1846} 1848}
1847 1849
1848static void 1850static void
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index dd71ffce5c..f90e9d73de 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -3664,7 +3664,7 @@ _elm_entry_efl_canvas_group_group_add(Eo *obj, Elm_Entry_Data *priv)
3664 priv->context_menu = EINA_TRUE; 3664 priv->context_menu = EINA_TRUE;
3665 priv->auto_save = EINA_TRUE; 3665 priv->auto_save = EINA_TRUE;
3666 priv->editable = EINA_TRUE; 3666 priv->editable = EINA_TRUE;
3667 priv->sel_allow = EINA_TRUE; 3667 priv->sel_allow = _elm_config->entry_select_allow;
3668 3668
3669 priv->drop_format = ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE; 3669 priv->drop_format = ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE;
3670 elm_drop_target_add(obj, priv->drop_format, 3670 elm_drop_target_add(obj, priv->drop_format,
@@ -3775,7 +3775,7 @@ _elm_entry_efl_canvas_group_group_add(Eo *obj, Elm_Entry_Data *priv)
3775 elm_object_sub_cursor_set 3775 elm_object_sub_cursor_set
3776 (wd->resize_obj, obj, ELM_CURSOR_XTERM); 3776 (wd->resize_obj, obj, ELM_CURSOR_XTERM);
3777 elm_widget_can_focus_set(obj, EINA_TRUE); 3777 elm_widget_can_focus_set(obj, EINA_TRUE);
3778 if (_elm_config->desktop_entry) 3778 if (priv->sel_allow && _elm_config->desktop_entry)
3779 edje_object_part_text_select_allow_set 3779 edje_object_part_text_select_allow_set
3780 (priv->entry_edje, "elm.text", EINA_TRUE); 3780 (priv->entry_edje, "elm.text", EINA_TRUE);
3781 3781
diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h
index 50fc9062df..ba351384d7 100644
--- a/src/lib/elementary/elm_priv.h
+++ b/src/lib/elementary/elm_priv.h
@@ -313,6 +313,7 @@ struct _Elm_Config
313 int gl_stencil; 313 int gl_stencil;
314 int gl_msaa; 314 int gl_msaa;
315 const char *icon_theme; 315 const char *icon_theme;
316 unsigned char entry_select_allow;
316 317
317 /* Not part of the EET file */ 318 /* Not part of the EET file */
318 Eina_Bool is_mirrored : 1; 319 Eina_Bool is_mirrored : 1;