davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=f03f83fba92ada0720a77a5bba4598487f005477
commit f03f83fba92ada0720a77a5bba4598487f005477 Author: Dave Andreoli <d...@gurumeditation.it> Date: Thu Jan 21 22:31:07 2016 +0100 New 1.17 API: elm.Configuration.context_menu_disabled --- efl/elementary/configuration.pxi | 15 +++++++++++++++ efl/elementary/configuration_cdef.pxi | 2 ++ examples/elementary/test_entry.py | 10 ++++++++++ 3 files changed, 27 insertions(+) diff --git a/efl/elementary/configuration.pxi b/efl/elementary/configuration.pxi index 76bda93..aac0f56 100644 --- a/efl/elementary/configuration.pxi +++ b/efl/elementary/configuration.pxi @@ -1215,6 +1215,21 @@ cdef class Configuration(object): def __set__(self, mode): elm_config_slider_indicator_visible_mode_set(mode) + property context_menu_disabled: + """ + + Enable or disable context menu in entries. + + :type: bool + + .. versionadded:: 1.17 + + """ + def __get__(self): + return bool(elm_config_context_menu_disabled_get()) + def __set__(self, bint disabled): + elm_config_context_menu_disabled_set(disabled) + #For compatibility def config_finger_size_get(): return elm_config_finger_size_get() diff --git a/efl/elementary/configuration_cdef.pxi b/efl/elementary/configuration_cdef.pxi index 79bb7b5..40678b6 100644 --- a/efl/elementary/configuration_cdef.pxi +++ b/efl/elementary/configuration_cdef.pxi @@ -180,6 +180,8 @@ cdef extern from "Elementary.h": Eina_Bool elm_config_window_auto_focus_animate_get() void elm_config_window_auto_focus_animate_set(Eina_Bool enable) + Eina_Bool elm_config_context_menu_disabled_get() + void elm_config_context_menu_disabled_set(Eina_Bool disabled) Eina_Bool elm_config_mirrored_get() void elm_config_mirrored_set(Eina_Bool mirrored) diff --git a/examples/elementary/test_entry.py b/examples/elementary/test_entry.py index 637343d..b4c43bb 100644 --- a/examples/elementary/test_entry.py +++ b/examples/elementary/test_entry.py @@ -5,6 +5,7 @@ from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL, EXPAND_BOTH, FILL_BOTH, \ EXPAND_HORIZ, FILL_HORIZ from efl import elementary from efl.elementary.check import Check +from efl.elementary.configuration import Configuration from efl.elementary.window import StandardWindow from efl.elementary.background import Background from efl.elementary.box import Box @@ -45,6 +46,9 @@ def my_entry_bt_3(bt, en): def my_entry_bt_4(bt, en): en.entry_insert("Insert some <b>BOLD</> text") +def my_entry_bt_5(chk): + Configuration().context_menu_disabled = chk.state + def my_entry_anchor_test(obj, anchor, en, *args, **kwargs): en.entry_insert("ANCHOR CLICKED") @@ -95,6 +99,12 @@ def entry_clicked(obj, item=None): bx2.pack_end(bt) bt.show() + ck = Check(win, text="Context menu disabled")#, size_hint_weight=EXPAND_HORIZ, + # size_hint_align=FILL_BOTH) + ck.callback_changed_add(my_entry_bt_5) + bx2.pack_end(ck) + ck.show() + bx.pack_end(bx2) bx2.show() --