summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-21 22:31:07 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-21 22:31:07 +0100
commitf03f83fba92ada0720a77a5bba4598487f005477 (patch)
treef22ea29d02e46de08d0c3cd5764f91d42b33a19a
parent926c325de8cbd2544d916c26a9fb57706cc48275 (diff)
New 1.17 API: elm.Configuration.context_menu_disabled
-rw-r--r--efl/elementary/configuration.pxi15
-rw-r--r--efl/elementary/configuration_cdef.pxi2
-rw-r--r--examples/elementary/test_entry.py10
3 files changed, 27 insertions, 0 deletions
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):
1215 def __set__(self, mode): 1215 def __set__(self, mode):
1216 elm_config_slider_indicator_visible_mode_set(mode) 1216 elm_config_slider_indicator_visible_mode_set(mode)
1217 1217
1218 property context_menu_disabled:
1219 """
1220
1221 Enable or disable context menu in entries.
1222
1223 :type: bool
1224
1225 .. versionadded:: 1.17
1226
1227 """
1228 def __get__(self):
1229 return bool(elm_config_context_menu_disabled_get())
1230 def __set__(self, bint disabled):
1231 elm_config_context_menu_disabled_set(disabled)
1232
1218#For compatibility 1233#For compatibility
1219def config_finger_size_get(): 1234def config_finger_size_get():
1220 return elm_config_finger_size_get() 1235 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":
180 Eina_Bool elm_config_window_auto_focus_animate_get() 180 Eina_Bool elm_config_window_auto_focus_animate_get()
181 void elm_config_window_auto_focus_animate_set(Eina_Bool enable) 181 void elm_config_window_auto_focus_animate_set(Eina_Bool enable)
182 182
183 Eina_Bool elm_config_context_menu_disabled_get()
184 void elm_config_context_menu_disabled_set(Eina_Bool disabled)
183 185
184 Eina_Bool elm_config_mirrored_get() 186 Eina_Bool elm_config_mirrored_get()
185 void elm_config_mirrored_set(Eina_Bool mirrored) 187 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, \
5 EXPAND_HORIZ, FILL_HORIZ 5 EXPAND_HORIZ, FILL_HORIZ
6from efl import elementary 6from efl import elementary
7from efl.elementary.check import Check 7from efl.elementary.check import Check
8from efl.elementary.configuration import Configuration
8from efl.elementary.window import StandardWindow 9from efl.elementary.window import StandardWindow
9from efl.elementary.background import Background 10from efl.elementary.background import Background
10from efl.elementary.box import Box 11from efl.elementary.box import Box
@@ -45,6 +46,9 @@ def my_entry_bt_3(bt, en):
45def my_entry_bt_4(bt, en): 46def my_entry_bt_4(bt, en):
46 en.entry_insert("Insert some <b>BOLD</> text") 47 en.entry_insert("Insert some <b>BOLD</> text")
47 48
49def my_entry_bt_5(chk):
50 Configuration().context_menu_disabled = chk.state
51
48def my_entry_anchor_test(obj, anchor, en, *args, **kwargs): 52def my_entry_anchor_test(obj, anchor, en, *args, **kwargs):
49 en.entry_insert("ANCHOR CLICKED") 53 en.entry_insert("ANCHOR CLICKED")
50 54
@@ -95,6 +99,12 @@ def entry_clicked(obj, item=None):
95 bx2.pack_end(bt) 99 bx2.pack_end(bt)
96 bt.show() 100 bt.show()
97 101
102 ck = Check(win, text="Context menu disabled")#, size_hint_weight=EXPAND_HORIZ,
103 # size_hint_align=FILL_BOTH)
104 ck.callback_changed_add(my_entry_bt_5)
105 bx2.pack_end(ck)
106 ck.show()
107
98 bx.pack_end(bx2) 108 bx.pack_end(bx2)
99 bx2.show() 109 bx2.show()
100 110